@warp-ds/elements 2.6.0 → 2.7.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/custom-elements.json +1552 -0
  2. package/dist/index.d.ts +561 -0
  3. package/dist/packages/affix/affix.js +11 -11
  4. package/dist/packages/affix/affix.js.map +3 -3
  5. package/dist/packages/alert/alert.js +7 -7
  6. package/dist/packages/alert/alert.js.map +3 -3
  7. package/dist/packages/attention/attention.js +22 -22
  8. package/dist/packages/attention/attention.js.map +3 -3
  9. package/dist/packages/breadcrumbs/breadcrumbs.js +9 -9
  10. package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
  11. package/dist/packages/button/button.js +11 -11
  12. package/dist/packages/button/button.js.map +3 -3
  13. package/dist/packages/card/card.js +8 -8
  14. package/dist/packages/card/card.js.map +3 -3
  15. package/dist/packages/checkbox/checkbox.a11y.test.d.ts +1 -0
  16. package/dist/packages/checkbox/checkbox.a11y.test.js +73 -0
  17. package/dist/packages/checkbox/checkbox.d.ts +49 -0
  18. package/dist/packages/checkbox/checkbox.js +2594 -0
  19. package/dist/packages/checkbox/checkbox.js.map +7 -0
  20. package/dist/packages/checkbox/checkbox.react.stories.d.ts +12 -0
  21. package/dist/packages/checkbox/checkbox.react.stories.js +10 -0
  22. package/dist/packages/checkbox/checkbox.stories.d.ts +25 -0
  23. package/dist/packages/checkbox/checkbox.stories.js +183 -0
  24. package/dist/packages/checkbox/checkbox.test.d.ts +1 -0
  25. package/dist/packages/checkbox/checkbox.test.js +142 -0
  26. package/dist/packages/checkbox/react.d.ts +5 -0
  27. package/dist/packages/checkbox/react.js +15 -0
  28. package/dist/packages/checkbox/styles.d.ts +1 -0
  29. package/dist/packages/checkbox/styles.js +134 -0
  30. package/dist/packages/checkbox-group/checkbox-group.a11y.test.d.ts +2 -0
  31. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +109 -0
  32. package/dist/packages/checkbox-group/checkbox-group.d.ts +33 -0
  33. package/dist/packages/checkbox-group/checkbox-group.js +71 -0
  34. package/dist/packages/checkbox-group/checkbox-group.js.map +7 -0
  35. package/dist/packages/checkbox-group/checkbox-group.test.d.ts +2 -0
  36. package/dist/packages/checkbox-group/checkbox-group.test.js +112 -0
  37. package/dist/packages/checkbox-group/locales/da/messages.d.mts +1 -0
  38. package/dist/packages/checkbox-group/locales/da/messages.mjs +1 -0
  39. package/dist/packages/checkbox-group/locales/en/messages.d.mts +1 -0
  40. package/dist/packages/checkbox-group/locales/en/messages.mjs +1 -0
  41. package/dist/packages/checkbox-group/locales/fi/messages.d.mts +1 -0
  42. package/dist/packages/checkbox-group/locales/fi/messages.mjs +1 -0
  43. package/dist/packages/checkbox-group/locales/nb/messages.d.mts +1 -0
  44. package/dist/packages/checkbox-group/locales/nb/messages.mjs +1 -0
  45. package/dist/packages/checkbox-group/locales/sv/messages.d.mts +1 -0
  46. package/dist/packages/checkbox-group/locales/sv/messages.mjs +1 -0
  47. package/dist/packages/checkbox-group/react.d.ts +2 -0
  48. package/dist/packages/checkbox-group/react.js +11 -0
  49. package/dist/packages/combobox/combobox.js +11 -11
  50. package/dist/packages/combobox/combobox.js.map +3 -3
  51. package/dist/packages/datepicker/datepicker.js +42 -42
  52. package/dist/packages/datepicker/datepicker.js.map +3 -3
  53. package/dist/packages/expandable/expandable.js +11 -11
  54. package/dist/packages/expandable/expandable.js.map +3 -3
  55. package/dist/packages/i18n.d.ts +2 -0
  56. package/dist/packages/i18n.js +87 -2
  57. package/dist/packages/modal-header/modal-header.js +15 -15
  58. package/dist/packages/modal-header/modal-header.js.map +3 -3
  59. package/dist/packages/page-indicator/page-indicator.js +7 -7
  60. package/dist/packages/page-indicator/page-indicator.js.map +3 -3
  61. package/dist/packages/pagination/pagination.js +24 -24
  62. package/dist/packages/pagination/pagination.js.map +3 -3
  63. package/dist/packages/pill/pill.js +10 -10
  64. package/dist/packages/pill/pill.js.map +3 -3
  65. package/dist/packages/select/select.js +20 -20
  66. package/dist/packages/select/select.js.map +3 -3
  67. package/dist/packages/slider/Slider.d.ts +2 -0
  68. package/dist/packages/slider/Slider.js +8 -0
  69. package/dist/packages/slider/index.d.ts +2 -0
  70. package/dist/packages/slider/index.js +2 -0
  71. package/dist/packages/slider/locales/da/messages.d.mts +1 -0
  72. package/dist/packages/slider/locales/da/messages.mjs +1 -0
  73. package/dist/packages/slider/locales/en/messages.d.mts +1 -0
  74. package/dist/packages/slider/locales/en/messages.mjs +1 -0
  75. package/dist/packages/slider/locales/fi/messages.d.mts +1 -0
  76. package/dist/packages/slider/locales/fi/messages.mjs +1 -0
  77. package/dist/packages/slider/locales/nb/messages.d.mts +1 -0
  78. package/dist/packages/slider/locales/nb/messages.mjs +1 -0
  79. package/dist/packages/slider/locales/sv/messages.d.mts +1 -0
  80. package/dist/packages/slider/locales/sv/messages.mjs +1 -0
  81. package/dist/packages/slider/react.d.ts +3 -0
  82. package/dist/packages/slider/react.js +13 -0
  83. package/dist/packages/slider/slider.d.ts +64 -0
  84. package/dist/packages/slider/slider.js +2641 -0
  85. package/dist/packages/slider/slider.js.map +7 -0
  86. package/dist/packages/slider/slider.react.stories.d.ts +19 -0
  87. package/dist/packages/slider/slider.react.stories.js +161 -0
  88. package/dist/packages/slider/slider.stories.d.ts +26 -0
  89. package/dist/packages/slider/slider.stories.js +464 -0
  90. package/dist/packages/slider/slider.test.d.ts +5 -0
  91. package/dist/packages/slider/slider.test.js +380 -0
  92. package/dist/packages/slider/styles/w-slider.styles.d.ts +1 -0
  93. package/dist/packages/slider/styles/w-slider.styles.js +154 -0
  94. package/dist/packages/slider/styles.d.ts +1 -0
  95. package/dist/packages/slider/styles.js +2 -0
  96. package/dist/packages/slider-thumb/SliderThumb.d.ts +2 -0
  97. package/dist/packages/slider-thumb/SliderThumb.js +8 -0
  98. package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.d.ts +2 -0
  99. package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.js +3 -0
  100. package/dist/packages/slider-thumb/react.d.ts +6 -0
  101. package/dist/packages/slider-thumb/react.js +15 -0
  102. package/dist/packages/slider-thumb/slider-thumb.d.ts +72 -0
  103. package/dist/packages/slider-thumb/slider-thumb.js +2774 -0
  104. package/dist/packages/slider-thumb/slider-thumb.js.map +7 -0
  105. package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.d.ts +1 -0
  106. package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.js +194 -0
  107. package/dist/packages/step/step.js +13 -13
  108. package/dist/packages/step/step.js.map +3 -3
  109. package/dist/packages/step-indicator/step-indicator.a11y.test.js +6 -2
  110. package/dist/packages/textarea/textarea.a11y.test.js +1 -1
  111. package/dist/packages/textarea/textarea.test.js +2 -1
  112. package/dist/packages/textfield/styles/w-textfield.styles.js +6 -0
  113. package/dist/packages/textfield/textfield.js +7 -1
  114. package/dist/packages/textfield/textfield.js.map +2 -2
  115. package/dist/packages/toast/toast.js +13 -13
  116. package/dist/packages/toast/toast.js.map +3 -3
  117. package/dist/setup-tests.js +1 -1
  118. package/dist/web-types.json +328 -1
  119. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- var ne=Object.create;var L=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var ce=Object.getPrototypeOf,le=Object.prototype.hasOwnProperty;var k=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ue=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ie(e))!le.call(r,a)&&a!==t&&L(r,a,{get:()=>e[a],enumerable:!(s=U(e,a))||s.enumerable});return r};var de=(r,e,t)=>(t=r!=null?ne(ce(r)):{},ue(e||!r||!r.__esModule?L(t,"default",{value:r,enumerable:!0}):t,r));var S=(r,e,t,s)=>{for(var a=s>1?void 0:s?U(e,t):e,c=r.length-1,n;c>=0;c--)(n=r[c])&&(a=(s?n(e,t,a):n(a))||a);return s&&a&&L(e,t,a),a};var $=k(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.errorMessages=h.ErrorType=void 0;var y;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(y=h.ErrorType||(h.ErrorType={}));h.errorMessages=new Map([[y.MalformedUnicode,"malformed Unicode character escape sequence"],[y.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[y.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[y.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[y.EndOfString,"malformed escape sequence at end of string"]])});var R=k(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.unraw=d.errorMessages=d.ErrorType=void 0;var l=$();Object.defineProperty(d,"ErrorType",{enumerable:!0,get:function(){return l.ErrorType}});Object.defineProperty(d,"errorMessages",{enumerable:!0,get:function(){return l.errorMessages}});function fe(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function C(r,e,t){let s=fe(r);if(Number.isNaN(s)||t!==void 0&&t!==r.length)throw new SyntaxError(l.errorMessages.get(e));return s}function ge(r){let e=C(r,l.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function j(r,e){let t=C(r,l.ErrorType.MalformedUnicode,4);if(e!==void 0){let s=C(e,l.ErrorType.MalformedUnicode,4);return String.fromCharCode(t,s)}return String.fromCharCode(t)}function pe(r){return r.charAt(0)==="{"&&r.charAt(r.length-1)==="}"}function me(r){if(!pe(r))throw new SyntaxError(l.errorMessages.get(l.ErrorType.MalformedUnicode));let e=r.slice(1,-1),t=C(e,l.ErrorType.MalformedUnicode);try{return String.fromCodePoint(t)}catch(s){throw s instanceof RangeError?new SyntaxError(l.errorMessages.get(l.ErrorType.CodePointLimit)):s}}function he(r,e=!1){if(e)throw new SyntaxError(l.errorMessages.get(l.ErrorType.OctalDeprecation));let t=parseInt(r,8);return String.fromCharCode(t)}var _e=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ye(r){return _e.get(r)||r}var be=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function H(r,e=!1){return r.replace(be,function(t,s,a,c,n,o,i,u,p){if(s!==void 0)return"\\";if(a!==void 0)return ge(a);if(c!==void 0)return me(c);if(n!==void 0)return j(n,o);if(i!==void 0)return j(i);if(u==="0")return"\0";if(u!==void 0)return he(u,!e);if(p!==void 0)return ye(p);throw new SyntaxError(l.errorMessages.get(l.ErrorType.EndOfString))})}d.unraw=H;d.default=H});var G=de(R(),1);var g=r=>typeof r=="string",Me=r=>typeof r=="function",J=new Map,z="en";function T(r){return[...Array.isArray(r)?r:[r],z]}function F(r,e,t){let s=T(r);t||(t="default");let a;if(typeof t=="string")switch(a={day:"numeric",month:"short",year:"numeric"},t){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=t;return v(()=>E("date",s,t),()=>new Intl.DateTimeFormat(s,a)).format(g(e)?new Date(e):e)}function we(r,e,t){let s;if(t||(t="default"),typeof t=="string")switch(s={second:"numeric",minute:"numeric",hour:"numeric"},t){case"full":case"long":s.timeZoneName="short";break;case"short":delete s.second}else s=t;return F(r,e,s)}function P(r,e,t){let s=T(r);return v(()=>E("number",s,t),()=>new Intl.NumberFormat(s,t)).format(e)}function q(r,e,t,{offset:s=0,...a}){var o,i;let c=T(r),n=e?v(()=>E("plural-ordinal",c),()=>new Intl.PluralRules(c,{type:"ordinal"})):v(()=>E("plural-cardinal",c),()=>new Intl.PluralRules(c,{type:"cardinal"}));return(i=(o=a[t])!=null?o:a[n.select(t-s)])!=null?i:a.other}function v(r,e){let t=r(),s=J.get(t);return s||(s=e(),J.set(t,s)),s}function E(r,e,t){let s=e.join("-");return`${r}-${s}-${JSON.stringify(t)}`}var B=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,K="%__lingui_octothorpe__%",Ce=(r,e,t={})=>{let s=e||r,a=n=>typeof n=="object"?n:t[n],c=(n,o)=>{let i=Object.keys(t).length?a("number"):void 0,u=P(s,n,i);return o.replace(new RegExp(K,"g"),u)};return{plural:(n,o)=>{let{offset:i=0}=o,u=q(s,!1,n,o);return c(n-i,u)},selectordinal:(n,o)=>{let{offset:i=0}=o,u=q(s,!0,n,o);return c(n-i,u)},select:ve,number:(n,o)=>P(s,n,a(o)||{style:o}),date:(n,o)=>F(s,n,a(o)||o),time:(n,o)=>we(s,n,a(o)||o)}},ve=(r,e)=>{var t;return(t=e[r])!=null?t:e.other};function Ee(r,e,t){return(s={},a)=>{let c=Ce(e,t,a),n=(i,u=!1)=>Array.isArray(i)?i.reduce((p,M)=>{if(M==="#"&&u)return p+K;if(g(M))return p+M;let[A,m,I]=M,x={};m==="plural"||m==="selectordinal"||m==="select"?Object.entries(I).forEach(([O,oe])=>{x[O]=n(oe,m==="plural"||m==="selectordinal")}):x=I;let w;if(m){let O=c[m];w=O(s[A],x)}else w=s[A];return w==null?p:p+w},""):i,o=n(r);return g(o)&&B.test(o)?(0,G.unraw)(o):g(o)?o:o?String(o):""}}var xe=Object.defineProperty,Oe=(r,e,t)=>e in r?xe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Le=(r,e,t)=>(Oe(r,typeof e!="symbol"?e+"":e,t),t),N=class{constructor(){Le(this,"_events",{})}on(e,t){var a;var s;return(a=(s=this._events)[e])!=null||(s[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){let s=this._getListeners(e);if(!s)return;let a=s.indexOf(t);~a&&s.splice(a,1)}emit(e,...t){let s=this._getListeners(e);s&&s.map(a=>a.apply(this,t))}_getListeners(e){let t=this._events[e];return Array.isArray(t)?t:!1}},Se=Object.defineProperty,Pe=(r,e,t)=>e in r?Se(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,_=(r,e,t)=>(Pe(r,typeof e!="symbol"?e+"":e,t),t),D=class extends N{constructor(e){var t;super(),_(this,"_locale",""),_(this,"_locales"),_(this,"_localeData",{}),_(this,"_messages",{}),_(this,"_missing"),_(this,"_messageCompiler"),_(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((t=e.locale)!=null?t:z,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,t){let s=this._localeData[e];s?Object.assign(s,t):this._localeData[e]=t}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,t){typeof e=="string"?this._loadLocaleData(e,t):Object.keys(e).forEach(s=>this._loadLocaleData(s,e[s])),this.emit("change")}_load(e,t){let s=this._messages[e];s?Object.assign(s,t):this._messages[e]=t}load(e,t){typeof e=="string"&&typeof t=="object"?this._load(e,t):Object.entries(e).forEach(([s,a])=>this._load(s,a)),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:s}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=s,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t,s){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=s==null?void 0:s.message;e||(e=""),g(e)||(t=e.values||t,a=e.message,e=e.id);let c=this.messages[e],n=c===void 0,o=this._missing;if(o&&n)return Me(o)?o(this._locale,e):o;n&&this.emit("missing",{id:e,locale:this._locale});let i=c||a||e;return g(i)&&(this._messageCompiler?i=this._messageCompiler(i):console.warn(`Uncompiled message detected! Message:
1
+ var de=Object.create;var S=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var me=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty;var $=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var pe=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of fe(e))!ge.call(r,s)&&s!==t&&S(r,s,{get:()=>e[s],enumerable:!(n=U(e,s))||n.enumerable});return r};var he=(r,e,t)=>(t=r!=null?de(me(r)):{},pe(e||!r||!r.__esModule?S(t,"default",{value:r,enumerable:!0}):t,r));var P=(r,e,t,n)=>{for(var s=n>1?void 0:n?U(e,t):e,c=r.length-1,o;c>=0;c--)(o=r[c])&&(s=(n?o(e,t,s):o(s))||s);return n&&s&&S(e,t,s),s};var j=$(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.errorMessages=h.ErrorType=void 0;var b;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(b=h.ErrorType||(h.ErrorType={}));h.errorMessages=new Map([[b.MalformedUnicode,"malformed Unicode character escape sequence"],[b.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[b.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[b.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[b.EndOfString,"malformed escape sequence at end of string"]])});var q=$(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.unraw=f.errorMessages=f.ErrorType=void 0;var l=j();Object.defineProperty(f,"ErrorType",{enumerable:!0,get:function(){return l.ErrorType}});Object.defineProperty(f,"errorMessages",{enumerable:!0,get:function(){return l.errorMessages}});function _e(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function E(r,e,t){let n=_e(r);if(Number.isNaN(n)||t!==void 0&&t!==r.length)throw new SyntaxError(l.errorMessages.get(e));return n}function be(r){let e=E(r,l.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function R(r,e){let t=E(r,l.ErrorType.MalformedUnicode,4);if(e!==void 0){let n=E(e,l.ErrorType.MalformedUnicode,4);return String.fromCharCode(t,n)}return String.fromCharCode(t)}function ye(r){return r.charAt(0)==="{"&&r.charAt(r.length-1)==="}"}function we(r){if(!ye(r))throw new SyntaxError(l.errorMessages.get(l.ErrorType.MalformedUnicode));let e=r.slice(1,-1),t=E(e,l.ErrorType.MalformedUnicode);try{return String.fromCodePoint(t)}catch(n){throw n instanceof RangeError?new SyntaxError(l.errorMessages.get(l.ErrorType.CodePointLimit)):n}}function Me(r,e=!1){if(e)throw new SyntaxError(l.errorMessages.get(l.ErrorType.OctalDeprecation));let t=parseInt(r,8);return String.fromCharCode(t)}var Ee=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ve(r){return Ee.get(r)||r}var Ce=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function J(r,e=!1){return r.replace(Ce,function(t,n,s,c,o,a,i,u,g){if(n!==void 0)return"\\";if(s!==void 0)return be(s);if(c!==void 0)return we(c);if(o!==void 0)return R(o,a);if(i!==void 0)return R(i);if(u==="0")return"\0";if(u!==void 0)return Me(u,!e);if(g!==void 0)return ve(g);throw new SyntaxError(l.errorMessages.get(l.ErrorType.EndOfString))})}f.unraw=J;f.default=J});var V=he(q(),1);var m=r=>typeof r=="string",Le=r=>typeof r=="function",G=new Map,B="en";function F(r){return[...Array.isArray(r)?r:[r],B]}function A(r,e,t){let n=F(r);t||(t="default");let s;if(typeof t=="string")switch(s={day:"numeric",month:"short",year:"numeric"},t){case"full":s.weekday="long";case"long":s.month="long";break;case"short":s.month="numeric";break}else s=t;return v(()=>C("date",n,t),()=>new Intl.DateTimeFormat(n,s)).format(m(e)?new Date(e):e)}function xe(r,e,t){let n;if(t||(t="default"),typeof t=="string")switch(n={second:"numeric",minute:"numeric",hour:"numeric"},t){case"full":case"long":n.timeZoneName="short";break;case"short":delete n.second}else n=t;return A(r,e,n)}function N(r,e,t){let n=F(r);return v(()=>C("number",n,t),()=>new Intl.NumberFormat(n,t)).format(e)}function z(r,e,t,{offset:n=0,...s}){var a,i;let c=F(r),o=e?v(()=>C("plural-ordinal",c),()=>new Intl.PluralRules(c,{type:"ordinal"})):v(()=>C("plural-cardinal",c),()=>new Intl.PluralRules(c,{type:"cardinal"}));return(i=(a=s[t])!=null?a:s[o.select(t-n)])!=null?i:s.other}function v(r,e){let t=r(),n=G.get(t);return n||(n=e(),G.set(t,n)),n}function C(r,e,t){let n=e.join("-");return`${r}-${n}-${JSON.stringify(t)}`}var K=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,X="%__lingui_octothorpe__%",Oe=(r,e,t={})=>{let n=e||r,s=o=>typeof o=="object"?o:t[o],c=(o,a)=>{let i=Object.keys(t).length?s("number"):void 0,u=N(n,o,i);return a.replace(new RegExp(X,"g"),u)};return{plural:(o,a)=>{let{offset:i=0}=a,u=z(n,!1,o,a);return c(o-i,u)},selectordinal:(o,a)=>{let{offset:i=0}=a,u=z(n,!0,o,a);return c(o-i,u)},select:Se,number:(o,a)=>N(n,o,s(a)||{style:a}),date:(o,a)=>A(n,o,s(a)||a),time:(o,a)=>xe(n,o,s(a)||a)}},Se=(r,e)=>{var t;return(t=e[r])!=null?t:e.other};function Pe(r,e,t){return(n={},s)=>{let c=Oe(e,t,s),o=(i,u=!1)=>Array.isArray(i)?i.reduce((g,w)=>{if(w==="#"&&u)return g+X;if(m(w))return g+w;let[k,p,H]=w,x={};p==="plural"||p==="selectordinal"||p==="select"?Object.entries(H).forEach(([O,ue])=>{x[O]=o(ue,p==="plural"||p==="selectordinal")}):x=H;let M;if(p){let O=c[p];M=O(n[k],x)}else M=n[k];return M==null?g:g+M},""):i,a=o(r);return m(a)&&K.test(a)?(0,V.unraw)(a):m(a)?a:a?String(a):""}}var Ne=Object.defineProperty,De=(r,e,t)=>e in r?Ne(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Te=(r,e,t)=>(De(r,typeof e!="symbol"?e+"":e,t),t),D=class{constructor(){Te(this,"_events",{})}on(e,t){var s;var n;return(s=(n=this._events)[e])!=null||(n[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){let n=this._getListeners(e);if(!n)return;let s=n.indexOf(t);~s&&n.splice(s,1)}emit(e,...t){let n=this._getListeners(e);n&&n.map(s=>s.apply(this,t))}_getListeners(e){let t=this._events[e];return Array.isArray(t)?t:!1}},Fe=Object.defineProperty,Ae=(r,e,t)=>e in r?Fe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,_=(r,e,t)=>(Ae(r,typeof e!="symbol"?e+"":e,t),t),T=class extends D{constructor(e){var t;super(),_(this,"_locale",""),_(this,"_locales"),_(this,"_localeData",{}),_(this,"_messages",{}),_(this,"_missing"),_(this,"_messageCompiler"),_(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((t=e.locale)!=null?t:B,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,t){let n=this._localeData[e];n?Object.assign(n,t):this._localeData[e]=t}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,t){typeof e=="string"?this._loadLocaleData(e,t):Object.keys(e).forEach(n=>this._loadLocaleData(n,e[n])),this.emit("change")}_load(e,t){let n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}load(e,t){typeof e=="string"&&typeof t=="object"?this._load(e,t):Object.entries(e).forEach(([n,s])=>this._load(n,s)),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t,n){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let s=n==null?void 0:n.message;e||(e=""),m(e)||(t=e.values||t,s=e.message,e=e.id);let c=this.messages[e],o=c===void 0,a=this._missing;if(a&&o)return Le(a)?a(this._locale,e):a;o&&this.emit("missing",{id:e,locale:this._locale});let i=c||s||e;return m(i)&&(this._messageCompiler?i=this._messageCompiler(i):console.warn(`Uncompiled message detected! Message:
3
3
 
4
4
  > ${i}
5
5
 
@@ -7,7 +7,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
7
7
  ICU features such as interpolation and plurals will not work properly for that message.
8
8
 
9
9
  Please compile your catalog first.
10
- `)),g(i)&&B.test(i)?JSON.parse(`"${i}"`):g(i)?i:Ee(i,this._locale,this._locales)(t,s==null?void 0:s.formats)}date(e,t){return F(this._locales||this._locale,e,t)}number(e,t){return P(this._locales||this._locale,e,t)}};function Ne(r={}){return new D(r)}var f=Ne();import{html as se,LitElement as Ae}from"lit";import{property as ae}from"lit/decorators.js";import{classMap as Ie}from"lit/directives/class-map.js";import{map as Ue}from"lit/directives/map.js";import{range as ke}from"lit/directives/range.js";var De=["en","nb","fi","da","sv"],X="en",V=r=>De.find(e=>r===e||r.toLowerCase().includes(e))||X;function Te(){if(typeof window=="undefined"){let r=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return V(r)}try{let r=document.documentElement.lang;return V(r)}catch(r){return console.warn("could not detect locale, falling back to source locale",r),X}}var Z=(r,e,t,s,a)=>{f.load("en",r),f.load("nb",e),f.load("fi",t),f.load("da",s),f.load("sv",a);let c=Te();f.activate(c)};var Q=JSON.parse('{"page-indicator.aria.label":["Prik ",["selectedPage"]," er fremh\xE6vet i en r\xE6kke med ",["pageCount"]," prikker"]}');var Y=JSON.parse('{"page-indicator.aria.label":["Dot ",["selectedPage"]," is highlighted in a row of ",["pageCount"]," dots"]}');var W=JSON.parse('{"page-indicator.aria.label":["Piste ",["selectedPage"]," on korostettuna ",["pageCount"]," pisteen riviss\xE4"]}');var ee=JSON.parse('{"page-indicator.aria.label":["Prikk ",["selectedPage"]," er uthevet i en rad med ",["pageCount"]," prikker"]}');var te=JSON.parse('{"page-indicator.aria.label":["Prick ",["selectedPage"]," \xE4r markerad i en rad med ",["pageCount"]," prickar"]}');import{css as Fe}from"lit";var re=Fe`
10
+ `)),m(i)&&K.test(i)?JSON.parse(`"${i}"`):m(i)?i:Pe(i,this._locale,this._locales)(t,n==null?void 0:n.formats)}date(e,t){return A(this._locales||this._locale,e,t)}number(e,t){return N(this._locales||this._locale,e,t)}};function Ie(r={}){return new T(r)}var d=Ie();import{html as ce,LitElement as Je}from"lit";import{property as le}from"lit/decorators.js";import{classMap as qe}from"lit/directives/class-map.js";import{map as Ge}from"lit/directives/map.js";import{range as ze}from"lit/directives/range.js";var ke=["en","nb","fi","da","sv"],I="en",L=r=>ke.find(e=>r===e||r.toLowerCase().includes(e))||I;function Y(){if(typeof window=="undefined"){let r=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return L(r)}try{let r=Q(document);if(r)return L(r);let e=je();if(e)return L(e);let t=Q(te());return t?L(t):I}catch(r){return console.warn("could not detect locale, falling back to source locale",r),I}}var W=(r,e,t,n,s)=>{d.load("en",r),d.load("nb",e),d.load("fi",t),d.load("da",n),d.load("sv",s);let c=Y();d.activate(c),ee(),Ue()},He="warp-i18n-change";function ee(){typeof window!="undefined"&&window.dispatchEvent(new Event(He))}var Z=!1;function Ue(){if(Z||typeof window=="undefined"||!(document!=null&&document.documentElement))return;Z=!0;let r=()=>{let s=Y();d.locale!==s&&(d.activate(s),ee())},e=new MutationObserver(s=>{for(let c of s)if(c.type==="attributes"&&c.attributeName==="lang"){r();break}});e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=te();t&&t.documentElement&&t!==document&&e.observe(t.documentElement,{attributes:!0,attributeFilter:["lang"]});let n=$e();n&&e.observe(n,{attributes:!0,attributeFilter:["lang"]})}function te(){var r,e;try{return(e=(r=window.parent)==null?void 0:r.document)!=null?e:null}catch(t){return null}}function Q(r){var e,t;try{return(t=(e=r==null?void 0:r.documentElement)==null?void 0:e.lang)!=null?t:""}catch(n){return""}}function $e(){var r;try{return(r=window.frameElement)!=null?r:null}catch(e){return null}}function je(){var r,e,t;try{return(t=(e=(r=window.frameElement)==null?void 0:r.getAttribute)==null?void 0:e.call(r,"lang"))!=null?t:""}catch(n){return""}}var re=JSON.parse('{"page-indicator.aria.label":["Prik ",["selectedPage"]," er fremh\xE6vet i en r\xE6kke med ",["pageCount"]," prikker"]}');var ne=JSON.parse('{"page-indicator.aria.label":["Dot ",["selectedPage"]," is highlighted in a row of ",["pageCount"]," dots"]}');var se=JSON.parse('{"page-indicator.aria.label":["Piste ",["selectedPage"]," on korostettuna ",["pageCount"]," pisteen riviss\xE4"]}');var ae=JSON.parse('{"page-indicator.aria.label":["Prikk ",["selectedPage"]," er uthevet i en rad med ",["pageCount"]," prikker"]}');var oe=JSON.parse('{"page-indicator.aria.label":["Prick ",["selectedPage"]," \xE4r markerad i en rad med ",["pageCount"]," prickar"]}');import{css as Re}from"lit";var ie=Re`
11
11
  .w-page-indicator {
12
12
  display: grid;
13
13
  justify-content: center;
@@ -31,11 +31,11 @@ Please compile your catalog first.
31
31
  .w-page-indicator--selecteddot {
32
32
  background-color: var(--w-s-color-icon-selected);
33
33
  }
34
- `;Z(Y,ee,W,Q,te);var b=class extends Ae{constructor(){super(...arguments);this.selectedPage=1;this.pageCount=1}get _validPageCount(){return Math.max(1,Math.floor(this.pageCount))}get _validSelectedPage(){let t=Math.floor(this.selectedPage);return Math.max(1,Math.min(t,this._validPageCount))}render(){let t=this._validPageCount,s=this._validSelectedPage,a=f._({id:"page-indicator.aria.label",comment:"Default screenreader message for page indicator group",message:"Dot {selectedPage} is highlighted in a row of {pageCount} dots",values:{selectedPage:s,pageCount:t}});return se`
35
- <div class="w-page-indicator" role="img" aria-label="${a}">
34
+ `;W(ne,ae,se,re,oe);var y=class extends Je{constructor(){super(...arguments);this.selectedPage=1;this.pageCount=1}get _validPageCount(){return Math.max(1,Math.floor(this.pageCount))}get _validSelectedPage(){let t=Math.floor(this.selectedPage);return Math.max(1,Math.min(t,this._validPageCount))}render(){let t=this._validPageCount,n=this._validSelectedPage,s=d._({id:"page-indicator.aria.label",comment:"Default screenreader message for page indicator group",message:"Dot {selectedPage} is highlighted in a row of {pageCount} dots",values:{selectedPage:n,pageCount:t}});return ce`
35
+ <div class="w-page-indicator" role="img" aria-label="${s}">
36
36
  <div class="w-page-indicator--container">
37
- ${Ue(ke(t),c=>{let i={"w-page-indicator--dot":!0,"w-page-indicator--selecteddot":c+1===s};return se`<div class="${Ie(i)}"></div>`})}
37
+ ${Ge(ze(t),c=>{let i={"w-page-indicator--dot":!0,"w-page-indicator--selecteddot":c+1===n};return ce`<div class="${qe(i)}"></div>`})}
38
38
  </div>
39
39
  </div>
40
- `}};b.styles=[re],S([ae({type:Number,attribute:"selected-page",reflect:!0})],b.prototype,"selectedPage",2),S([ae({type:Number,attribute:"page-count",reflect:!0})],b.prototype,"pageCount",2);customElements.get("w-page-indicator")||customElements.define("w-page-indicator",b);export{b as WarpPageIndicator};
40
+ `}};y.styles=[ie],P([le({type:Number,attribute:"selected-page",reflect:!0})],y.prototype,"selectedPage",2),P([le({type:Number,attribute:"page-count",reflect:!0})],y.prototype,"pageCount",2);customElements.get("w-page-indicator")||customElements.define("w-page-indicator",y);export{y as WarpPageIndicator};
41
41
  //# sourceMappingURL=page-indicator.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../node_modules/.pnpm/unraw@3.0.0/node_modules/unraw/dist/errors.js", "../../../node_modules/.pnpm/unraw@3.0.0/node_modules/unraw/dist/index.js", "../../../node_modules/.pnpm/@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-macros@3.1.0_ty_33a2537ce57a59324989ce8020998d0e/node_modules/@lingui/core/dist/index.mjs", "../../../packages/page-indicator/page-indicator.ts", "../../../packages/i18n.ts", "../../../packages/page-indicator/locales/da/messages.mjs", "../../../packages/page-indicator/locales/en/messages.mjs", "../../../packages/page-indicator/locales/fi/messages.mjs", "../../../packages/page-indicator/locales/nb/messages.mjs", "../../../packages/page-indicator/locales/sv/messages.mjs", "../../../packages/page-indicator/style.ts"],
4
- "sourcesContent": ["\"use strict\";\n// NOTE: don't construct errors here or they'll have the wrong stack trace.\n// NOTE: don't make custom error class; the JS engines use `SyntaxError`\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorMessages = exports.ErrorType = void 0;\n/**\n * Keys for possible error messages used by `unraw`.\n * Note: These do _not_ map to actual error object types. All errors thrown\n * are `SyntaxError`.\n */\n// Don't use const enum or JS users won't be able to access the enum values\nvar ErrorType;\n(function (ErrorType) {\n /**\n * Thrown when a badly formed Unicode escape sequence is found. Possible\n * reasons include the code being too short (`\"\\u25\"`) or having invalid\n * characters (`\"\\u2$A5\"`).\n */\n ErrorType[\"MalformedUnicode\"] = \"MALFORMED_UNICODE\";\n /**\n * Thrown when a badly formed hexadecimal escape sequence is found. Possible\n * reasons include the code being too short (`\"\\x2\"`) or having invalid\n * characters (`\"\\x2$\"`).\n */\n ErrorType[\"MalformedHexadecimal\"] = \"MALFORMED_HEXADECIMAL\";\n /**\n * Thrown when a Unicode code point escape sequence has too high of a code\n * point. The maximum code point allowed is `\\u{10FFFF}`, so `\\u{110000}` and\n * higher will throw this error.\n */\n ErrorType[\"CodePointLimit\"] = \"CODE_POINT_LIMIT\";\n /**\n * Thrown when an octal escape sequences is encountered and `allowOctals` is\n * `false`. For example, `unraw(\"\\234\", false)`.\n */\n ErrorType[\"OctalDeprecation\"] = \"OCTAL_DEPRECATION\";\n /**\n * Thrown only when a single backslash is found at the end of a string. For\n * example, `\"\\\\\"` or `\"test\\\\x24\\\\\"`.\n */\n ErrorType[\"EndOfString\"] = \"END_OF_STRING\";\n})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));\n/** Map of error message names to the full text of the message. */\nexports.errorMessages = new Map([\n [ErrorType.MalformedUnicode, \"malformed Unicode character escape sequence\"],\n [\n ErrorType.MalformedHexadecimal,\n \"malformed hexadecimal character escape sequence\"\n ],\n [\n ErrorType.CodePointLimit,\n \"Unicode codepoint must not be greater than 0x10FFFF in escape sequence\"\n ],\n [\n ErrorType.OctalDeprecation,\n '\"0\"-prefixed octal literals and octal escape sequences are deprecated; ' +\n 'for octal literals use the \"0o\" prefix instead'\n ],\n [ErrorType.EndOfString, \"malformed escape sequence at end of string\"]\n]);\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unraw = exports.errorMessages = exports.ErrorType = void 0;\nconst errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"ErrorType\", { enumerable: true, get: function () { return errors_1.ErrorType; } });\nObject.defineProperty(exports, \"errorMessages\", { enumerable: true, get: function () { return errors_1.errorMessages; } });\n/**\n * Parse a string as a base-16 number. This is more strict than `parseInt` as it\n * will not allow any other characters, including (for example) \"+\", \"-\", and\n * \".\".\n * @param hex A string containing a hexadecimal number.\n * @returns The parsed integer, or `NaN` if the string is not a valid hex\n * number.\n */\nfunction parseHexToInt(hex) {\n const isOnlyHexChars = !hex.match(/[^a-f0-9]/i);\n return isOnlyHexChars ? parseInt(hex, 16) : NaN;\n}\n/**\n * Check the validity and length of a hexadecimal code and optionally enforces\n * a specific number of hex digits.\n * @param hex The string to validate and parse.\n * @param errorName The name of the error message to throw a `SyntaxError` with\n * if `hex` is invalid. This is used to index `errorMessages`.\n * @param enforcedLength If provided, will throw an error if `hex` is not\n * exactly this many characters.\n * @returns The parsed hex number as a normal number.\n * @throws {SyntaxError} If the code is not valid.\n */\nfunction validateAndParseHex(hex, errorName, enforcedLength) {\n const parsedHex = parseHexToInt(hex);\n if (Number.isNaN(parsedHex) ||\n (enforcedLength !== undefined && enforcedLength !== hex.length)) {\n throw new SyntaxError(errors_1.errorMessages.get(errorName));\n }\n return parsedHex;\n}\n/**\n * Parse a two-digit hexadecimal character escape code.\n * @param code The two-digit hexadecimal number that represents the character to\n * output.\n * @returns The single character represented by the code.\n * @throws {SyntaxError} If the code is not valid hex or is not the right\n * length.\n */\nfunction parseHexadecimalCode(code) {\n const parsedCode = validateAndParseHex(code, errors_1.ErrorType.MalformedHexadecimal, 2);\n return String.fromCharCode(parsedCode);\n}\n/**\n * Parse a four-digit Unicode character escape code.\n * @param code The four-digit unicode number that represents the character to\n * output.\n * @param surrogateCode Optional four-digit unicode surrogate that represents\n * the other half of the character to output.\n * @returns The single character represented by the code.\n * @throws {SyntaxError} If the codes are not valid hex or are not the right\n * length.\n */\nfunction parseUnicodeCode(code, surrogateCode) {\n const parsedCode = validateAndParseHex(code, errors_1.ErrorType.MalformedUnicode, 4);\n if (surrogateCode !== undefined) {\n const parsedSurrogateCode = validateAndParseHex(surrogateCode, errors_1.ErrorType.MalformedUnicode, 4);\n return String.fromCharCode(parsedCode, parsedSurrogateCode);\n }\n return String.fromCharCode(parsedCode);\n}\n/**\n * Test if the text is surrounded by curly braces (`{}`).\n * @param text Text to check.\n * @returns `true` if the text is in the form `{*}`.\n */\nfunction isCurlyBraced(text) {\n return text.charAt(0) === \"{\" && text.charAt(text.length - 1) === \"}\";\n}\n/**\n * Parse a Unicode code point character escape code.\n * @param codePoint A unicode escape code point, including the surrounding curly\n * braces.\n * @returns The single character represented by the code.\n * @throws {SyntaxError} If the code is not valid hex or does not have the\n * surrounding curly braces.\n */\nfunction parseUnicodeCodePointCode(codePoint) {\n if (!isCurlyBraced(codePoint)) {\n throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.MalformedUnicode));\n }\n const withoutBraces = codePoint.slice(1, -1);\n const parsedCode = validateAndParseHex(withoutBraces, errors_1.ErrorType.MalformedUnicode);\n try {\n return String.fromCodePoint(parsedCode);\n }\n catch (err) {\n throw err instanceof RangeError\n ? new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.CodePointLimit))\n : err;\n }\n}\n// Have to give overload that takes boolean for when compiler doesn't know if\n// true or false\nfunction parseOctalCode(code, error = false) {\n if (error) {\n throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.OctalDeprecation));\n }\n // The original regex only allows digits so we don't need to have a strict\n // octal parser like hexToInt. Length is not enforced for octals.\n const parsedCode = parseInt(code, 8);\n return String.fromCharCode(parsedCode);\n}\n/**\n * Map of unescaped letters to their corresponding special JS escape characters.\n * Intentionally does not include characters that map to themselves like \"\\'\".\n */\nconst singleCharacterEscapes = new Map([\n [\"b\", \"\\b\"],\n [\"f\", \"\\f\"],\n [\"n\", \"\\n\"],\n [\"r\", \"\\r\"],\n [\"t\", \"\\t\"],\n [\"v\", \"\\v\"],\n [\"0\", \"\\0\"]\n]);\n/**\n * Parse a single character escape sequence and return the matching character.\n * If none is matched, defaults to `code`.\n * @param code A single character code.\n */\nfunction parseSingleCharacterCode(code) {\n return singleCharacterEscapes.get(code) || code;\n}\n/**\n * Matches every escape sequence possible, including invalid ones.\n *\n * All capture groups (described below) are unique (only one will match), except\n * for 4, which can only potentially match if 3 does.\n *\n * **Capture Groups:**\n * 0. A single backslash\n * 1. Hexadecimal code\n * 2. Unicode code point code with surrounding curly braces\n * 3. Unicode escape code with surrogate\n * 4. Surrogate code\n * 5. Unicode escape code without surrogate\n * 6. Octal code _NOTE: includes \"0\"._\n * 7. A single character (will never be \\, x, u, or 0-3)\n */\nconst escapeMatch = /\\\\(?:(\\\\)|x([\\s\\S]{0,2})|u(\\{[^}]*\\}?)|u([\\s\\S]{4})\\\\u([^{][\\s\\S]{0,3})|u([\\s\\S]{0,4})|([0-3]?[0-7]{1,2})|([\\s\\S])|$)/g;\n/**\n * Replace raw escape character strings with their escape characters.\n * @param raw A string where escape characters are represented as raw string\n * values like `\\'` rather than `'`.\n * @param allowOctals If `true`, will process the now-deprecated octal escape\n * sequences (ie, `\\111`).\n * @returns The processed string, with escape characters replaced by their\n * respective actual Unicode characters.\n */\nfunction unraw(raw, allowOctals = false) {\n return raw.replace(escapeMatch, function (_, backslash, hex, codePoint, unicodeWithSurrogate, surrogate, unicode, octal, singleCharacter) {\n // Compare groups to undefined because empty strings mean different errors\n // Otherwise, `\\u` would fail the same as `\\` which is wrong.\n if (backslash !== undefined) {\n return \"\\\\\";\n }\n if (hex !== undefined) {\n return parseHexadecimalCode(hex);\n }\n if (codePoint !== undefined) {\n return parseUnicodeCodePointCode(codePoint);\n }\n if (unicodeWithSurrogate !== undefined) {\n return parseUnicodeCode(unicodeWithSurrogate, surrogate);\n }\n if (unicode !== undefined) {\n return parseUnicodeCode(unicode);\n }\n if (octal === \"0\") {\n return \"\\0\";\n }\n if (octal !== undefined) {\n return parseOctalCode(octal, !allowOctals);\n }\n if (singleCharacter !== undefined) {\n return parseSingleCharacterCode(singleCharacter);\n }\n throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.EndOfString));\n });\n}\nexports.unraw = unraw;\nexports.default = unraw;\n", "import { unraw } from 'unraw';\nimport { compileMessage } from '@lingui/message-utils/compileMessage';\n\nconst isString = (s) => typeof s === \"string\";\nconst isFunction = (f) => typeof f === \"function\";\n\nconst cache = /* @__PURE__ */ new Map();\nconst defaultLocale = \"en\";\nfunction normalizeLocales(locales) {\n const out = Array.isArray(locales) ? locales : [locales];\n return [...out, defaultLocale];\n}\nfunction date(locales, value, format) {\n const _locales = normalizeLocales(locales);\n if (!format) {\n format = \"default\";\n }\n let o;\n if (typeof format === \"string\") {\n o = {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\"\n };\n switch (format) {\n case \"full\":\n o.weekday = \"long\";\n case \"long\":\n o.month = \"long\";\n break;\n case \"short\":\n o.month = \"numeric\";\n break;\n }\n } else {\n o = format;\n }\n const formatter = getMemoized(\n () => cacheKey(\"date\", _locales, format),\n () => new Intl.DateTimeFormat(_locales, o)\n );\n return formatter.format(isString(value) ? new Date(value) : value);\n}\nfunction time(locales, value, format) {\n let o;\n if (!format) {\n format = \"default\";\n }\n if (typeof format === \"string\") {\n o = {\n second: \"numeric\",\n minute: \"numeric\",\n hour: \"numeric\"\n };\n switch (format) {\n case \"full\":\n case \"long\":\n o.timeZoneName = \"short\";\n break;\n case \"short\":\n delete o.second;\n }\n } else {\n o = format;\n }\n return date(locales, value, o);\n}\nfunction number(locales, value, format) {\n const _locales = normalizeLocales(locales);\n const formatter = getMemoized(\n () => cacheKey(\"number\", _locales, format),\n () => new Intl.NumberFormat(_locales, format)\n );\n return formatter.format(value);\n}\nfunction plural(locales, ordinal, value, { offset = 0, ...rules }) {\n const _locales = normalizeLocales(locales);\n const plurals = ordinal ? getMemoized(\n () => cacheKey(\"plural-ordinal\", _locales),\n () => new Intl.PluralRules(_locales, { type: \"ordinal\" })\n ) : getMemoized(\n () => cacheKey(\"plural-cardinal\", _locales),\n () => new Intl.PluralRules(_locales, { type: \"cardinal\" })\n );\n return rules[value] ?? rules[plurals.select(value - offset)] ?? rules.other;\n}\nfunction getMemoized(getKey, construct) {\n const key = getKey();\n let formatter = cache.get(key);\n if (!formatter) {\n formatter = construct();\n cache.set(key, formatter);\n }\n return formatter;\n}\nfunction cacheKey(type, locales, options) {\n const localeKey = locales.join(\"-\");\n return `${type}-${localeKey}-${JSON.stringify(options)}`;\n}\n\nconst formats = {\n __proto__: null,\n date: date,\n defaultLocale: defaultLocale,\n number: number,\n plural: plural,\n time: time\n};\n\nconst UNICODE_REGEX = /\\\\u[a-fA-F0-9]{4}|\\\\x[a-fA-F0-9]{2}/;\nconst OCTOTHORPE_PH = \"%__lingui_octothorpe__%\";\nconst getDefaultFormats = (locale, passedLocales, formats = {}) => {\n const locales = passedLocales || locale;\n const style = (format) => {\n if (typeof format === \"object\")\n return format;\n return formats[format];\n };\n const replaceOctothorpe = (value, message) => {\n const numberFormat = Object.keys(formats).length ? style(\"number\") : void 0;\n const valueStr = number(locales, value, numberFormat);\n return message.replace(new RegExp(OCTOTHORPE_PH, \"g\"), valueStr);\n };\n return {\n plural: (value, cases) => {\n const { offset = 0 } = cases;\n const message = plural(locales, false, value, cases);\n return replaceOctothorpe(value - offset, message);\n },\n selectordinal: (value, cases) => {\n const { offset = 0 } = cases;\n const message = plural(locales, true, value, cases);\n return replaceOctothorpe(value - offset, message);\n },\n select: selectFormatter,\n number: (value, format) => number(\n locales,\n value,\n style(format) || { style: format }\n ),\n date: (value, format) => date(locales, value, style(format) || format),\n time: (value, format) => time(locales, value, style(format) || format)\n };\n};\nconst selectFormatter = (value, rules) => rules[value] ?? rules.other;\nfunction interpolate(translation, locale, locales) {\n return (values = {}, formats) => {\n const formatters = getDefaultFormats(locale, locales, formats);\n const formatMessage = (tokens, replaceOctothorpe = false) => {\n if (!Array.isArray(tokens))\n return tokens;\n return tokens.reduce((message, token) => {\n if (token === \"#\" && replaceOctothorpe) {\n return message + OCTOTHORPE_PH;\n }\n if (isString(token)) {\n return message + token;\n }\n const [name, type, format] = token;\n let interpolatedFormat = {};\n if (type === \"plural\" || type === \"selectordinal\" || type === \"select\") {\n Object.entries(format).forEach(\n ([key, value2]) => {\n interpolatedFormat[key] = formatMessage(\n value2,\n type === \"plural\" || type === \"selectordinal\"\n );\n }\n );\n } else {\n interpolatedFormat = format;\n }\n let value;\n if (type) {\n const formatter = formatters[type];\n value = formatter(values[name], interpolatedFormat);\n } else {\n value = values[name];\n }\n if (value == null) {\n return message;\n }\n return message + value;\n }, \"\");\n };\n const result = formatMessage(translation);\n if (isString(result) && UNICODE_REGEX.test(result)) {\n return unraw(result);\n }\n if (isString(result))\n return result;\n return result ? String(result) : \"\";\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => {\n __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass EventEmitter {\n constructor() {\n __publicField$1(this, \"_events\", {});\n }\n on(event, listener) {\n var _a;\n (_a = this._events)[event] ?? (_a[event] = []);\n this._events[event].push(listener);\n return () => this.removeListener(event, listener);\n }\n removeListener(event, listener) {\n const maybeListeners = this._getListeners(event);\n if (!maybeListeners)\n return;\n const index = maybeListeners.indexOf(listener);\n if (~index)\n maybeListeners.splice(index, 1);\n }\n emit(event, ...args) {\n const maybeListeners = this._getListeners(event);\n if (!maybeListeners)\n return;\n maybeListeners.map((listener) => listener.apply(this, args));\n }\n _getListeners(event) {\n const maybeListeners = this._events[event];\n return Array.isArray(maybeListeners) ? maybeListeners : false;\n }\n}\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass I18n extends EventEmitter {\n constructor(params) {\n super();\n __publicField(this, \"_locale\", \"\");\n __publicField(this, \"_locales\");\n __publicField(this, \"_localeData\", {});\n __publicField(this, \"_messages\", {});\n __publicField(this, \"_missing\");\n __publicField(this, \"_messageCompiler\");\n /**\n * Alias for {@see I18n._}\n */\n __publicField(this, \"t\", this._.bind(this));\n if (process.env.NODE_ENV !== \"production\") {\n this.setMessagesCompiler(compileMessage);\n }\n if (params.missing != null)\n this._missing = params.missing;\n if (params.messages != null)\n this.load(params.messages);\n if (params.localeData != null)\n this.loadLocaleData(params.localeData);\n if (typeof params.locale === \"string\" || params.locales) {\n this.activate(params.locale ?? defaultLocale, params.locales);\n }\n }\n get locale() {\n return this._locale;\n }\n get locales() {\n return this._locales;\n }\n get messages() {\n return this._messages[this._locale] ?? {};\n }\n /**\n * @deprecated this has no effect. Please remove this from the code. Deprecated in v4\n */\n get localeData() {\n return this._localeData[this._locale] ?? {};\n }\n _loadLocaleData(locale, localeData) {\n const maybeLocaleData = this._localeData[locale];\n if (!maybeLocaleData) {\n this._localeData[locale] = localeData;\n } else {\n Object.assign(maybeLocaleData, localeData);\n }\n }\n /**\n * Registers a `MessageCompiler` to enable the use of uncompiled catalogs at runtime.\n *\n * In production builds, the `MessageCompiler` is typically excluded to reduce bundle size.\n * By default, message catalogs should be precompiled during the build process. However,\n * if you need to compile catalogs at runtime, you can use this method to set a message compiler.\n *\n * Example usage:\n *\n * ```ts\n * import { compileMessage } from \"@lingui/message-utils/compileMessage\";\n *\n * i18n.setMessagesCompiler(compileMessage);\n * ```\n */\n setMessagesCompiler(compiler) {\n this._messageCompiler = compiler;\n return this;\n }\n /**\n * @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4\n */\n loadLocaleData(localeOrAllData, localeData) {\n if (typeof localeOrAllData === \"string\") {\n this._loadLocaleData(localeOrAllData, localeData);\n } else {\n Object.keys(localeOrAllData).forEach(\n (locale) => this._loadLocaleData(locale, localeOrAllData[locale])\n );\n }\n this.emit(\"change\");\n }\n _load(locale, messages) {\n const maybeMessages = this._messages[locale];\n if (!maybeMessages) {\n this._messages[locale] = messages;\n } else {\n Object.assign(maybeMessages, messages);\n }\n }\n load(localeOrMessages, messages) {\n if (typeof localeOrMessages == \"string\" && typeof messages === \"object\") {\n this._load(localeOrMessages, messages);\n } else {\n Object.entries(localeOrMessages).forEach(\n ([locale, messages2]) => this._load(locale, messages2)\n );\n }\n this.emit(\"change\");\n }\n /**\n * @param options {@link LoadAndActivateOptions}\n */\n loadAndActivate({ locale, locales, messages }) {\n this._locale = locale;\n this._locales = locales || void 0;\n this._messages[this._locale] = messages;\n this.emit(\"change\");\n }\n activate(locale, locales) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!this._messages[locale]) {\n console.warn(`Messages for locale \"${locale}\" not loaded.`);\n }\n }\n this._locale = locale;\n this._locales = locales;\n this.emit(\"change\");\n }\n _(id, values, options) {\n if (!this.locale) {\n throw new Error(\n \"Lingui: Attempted to call a translation function without setting a locale.\\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\\nThis issue may also occur due to a race condition in your initialization logic.\"\n );\n }\n let message = options?.message;\n if (!id) {\n id = \"\";\n }\n if (!isString(id)) {\n values = id.values || values;\n message = id.message;\n id = id.id;\n }\n const messageForId = this.messages[id];\n const messageMissing = messageForId === void 0;\n const missing = this._missing;\n if (missing && messageMissing) {\n return isFunction(missing) ? missing(this._locale, id) : missing;\n }\n if (messageMissing) {\n this.emit(\"missing\", { id, locale: this._locale });\n }\n let translation = messageForId || message || id;\n if (isString(translation)) {\n if (this._messageCompiler) {\n translation = this._messageCompiler(translation);\n } else {\n console.warn(`Uncompiled message detected! Message:\n\n> ${translation}\n\nThat means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.\nICU features such as interpolation and plurals will not work properly for that message. \n\nPlease compile your catalog first. \n`);\n }\n }\n if (isString(translation) && UNICODE_REGEX.test(translation))\n return JSON.parse(`\"${translation}\"`);\n if (isString(translation))\n return translation;\n return interpolate(\n translation,\n this._locale,\n this._locales\n )(values, options?.formats);\n }\n date(value, format) {\n return date(this._locales || this._locale, value, format);\n }\n number(value, format) {\n return number(this._locales || this._locale, value, format);\n }\n}\nfunction setupI18n(params = {}) {\n return new I18n(params);\n}\n\nconst i18n = setupI18n();\n\nexport { I18n, formats, i18n, setupI18n };\n", "import { i18n } from '@lingui/core';\nimport { html, LitElement, TemplateResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { map } from 'lit/directives/map.js';\nimport { range } from 'lit/directives/range.js';\n\nimport { activateI18n } from '../i18n.js';\n\nimport { messages as daMessages } from './locales/da/messages.mjs';\nimport { messages as enMessages } from './locales/en/messages.mjs';\nimport { messages as fiMessages } from './locales/fi/messages.mjs';\nimport { messages as nbMessages } from './locales/nb/messages.mjs';\nimport { messages as svMessages } from './locales/sv/messages.mjs';\nimport { styles } from './style.js';\n\nactivateI18n(enMessages, nbMessages, fiMessages, daMessages, svMessages);\n\n/**\n * A page indicator component that displays a series of dots representing pages.\n * One dot is highlighted to indicate the currently selected page.\n *\n * @example\n * ```html\n * <w-page-indicator page-count=\"5\" selected-page=\"2\"></w-page-indicator>\n * ```\n *\n * @property {number} pageCount - Total number of pages (minimum 1)\n * @property {number} selectedPage - Currently selected page (1-based index, clamped to valid range)\n */\nclass WarpPageIndicator extends LitElement {\n static styles = [styles];\n\n /** Currently selected page (1-based index) */\n @property({ type: Number, attribute: 'selected-page', reflect: true })\n selectedPage = 1;\n\n /** Total number of pages */\n @property({ type: Number, attribute: 'page-count', reflect: true })\n pageCount = 1;\n\n /** Validated page count (minimum 1) */\n private get _validPageCount(): number {\n return Math.max(1, Math.floor(this.pageCount));\n }\n\n /** Validated selected page (clamped to valid range) */\n private get _validSelectedPage(): number {\n const page = Math.floor(this.selectedPage);\n return Math.max(1, Math.min(page, this._validPageCount));\n }\n\n render(): TemplateResult {\n const pageCount = this._validPageCount;\n const selectedPage = this._validSelectedPage;\n\n const groupLabel = i18n._({\n id: 'page-indicator.aria.label',\n comment: 'Default screenreader message for page indicator group',\n message: 'Dot {selectedPage} is highlighted in a row of {pageCount} dots',\n values: { selectedPage, pageCount },\n });\n\n return html`\n <div class=\"w-page-indicator\" role=\"img\" aria-label=\"${groupLabel}\">\n <div class=\"w-page-indicator--container\">\n ${map(range(pageCount), (i) => {\n const pageNumber = i + 1;\n const isSelected = pageNumber === selectedPage;\n const classes = {\n 'w-page-indicator--dot': true,\n 'w-page-indicator--selecteddot': isSelected,\n };\n return html`<div class=\"${classMap(classes)}\"></div>`;\n })}\n </div>\n </div>\n `;\n }\n}\n\nif (!customElements.get('w-page-indicator')) {\n customElements.define('w-page-indicator', WarpPageIndicator);\n}\n\nexport { WarpPageIndicator };\n", "import { i18n, Messages } from '@lingui/core';\n\nexport const supportedLocales = ['en', 'nb', 'fi', 'da', 'sv'] as const;\ntype SupportedLocale = (typeof supportedLocales)[number];\n\nexport const defaultLocale = 'en';\n\nexport const getSupportedLocale = (usedLocale: string) => {\n return (\n supportedLocales.find((locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)) ||\n defaultLocale\n );\n};\n\nexport function detectLocale(): SupportedLocale {\n if (typeof window === 'undefined') {\n /**\n * Server locale detection. This requires e.g LANG environment variable to be set on the server.\n */\n const serverLocale = process.env.NMP_LANGUAGE || Intl.DateTimeFormat().resolvedOptions().locale;\n return getSupportedLocale(serverLocale);\n }\n\n try {\n /**\n * Client locale detection. Expects the lang attribute to be defined.\n */\n const htmlLocale = document.documentElement.lang;\n return getSupportedLocale(htmlLocale);\n } catch (e) {\n console.warn('could not detect locale, falling back to source locale', e);\n return defaultLocale;\n }\n}\n\nexport const getMessages = (\n locale: SupportedLocale,\n enMsg: Messages,\n nbMsg: Messages,\n fiMsg: Messages,\n daMsg: Messages,\n svMsg: Messages,\n) => {\n if (locale === 'nb') return nbMsg;\n if (locale === 'fi') return fiMsg;\n if (locale === 'da') return daMsg;\n if (locale === 'sv') return svMsg;\n // Default to English\n return enMsg;\n};\n\nexport const activateI18n = (\n enMessages: Messages,\n nbMessages: Messages,\n fiMessages: Messages,\n daMessages: Messages,\n svMessages: Messages,\n) => {\n // Load all locales upfront to support dynamic locale switching\n i18n.load('en', enMessages);\n i18n.load('nb', nbMessages);\n i18n.load('fi', fiMessages);\n i18n.load('da', daMessages);\n i18n.load('sv', svMessages);\n\n const locale = detectLocale();\n i18n.activate(locale);\n};\n", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Prik \\\",[\\\"selectedPage\\\"],\\\" er fremh\u00E6vet i en r\u00E6kke med \\\",[\\\"pageCount\\\"],\\\" prikker\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Dot \\\",[\\\"selectedPage\\\"],\\\" is highlighted in a row of \\\",[\\\"pageCount\\\"],\\\" dots\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Piste \\\",[\\\"selectedPage\\\"],\\\" on korostettuna \\\",[\\\"pageCount\\\"],\\\" pisteen riviss\u00E4\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Prikk \\\",[\\\"selectedPage\\\"],\\\" er uthevet i en rad med \\\",[\\\"pageCount\\\"],\\\" prikker\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Prick \\\",[\\\"selectedPage\\\"],\\\" \u00E4r markerad i en rad med \\\",[\\\"pageCount\\\"],\\\" prickar\\\"]}\");", "import { css } from 'lit';\n\nexport const styles = css`\n .w-page-indicator {\n display: grid;\n justify-content: center;\n height: max-content;\n pointer-events: none;\n }\n\n .w-page-indicator--container {\n display: grid;\n grid-auto-flow: column;\n gap: 8px;\n }\n\n .w-page-indicator--dot {\n background-color: var(--w-s-color-background-disabled);\n border-radius: 5px;\n width: 10px;\n height: 10px;\n }\n\n .w-page-indicator--selecteddot {\n background-color: var(--w-s-color-icon-selected);\n }\n`;\n"],
5
- "mappings": "0pBAAA,IAAAA,EAAAC,EAAAC,GAAA,cAGA,OAAO,eAAeA,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5DA,EAAQ,cAAgBA,EAAQ,UAAY,OAO5C,IAAIC,GACH,SAAUA,EAAW,CAMlBA,EAAU,iBAAsB,oBAMhCA,EAAU,qBAA0B,wBAMpCA,EAAU,eAAoB,mBAK9BA,EAAU,iBAAsB,oBAKhCA,EAAU,YAAiB,eAC/B,GAAGA,EAAYD,EAAQ,YAAcA,EAAQ,UAAY,CAAC,EAAE,EAE5DA,EAAQ,cAAg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,UAAAD,CAAU,CACpC,CAAC,EAED,OAAOI;AAAA,6DACkDF,CAAU;AAAA;AAAA,YAE3DG,GAAIC,GAAMN,CAAS,EAAIO,GAAM,CAG7B,IAAMC,EAAU,CACd,wBAAyB,GACzB,gCAJiBD,EAAI,IACWN,CAIlC,EACA,OAAOG,iBAAmBK,GAASD,CAAO,CAAC,UAC7C,CAAC,CAAC;AAAA;AAAA;AAAA,KAIV,CACF,EAjDMX,EACG,OAAS,CAACa,EAAM,EAIvBC,EAAA,CADCC,GAAS,CAAE,KAAM,OAAQ,UAAW,gBAAiB,QAAS,EAAK,CAAC,GAJjEf,EAKJ,4BAIAc,EAAA,CADCC,GAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,QAAS,EAAK,CAAC,GAR9Df,EASJ,yBA0CG,eAAe,IAAI,kBAAkB,GACxC,eAAe,OAAO,mBAAoBA,CAAiB",
6
- "names": ["require_errors", "__commonJSMin", "exports", "ErrorType", "require_dist", "__commonJSMin", "exports", "errors_1", "parseHexToInt", "hex", "validateAndParseHex", "errorName", "enforcedLength", "parsedHex", "parseHexadecimalCode", "code", "parsedCode", "parseUnicodeCode", "surrogateCode", "parsedSurrogateCode", "isCurlyBraced", "text", "parseUnicodeCodePointCode", "codePoint", "withoutBraces", "err", "parseOctalCode", "error", "singleCharacterEscapes", "parseSingleCharacterCode", "escapeMatch", "unraw", "raw", "allowOctals", "_", "backslash", "unicodeWithSurrogate", "surrogate", "unicode", "octal", "singleCharacter", "import_unraw", "isString", "s", "isFunction", "f", "cache", "defaultLocale", "normalizeLocales", "locales", "date", "value", "format", "_locales", "o", "getMemoized", "cacheKey", "time", "number", "plural", "ordinal", "offset", "rules", "_a", "_b", "plurals", "getKey", "construct", "key", "formatter", "type", "options", "localeKey", "UNICODE_REGEX", "OCTOTHORPE_PH", "getDefaultFormats", "locale", "passedLocales", "formats", "locales", "style", "format", "replaceOctothorpe", "value", "message", "numberFormat", "valueStr", "number", "cases", "offset", "plural", "selectFormatter", "date", "time", "rules", "_a", "interpolate", "translation", "values", "formatters", "formatMessage", "tokens", "token", "isString", "name", "type", "interpolatedFormat", "key", "value2", "formatter", "result", "__defProp$1", "__defNormalProp$1", "obj", "__publicField$1", "EventEmitter", "event", "listener", "maybeListeners", "index", "args", "__defProp", "__defNormalProp", "__publicField", "I18n", "params", "defaultLocale", "localeData", "maybeLocaleData", "compiler", "localeOrAllData", "messages", "maybeMessages", "localeOrMessages", "messages2", "id", "options", "messageForId", "messageMissing", "missing", "isFunction", "setupI18n", "i18n", "html", "LitElement", "property", "classMap", "map", "range", "supportedLocales", "defaultLocale", "getSupportedLocale", "usedLocale", "locale", "detectLocale", "serverLocale", "htmlLocale", "e", "activateI18n", "enMessages", "nbMessages", "fiMessages", "daMessages", "svMessages", "i18n", "locale", "detectLocale", "messages", "messages", "messages", "messages", "messages", "css", "styles", "activateI18n", "messages", "WarpPageIndicator", "LitElement", "page", "pageCount", "selectedPage", "groupLabel", "i18n", "html", "map", "range", "i", "classes", "classMap", "styles", "__decorateClass", "property"]
4
+ "sourcesContent": ["\"use strict\";\n// NOTE: don't construct errors here or they'll have the wrong stack trace.\n// NOTE: don't make custom error class; the JS engines use `SyntaxError`\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorMessages = exports.ErrorType = void 0;\n/**\n * Keys for possible error messages used by `unraw`.\n * Note: These do _not_ map to actual error object types. All errors thrown\n * are `SyntaxError`.\n */\n// Don't use const enum or JS users won't be able to access the enum values\nvar ErrorType;\n(function (ErrorType) {\n /**\n * Thrown when a badly formed Unicode escape sequence is found. Possible\n * reasons include the code being too short (`\"\\u25\"`) or having invalid\n * characters (`\"\\u2$A5\"`).\n */\n ErrorType[\"MalformedUnicode\"] = \"MALFORMED_UNICODE\";\n /**\n * Thrown when a badly formed hexadecimal escape sequence is found. Possible\n * reasons include the code being too short (`\"\\x2\"`) or having invalid\n * characters (`\"\\x2$\"`).\n */\n ErrorType[\"MalformedHexadecimal\"] = \"MALFORMED_HEXADECIMAL\";\n /**\n * Thrown when a Unicode code point escape sequence has too high of a code\n * point. The maximum code point allowed is `\\u{10FFFF}`, so `\\u{110000}` and\n * higher will throw this error.\n */\n ErrorType[\"CodePointLimit\"] = \"CODE_POINT_LIMIT\";\n /**\n * Thrown when an octal escape sequences is encountered and `allowOctals` is\n * `false`. For example, `unraw(\"\\234\", false)`.\n */\n ErrorType[\"OctalDeprecation\"] = \"OCTAL_DEPRECATION\";\n /**\n * Thrown only when a single backslash is found at the end of a string. For\n * example, `\"\\\\\"` or `\"test\\\\x24\\\\\"`.\n */\n ErrorType[\"EndOfString\"] = \"END_OF_STRING\";\n})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));\n/** Map of error message names to the full text of the message. */\nexports.errorMessages = new Map([\n [ErrorType.MalformedUnicode, \"malformed Unicode character escape sequence\"],\n [\n ErrorType.MalformedHexadecimal,\n \"malformed hexadecimal character escape sequence\"\n ],\n [\n ErrorType.CodePointLimit,\n \"Unicode codepoint must not be greater than 0x10FFFF in escape sequence\"\n ],\n [\n ErrorType.OctalDeprecation,\n '\"0\"-prefixed octal literals and octal escape sequences are deprecated; ' +\n 'for octal literals use the \"0o\" prefix instead'\n ],\n [ErrorType.EndOfString, \"malformed escape sequence at end of string\"]\n]);\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unraw = exports.errorMessages = exports.ErrorType = void 0;\nconst errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"ErrorType\", { enumerable: true, get: function () { return errors_1.ErrorType; } });\nObject.defineProperty(exports, \"errorMessages\", { enumerable: true, get: function () { return errors_1.errorMessages; } });\n/**\n * Parse a string as a base-16 number. This is more strict than `parseInt` as it\n * will not allow any other characters, including (for example) \"+\", \"-\", and\n * \".\".\n * @param hex A string containing a hexadecimal number.\n * @returns The parsed integer, or `NaN` if the string is not a valid hex\n * number.\n */\nfunction parseHexToInt(hex) {\n const isOnlyHexChars = !hex.match(/[^a-f0-9]/i);\n return isOnlyHexChars ? parseInt(hex, 16) : NaN;\n}\n/**\n * Check the validity and length of a hexadecimal code and optionally enforces\n * a specific number of hex digits.\n * @param hex The string to validate and parse.\n * @param errorName The name of the error message to throw a `SyntaxError` with\n * if `hex` is invalid. This is used to index `errorMessages`.\n * @param enforcedLength If provided, will throw an error if `hex` is not\n * exactly this many characters.\n * @returns The parsed hex number as a normal number.\n * @throws {SyntaxError} If the code is not valid.\n */\nfunction validateAndParseHex(hex, errorName, enforcedLength) {\n const parsedHex = parseHexToInt(hex);\n if (Number.isNaN(parsedHex) ||\n (enforcedLength !== undefined && enforcedLength !== hex.length)) {\n throw new SyntaxError(errors_1.errorMessages.get(errorName));\n }\n return parsedHex;\n}\n/**\n * Parse a two-digit hexadecimal character escape code.\n * @param code The two-digit hexadecimal number that represents the character to\n * output.\n * @returns The single character represented by the code.\n * @throws {SyntaxError} If the code is not valid hex or is not the right\n * length.\n */\nfunction parseHexadecimalCode(code) {\n const parsedCode = validateAndParseHex(code, errors_1.ErrorType.MalformedHexadecimal, 2);\n return String.fromCharCode(parsedCode);\n}\n/**\n * Parse a four-digit Unicode character escape code.\n * @param code The four-digit unicode number that represents the character to\n * output.\n * @param surrogateCode Optional four-digit unicode surrogate that represents\n * the other half of the character to output.\n * @returns The single character represented by the code.\n * @throws {SyntaxError} If the codes are not valid hex or are not the right\n * length.\n */\nfunction parseUnicodeCode(code, surrogateCode) {\n const parsedCode = validateAndParseHex(code, errors_1.ErrorType.MalformedUnicode, 4);\n if (surrogateCode !== undefined) {\n const parsedSurrogateCode = validateAndParseHex(surrogateCode, errors_1.ErrorType.MalformedUnicode, 4);\n return String.fromCharCode(parsedCode, parsedSurrogateCode);\n }\n return String.fromCharCode(parsedCode);\n}\n/**\n * Test if the text is surrounded by curly braces (`{}`).\n * @param text Text to check.\n * @returns `true` if the text is in the form `{*}`.\n */\nfunction isCurlyBraced(text) {\n return text.charAt(0) === \"{\" && text.charAt(text.length - 1) === \"}\";\n}\n/**\n * Parse a Unicode code point character escape code.\n * @param codePoint A unicode escape code point, including the surrounding curly\n * braces.\n * @returns The single character represented by the code.\n * @throws {SyntaxError} If the code is not valid hex or does not have the\n * surrounding curly braces.\n */\nfunction parseUnicodeCodePointCode(codePoint) {\n if (!isCurlyBraced(codePoint)) {\n throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.MalformedUnicode));\n }\n const withoutBraces = codePoint.slice(1, -1);\n const parsedCode = validateAndParseHex(withoutBraces, errors_1.ErrorType.MalformedUnicode);\n try {\n return String.fromCodePoint(parsedCode);\n }\n catch (err) {\n throw err instanceof RangeError\n ? new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.CodePointLimit))\n : err;\n }\n}\n// Have to give overload that takes boolean for when compiler doesn't know if\n// true or false\nfunction parseOctalCode(code, error = false) {\n if (error) {\n throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.OctalDeprecation));\n }\n // The original regex only allows digits so we don't need to have a strict\n // octal parser like hexToInt. Length is not enforced for octals.\n const parsedCode = parseInt(code, 8);\n return String.fromCharCode(parsedCode);\n}\n/**\n * Map of unescaped letters to their corresponding special JS escape characters.\n * Intentionally does not include characters that map to themselves like \"\\'\".\n */\nconst singleCharacterEscapes = new Map([\n [\"b\", \"\\b\"],\n [\"f\", \"\\f\"],\n [\"n\", \"\\n\"],\n [\"r\", \"\\r\"],\n [\"t\", \"\\t\"],\n [\"v\", \"\\v\"],\n [\"0\", \"\\0\"]\n]);\n/**\n * Parse a single character escape sequence and return the matching character.\n * If none is matched, defaults to `code`.\n * @param code A single character code.\n */\nfunction parseSingleCharacterCode(code) {\n return singleCharacterEscapes.get(code) || code;\n}\n/**\n * Matches every escape sequence possible, including invalid ones.\n *\n * All capture groups (described below) are unique (only one will match), except\n * for 4, which can only potentially match if 3 does.\n *\n * **Capture Groups:**\n * 0. A single backslash\n * 1. Hexadecimal code\n * 2. Unicode code point code with surrounding curly braces\n * 3. Unicode escape code with surrogate\n * 4. Surrogate code\n * 5. Unicode escape code without surrogate\n * 6. Octal code _NOTE: includes \"0\"._\n * 7. A single character (will never be \\, x, u, or 0-3)\n */\nconst escapeMatch = /\\\\(?:(\\\\)|x([\\s\\S]{0,2})|u(\\{[^}]*\\}?)|u([\\s\\S]{4})\\\\u([^{][\\s\\S]{0,3})|u([\\s\\S]{0,4})|([0-3]?[0-7]{1,2})|([\\s\\S])|$)/g;\n/**\n * Replace raw escape character strings with their escape characters.\n * @param raw A string where escape characters are represented as raw string\n * values like `\\'` rather than `'`.\n * @param allowOctals If `true`, will process the now-deprecated octal escape\n * sequences (ie, `\\111`).\n * @returns The processed string, with escape characters replaced by their\n * respective actual Unicode characters.\n */\nfunction unraw(raw, allowOctals = false) {\n return raw.replace(escapeMatch, function (_, backslash, hex, codePoint, unicodeWithSurrogate, surrogate, unicode, octal, singleCharacter) {\n // Compare groups to undefined because empty strings mean different errors\n // Otherwise, `\\u` would fail the same as `\\` which is wrong.\n if (backslash !== undefined) {\n return \"\\\\\";\n }\n if (hex !== undefined) {\n return parseHexadecimalCode(hex);\n }\n if (codePoint !== undefined) {\n return parseUnicodeCodePointCode(codePoint);\n }\n if (unicodeWithSurrogate !== undefined) {\n return parseUnicodeCode(unicodeWithSurrogate, surrogate);\n }\n if (unicode !== undefined) {\n return parseUnicodeCode(unicode);\n }\n if (octal === \"0\") {\n return \"\\0\";\n }\n if (octal !== undefined) {\n return parseOctalCode(octal, !allowOctals);\n }\n if (singleCharacter !== undefined) {\n return parseSingleCharacterCode(singleCharacter);\n }\n throw new SyntaxError(errors_1.errorMessages.get(errors_1.ErrorType.EndOfString));\n });\n}\nexports.unraw = unraw;\nexports.default = unraw;\n", "import { unraw } from 'unraw';\nimport { compileMessage } from '@lingui/message-utils/compileMessage';\n\nconst isString = (s) => typeof s === \"string\";\nconst isFunction = (f) => typeof f === \"function\";\n\nconst cache = /* @__PURE__ */ new Map();\nconst defaultLocale = \"en\";\nfunction normalizeLocales(locales) {\n const out = Array.isArray(locales) ? locales : [locales];\n return [...out, defaultLocale];\n}\nfunction date(locales, value, format) {\n const _locales = normalizeLocales(locales);\n if (!format) {\n format = \"default\";\n }\n let o;\n if (typeof format === \"string\") {\n o = {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\"\n };\n switch (format) {\n case \"full\":\n o.weekday = \"long\";\n case \"long\":\n o.month = \"long\";\n break;\n case \"short\":\n o.month = \"numeric\";\n break;\n }\n } else {\n o = format;\n }\n const formatter = getMemoized(\n () => cacheKey(\"date\", _locales, format),\n () => new Intl.DateTimeFormat(_locales, o)\n );\n return formatter.format(isString(value) ? new Date(value) : value);\n}\nfunction time(locales, value, format) {\n let o;\n if (!format) {\n format = \"default\";\n }\n if (typeof format === \"string\") {\n o = {\n second: \"numeric\",\n minute: \"numeric\",\n hour: \"numeric\"\n };\n switch (format) {\n case \"full\":\n case \"long\":\n o.timeZoneName = \"short\";\n break;\n case \"short\":\n delete o.second;\n }\n } else {\n o = format;\n }\n return date(locales, value, o);\n}\nfunction number(locales, value, format) {\n const _locales = normalizeLocales(locales);\n const formatter = getMemoized(\n () => cacheKey(\"number\", _locales, format),\n () => new Intl.NumberFormat(_locales, format)\n );\n return formatter.format(value);\n}\nfunction plural(locales, ordinal, value, { offset = 0, ...rules }) {\n const _locales = normalizeLocales(locales);\n const plurals = ordinal ? getMemoized(\n () => cacheKey(\"plural-ordinal\", _locales),\n () => new Intl.PluralRules(_locales, { type: \"ordinal\" })\n ) : getMemoized(\n () => cacheKey(\"plural-cardinal\", _locales),\n () => new Intl.PluralRules(_locales, { type: \"cardinal\" })\n );\n return rules[value] ?? rules[plurals.select(value - offset)] ?? rules.other;\n}\nfunction getMemoized(getKey, construct) {\n const key = getKey();\n let formatter = cache.get(key);\n if (!formatter) {\n formatter = construct();\n cache.set(key, formatter);\n }\n return formatter;\n}\nfunction cacheKey(type, locales, options) {\n const localeKey = locales.join(\"-\");\n return `${type}-${localeKey}-${JSON.stringify(options)}`;\n}\n\nconst formats = {\n __proto__: null,\n date: date,\n defaultLocale: defaultLocale,\n number: number,\n plural: plural,\n time: time\n};\n\nconst UNICODE_REGEX = /\\\\u[a-fA-F0-9]{4}|\\\\x[a-fA-F0-9]{2}/;\nconst OCTOTHORPE_PH = \"%__lingui_octothorpe__%\";\nconst getDefaultFormats = (locale, passedLocales, formats = {}) => {\n const locales = passedLocales || locale;\n const style = (format) => {\n if (typeof format === \"object\")\n return format;\n return formats[format];\n };\n const replaceOctothorpe = (value, message) => {\n const numberFormat = Object.keys(formats).length ? style(\"number\") : void 0;\n const valueStr = number(locales, value, numberFormat);\n return message.replace(new RegExp(OCTOTHORPE_PH, \"g\"), valueStr);\n };\n return {\n plural: (value, cases) => {\n const { offset = 0 } = cases;\n const message = plural(locales, false, value, cases);\n return replaceOctothorpe(value - offset, message);\n },\n selectordinal: (value, cases) => {\n const { offset = 0 } = cases;\n const message = plural(locales, true, value, cases);\n return replaceOctothorpe(value - offset, message);\n },\n select: selectFormatter,\n number: (value, format) => number(\n locales,\n value,\n style(format) || { style: format }\n ),\n date: (value, format) => date(locales, value, style(format) || format),\n time: (value, format) => time(locales, value, style(format) || format)\n };\n};\nconst selectFormatter = (value, rules) => rules[value] ?? rules.other;\nfunction interpolate(translation, locale, locales) {\n return (values = {}, formats) => {\n const formatters = getDefaultFormats(locale, locales, formats);\n const formatMessage = (tokens, replaceOctothorpe = false) => {\n if (!Array.isArray(tokens))\n return tokens;\n return tokens.reduce((message, token) => {\n if (token === \"#\" && replaceOctothorpe) {\n return message + OCTOTHORPE_PH;\n }\n if (isString(token)) {\n return message + token;\n }\n const [name, type, format] = token;\n let interpolatedFormat = {};\n if (type === \"plural\" || type === \"selectordinal\" || type === \"select\") {\n Object.entries(format).forEach(\n ([key, value2]) => {\n interpolatedFormat[key] = formatMessage(\n value2,\n type === \"plural\" || type === \"selectordinal\"\n );\n }\n );\n } else {\n interpolatedFormat = format;\n }\n let value;\n if (type) {\n const formatter = formatters[type];\n value = formatter(values[name], interpolatedFormat);\n } else {\n value = values[name];\n }\n if (value == null) {\n return message;\n }\n return message + value;\n }, \"\");\n };\n const result = formatMessage(translation);\n if (isString(result) && UNICODE_REGEX.test(result)) {\n return unraw(result);\n }\n if (isString(result))\n return result;\n return result ? String(result) : \"\";\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => {\n __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass EventEmitter {\n constructor() {\n __publicField$1(this, \"_events\", {});\n }\n on(event, listener) {\n var _a;\n (_a = this._events)[event] ?? (_a[event] = []);\n this._events[event].push(listener);\n return () => this.removeListener(event, listener);\n }\n removeListener(event, listener) {\n const maybeListeners = this._getListeners(event);\n if (!maybeListeners)\n return;\n const index = maybeListeners.indexOf(listener);\n if (~index)\n maybeListeners.splice(index, 1);\n }\n emit(event, ...args) {\n const maybeListeners = this._getListeners(event);\n if (!maybeListeners)\n return;\n maybeListeners.map((listener) => listener.apply(this, args));\n }\n _getListeners(event) {\n const maybeListeners = this._events[event];\n return Array.isArray(maybeListeners) ? maybeListeners : false;\n }\n}\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass I18n extends EventEmitter {\n constructor(params) {\n super();\n __publicField(this, \"_locale\", \"\");\n __publicField(this, \"_locales\");\n __publicField(this, \"_localeData\", {});\n __publicField(this, \"_messages\", {});\n __publicField(this, \"_missing\");\n __publicField(this, \"_messageCompiler\");\n /**\n * Alias for {@see I18n._}\n */\n __publicField(this, \"t\", this._.bind(this));\n if (process.env.NODE_ENV !== \"production\") {\n this.setMessagesCompiler(compileMessage);\n }\n if (params.missing != null)\n this._missing = params.missing;\n if (params.messages != null)\n this.load(params.messages);\n if (params.localeData != null)\n this.loadLocaleData(params.localeData);\n if (typeof params.locale === \"string\" || params.locales) {\n this.activate(params.locale ?? defaultLocale, params.locales);\n }\n }\n get locale() {\n return this._locale;\n }\n get locales() {\n return this._locales;\n }\n get messages() {\n return this._messages[this._locale] ?? {};\n }\n /**\n * @deprecated this has no effect. Please remove this from the code. Deprecated in v4\n */\n get localeData() {\n return this._localeData[this._locale] ?? {};\n }\n _loadLocaleData(locale, localeData) {\n const maybeLocaleData = this._localeData[locale];\n if (!maybeLocaleData) {\n this._localeData[locale] = localeData;\n } else {\n Object.assign(maybeLocaleData, localeData);\n }\n }\n /**\n * Registers a `MessageCompiler` to enable the use of uncompiled catalogs at runtime.\n *\n * In production builds, the `MessageCompiler` is typically excluded to reduce bundle size.\n * By default, message catalogs should be precompiled during the build process. However,\n * if you need to compile catalogs at runtime, you can use this method to set a message compiler.\n *\n * Example usage:\n *\n * ```ts\n * import { compileMessage } from \"@lingui/message-utils/compileMessage\";\n *\n * i18n.setMessagesCompiler(compileMessage);\n * ```\n */\n setMessagesCompiler(compiler) {\n this._messageCompiler = compiler;\n return this;\n }\n /**\n * @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4\n */\n loadLocaleData(localeOrAllData, localeData) {\n if (typeof localeOrAllData === \"string\") {\n this._loadLocaleData(localeOrAllData, localeData);\n } else {\n Object.keys(localeOrAllData).forEach(\n (locale) => this._loadLocaleData(locale, localeOrAllData[locale])\n );\n }\n this.emit(\"change\");\n }\n _load(locale, messages) {\n const maybeMessages = this._messages[locale];\n if (!maybeMessages) {\n this._messages[locale] = messages;\n } else {\n Object.assign(maybeMessages, messages);\n }\n }\n load(localeOrMessages, messages) {\n if (typeof localeOrMessages == \"string\" && typeof messages === \"object\") {\n this._load(localeOrMessages, messages);\n } else {\n Object.entries(localeOrMessages).forEach(\n ([locale, messages2]) => this._load(locale, messages2)\n );\n }\n this.emit(\"change\");\n }\n /**\n * @param options {@link LoadAndActivateOptions}\n */\n loadAndActivate({ locale, locales, messages }) {\n this._locale = locale;\n this._locales = locales || void 0;\n this._messages[this._locale] = messages;\n this.emit(\"change\");\n }\n activate(locale, locales) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!this._messages[locale]) {\n console.warn(`Messages for locale \"${locale}\" not loaded.`);\n }\n }\n this._locale = locale;\n this._locales = locales;\n this.emit(\"change\");\n }\n _(id, values, options) {\n if (!this.locale) {\n throw new Error(\n \"Lingui: Attempted to call a translation function without setting a locale.\\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\\nThis issue may also occur due to a race condition in your initialization logic.\"\n );\n }\n let message = options?.message;\n if (!id) {\n id = \"\";\n }\n if (!isString(id)) {\n values = id.values || values;\n message = id.message;\n id = id.id;\n }\n const messageForId = this.messages[id];\n const messageMissing = messageForId === void 0;\n const missing = this._missing;\n if (missing && messageMissing) {\n return isFunction(missing) ? missing(this._locale, id) : missing;\n }\n if (messageMissing) {\n this.emit(\"missing\", { id, locale: this._locale });\n }\n let translation = messageForId || message || id;\n if (isString(translation)) {\n if (this._messageCompiler) {\n translation = this._messageCompiler(translation);\n } else {\n console.warn(`Uncompiled message detected! Message:\n\n> ${translation}\n\nThat means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.\nICU features such as interpolation and plurals will not work properly for that message. \n\nPlease compile your catalog first. \n`);\n }\n }\n if (isString(translation) && UNICODE_REGEX.test(translation))\n return JSON.parse(`\"${translation}\"`);\n if (isString(translation))\n return translation;\n return interpolate(\n translation,\n this._locale,\n this._locales\n )(values, options?.formats);\n }\n date(value, format) {\n return date(this._locales || this._locale, value, format);\n }\n number(value, format) {\n return number(this._locales || this._locale, value, format);\n }\n}\nfunction setupI18n(params = {}) {\n return new I18n(params);\n}\n\nconst i18n = setupI18n();\n\nexport { I18n, formats, i18n, setupI18n };\n", "import { i18n } from '@lingui/core';\nimport { html, LitElement, TemplateResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { map } from 'lit/directives/map.js';\nimport { range } from 'lit/directives/range.js';\n\nimport { activateI18n } from '../i18n.js';\n\nimport { messages as daMessages } from './locales/da/messages.mjs';\nimport { messages as enMessages } from './locales/en/messages.mjs';\nimport { messages as fiMessages } from './locales/fi/messages.mjs';\nimport { messages as nbMessages } from './locales/nb/messages.mjs';\nimport { messages as svMessages } from './locales/sv/messages.mjs';\nimport { styles } from './style.js';\n\nactivateI18n(enMessages, nbMessages, fiMessages, daMessages, svMessages);\n\n/**\n * A page indicator component that displays a series of dots representing pages.\n * One dot is highlighted to indicate the currently selected page.\n *\n * @example\n * ```html\n * <w-page-indicator page-count=\"5\" selected-page=\"2\"></w-page-indicator>\n * ```\n *\n * @property {number} pageCount - Total number of pages (minimum 1)\n * @property {number} selectedPage - Currently selected page (1-based index, clamped to valid range)\n */\nclass WarpPageIndicator extends LitElement {\n static styles = [styles];\n\n /** Currently selected page (1-based index) */\n @property({ type: Number, attribute: 'selected-page', reflect: true })\n selectedPage = 1;\n\n /** Total number of pages */\n @property({ type: Number, attribute: 'page-count', reflect: true })\n pageCount = 1;\n\n /** Validated page count (minimum 1) */\n private get _validPageCount(): number {\n return Math.max(1, Math.floor(this.pageCount));\n }\n\n /** Validated selected page (clamped to valid range) */\n private get _validSelectedPage(): number {\n const page = Math.floor(this.selectedPage);\n return Math.max(1, Math.min(page, this._validPageCount));\n }\n\n render(): TemplateResult {\n const pageCount = this._validPageCount;\n const selectedPage = this._validSelectedPage;\n\n const groupLabel = i18n._({\n id: 'page-indicator.aria.label',\n comment: 'Default screenreader message for page indicator group',\n message: 'Dot {selectedPage} is highlighted in a row of {pageCount} dots',\n values: { selectedPage, pageCount },\n });\n\n return html`\n <div class=\"w-page-indicator\" role=\"img\" aria-label=\"${groupLabel}\">\n <div class=\"w-page-indicator--container\">\n ${map(range(pageCount), (i) => {\n const pageNumber = i + 1;\n const isSelected = pageNumber === selectedPage;\n const classes = {\n 'w-page-indicator--dot': true,\n 'w-page-indicator--selecteddot': isSelected,\n };\n return html`<div class=\"${classMap(classes)}\"></div>`;\n })}\n </div>\n </div>\n `;\n }\n}\n\nif (!customElements.get('w-page-indicator')) {\n customElements.define('w-page-indicator', WarpPageIndicator);\n}\n\nexport { WarpPageIndicator };\n", "import { i18n, Messages } from '@lingui/core';\n\nexport const supportedLocales = ['en', 'nb', 'fi', 'da', 'sv'] as const;\ntype SupportedLocale = (typeof supportedLocales)[number];\n\nexport const defaultLocale = 'en';\n\nexport const getSupportedLocale = (usedLocale: string) => {\n return (\n supportedLocales.find((locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)) ||\n defaultLocale\n );\n};\n\nexport function detectLocale(): SupportedLocale {\n if (typeof window === 'undefined') {\n /**\n * Server locale detection. This requires e.g LANG environment variable to be set on the server.\n */\n const serverLocale = process.env.NMP_LANGUAGE || Intl.DateTimeFormat().resolvedOptions().locale;\n return getSupportedLocale(serverLocale);\n }\n\n try {\n /**\n * Client locale detection. Expects the lang attribute to be defined.\n */\n const htmlLocale = getDocumentLang(document);\n if (htmlLocale) {\n return getSupportedLocale(htmlLocale);\n }\n\n const frameLocale = getFrameElementLang();\n if (frameLocale) {\n return getSupportedLocale(frameLocale);\n }\n\n const parentLocale = getDocumentLang(getParentDocument());\n if (parentLocale) {\n return getSupportedLocale(parentLocale);\n }\n\n return defaultLocale;\n } catch (e) {\n console.warn('could not detect locale, falling back to source locale', e);\n return defaultLocale;\n }\n}\n\nexport const getMessages = (\n locale: SupportedLocale,\n enMsg: Messages,\n nbMsg: Messages,\n fiMsg: Messages,\n daMsg: Messages,\n svMsg: Messages,\n) => {\n if (locale === 'nb') return nbMsg;\n if (locale === 'fi') return fiMsg;\n if (locale === 'da') return daMsg;\n if (locale === 'sv') return svMsg;\n // Default to English\n return enMsg;\n};\n\nexport const activateI18n = (\n enMessages: Messages,\n nbMessages: Messages,\n fiMessages: Messages,\n daMessages: Messages,\n svMessages: Messages,\n) => {\n // Load all locales upfront to support dynamic locale switching\n i18n.load('en', enMessages);\n i18n.load('nb', nbMessages);\n i18n.load('fi', fiMessages);\n i18n.load('da', daMessages);\n i18n.load('sv', svMessages);\n\n const locale = detectLocale();\n i18n.activate(locale);\n notifyI18nChange();\n\n setupLangObserver();\n};\n\nexport const I18N_CHANGE_EVENT = 'warp-i18n-change';\n\nexport function notifyI18nChange() {\n if (typeof window === 'undefined') return;\n window.dispatchEvent(new Event(I18N_CHANGE_EVENT));\n}\n\nlet langObserverInitialized = false;\n\nfunction setupLangObserver() {\n if (langObserverInitialized) return;\n if (typeof window === 'undefined') return;\n if (!document?.documentElement) return;\n\n langObserverInitialized = true;\n\n const handleLangChange = () => {\n const nextLocale = detectLocale();\n if (i18n.locale !== nextLocale) {\n i18n.activate(nextLocale);\n notifyI18nChange();\n }\n };\n\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'lang') {\n handleLangChange();\n break;\n }\n }\n });\n\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] });\n\n const parentDocument = getParentDocument();\n if (parentDocument && parentDocument.documentElement && parentDocument !== document) {\n observer.observe(parentDocument.documentElement, { attributes: true, attributeFilter: ['lang'] });\n }\n\n const frameEl = getFrameElement();\n if (frameEl) {\n observer.observe(frameEl, { attributes: true, attributeFilter: ['lang'] });\n }\n}\n\nfunction getParentDocument(): Document | null {\n try {\n return window.parent?.document ?? null;\n } catch {\n return null;\n }\n}\n\nfunction getDocumentLang(doc: Document | null | undefined): string {\n try {\n return doc?.documentElement?.lang ?? '';\n } catch {\n return '';\n }\n}\n\nfunction getFrameElement(): HTMLElement | null {\n try {\n return (window.frameElement as HTMLElement | null) ?? null;\n } catch {\n return null;\n }\n}\n\nfunction getFrameElementLang(): string {\n try {\n return window.frameElement?.getAttribute?.('lang') ?? '';\n } catch {\n return '';\n }\n}\n", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Prik \\\",[\\\"selectedPage\\\"],\\\" er fremh\u00E6vet i en r\u00E6kke med \\\",[\\\"pageCount\\\"],\\\" prikker\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Dot \\\",[\\\"selectedPage\\\"],\\\" is highlighted in a row of \\\",[\\\"pageCount\\\"],\\\" dots\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Piste \\\",[\\\"selectedPage\\\"],\\\" on korostettuna \\\",[\\\"pageCount\\\"],\\\" pisteen riviss\u00E4\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Prikk \\\",[\\\"selectedPage\\\"],\\\" er uthevet i en rad med \\\",[\\\"pageCount\\\"],\\\" prikker\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"page-indicator.aria.label\\\":[\\\"Prick \\\",[\\\"selectedPage\\\"],\\\" \u00E4r markerad i en rad med \\\",[\\\"pageCount\\\"],\\\" prickar\\\"]}\");", "import { css } from 'lit';\n\nexport const styles = css`\n .w-page-indicator {\n display: grid;\n justify-content: center;\n height: max-content;\n pointer-events: none;\n }\n\n .w-page-indicator--container {\n display: grid;\n grid-auto-flow: column;\n gap: 8px;\n }\n\n .w-page-indicator--dot {\n background-color: var(--w-s-color-background-disabled);\n border-radius: 5px;\n width: 10px;\n height: 10px;\n }\n\n .w-page-indicator--selecteddot {\n background-color: var(--w-s-color-icon-selected);\n }\n`;\n"],
5
+ "mappings": "0pBAAA,IAAAA,EAAAC,EAAAC,GAAA,cAGA,OAAO,eAAeA,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5DA,EAAQ,cAAgBA,EAAQ,UAAY,OAO5C,IAAIC,GACH,SAAUA,EAAW,CAMlBA,EAAU,iBAAsB,oBAMhCA,EAAU,qBAA0B,wBAMpCA,EAAU,eAAoB,mBAK9BA,EAAU,iBAAsB,oBAKhCA,E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HexToInt", "hex", "validateAndParseHex", "errorName", "enforcedLength", "parsedHex", "parseHexadecimalCode", "code", "parsedCode", "parseUnicodeCode", "surrogateCode", "parsedSurrogateCode", "isCurlyBraced", "text", "parseUnicodeCodePointCode", "codePoint", "withoutBraces", "err", "parseOctalCode", "error", "singleCharacterEscapes", "parseSingleCharacterCode", "escapeMatch", "unraw", "raw", "allowOctals", "_", "backslash", "unicodeWithSurrogate", "surrogate", "unicode", "octal", "singleCharacter", "import_unraw", "isString", "s", "isFunction", "f", "cache", "defaultLocale", "normalizeLocales", "locales", "date", "value", "format", "_locales", "o", "getMemoized", "cacheKey", "time", "number", "plural", "ordinal", "offset", "rules", "_a", "_b", "plurals", "getKey", "construct", "key", "formatter", "type", "options", "localeKey", "UNICODE_REGEX", "OCTOTHORPE_PH", "getDefaultFormats", "locale", "passedLocales", "formats", "locales", "style", "format", "replaceOctothorpe", "value", "message", "numberFormat", "valueStr", "number", "cases", "offset", "plural", "selectFormatter", "date", "time", "rules", "_a", "interpolate", "translation", "values", "formatters", "formatMessage", "tokens", "token", "isString", "name", "type", "interpolatedFormat", "key", "value2", "formatter", "result", "__defProp$1", "__defNormalProp$1", "obj", "__publicField$1", "EventEmitter", "event", "listener", "maybeListeners", "index", "args", "__defProp", "__defNormalProp", "__publicField", "I18n", "params", "defaultLocale", "localeData", "maybeLocaleData", "compiler", "localeOrAllData", "messages", "maybeMessages", "localeOrMessages", "messages2", "id", "options", "messageForId", "messageMissing", "missing", "isFunction", "setupI18n", "i18n", "html", "LitElement", "property", "classMap", "map", "range", "supportedLocales", "defaultLocale", "getSupportedLocale", "usedLocale", "locale", "detectLocale", "serverLocale", "htmlLocale", "getDocumentLang", "frameLocale", "getFrameElementLang", "parentLocale", "getParentDocument", "e", "activateI18n", "enMessages", "nbMessages", "fiMessages", "daMessages", "svMessages", "i18n", "locale", "detectLocale", "notifyI18nChange", "setupLangObserver", "I18N_CHANGE_EVENT", "langObserverInitialized", "handleLangChange", "nextLocale", "observer", "mutations", "mutation", "parentDocument", "getParentDocument", "frameEl", "getFrameElement", "_a", "_b", "e", "getDocumentLang", "doc", "getFrameElementLang", "_c", "messages", "messages", "messages", "messages", "messages", "css", "styles", "activateI18n", "messages", "WarpPageIndicator", "LitElement", "page", "pageCount", "selectedPage", "groupLabel", "i18n", "html", "map", "range", "i", "classes", "classMap", "styles", "__decorateClass", "property"]
7
7
  }
@@ -1,13 +1,13 @@
1
- var ke=Object.create;var F=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,ze=Object.prototype.hasOwnProperty;var B=o=>{throw TypeError(o)};var G=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Pe=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ye(e))!ze.call(o,a)&&a!==r&&F(o,a,{get:()=>e[a],enumerable:!(t=q(e,a))||t.enumerable});return o};var Me=(o,e,r)=>(r=o!=null?ke(_e(o)):{},Pe(e||!o||!o.__esModule?F(r,"default",{value:o,enumerable:!0}):r,o));var g=(o,e,r,t)=>{for(var a=t>1?void 0:t?q(e,r):e,s=o.length-1,i;s>=0;s--)(i=o[s])&&(a=(t?i(e,r,a):i(a))||a);return t&&a&&F(e,r,a),a};var Se=(o,e,r)=>e.has(o)||B("Cannot "+r);var J=(o,e,r)=>e.has(o)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r);var V=(o,e,r)=>(Se(o,e,"access private method"),r);var K=G(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.errorMessages=w.ErrorType=void 0;var k;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(k=w.ErrorType||(w.ErrorType={}));w.errorMessages=new Map([[k.MalformedUnicode,"malformed Unicode character escape sequence"],[k.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[k.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[k.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[k.EndOfString,"malformed escape sequence at end of string"]])});var ee=G(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.unraw=b.errorMessages=b.ErrorType=void 0;var l=K();Object.defineProperty(b,"ErrorType",{enumerable:!0,get:function(){return l.ErrorType}});Object.defineProperty(b,"errorMessages",{enumerable:!0,get:function(){return l.errorMessages}});function Ee(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function M(o,e,r){let t=Ee(o);if(Number.isNaN(t)||r!==void 0&&r!==o.length)throw new SyntaxError(l.errorMessages.get(e));return t}function Ce(o){let e=M(o,l.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function Q(o,e){let r=M(o,l.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=M(e,l.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,t)}return String.fromCharCode(r)}function $e(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Ne(o){if(!$e(o))throw new SyntaxError(l.errorMessages.get(l.ErrorType.MalformedUnicode));let e=o.slice(1,-1),r=M(e,l.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(t){throw t instanceof RangeError?new SyntaxError(l.errorMessages.get(l.ErrorType.CodePointLimit)):t}}function Le(o,e=!1){if(e)throw new SyntaxError(l.errorMessages.get(l.ErrorType.OctalDeprecation));let r=parseInt(o,8);return String.fromCharCode(r)}var Oe=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Fe(o){return Oe.get(o)||o}var De=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function W(o,e=!1){return o.replace(De,function(r,t,a,s,i,n,c,p,v){if(t!==void 0)return"\\";if(a!==void 0)return Ce(a);if(s!==void 0)return Ne(s);if(i!==void 0)return Q(i,n);if(c!==void 0)return Q(c);if(p==="0")return"\0";if(p!==void 0)return Le(p,!e);if(v!==void 0)return Fe(v);throw new SyntaxError(l.errorMessages.get(l.ErrorType.EndOfString))})}b.unraw=W;b.default=W});var te=Me(ee(),1);var u=o=>typeof o=="string",Te=o=>typeof o=="function",re=new Map,ae="en";function Y(o){return[...Array.isArray(o)?o:[o],ae]}function A(o,e,r){let t=Y(o);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return S(()=>E("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(u(e)?new Date(e):e)}function je(o,e,r){let t;if(r||(r="default"),typeof r=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=r;return A(o,e,t)}function D(o,e,r){let t=Y(o);return S(()=>E("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function oe(o,e,r,{offset:t=0,...a}){var n,c;let s=Y(o),i=e?S(()=>E("plural-ordinal",s),()=>new Intl.PluralRules(s,{type:"ordinal"})):S(()=>E("plural-cardinal",s),()=>new Intl.PluralRules(s,{type:"cardinal"}));return(c=(n=a[r])!=null?n:a[i.select(r-t)])!=null?c:a.other}function S(o,e){let r=o(),t=re.get(r);return t||(t=e(),re.set(r,t)),t}function E(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var ie=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ne="%__lingui_octothorpe__%",Ye=(o,e,r={})=>{let t=e||o,a=i=>typeof i=="object"?i:r[i],s=(i,n)=>{let c=Object.keys(r).length?a("number"):void 0,p=D(t,i,c);return n.replace(new RegExp(ne,"g"),p)};return{plural:(i,n)=>{let{offset:c=0}=n,p=oe(t,!1,i,n);return s(i-c,p)},selectordinal:(i,n)=>{let{offset:c=0}=n,p=oe(t,!0,i,n);return s(i-c,p)},select:Ae,number:(i,n)=>D(t,i,a(n)||{style:n}),date:(i,n)=>A(t,i,a(n)||n),time:(i,n)=>je(t,i,a(n)||n)}},Ae=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function Ie(o,e,r){return(t={},a)=>{let s=Ye(e,r,a),i=(c,p=!1)=>Array.isArray(c)?c.reduce((v,z)=>{if(z==="#"&&p)return v+ne;if(u(z))return v+z;let[Z,f,H]=z,L={};f==="plural"||f==="selectordinal"||f==="select"?Object.entries(H).forEach(([O,xe])=>{L[O]=i(xe,f==="plural"||f==="selectordinal")}):L=H;let P;if(f){let O=s[f];P=O(t[Z],L)}else P=t[Z];return P==null?v:v+P},""):c,n=i(o);return u(n)&&ie.test(n)?(0,te.unraw)(n):u(n)?n:n?String(n):""}}var Re=Object.defineProperty,Ue=(o,e,r)=>e in o?Re(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Xe=(o,e,r)=>(Ue(o,typeof e!="symbol"?e+"":e,r),r),T=class{constructor(){Xe(this,"_events",{})}on(e,r){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(r);~a&&t.splice(a,1)}emit(e,...r){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},Ze=Object.defineProperty,He=(o,e,r)=>e in o?Ze(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,x=(o,e,r)=>(He(o,typeof e!="symbol"?e+"":e,r),r),j=class extends T{constructor(e){var r;super(),x(this,"_locale",""),x(this,"_locales"),x(this,"_localeData",{}),x(this,"_messages",{}),x(this,"_missing"),x(this,"_messageCompiler"),x(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((r=e.locale)!=null?r:ae,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){let t=this._localeData[e];t?Object.assign(t,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){let t=this._messages[e];t?Object.assign(t,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;e||(e=""),u(e)||(r=e.values||r,a=e.message,e=e.id);let s=this.messages[e],i=s===void 0,n=this._missing;if(n&&i)return Te(n)?n(this._locale,e):n;i&&this.emit("missing",{id:e,locale:this._locale});let c=s||a||e;return u(c)&&(this._messageCompiler?c=this._messageCompiler(c):console.warn(`Uncompiled message detected! Message:
1
+ var Pe=Object.create;var D=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var Ee=Object.getOwnPropertyNames;var Me=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var J=o=>{throw TypeError(o)};var V=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Ce=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Ee(e))!Se.call(o,a)&&a!==r&&D(o,a,{get:()=>e[a],enumerable:!(t=G(e,a))||t.enumerable});return o};var Le=(o,e,r)=>(r=o!=null?Pe(Me(o)):{},Ce(e||!o||!o.__esModule?D(r,"default",{value:o,enumerable:!0}):r,o));var g=(o,e,r,t)=>{for(var a=t>1?void 0:t?G(e,r):e,s=o.length-1,i;s>=0;s--)(i=o[s])&&(a=(t?i(e,r,a):i(a))||a);return t&&a&&D(e,r,a),a};var Ne=(o,e,r)=>e.has(o)||J("Cannot "+r);var K=(o,e,r)=>e.has(o)?J("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r);var Q=(o,e,r)=>(Ne(o,e,"access private method"),r);var W=V(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.errorMessages=w.ErrorType=void 0;var k;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(k=w.ErrorType||(w.ErrorType={}));w.errorMessages=new Map([[k.MalformedUnicode,"malformed Unicode character escape sequence"],[k.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[k.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[k.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[k.EndOfString,"malformed escape sequence at end of string"]])});var oe=V(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.unraw=b.errorMessages=b.ErrorType=void 0;var d=W();Object.defineProperty(b,"ErrorType",{enumerable:!0,get:function(){return d.ErrorType}});Object.defineProperty(b,"errorMessages",{enumerable:!0,get:function(){return d.errorMessages}});function $e(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function E(o,e,r){let t=$e(o);if(Number.isNaN(t)||r!==void 0&&r!==o.length)throw new SyntaxError(d.errorMessages.get(e));return t}function Oe(o){let e=E(o,d.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function ee(o,e){let r=E(o,d.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=E(e,d.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,t)}return String.fromCharCode(r)}function Fe(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function De(o){if(!Fe(o))throw new SyntaxError(d.errorMessages.get(d.ErrorType.MalformedUnicode));let e=o.slice(1,-1),r=E(e,d.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(t){throw t instanceof RangeError?new SyntaxError(d.errorMessages.get(d.ErrorType.CodePointLimit)):t}}function Te(o,e=!1){if(e)throw new SyntaxError(d.errorMessages.get(d.ErrorType.OctalDeprecation));let r=parseInt(o,8);return String.fromCharCode(r)}var je=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ye(o){return je.get(o)||o}var Ie=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function re(o,e=!1){return o.replace(Ie,function(r,t,a,s,i,n,l,p,v){if(t!==void 0)return"\\";if(a!==void 0)return Oe(a);if(s!==void 0)return De(s);if(i!==void 0)return ee(i,n);if(l!==void 0)return ee(l);if(p==="0")return"\0";if(p!==void 0)return Te(p,!e);if(v!==void 0)return Ye(v);throw new SyntaxError(d.errorMessages.get(d.ErrorType.EndOfString))})}b.unraw=re;b.default=re});var ie=Le(oe(),1);var u=o=>typeof o=="string",Ae=o=>typeof o=="function",te=new Map,ne="en";function I(o){return[...Array.isArray(o)?o:[o],ne]}function A(o,e,r){let t=I(o);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return M(()=>S("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(u(e)?new Date(e):e)}function Re(o,e,r){let t;if(r||(r="default"),typeof r=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=r;return A(o,e,t)}function T(o,e,r){let t=I(o);return M(()=>S("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function ae(o,e,r,{offset:t=0,...a}){var n,l;let s=I(o),i=e?M(()=>S("plural-ordinal",s),()=>new Intl.PluralRules(s,{type:"ordinal"})):M(()=>S("plural-cardinal",s),()=>new Intl.PluralRules(s,{type:"cardinal"}));return(l=(n=a[r])!=null?n:a[i.select(r-t)])!=null?l:a.other}function M(o,e){let r=o(),t=te.get(r);return t||(t=e(),te.set(r,t)),t}function S(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var se=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,le="%__lingui_octothorpe__%",Ue=(o,e,r={})=>{let t=e||o,a=i=>typeof i=="object"?i:r[i],s=(i,n)=>{let l=Object.keys(r).length?a("number"):void 0,p=T(t,i,l);return n.replace(new RegExp(le,"g"),p)};return{plural:(i,n)=>{let{offset:l=0}=n,p=ae(t,!1,i,n);return s(i-l,p)},selectordinal:(i,n)=>{let{offset:l=0}=n,p=ae(t,!0,i,n);return s(i-l,p)},select:Xe,number:(i,n)=>T(t,i,a(n)||{style:n}),date:(i,n)=>A(t,i,a(n)||n),time:(i,n)=>Re(t,i,a(n)||n)}},Xe=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function He(o,e,r){return(t={},a)=>{let s=Ue(e,r,a),i=(l,p=!1)=>Array.isArray(l)?l.reduce((v,z)=>{if(z==="#"&&p)return v+le;if(u(z))return v+z;let[q,f,B]=z,O={};f==="plural"||f==="selectordinal"||f==="select"?Object.entries(B).forEach(([F,ze])=>{O[F]=i(ze,f==="plural"||f==="selectordinal")}):O=B;let P;if(f){let F=s[f];P=F(t[q],O)}else P=t[q];return P==null?v:v+P},""):l,n=i(o);return u(n)&&se.test(n)?(0,ie.unraw)(n):u(n)?n:n?String(n):""}}var Ze=Object.defineProperty,qe=(o,e,r)=>e in o?Ze(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Be=(o,e,r)=>(qe(o,typeof e!="symbol"?e+"":e,r),r),j=class{constructor(){Be(this,"_events",{})}on(e,r){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(r);~a&&t.splice(a,1)}emit(e,...r){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},Ge=Object.defineProperty,Je=(o,e,r)=>e in o?Ge(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,x=(o,e,r)=>(Je(o,typeof e!="symbol"?e+"":e,r),r),Y=class extends j{constructor(e){var r;super(),x(this,"_locale",""),x(this,"_locales"),x(this,"_localeData",{}),x(this,"_messages",{}),x(this,"_missing"),x(this,"_messageCompiler"),x(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((r=e.locale)!=null?r:ne,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){let t=this._localeData[e];t?Object.assign(t,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){let t=this._messages[e];t?Object.assign(t,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;e||(e=""),u(e)||(r=e.values||r,a=e.message,e=e.id);let s=this.messages[e],i=s===void 0,n=this._missing;if(n&&i)return Ae(n)?n(this._locale,e):n;i&&this.emit("missing",{id:e,locale:this._locale});let l=s||a||e;return u(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
3
3
 
4
- > ${c}
4
+ > ${l}
5
5
 
6
6
  That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
7
7
  ICU features such as interpolation and plurals will not work properly for that message.
8
8
 
9
9
  Please compile your catalog first.
10
- `)),u(c)&&ie.test(c)?JSON.parse(`"${c}"`):u(c)?c:Ie(c,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return A(this._locales||this._locale,e,r)}number(e,r){return D(this._locales||this._locale,e,r)}};function qe(o={}){return new j(o)}var d=qe();import{css as or,html as _,LitElement as tr,nothing as U}from"lit";import{property as C}from"lit/decorators.js";import{html as Ge,LitElement as Je}from"lit";import{property as I,state as Ve}from"lit/decorators.js";import{classMap as Ke}from"lit/directives/class-map.js";import{css as Be}from"lit";var se=Be`
10
+ `)),u(l)&&se.test(l)?JSON.parse(`"${l}"`):u(l)?l:He(l,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return A(this._locales||this._locale,e,r)}number(e,r){return T(this._locales||this._locale,e,r)}};function Ve(o={}){return new Y(o)}var c=Ve();import{css as dr,html as _,LitElement as pr,nothing as H}from"lit";import{property as L}from"lit/decorators.js";import{html as Qe,LitElement as We}from"lit";import{property as R,state as er}from"lit/decorators.js";import{classMap as rr}from"lit/directives/class-map.js";import{css as Ke}from"lit";var ce=Ke`
11
11
  :host {
12
12
  display: inline-block;
13
13
  }
@@ -32,7 +32,7 @@ Please compile your catalog first.
32
32
  --w-icon-size: 32px;
33
33
  }
34
34
 
35
- `;var R=new Map,Qe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function We(o,e={}){var t;let r=(t=e.responseParser)!=null?t:(a=>a.text());return R.has(o)||R.set(o,fetch(o).then(r)),R.get(o)}var h=class extends Je{constructor(){super(...arguments);this.name="";this.size="medium";this.locale="en";this.svg=null}async fetchIcon(r){let t=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await We(t);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch(a){return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(Qe,"text/html").body.firstElementChild),this.svg=r}render(){let r={"w-icon":!0,"w-icon--s":this.size==="small","w-icon--m":this.size==="medium","w-icon--l":this.size==="large"},t=typeof this.size=="string"&&this.size.endsWith("px")?`--w-icon-size: ${this.size};`:"";return Ge`<div class="${Ke(r)}" style="${t}" part="w-${this.name.toLowerCase()}">${this.svg}</div>`}};h.styles=[se],g([I({type:String,reflect:!0})],h.prototype,"name",2),g([I({type:String,reflect:!0})],h.prototype,"size",2),g([I({type:String,reflect:!0})],h.prototype,"locale",2),g([Ve()],h.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",h);var er=["en","nb","fi","da","sv"],le="en",ce=o=>er.find(e=>o===e||o.toLowerCase().includes(e))||le;function y(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return ce(o)}try{let o=document.documentElement.lang;return ce(o)}catch(o){return console.warn("could not detect locale, falling back to source locale",o),le}}var de=(o,e,r,t,a)=>{d.load("en",o),d.load("nb",e),d.load("fi",r),d.load("da",t),d.load("sv",a);let s=y();d.activate(s)};import{css as pe}from"lit";var ge=pe`
35
+ `;var U=new Map,or='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function tr(o,e={}){var t;let r=(t=e.responseParser)!=null?t:(a=>a.text());return U.has(o)||U.set(o,fetch(o).then(r)),U.get(o)}var h=class extends We{constructor(){super(...arguments);this.name="";this.size="medium";this.locale="en";this.svg=null}async fetchIcon(r){let t=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await tr(t);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch(a){return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(or,"text/html").body.firstElementChild),this.svg=r}render(){let r={"w-icon":!0,"w-icon--s":this.size==="small","w-icon--m":this.size==="medium","w-icon--l":this.size==="large"},t=typeof this.size=="string"&&this.size.endsWith("px")?`--w-icon-size: ${this.size};`:"";return Qe`<div class="${rr(r)}" style="${t}" part="w-${this.name.toLowerCase()}">${this.svg}</div>`}};h.styles=[ce],g([R({type:String,reflect:!0})],h.prototype,"name",2),g([R({type:String,reflect:!0})],h.prototype,"size",2),g([R({type:String,reflect:!0})],h.prototype,"locale",2),g([er()],h.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",h);var ar=["en","nb","fi","da","sv"],X="en",C=o=>ar.find(e=>o===e||o.toLowerCase().includes(e))||X;function y(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return C(o)}try{let o=pe(document);if(o)return C(o);let e=lr();if(e)return C(e);let r=pe(ue());return r?C(r):X}catch(o){return console.warn("could not detect locale, falling back to source locale",o),X}}var ge=(o,e,r,t,a)=>{c.load("en",o),c.load("nb",e),c.load("fi",r),c.load("da",t),c.load("sv",a);let s=y();c.activate(s),be(),nr()},ir="warp-i18n-change";function be(){typeof window!="undefined"&&window.dispatchEvent(new Event(ir))}var de=!1;function nr(){if(de||typeof window=="undefined"||!(document!=null&&document.documentElement))return;de=!0;let o=()=>{let a=y();c.locale!==a&&(c.activate(a),be())},e=new MutationObserver(a=>{for(let s of a)if(s.type==="attributes"&&s.attributeName==="lang"){o();break}});e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=ue();r&&r.documentElement&&r!==document&&e.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=sr();t&&e.observe(t,{attributes:!0,attributeFilter:["lang"]})}function ue(){var o,e;try{return(e=(o=window.parent)==null?void 0:o.document)!=null?e:null}catch(r){return null}}function pe(o){var e,r;try{return(r=(e=o==null?void 0:o.documentElement)==null?void 0:e.lang)!=null?r:""}catch(t){return""}}function sr(){var o;try{return(o=window.frameElement)!=null?o:null}catch(e){return null}}function lr(){var o,e,r;try{return(r=(e=(o=window.frameElement)==null?void 0:o.getAttribute)==null?void 0:e.call(o,"lang"))!=null?r:""}catch(t){return""}}import{css as he}from"lit";var me=he`
36
36
  *,
37
37
  :before,
38
38
  :after {
@@ -305,7 +305,7 @@ Please compile your catalog first.
305
305
  svg {
306
306
  pointer-events: none;
307
307
  }
308
- `,kr=pe`*, :before, :after {
308
+ `,Cr=he`*, :before, :after {
309
309
  --w-rotate: 0;
310
310
  --w-rotate-x: 0;
311
311
  --w-rotate-y: 0;
@@ -2471,33 +2471,33 @@ Please compile your catalog first.
2471
2471
  display: none
2472
2472
  }
2473
2473
  }
2474
- `;var be=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE6ste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var ue=JSON.parse('{"pagination.aria.first-page":["First page"],"pagination.aria.icon-suffix":["icon"],"pagination.aria.next-page":["Next page"],"pagination.aria.page":["Page ",["currentPage"]],"pagination.aria.pagination":["Pages"],"pagination.aria.prev-page":["Previous page"]}');var he=JSON.parse('{"pagination.aria.first-page":["Ensimm\xE4inen sivu"],"pagination.aria.icon-suffix":["kuvake"],"pagination.aria.next-page":["Seuraava sivu"],"pagination.aria.page":["Sivu ",["currentPage"]],"pagination.aria.pagination":["Sivut"],"pagination.aria.prev-page":["Edellinen sivu"]}');var me=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["Neste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var ve=JSON.parse('{"pagination.aria.first-page":["F\xF6rsta sidan"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE4sta sida"],"pagination.aria.page":["Sida ",["currentPage"]],"pagination.aria.pagination":["Sidor"],"pagination.aria.prev-page":["F\xF6reg\xE5ende sida"]}');import{css as rr}from"lit";var fe=rr`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.border-0{border-width:0}.rounded-full{border-radius:9999px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.hover\\:no-underline:hover,.focus\\:no-underline:focus{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-4{padding:.4rem}.p-8{padding:.8rem}.visible{visibility:visible}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:768px){.md\\:block{display:block}.md\\:hidden{display:none}}`;var X=()=>d._({id:"pagination.aria.icon-suffix",message:"icon",comment:"Suffix added at the end of icon titles when img semantics are lost on an html element"}),$="hover:no-underline focus:no-underline focusable inline-flex justify-center items-center transition-colors ease-in-out min-h-[44px] min-w-[44px] p-4 rounded-full border-0 hover:bg-clip-padding",N,we,m=class extends tr{constructor(){super();J(this,N);this.currentPageNumber=1;this.visiblePages=7;de(ue,me,he,be,ve)}get shouldShowShowFirstPageButton(){return this.currentPageNumber-2>0}get shouldShowPreviousPageButton(){return this.currentPageNumber-1>0}get shouldShowNextPageButton(){return this.currentPageNumber<this.pages}get currentPageIndex(){return this.currentPageNumber-1}get visiblePageNumbers(){if(this.pages<=this.visiblePages)return Array.from({length:this.pages},(s,i)=>i+1);let r=Math.floor(this.visiblePages/2),t=Math.max(1,this.currentPageNumber-r),a=Math.min(this.pages,t+this.visiblePages-1);return a-t+1<this.visiblePages&&(t=Math.max(1,a-this.visiblePages+1)),Array.from({length:a-t+1},(s,i)=>t+i)}render(){let r=this.visiblePageNumbers;return _`<nav class="flex items-center justify-center p-8" @click="${V(this,N,we)}">
2474
+ `;var ve=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE6ste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var fe=JSON.parse('{"pagination.aria.first-page":["First page"],"pagination.aria.icon-suffix":["icon"],"pagination.aria.next-page":["Next page"],"pagination.aria.page":["Page ",["currentPage"]],"pagination.aria.pagination":["Pages"],"pagination.aria.prev-page":["Previous page"]}');var we=JSON.parse('{"pagination.aria.first-page":["Ensimm\xE4inen sivu"],"pagination.aria.icon-suffix":["kuvake"],"pagination.aria.next-page":["Seuraava sivu"],"pagination.aria.page":["Sivu ",["currentPage"]],"pagination.aria.pagination":["Sivut"],"pagination.aria.prev-page":["Edellinen sivu"]}');var xe=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["Neste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var ke=JSON.parse('{"pagination.aria.first-page":["F\xF6rsta sidan"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE4sta sida"],"pagination.aria.page":["Sida ",["currentPage"]],"pagination.aria.pagination":["Sidor"],"pagination.aria.prev-page":["F\xF6reg\xE5ende sida"]}');import{css as cr}from"lit";var ye=cr`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.border-0{border-width:0}.rounded-full{border-radius:9999px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.hover\\:no-underline:hover,.focus\\:no-underline:focus{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-4{padding:.4rem}.p-8{padding:.8rem}.visible{visibility:visible}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:768px){.md\\:block{display:block}.md\\:hidden{display:none}}`;var Z=()=>c._({id:"pagination.aria.icon-suffix",message:"icon",comment:"Suffix added at the end of icon titles when img semantics are lost on an html element"}),N="hover:no-underline focus:no-underline focusable inline-flex justify-center items-center transition-colors ease-in-out min-h-[44px] min-w-[44px] p-4 rounded-full border-0 hover:bg-clip-padding",$,_e,m=class extends pr{constructor(){super();K(this,$);this.currentPageNumber=1;this.visiblePages=7;ge(fe,xe,we,ve,ke)}get shouldShowShowFirstPageButton(){return this.currentPageNumber-2>0}get shouldShowPreviousPageButton(){return this.currentPageNumber-1>0}get shouldShowNextPageButton(){return this.currentPageNumber<this.pages}get currentPageIndex(){return this.currentPageNumber-1}get visiblePageNumbers(){if(this.pages<=this.visiblePages)return Array.from({length:this.pages},(s,i)=>i+1);let r=Math.floor(this.visiblePages/2),t=Math.max(1,this.currentPageNumber-r),a=Math.min(this.pages,t+this.visiblePages-1);return a-t+1<this.visiblePages&&(t=Math.max(1,a-this.visiblePages+1)),Array.from({length:a-t+1},(s,i)=>t+i)}render(){let r=this.visiblePageNumbers;return _`<nav class="flex items-center justify-center p-8" @click="${Q(this,$,_e)}">
2475
2475
  <h1 class="sr-only">
2476
- ${d._({id:"pagination.aria.pagination",message:"Pages",comment:"Default screenreader message for pagination container in the pagination component"})}
2476
+ ${c._({id:"pagination.aria.pagination",message:"Pages",comment:"Default screenreader message for pagination container in the pagination component"})}
2477
2477
  </h1>
2478
2478
  <div class="flex items-center s-text-link">
2479
2479
  ${this.shouldShowShowFirstPageButton?_`<a
2480
2480
  data-page-number="1"
2481
2481
  href="${this.baseUrl}1"
2482
- class="${$+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
2482
+ class="${N+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
2483
2483
  <span class="sr-only"
2484
- >${d._({id:"pagination.aria.first-page",message:"First page",comment:"Default screenreader message for first page link in the pagination component"})},</span
2484
+ >${c._({id:"pagination.aria.first-page",message:"First page",comment:"Default screenreader message for first page link in the pagination component"})},</span
2485
2485
  >
2486
2486
  <w-icon name="ChevronDoubleLeft" size="small" locale="${y()}" class="pointer-events-none flex items-center" class="flex"></w-icon>
2487
- <span class="sr-only">${X()}</span>
2488
- </a>`:U}
2487
+ <span class="sr-only">${Z()}</span>
2488
+ </a>`:H}
2489
2489
  ${this.shouldShowPreviousPageButton?_`<a
2490
2490
  data-page-number="${this.currentPageNumber-1}"
2491
2491
  href="${this.baseUrl}${this.currentPageNumber-1}"
2492
- class="${$+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
2492
+ class="${N+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
2493
2493
  <span class="sr-only"
2494
- >${d._({id:"pagination.aria.prev-page",message:"Previous page",comment:"Default screenreader message for previous page link in the pagination component"})},</span
2494
+ >${c._({id:"pagination.aria.prev-page",message:"Previous page",comment:"Default screenreader message for previous page link in the pagination component"})},</span
2495
2495
  >
2496
2496
  <w-icon name="ChevronLeft" size="small" locale="${y()}" class="pointer-events-none flex items-center" class="flex"></w-icon>
2497
- <span class="sr-only">${X()}</span>
2498
- </a>`:U}
2497
+ <span class="sr-only">${Z()}</span>
2498
+ </a>`:H}
2499
2499
  <div class="hidden md:block">
2500
- ${r.map(t=>{let a=t===this.currentPageNumber,s=`${this.baseUrl}${t}`,i=$;a?i+=" s-bg-primary s-text-inverted":i+=" hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]";let n=d._({id:"pagination.aria.page",message:"Page {currentPage}",values:{currentPage:t},comment:"Default screenreader message for page link in the pagination component"});return _`<a
2500
+ ${r.map(t=>{let a=t===this.currentPageNumber,s=`${this.baseUrl}${t}`,i=N;a?i+=" s-bg-primary s-text-inverted":i+=" hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]";let n=c._({id:"pagination.aria.page",message:"Page {currentPage}",values:{currentPage:t},comment:"Default screenreader message for page link in the pagination component"});return _`<a
2501
2501
  data-page-number="${t}"
2502
2502
  aria-label="${n}"
2503
2503
  href="${s}"
@@ -2506,21 +2506,21 @@ Please compile your catalog first.
2506
2506
  >${t}</a
2507
2507
  >`})}
2508
2508
  </div>
2509
- <span class="block md:hidden p-8 font-bold">${d._({id:"pagination.label.current-page",message:"Page {currentPage}",values:{currentPage:this.currentPageNumber},comment:"Default message for current page label in the pagination component"})}</span>
2509
+ <span class="block md:hidden p-8 font-bold">${c._({id:"pagination.label.current-page",message:"Page {currentPage}",values:{currentPage:this.currentPageNumber},comment:"Default message for current page label in the pagination component"})}</span>
2510
2510
  ${this.shouldShowNextPageButton?_`<a
2511
2511
  data-page-number="${this.currentPageNumber+1}"
2512
2512
  href="${this.baseUrl}${this.currentPageNumber+1}"
2513
- class="${$+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
2513
+ class="${N+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
2514
2514
  <span class="sr-only">
2515
- ${d._({id:"pagination.aria.next-page",message:"Next page",comment:"Default screenreader message for next page link in the pagination component"})},</span
2515
+ ${c._({id:"pagination.aria.next-page",message:"Next page",comment:"Default screenreader message for next page link in the pagination component"})},</span
2516
2516
  >
2517
2517
  <w-icon name="ChevronRight" size="small" locale="${y()}" class="pointer-events-none flex items-center" class="flex"></w-icon>
2518
- <span class="sr-only">${X()}</span>
2519
- </a>`:U}
2518
+ <span class="sr-only">${Z()}</span>
2519
+ </a>`:H}
2520
2520
  </div>
2521
- </nav>`}};N=new WeakSet,we=function(r){let t=r.target.getAttribute("data-page-number");this.dispatchEvent(new CustomEvent("page-click",{detail:{clickedPage:t},bubbles:!0,composed:!0}))},m.styles=[ge,fe,or`
2521
+ </nav>`}};$=new WeakSet,_e=function(r){let t=r.target.getAttribute("data-page-number");this.dispatchEvent(new CustomEvent("page-click",{detail:{clickedPage:t},bubbles:!0,composed:!0}))},m.styles=[me,ye,dr`
2522
2522
  w-icon {
2523
2523
  height: 16px;
2524
2524
  }
2525
- `],g([C({type:String,reflect:!0,attribute:"base-url"})],m.prototype,"baseUrl",2),g([C({type:Number,reflect:!0})],m.prototype,"pages",2),g([C({type:Number,reflect:!0,attribute:"current-page"})],m.prototype,"currentPageNumber",2),g([C({type:Number,reflect:!0,attribute:"visible-pages"})],m.prototype,"visiblePages",2);customElements.get("w-pagination")||customElements.define("w-pagination",m);export{m as WarpPagination};
2525
+ `],g([L({type:String,reflect:!0,attribute:"base-url"})],m.prototype,"baseUrl",2),g([L({type:Number,reflect:!0})],m.prototype,"pages",2),g([L({type:Number,reflect:!0,attribute:"current-page"})],m.prototype,"currentPageNumber",2),g([L({type:Number,reflect:!0,attribute:"visible-pages"})],m.prototype,"visiblePages",2);customElements.get("w-pagination")||customElements.define("w-pagination",m);export{m as WarpPagination};
2526
2526
  //# sourceMappingURL=pagination.js.map