@foxy.io/elements 1.8.0-beta.1 → 1.8.1-beta.1
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.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +2 -2
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +3 -3
- package/dist/cdn/foxy-customer-portal.js +14 -14
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +230 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +2 -2
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/{shared-3747bcc6.js → shared-090432b4.js} +1 -1
- package/dist/cdn/shared-1d0ef57d.js +1 -0
- package/dist/cdn/{shared-720656e1.js → shared-23966eed.js} +1 -1
- package/dist/cdn/{shared-0fab8117.js → shared-497fd63c.js} +1 -1
- package/dist/cdn/{shared-963eb150.js → shared-4b33c6d2.js} +2 -2
- package/dist/cdn/{shared-18f51b0f.js → shared-525dd8c8.js} +1 -1
- package/dist/cdn/{shared-654b4125.js → shared-6872bf5c.js} +1 -1
- package/dist/cdn/shared-69d0ca61.js +1 -0
- package/dist/cdn/{shared-0073399d.js → shared-6f84ea16.js} +1 -1
- package/dist/cdn/{shared-3fbdd8df.js → shared-77bdf956.js} +1 -1
- package/dist/cdn/shared-8057ee9c.js +1 -0
- package/dist/cdn/{shared-67b701fa.js → shared-84203d52.js} +1 -1
- package/dist/cdn/shared-851b97ef.js +1 -0
- package/dist/cdn/{shared-3eee4ff4.js → shared-8f34ce95.js} +1 -1
- package/dist/cdn/{shared-75c1b56a.js → shared-92d03925.js} +1 -1
- package/dist/cdn/{shared-4d16f087.js → shared-96de56d4.js} +1 -1
- package/dist/cdn/{shared-090ed5f4.js → shared-9f78e096.js} +1 -1
- package/dist/cdn/{shared-c7566461.js → shared-a5fbfdc7.js} +1 -1
- package/dist/cdn/{shared-4b3d6aeb.js → shared-a7709d26.js} +1 -1
- package/dist/cdn/{shared-b817761e.js → shared-aac9fed8.js} +1 -1
- package/dist/cdn/{shared-4b7b3564.js → shared-b13a5ed3.js} +1 -1
- package/dist/cdn/{shared-a67a2bc1.js → shared-bba615b8.js} +1 -1
- package/dist/cdn/{shared-3e548f74.js → shared-bf28ab5e.js} +1 -1
- package/dist/cdn/shared-c70d9713.js +1 -0
- package/dist/cdn/{shared-5bfca1d2.js → shared-e058cb87.js} +1 -1
- package/dist/cdn/{shared-97fc8fd7.js → shared-f06d08d5.js} +1 -1
- package/dist/cdn/translations/shared/en.json +3 -0
- package/dist/cdn/translations/shared/es.json +3 -0
- package/dist/elements/private/Dialog/DialogWindow.d.ts +3 -2
- package/dist/elements/private/Dialog/DialogWindow.js +11 -1
- package/dist/elements/private/Dialog/DialogWindow.js.map +1 -1
- package/dist/elements/public/CustomerApi/cookieStorage.js +2 -1
- package/dist/elements/public/CustomerApi/cookieStorage.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/private/DisallowedDates/DisallowedDates.js +1 -1
- package/dist/elements/public/CustomerPortalSettings/private/DisallowedDates/DisallowedDates.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/private/FrequencyList/FrequencyList.js +3 -2
- package/dist/elements/public/CustomerPortalSettings/private/FrequencyList/FrequencyList.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/private/NextDateModificationRule/NextDateModificationRule.js +2 -2
- package/dist/elements/public/CustomerPortalSettings/private/NextDateModificationRule/NextDateModificationRule.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/private/OriginsList/OriginsList.js +2 -1
- package/dist/elements/public/CustomerPortalSettings/private/OriginsList/OriginsList.js.map +1 -1
- package/dist/elements/public/SignInForm/SignInForm.d.ts +7 -0
- package/dist/elements/public/SignInForm/SignInForm.js +57 -2
- package/dist/elements/public/SignInForm/SignInForm.js.map +1 -1
- package/dist/elements/public/SignInForm/index.d.ts +1 -0
- package/dist/elements/public/SignInForm/index.js +1 -0
- package/dist/elements/public/SignInForm/index.js.map +1 -1
- package/dist/elements/public/SignInForm/types.d.ts +3 -0
- package/dist/elements/public/SignInForm/types.js.map +1 -1
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.js +2 -2
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
- package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.js +8 -2
- package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.js.map +1 -1
- package/dist/mixins/themeable.js +30 -25
- package/dist/mixins/themeable.js.map +1 -1
- package/dist/mixins/translatable.d.ts +3 -4
- package/dist/mixins/translatable.js +2 -6
- package/dist/mixins/translatable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-51f550e3.js +0 -1
- package/dist/cdn/shared-6dc6912f.js +0 -1
- package/dist/cdn/shared-75bde6c4.js +0 -1
- package/dist/cdn/shared-916991a9.js +0 -1
- package/dist/cdn/shared-a494131d.js +0 -1
- package/dist/cdn/shared-c7ab8ec5.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t}from"./shared-
|
|
1
|
+
import{_ as t}from"./shared-84203d52.js";import{T as e}from"./shared-1d0ef57d.js";import{a as s}from"./shared-8057ee9c.js";import{p as a}from"./shared-69d0ca61.js";let n,o,r,i,l=t=>t;class c extends(s(e,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:e=>{const s=e.data._embedded["fx:last_transaction"],o=`${s.total_order} ${s.currency_code}`;return e.html(n||(n=l`
|
|
2
2
|
<foxy-i18n
|
|
3
3
|
data-testclass="i18n frequencies"
|
|
4
4
|
class="font-semibold text-s font-tnum"
|
|
@@ -18,7 +18,7 @@ import{_ as t}from"./shared-67b701fa.js";import{T as e}from"./shared-916991a9.js
|
|
|
18
18
|
.options=${0}
|
|
19
19
|
>
|
|
20
20
|
</foxy-i18n>
|
|
21
|
-
`),t.lang,t.ns,s)}},c.statusColumn={hideBelow:"md",cell:t=>{let e,s,a;if(t.data.first_failed_transaction_date)s=t.data.first_failed_transaction_date,a="subscription_failed",e="bg-error-10 text-error";else if(t.data.end_date){s=t.data.end_date;const n=new Date(s).getTime()>Date.now();a=n?"subscription_will_be_cancelled":"subscription_cancelled",e=n?"bg-success-10 text-success":"bg-contrast-5 text-tertiary"}else s=t.data.next_transaction_date,a="subscription_active",e="bg-success-10 text-success";return t.html(r||(r=l`
|
|
21
|
+
`),t.lang,t.ns,s)}},c.statusColumn={hideBelow:"md",cell:t=>{let e,s,a;if(t.data.first_failed_transaction_date)s=t.data.first_failed_transaction_date,a="subscription_failed",e="bg-error-10 text-error";else if(t.data.end_date){s=t.data.end_date;const n=new Date(s).getTime()>Date.now();a=n?"subscription_will_be_cancelled":"subscription_cancelled",e=n?"bg-success-10 text-success":"bg-contrast-5 text-tertiary"}else s=t.data.next_transaction_date,t.data.is_active?(a="subscription_active",e="bg-success-10 text-success"):(a="subscription_inactive",e="bg-contrast-5 text-tertiary");return t.html(r||(r=l`
|
|
22
22
|
<foxy-i18n
|
|
23
23
|
data-testclass="i18n statuses"
|
|
24
24
|
class="px-s py-xs text-s font-semibold rounded ${0}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as e,_ as s,h as t}from"./shared-
|
|
1
|
+
import{L as e,_ as s,h as t}from"./shared-84203d52.js";import{b as r}from"./shared-8057ee9c.js";let a,o=e=>e;class n extends e{constructor(){super(...arguments),this.frame=!1}static get properties(){return s(s({},super.properties),{},{frame:{type:Boolean}})}static get styles(){return r.styles}render(){return t(a||(a=o` <section class="space-y-s font-lumo antialiased"> <h3 class="${0}"> <slot name="header"></slot> </h3> <div class="rounded-t-l rounded-b-l ${0}"> <slot></slot> </div> </section> `),"text-s font-medium text-secondary leading-none "+(this.frame?"":"pl-m"),this.frame?"border border-contrast-10":"")}}export{n as G};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as t,_ as e,c as i,h as s}from"./shared-67b701fa.js";import"./shared-b98f88c9.js";import{p as r}from"./shared-87ca7818.js";import"./shared-45d647e4.js";import"./shared-e0248713.js";import{b as a,S as n,c as o}from"./shared-c7ab8ec5.js";import{s as c,I as l,D as h}from"./shared-a67a2bc1.js";import"./shared-75bde6c4.js";import{E as d}from"./shared-5bfca1d2.js";import"./shared-54c485d2.js";import"./shared-3ae39e52.js";import"./foxy-i18n.js";import"./shared-cd700eac.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends t{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return e(e({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}let v,b,w,x,q,I,$,E,S=t=>t;class D extends(n(t)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return e(e({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=S`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=c({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,h,d]=this.data;return s(b||(b=S` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,h?s(q||(q=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,r,e,t>102?s(I||(I=S`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s($||($=S`<div class="m-auto text-xxxl">+${0}</div>`),t-3),d?s(E||(E=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,d):"",i,e,i,e)}}let k,C,A=t=>t;class N extends D{static get scopedElements(){return{"x-pic":f}}}class P extends D{static get scopedElements(){return{"x-pic":N}}}class F extends(n(t)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":P}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=c({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(k||(k=A`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(C||(C=A`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class T extends o{static get properties(){return e(e({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let j,O,B,L,R,z,V,M=t=>t;class Q extends T{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=Q.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(j||(j=M`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":d,"x-preview":F,"x-i18n":l}}static get properties(){return e(e({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(O||(O=M`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(B||(B=M` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(L||(L=M` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(R||(R=M` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(z||(z=M`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(V||(V=M` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=Q.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return Q.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}Q.__existingIds=[];let W,J,U,X,H,G,K=t=>t;class Y extends T{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");Y.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":d,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":h,"x-item":Q}}static get properties(){return e(e({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>Y.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>Y.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:(t,e)=>{if(!t)return[];const i=JSON.parse(t);if(!Array.isArray(i))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of i)if(!Y.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return i.filter(Y.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(J||(J=K` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(U||(U=K` ${0}`),[...this.__data.entries()].map((([t,e])=>s(X||(X=K`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(H||(H=K` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(G||(G=K` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(W||(W=K`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(t=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!Y.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(Y.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",Y),customElements.define("foxy-item",Q);export{Y as I,F as P,Q as a};
|
|
1
|
+
import{L as t,_ as e,c as i,h as s}from"./shared-84203d52.js";import"./shared-b98f88c9.js";import{p as r}from"./shared-87ca7818.js";import"./shared-45d647e4.js";import"./shared-e0248713.js";import{b as a,S as n,c as o}from"./shared-8057ee9c.js";import{s as c,I as l,D as h}from"./shared-bba615b8.js";import"./shared-851b97ef.js";import{E as d}from"./shared-e058cb87.js";import"./shared-54c485d2.js";import"./shared-3ae39e52.js";import"./foxy-i18n.js";import"./shared-cd700eac.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends t{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return e(e({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}let v,b,w,x,q,I,$,E,S=t=>t;class D extends(n(t)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return e(e({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=S`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=c({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,h,d]=this.data;return s(b||(b=S` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,h?s(q||(q=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,r,e,t>102?s(I||(I=S`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s($||($=S`<div class="m-auto text-xxxl">+${0}</div>`),t-3),d?s(E||(E=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,d):"",i,e,i,e)}}let k,C,A=t=>t;class N extends D{static get scopedElements(){return{"x-pic":f}}}class P extends D{static get scopedElements(){return{"x-pic":N}}}class F extends(n(t)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":P}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=c({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(k||(k=A`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(C||(C=A`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class T extends o{static get properties(){return e(e({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let j,O,B,L,R,z,V,M=t=>t;class Q extends T{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=Q.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(j||(j=M`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":d,"x-preview":F,"x-i18n":l}}static get properties(){return e(e({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(O||(O=M`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(B||(B=M` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(L||(L=M` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(R||(R=M` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(z||(z=M`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(V||(V=M` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=Q.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return Q.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}Q.__existingIds=[];let W,J,U,X,H,G,K=t=>t;class Y extends T{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");Y.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":d,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":h,"x-item":Q}}static get properties(){return e(e({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>Y.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>Y.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:(t,e)=>{if(!t)return[];const i=JSON.parse(t);if(!Array.isArray(i))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of i)if(!Y.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return i.filter(Y.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(J||(J=K` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(U||(U=K` ${0}`),[...this.__data.entries()].map((([t,e])=>s(X||(X=K`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(H||(H=K` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(G||(G=K` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(W||(W=K`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(t=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!Y.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(Y.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",Y),customElements.define("foxy-item",Q);export{Y as I,F as P,Q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as r}from"./shared-84203d52.js";import{p as s}from"./shared-87ca7818.js";function t(t){var a;const n=s(t),o=null!==(a={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[n.units])&&void 0!==a?a:n.units;return r(r({},n),{},{units:o})}export{t as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-3ae39e52.js";import"./shared-b98f88c9.js";import"./shared-
|
|
1
|
+
import"./shared-3ae39e52.js";import"./shared-b98f88c9.js";import"./shared-bf28ab5e.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{C as e}from"./shared-a5fbfdc7.js";import"./shared-bba615b8.js";import"./shared-851b97ef.js";import{ax as t,e as s,h as i}from"./shared-84203d52.js";import{S as r,T as a,a as n}from"./shared-8057ee9c.js";import"./shared-54c485d2.js";import{G as l}from"./shared-525dd8c8.js";import"./shared-45d647e4.js";import"./shared-e0248713.js";import{c as o}from"./shared-4e709717.js";import{C as d,i as h}from"./shared-23966eed.js";import{N as c}from"./shared-b13a5ed3.js";import{v as m}from"./shared-b738ee96.js";let C,f,p,g,u=e=>e;const y=[{property:"is_merchant",icon:t(C||(C=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:t(f||(f=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:t(p||(p=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:t(g||(g=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let v,x,_,$=e=>e;const b=r(a(d(n(c,"user-form"))));class w extends b{constructor(){super(...arguments),this.__getValidator=s((e=>()=>!this.errors.some((t=>t.startsWith(e))))),this.__bindField=s((e=>t=>{const s=t.target;this.edit({[e]:s.value})}))}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"x-checkbox":e,"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get v8n(){return[({first_name:e})=>!e||e.length<=50||"first_name_too_long",({last_name:e})=>!e||e.length<=50||"last_name_too_long",({email:e})=>e&&e.length>0||"email_required",({email:e})=>e&&e.length<=100||"email_too_long",({email:e})=>e&&m(e)||"email_invalid_email",({phone:e})=>!e||e.length<=50||"phone_too_long"]}render(){const e=this.in({idle:{template:{dirty:"valid"}}}),t=this.in({idle:{snapshot:{dirty:"valid"}}}),s=e||t,r=this.in("busy"),a=this.in("fail"),n=r||a||this.disabled;return i(v||(v=$` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="grid grid-cols-1 sm-grid-cols-2 gap-m"> ${0} </div> <x-group frame> ${0} </x-group> <vaadin-button data-testid="action" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> </div> `),this.lang,this.ns,this.__handleConfirmHide,this.in("busy"),["first_name","last_name","email","phone"].map((e=>i(x||(x=$` <vaadin-text-field error-message="${0}" data-testid="${0}" ?disabled="${0}" ?readonly="${0}" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-text-field> `),this.__getErrorMessage(e),e,n,this.readonly,this.t(e),h(this.form[e]),this.__getValidator(e),this.__bindField(e),this.__handleKeyDown))),y.map(((e,t)=>i(_||(_=$` <hr class="${0}" style="margin-left:calc((var(--lumo-space-m) * 2) + 1.125rem)"> <x-checkbox class="w-full p-m" ?readonly="${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="flex items-start leading-s"> <div class="flex-1 flex flex-col"> <foxy-i18n key="${0}" lang="${0}" ns="${0}"></foxy-i18n> <foxy-i18n class="text-s text-secondary" lang="${0}" key="${0}_explainer" ns="${0}"> </foxy-i18n> </div> <div class="mt-xs" style="width:1.125rem;height:1.125rem">${0}</div> </div> </x-checkbox> `),t>0?"border-contrast-10":"hidden",this.readonly,n,this.form[e.property],(t=>{const s=t.target;this.edit({[e.property]:s.checked})}),e.key,this.lang,this.ns,this.lang,e.key,this.ns,e.icon))),this.in("idle")?"primary "+(this.href?"error":"success"):"",this.in({idle:"template"})&&!s||n,this.__handleActionClick,this.lang,this.href?"delete":"create",this.ns,o({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!r&&!a}),a?"error":r?"busy":"empty",this.lang,this.ns)}__getErrorMessage(e){const t=this.errors.find((t=>t.startsWith(e)));return t?this.t(t.replace(e,"v8n")):""}__handleActionClick(e){if(this.in({idle:"snapshot"})){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}else this.submit()}__handleConfirmHide(e){e.detail.cancelled||this.delete()}__handleKeyDown(e){"Enter"===e.key&&this.submit()}}customElements.define("foxy-user-form",w);export{w as U,y as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-b98f88c9.js";import"./shared-cd700eac.js";import"./shared-45d647e4.js";import{L as t,h as e}from"./shared-
|
|
1
|
+
import"./shared-b98f88c9.js";import"./shared-cd700eac.js";import"./shared-45d647e4.js";import{L as t,h as e}from"./shared-84203d52.js";import{T as a,S as s,a as n}from"./shared-8057ee9c.js";import{c as i}from"./shared-4e709717.js";import{p as r,W as o}from"./shared-c70d9713.js";import"./shared-090432b4.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import"./shared-e0248713.js";import{C as d,i as l}from"./shared-23966eed.js";import"./shared-bba615b8.js";import"./shared-851b97ef.js";import"./shared-54c485d2.js";import"./shared-3ae39e52.js";import{G as c}from"./shared-525dd8c8.js";import{N as h}from"./shared-b13a5ed3.js";function u(t){return[t.getFullYear().toString().padStart(4,"0"),(t.getMonth()+1).toString().padStart(2,"0"),t.getDate().toString().padStart(2,"0")].join("-")}let m,g,p,v,b,f=t=>t;class y extends(a(t)){constructor(){super(...arguments),this.checkAvailability=()=>!0,this.readonly=!1,this.disabled=!1,this.value="",this.start="",this.lang=""}static get properties(){return{checkAvailability:{attribute:!1},readonly:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},value:{type:String},start:{type:String},lang:{type:String}}}render(){var t,a;const s=new Date(null!==(a=null!==(t=this.__startAsDate)&&void 0!==t?t:this.__valueAsDate)&&void 0!==a?a:Date.now()),n=new Date(s),r=new Date(s),o=this.lang||navigator.language;return n.setMonth(n.getMonth()-1),r.setMonth(r.getMonth()+1),e(m||(m=f` <div class="text-m text-body font-lumo leading-m"> <div class="grid p-xs" style="grid-template:auto/max-content auto max-content"> <vaadin-button data-testid="prev" aria-label="${0}" theme="icon tertiary" class="px-xs" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:chevron-left"></iron-icon> </vaadin-button> <span data-testid="month" class="${0}"> ${0} </span> <vaadin-button data-testid="next" aria-label="${0}" theme="icon tertiary" class="px-xs" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:chevron-right"></iron-icon> </vaadin-button> </div> ${0} </div> `),n.toLocaleString(o,{year:"numeric",month:"long"}),this.disabled,this.__handlePrevButtonClick,i({"text-center self-center font-medium":!0,"text-disabled":this.disabled}),s.toLocaleDateString(o,{month:"long",year:"numeric"}),r.toLocaleString(o,{year:"numeric",month:"long"}),this.disabled,this.__handleNextButtonClick,this.__renderMonth(s.getMonth(),s.getFullYear()))}get __valueAsDate(){return r(this.value)}set __valueAsDate(t){this.value=t?u(t):""}get __startAsDate(){return r(this.start)}set __startAsDate(t){this.start=t?u(t):""}__renderMonth(t,a){var s,n,r;const o=this.lang||navigator.language,d=new Date(a,t,1,0,0,0,0),l=[];for(let t=0;t<7;++t){const a=new Date;for(;a.getDay()!==t;)a.setDate(a.getDate()+1);l.push(e(g||(g=f` <span class="${0}"> ${0} </span> `),i({"self-center text-xxs uppercase font-medium tracking-wider":!0,"text-secondary":!this.disabled,"text-disabled":this.disabled}),a.toLocaleString(o,{weekday:"short"})))}for(;d.getMonth()===t;){const i=d.getFullYear()===(null===(s=this.__valueAsDate)||void 0===s?void 0:s.getFullYear())&&d.getMonth()===(null===(n=this.__valueAsDate)||void 0===n?void 0:n.getMonth())&&d.getDate()===(null===(r=this.__valueAsDate)||void 0===r?void 0:r.getDate());l.push(e(p||(p=f` <div style="grid-column:${0}" data-testclass="day-of-month"> ${0} </div> `),d.getDay()+1,this.__renderDate(d.getDate(),t,a,i))),d.setDate(d.getDate()+1)}return e(v||(v=f` <form data-testid="grid" class="grid gap-s p-s text-center" style="grid-template:auto/repeat(7,1fr)"> ${0} </form> `),l)}__renderDate(t,a,s,n=!1){const r=this.disabled||this.readonly||!this.checkAvailability(new Date(s,a,t));return e(b||(b=f` <label class="${0}"> <input name="date" type="radio" value="${0}" class="sr-only" ?disabled="${0}" @change="${0}"> ${0} </label> `),i({"font-tnum select-none relative flex h-m items-center justify-center rounded":!0,"cursor-pointer focus-within-ring-2 focus-within-ring-primary-50":!r,"bg-contrast-5 hover-bg-contrast-10":!n&&!r,"bg-primary text-primary-contrast":n&&!r,"border border-dashed border-contrast-20 text-disabled":!n&&r,"border border-dashed border-primary text-primary":n&&r}),t,this.readonly||this.disabled||r,(()=>{this.__valueAsDate=new Date(s,a,t),this.dispatchEvent(new CustomEvent("change"))}),t)}__handlePrevButtonClick(){var t;const e=new Date(null!==(t=this.start)&&void 0!==t?t:Date.now());this.__startAsDate=new Date(e.setMonth(e.getMonth()-1))}__handleNextButtonClick(){var t;const e=new Date(null!==(t=this.start)&&void 0!==t?t:Date.now());this.__startAsDate=new Date(e.setMonth(e.getMonth()+1))}}customElements.define("foxy-internal-calendar",y);let _,x,$,D,w=t=>t;const S=s(a(d(n(h,"cancellation-form"))));class j extends S{constructor(){super(...arguments),this.templates={},this.__renderWarning=()=>{const{lang:t,ns:a}=this;return e(_||(_=w` <div> ${0} <x-warning> <foxy-i18n data-testid="warning" class="${0}" lang="${0}" key="end_subscription_explainer" ns="${0}"> </foxy-i18n> </x-warning> ${0} </div> `),this.renderTemplateOrSlot("warning:before"),i({"text-disabled":!this.in({idle:"snapshot"})}),t,a,this.renderTemplateOrSlot("warning:after"))},this.__renderEndDate=()=>{var t,a;const{constructor:s,lang:n,ns:r}=this,o=s.__tomorrow.getTime(),d=this.in({idle:"snapshot"});return e(x||(x=w` <div> ${0} <x-group frame> <foxy-i18n data-testid="end-date-label" class="${0}" slot="header" lang="${0}" key="end_date" ns="${0}"> </foxy-i18n> <foxy-internal-calendar data-testid="end-date" .checkAvailability="${0}" ?disabled="${0}" ?readonly="${0}" value="${0}" lang="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("end-date:before"),i({"text-disabled":!d}),n,r,(t=>t.getTime()>=o),!d||this.disabledSelector.matches("end-date",!0),!!(null===(t=this.data)||void 0===t?void 0:t.end_date)||this.readonlySelector.matches("end-date",!0),l(null!==(a=this.form.end_date)&&void 0!==a?a:void 0),n,(t=>{this.edit({end_date:t.target.value})}),this.renderTemplateOrSlot("end-date:after"))},this.__renderSubmit=()=>{const t=this.in({idle:{snapshot:{clean:"valid"}}})||this.in({idle:{snapshot:{dirty:"valid"}}});return e($||($=w` <div> ${0} <vaadin-button data-testid="submit" ?disabled="${0}" theme="primary error" class="w-full" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="end_subscription"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),!t||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.ns,this.lang,this.renderTemplateOrSlot("submit:after"))}}static get scopedElements(){return{"foxy-internal-calendar":customElements.get("foxy-internal-calendar"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-warning":o,"x-group":c}}static get v8n(){return[({end_date:t})=>!!t||"end_date_required"]}render(){var t,a;const s=this.hiddenSelector,n=this.in("busy"),r=this.in("fail");return e(D||(D=w` <div class="space-y-l font-lumo text-m text-body leading-m relative"> ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),s.matches("warning",!0)?"":this.__renderWarning(),s.matches("end-date",!0)?"":this.__renderEndDate(),s.matches("submit",!0)?"":this.__renderSubmit(),i({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!n&&!r}),r?"error":n?"busy":"empty",this.lang,this.ns,null!==(a=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==a?a:"")}submit(){if(!this.form.end_date){const t=this.constructor;this.edit({end_date:u(t.__tomorrow)})}super.submit()}static get __tomorrow(){const t=new Date;return t.setDate(t.getDate()+1),t.setHours(0,0,0,0),t}}customElements.define("foxy-cancellation-form",j);export{j as C,u as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as t,g as e,i as o,j as r,k as a,l as n,n as s,T as i,o as l,c,L as u,_ as p}from"./shared-84203d52.js";function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function f(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?Object(arguments[e]):{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter((function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable})))),r.forEach((function(e){g(t,e,o[e])}))}return t}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t,e,o){return e&&m(t.prototype,e),o&&m(t,o),t}var y=e(t((function(t){function e(o){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(o)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})));function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?b(t):e}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function k(t,e){return(k=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function S(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&k(t,e)}var L={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]&&console[t].apply(console,e)}},O=new(function(){function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(this,t),this.init(e,o)}return v(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||L,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,o,r){return r&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(o).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,f({},{prefix:"".concat(this.prefix,":").concat(e,":")},this.options))}}]),t}()),j=function(){function t(){h(this,t),this.observers={}}return v(t,[{key:"on",value:function(t,e){var o=this;return t.split(" ").forEach((function(t){o.observers[t]=o.observers[t]||[],o.observers[t].push(e)})),this}},{key:"off",value:function(t,e){this.observers[t]&&(e?this.observers[t]=this.observers[t].filter((function(t){return t!==e})):delete this.observers[t])}},{key:"emit",value:function(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];if(this.observers[t]){var a=[].concat(this.observers[t]);a.forEach((function(t){t.apply(void 0,o)}))}if(this.observers["*"]){var n=[].concat(this.observers["*"]);n.forEach((function(e){e.apply(e,[t].concat(o))}))}}}]),t}();function R(){var t,e,o=new Promise((function(o,r){t=o,e=r}));return o.resolve=t,o.reject=e,o}function C(t){return null==t?"":""+t}function E(t,e,o){t.forEach((function(t){e[t]&&(o[t]=e[t])}))}function N(t,e,o){function r(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function a(){return!t||"string"==typeof t}for(var n="string"!=typeof e?[].concat(e):e.split(".");n.length>1;){if(a())return{};var s=r(n.shift());!t[s]&&o&&(t[s]=new o),t=Object.prototype.hasOwnProperty.call(t,s)?t[s]:{}}return a()?{}:{obj:t,k:r(n.shift())}}function _(t,e,o){var r=N(t,e,Object);r.obj[r.k]=o}function P(t,e){var o=N(t,e),r=o.obj,a=o.k;if(r)return r[a]}function z(t,e,o){var r=P(t,o);return void 0!==r?r:P(e,o)}function M(t,e,o){for(var r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof e[r]||e[r]instanceof String?o&&(t[r]=e[r]):M(t[r],e[r],o):t[r]=e[r]);return t}function T(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var A={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function F(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(function(t){return A[t]})):t}var I="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=function(t){function e(t){var o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return h(this,e),o=w(this,x(e).call(this)),I&&j.call(b(o)),o.data=t||{},o.options=r,void 0===o.options.keySeparator&&(o.options.keySeparator="."),o}return S(e,j),v(e,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,n=[t,e];return o&&"string"!=typeof o&&(n=n.concat(o)),o&&"string"==typeof o&&(n=n.concat(a?o.split(a):o)),t.indexOf(".")>-1&&(n=t.split(".")),P(this.data,n)}},{key:"addResource",value:function(t,e,o,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},n=this.options.keySeparator;void 0===n&&(n=".");var s=[t,e];o&&(s=s.concat(n?o.split(n):o)),t.indexOf(".")>-1&&(r=e,e=(s=t.split("."))[1]),this.addNamespaces(e),_(this.data,s,r),a.silent||this.emit("added",t,e,o,r)}},{key:"addResources",value:function(t,e,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var a in o)"string"!=typeof o[a]&&"[object Array]"!==Object.prototype.toString.apply(o[a])||this.addResource(t,e,a,o[a],{silent:!0});r.silent||this.emit("added",t,e,o)}},{key:"addResourceBundle",value:function(t,e,o,r,a){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(r=o,o=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var i=P(this.data,s)||{};r?M(i,o,a):i=f({},i,o),_(this.data,s,i),n.silent||this.emit("added",t,e,o)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?f({},{},this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),e}(),q={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,o,r,a){var n=this;return t.forEach((function(t){n.processors[t]&&(e=n.processors[t].process(e,o,r,a))})),e}},H={},V=function(t){function e(t){var o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,e),o=w(this,x(e).call(this)),I&&j.call(b(o)),E(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,b(o)),o.options=r,void 0===o.options.keySeparator&&(o.options.keySeparator="."),o.logger=O.create("translator"),o}return S(e,j),v(e,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},o=this.resolve(t,e);return o&&void 0!==o.res}},{key:"extractFromKey",value:function(t,e){var o=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===o&&(o=":");var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,a=e.ns||this.options.defaultNS;if(o&&t.indexOf(o)>-1){var n=t.match(this.interpolator.nestingRegexp);if(n&&n.length>0)return{key:t,namespaces:a};var s=t.split(o);(o!==r||o===r&&this.options.ns.indexOf(s[0])>-1)&&(a=s.shift()),t=s.join(r)}return"string"==typeof a&&(a=[a]),{key:t,namespaces:a}}},{key:"translate",value:function(t,o,r){var a=this;if("object"!==d(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,s=this.extractFromKey(t[t.length-1],o),i=s.key,l=s.namespaces,c=l[l.length-1],u=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return c+g+i}return i}var h=this.resolve(t,o),m=h&&h.res,v=h&&h.usedKey||i,y=h&&h.exactUsedKey||i,b=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(k&&m&&S&&w.indexOf(b)<0&&("string"!=typeof x||"[object Array]"!==b)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(i," (").concat(this.language,")' returned an object instead of string.");if(n){var L="[object Array]"===b,O=L?[]:{},j=L?y:v;for(var R in m)if(Object.prototype.hasOwnProperty.call(m,R)){var C="".concat(j).concat(n).concat(R);O[R]=this.translate(C,f({},o,{joinArrays:!1,ns:l})),O[R]===C&&(O[R]=m[R])}m=O}}else if(k&&"string"==typeof x&&"[object Array]"===b)(m=m.join(x))&&(m=this.extendTranslation(m,t,o,r));else{var E=!1,N=!1,_=void 0!==o.count&&"string"!=typeof o.count,P=e.hasDefaultValue(o),z=_?this.pluralResolver.getSuffix(u,o.count):"",M=o["defaultValue".concat(z)]||o.defaultValue;!this.isValidLookup(m)&&P&&(E=!0,m=M),this.isValidLookup(m)||(N=!0,m=i);var T=P&&M!==m&&this.options.updateMissing;if(N||E||T){if(this.logger.log(T?"updateKey":"missingKey",u,c,i,T?M:m),n){var A=this.resolve(i,f({},o,{keySeparator:!1}));A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&I&&I[0])for(var U=0;U<I.length;U++)F.push(I[U]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(o.lng||this.language):F.push(o.lng||this.language);var q=function(t,e,r){a.options.missingKeyHandler?a.options.missingKeyHandler(t,c,e,T?r:m,T,o):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(t,c,e,T?r:m,T,o),a.emit("missingKey",t,c,e,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?F.forEach((function(t){a.pluralResolver.getSuffixes(t).forEach((function(e){q([t],i+e,o["defaultValue".concat(e)]||M)}))})):q(F,i,M))}m=this.extendTranslation(m,t,o,h,r),N&&m===i&&this.options.appendNamespaceToMissingKey&&(m="".concat(c,":").concat(i)),N&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(m))}return m}},{key:"extendTranslation",value:function(t,e,o,r,a){var n=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,o,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init(f({},o,{interpolation:f({},this.options.interpolation,o.interpolation)}));var s,i=o.interpolation&&o.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(i){var l=t.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=o.replace&&"string"!=typeof o.replace?o.replace:o;if(this.options.interpolation.defaultVariables&&(c=f({},this.options.interpolation.defaultVariables,c)),t=this.interpolator.interpolate(t,c,o.lng||this.language,o),i){var u=t.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(o.nest=!1)}!1!==o.nest&&(t=this.interpolator.nest(t,(function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return a&&a[0]===r[0]&&!o.context?(n.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(e[0])),null):n.translate.apply(n,r.concat([e]))}),o)),o.interpolation&&this.interpolator.reset()}var p=o.postProcess||this.options.postProcess,d="string"==typeof p?[p]:p;return null!=t&&d&&d.length&&!1!==o.applyPostProcessor&&(t=q.handle(d,t,e,this.options&&this.options.postProcessPassResolved?f({i18nResolved:r},o):o,this)),t}},{key:"resolve",value:function(t){var e,o,r,a,n,s=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((function(t){if(!s.isValidLookup(e)){var l=s.extractFromKey(t,i),c=l.key;o=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var p=void 0!==i.count&&"string"!=typeof i.count,d=void 0!==i.context&&"string"==typeof i.context&&""!==i.context,g=i.lngs?i.lngs:s.languageUtils.toResolveHierarchy(i.lng||s.language,i.fallbackLng);u.forEach((function(t){s.isValidLookup(e)||(n=t,!H["".concat(g[0],"-").concat(t)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(n)&&(H["".concat(g[0],"-").concat(t)]=!0,s.logger.warn('key "'.concat(o,'" for languages "').concat(g.join(", "),'" won\'t get resolved as namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach((function(o){if(!s.isValidLookup(e)){a=o;var n,l,u=c,g=[u];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(g,c,o,t,i);else p&&(n=s.pluralResolver.getSuffix(o,i.count)),p&&d&&g.push(u+n),d&&g.push(u+="".concat(s.options.contextSeparator).concat(i.context)),p&&g.push(u+=n);for(;l=g.pop();)s.isValidLookup(e)||(r=l,e=s.getResource(o,t,l,i))}})))}))}})),{res:e,usedKey:o,exactUsedKey:r,usedLng:a,usedNS:n}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,o,r):this.resourceStore.getResource(t,e,o,r)}}],[{key:"hasDefaultValue",value:function(t){var e="defaultValue";for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&e===o.substring(0,e.length)&&void 0!==t[o])return!0;return!1}}]),e}();function D(t){return t.charAt(0).toUpperCase()+t.slice(1)}var $=function(){function t(e){h(this,t),this.options=e,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=O.create("languageUtils")}return v(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],o=t.split("-");return this.options.lowerCaseLng?o=o.map((function(t){return t.toLowerCase()})):2===o.length?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),e.indexOf(o[1].toLowerCase())>-1&&(o[1]=D(o[1].toLowerCase()))):3===o.length&&(o[0]=o[0].toLowerCase(),2===o[1].length&&(o[1]=o[1].toUpperCase()),"sgn"!==o[0]&&2===o[2].length&&(o[2]=o[2].toUpperCase()),e.indexOf(o[1].toLowerCase())>-1&&(o[1]=D(o[1].toLowerCase())),e.indexOf(o[2].toLowerCase())>-1&&(o[2]=D(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var e,o=this;return t?(t.forEach((function(t){if(!e){var r=o.formatLanguageCode(t);o.options.supportedLngs&&!o.isSupportedCode(r)||(e=r)}})),!e&&this.options.supportedLngs&&t.forEach((function(t){if(!e){var r=o.getLanguagePartFromCode(t);if(o.isSupportedCode(r))return e=r;e=o.options.supportedLngs.find((function(t){if(0===t.indexOf(r))return t}))}})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e):null}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var o=t[e];return o||(o=t[this.getScriptPartFromCode(e)]),o||(o=t[this.formatLanguageCode(e)]),o||(o=t[this.getLanguagePartFromCode(e)]),o||(o=t.default),o||[]}},{key:"toResolveHierarchy",value:function(t,e){var o=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),a=[],n=function(t){t&&(o.isSupportedCode(t)?a.push(t):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(t))):"string"==typeof t&&n(this.formatLanguageCode(t)),r.forEach((function(t){a.indexOf(t)<0&&n(o.formatLanguageCode(t))})),a}}]),t}(),B=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],K={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function X(){var t={};return B.forEach((function(e){e.lngs.forEach((function(o){t[o]={numbers:e.nr,plurals:K[e.fc]}}))})),t}var W=function(){function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(this,t),this.languageUtils=e,this.options=o,this.logger=O.create("pluralResolver"),this.rules=X()}return v(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=this.getRule(t);return e&&e.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){return this.getSuffixes(t).map((function(t){return e+t}))}},{key:"getSuffixes",value:function(t){var e=this,o=this.getRule(t);return o?o.numbers.map((function(o){return e.getSuffix(t,o)})):[]}},{key:"getSuffix",value:function(t,e){var o=this,r=this.getRule(t);if(r){var a=r.noAbs?r.plurals(e):r.plurals(Math.abs(e)),n=r.numbers[a];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===n?n="plural":1===n&&(n=""));var s=function(){return o.options.prepend&&n.toString()?o.options.prepend+n.toString():n.toString()};return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?"_plural_".concat(n.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),t}(),J=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,t),this.logger=O.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return v(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:F,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?T(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?T(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?T(e.nestingPrefix):e.nestingPrefixEscaped||T("$t("),this.nestingSuffix=e.nestingSuffix?T(e.nestingSuffix):e.nestingSuffixEscaped||T(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(t,e,o,r){var a,n,s,i=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(t){return t.replace(/\$/g,"$$$$")}var u=function(t){if(t.indexOf(i.formatSeparator)<0){var a=z(e,l,t);return i.alwaysFormat?i.format(a,void 0,o):a}var n=t.split(i.formatSeparator),s=n.shift().trim(),c=n.join(i.formatSeparator).trim();return i.format(z(e,l,s),c,o,r)};this.resetRegExp();var p=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(t){return c(t)}},{regex:this.regexp,safeValue:function(t){return i.escapeValue?c(i.escape(t)):c(t)}}].forEach((function(e){for(s=0;a=e.regex.exec(t);){if(void 0===(n=u(a[1].trim())))if("function"==typeof p){var o=p(t,a,r);n="string"==typeof o?o:""}else{if(d){n=a[0];continue}i.logger.warn("missed to pass in variable ".concat(a[1]," for interpolating ").concat(t)),n=""}else"string"==typeof n||i.useRawValueToEscape||(n=C(n));if(t=t.replace(a[0],e.safeValue(n)),e.regex.lastIndex=0,++s>=i.maxReplaces)break}})),t}},{key:"nest",value:function(t,e){var o,r,a=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=f({},n);function i(t,e){var o=this.nestingOptionsSeparator;if(t.indexOf(o)<0)return t;var r=t.split(new RegExp("".concat(o,"[ ]*{"))),a="{".concat(r[1]);t=r[0],a=(a=this.interpolate(a,s)).replace(/'/g,'"');try{s=JSON.parse(a),e&&(s=f({},e,s))}catch(e){return this.logger.warn("failed parsing options string in nesting for key ".concat(t),e),"".concat(t).concat(o).concat(a)}return delete s.defaultValue,t}for(s.applyPostProcessor=!1,delete s.defaultValue;o=this.nestingRegexp.exec(t);){var l=[],c=!1;if(o[0].includes(this.formatSeparator)&&!/{.*}/.test(o[1])){var u=o[1].split(this.formatSeparator).map((function(t){return t.trim()}));o[1]=u.shift(),l=u,c=!0}if((r=e(i.call(this,o[1].trim(),s),s))&&o[0]===t&&"string"!=typeof r)return r;"string"!=typeof r&&(r=C(r)),r||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(t)),r=""),c&&(r=l.reduce((function(t,e){return a.format(t,e,n.lng,n)}),r.trim())),t=t.replace(o[0],r),this.regexp.lastIndex=0}return t}}]),t}();var Y=function(t){function e(t,o,r){var a,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return h(this,e),a=w(this,x(e).call(this)),I&&j.call(b(a)),a.backend=t,a.store=o,a.services=r,a.languageUtils=r.languageUtils,a.options=n,a.logger=O.create("backendConnector"),a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(r,n.backend,n),a}return S(e,j),v(e,[{key:"queueLoad",value:function(t,e,o,r){var a=this,n=[],s=[],i=[],l=[];return t.forEach((function(t){var r=!0;e.forEach((function(e){var i="".concat(t,"|").concat(e);!o.reload&&a.store.hasResourceBundle(t,e)?a.state[i]=2:a.state[i]<0||(1===a.state[i]?s.indexOf(i)<0&&s.push(i):(a.state[i]=1,r=!1,s.indexOf(i)<0&&s.push(i),n.indexOf(i)<0&&n.push(i),l.indexOf(e)<0&&l.push(e)))})),r||i.push(t)})),(n.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:r}),{toLoad:n,pending:s,toLoadLanguages:i,toLoadNamespaces:l}}},{key:"loaded",value:function(t,e,o){var r=t.split("|"),a=r[0],n=r[1];e&&this.emit("failedLoading",a,n,e),o&&this.store.addResourceBundle(a,n,o),this.state[t]=e?-1:2;var s={};this.queue.forEach((function(o){var r,i,l,c,u,p;r=o.loaded,i=n,c=N(r,[a],Object),u=c.obj,p=c.k,u[p]=u[p]||[],l&&(u[p]=u[p].concat(i)),l||u[p].push(i),function(t,e){for(var o=t.indexOf(e);-1!==o;)t.splice(o,1),o=t.indexOf(e)}(o.pending,t),e&&o.errors.push(e),0!==o.pending.length||o.done||(Object.keys(o.loaded).forEach((function(t){s[t]||(s[t]=[]),o.loaded[t].length&&o.loaded[t].forEach((function(e){s[t].indexOf(e)<0&&s[t].push(e)}))})),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(t){return!t.done}))}},{key:"read",value:function(t,e,o){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[o](t,e,(function(i,l){i&&l&&a<5?setTimeout((function(){r.read.call(r,t,e,o,a+1,2*n,s)}),n):s(i,l)})):s(null,{})}},{key:"prepareLoading",value:function(t,e){var o=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var n=this.queueLoad(t,e,r,a);if(!n.toLoad.length)return n.pending.length||a(),null;n.toLoad.forEach((function(t){o.loadOne(t)}))}},{key:"load",value:function(t,e,o){this.prepareLoading(t,e,{},o)}},{key:"reload",value:function(t,e,o){this.prepareLoading(t,e,{reload:!0},o)}},{key:"loadOne",value:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),a=r[0],n=r[1];this.read(a,n,"read",void 0,void 0,(function(r,s){r&&e.logger.warn("".concat(o,"loading namespace ").concat(n," for language ").concat(a," failed"),r),!r&&s&&e.logger.log("".concat(o,"loaded namespace ").concat(n," for language ").concat(a),s),e.loaded(t,r,s)}))}},{key:"saveMissing",value:function(t,e,o,r,a){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e)?this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(e,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=o&&""!==o&&(this.backend&&this.backend.create&&this.backend.create(t,e,o,r,null,f({},n,{isUpdate:a})),t&&t[0]&&this.store.addResource(t[0],e,o,r))}}]),e}();function G(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===d(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===d(t[2])||"object"===d(t[3])){var o=t[3]||t[2];Object.keys(o).forEach((function(t){e[t]=o[t]}))}return e},interpolation:{escapeValue:!0,format:function(t,e,o,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function Q(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&(t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t.supportedLngs=t.whitelist),t.nonExplicitWhitelist&&(t.nonExplicitSupportedLngs=t.nonExplicitWhitelist),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function Z(){}var tt=new(function(t){function e(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(h(this,e),t=w(this,x(e).call(this)),I&&j.call(b(t)),t.options=Q(o),t.services={},t.logger=O,t.modules={external:[]},r&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,r),w(t,b(t));setTimeout((function(){t.init(o,r)}),0)}return t}return S(e,j),v(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;function r(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof e&&(o=e,e={}),e.whitelist&&!e.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),e.nonExplicitWhitelist&&!e.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=f({},G(),this.options,Q(e)),this.format=this.options.interpolation.format,o||(o=Z),!this.options.isClone){this.modules.logger?O.init(r(this.modules.logger),this.options):O.init(null,this.options);var a=new $(this.options);this.store=new U(this.options.resources,this.options);var n=this.services;n.logger=O,n.resourceStore=this.store,n.languageUtils=a,n.pluralResolver=new W(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),n.interpolator=new J(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Y(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",(function(e){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new V(this.services,this.options),this.translator.on("*",(function(e){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var i=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];i.forEach((function(e){t[e]=function(){var o;return(o=t.store)[e].apply(o,arguments)}}));var l=["addResource","addResources","addResourceBundle","removeResourceBundle"];l.forEach((function(e){t[e]=function(){var o;return(o=t.store)[e].apply(o,arguments),t}}));var c=R(),u=function(){var e=function(e,r){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),c.resolve(r),o(e,r)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}},{key:"loadResources",value:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z,r=o,a="string"==typeof t?t:this.language;if("function"==typeof t&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(a&&"cimode"===a.toLowerCase())return r();var n=[],s=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(t){n.indexOf(t)<0&&n.push(t)}))};if(a)s(a);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(t){return s(t)}))}this.options.preload&&this.options.preload.forEach((function(t){return s(t)})),this.services.backendConnector.load(n,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(t,e,o){var r=R();return t||(t=this.languages),e||(e=this.options.ns),o||(o=Z),this.services.backendConnector.reload(t,e,(function(t){r.resolve(),o(t)})),r}},{key:"use",value:function(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&q.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,e){var o=this;this.isLanguageChangingTo=t;var r=R();this.emit("languageChanging",t);var a=function(t){var a="string"==typeof t?t:o.services.languageUtils.getBestMatchFromCodes(t);a&&(o.language||(o.language=a,o.languages=o.services.languageUtils.toResolveHierarchy(a)),o.translator.language||o.translator.changeLanguage(a),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(a)),o.loadResources(a,(function(t){!function(t,a){a?(o.language=a,o.languages=o.services.languageUtils.toResolveHierarchy(a),o.translator.changeLanguage(a),o.isLanguageChangingTo=void 0,o.emit("languageChanged",a),o.logger.log("languageChanged",a)):o.isLanguageChangingTo=void 0,r.resolve((function(){return o.t.apply(o,arguments)})),e&&e(t,(function(){return o.t.apply(o,arguments)}))}(t,a)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(t,e){var o=this,r=function t(e,r){var a;if("object"!==d(r)){for(var n=arguments.length,s=new Array(n>2?n-2:0),i=2;i<n;i++)s[i-2]=arguments[i];a=o.options.overloadTranslationOptionHandler([e,r].concat(s))}else a=f({},r);return a.lng=a.lng||t.lng,a.lngs=a.lngs||t.lngs,a.ns=a.ns||t.ns,o.t(e,a)};return"string"==typeof t?r.lng=t:r.lngs=t,r.ns=e,r}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],a=!!this.options&&this.options.fallbackLng,n=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(t,o){var r=e.services.backendConnector.state["".concat(t,"|").concat(o)];return-1===r||2===r};if(o.precheck){var i=o.precheck(this,s);if(void 0!==i)return i}return!!this.hasResourceBundle(r,t)||(!this.services.backendConnector.backend||!(!s(r,t)||a&&!s(n,t)))}},{key:"loadNamespaces",value:function(t,e){var o=this,r=R();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(t){o.options.ns.indexOf(t)<0&&o.options.ns.push(t)})),this.loadResources((function(t){r.resolve(),e&&e(t)})),r):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var o=R();"string"==typeof t&&(t=[t]);var r=this.options.preload||[],a=t.filter((function(t){return r.indexOf(t)<0}));return a.length?(this.options.preload=r.concat(a),this.loadResources((function(t){o.resolve(),e&&e(t)})),o):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;return new e(t,o)}},{key:"cloneInstance",value:function(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z,a=f({},this.options,o,{isClone:!0}),n=new e(a),s=["store","services","language"];return s.forEach((function(e){n[e]=t[e]})),n.services=f({},this.services),n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n.translator=new V(n.services,n.options),n.translator.on("*",(function(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];n.emit.apply(n,[t].concat(o))})),n.init(a,r),n.translator.options=n.options,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}}]),e}());function et(t){return(et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ot=[],rt=ot.forEach,at=ot.slice;function nt(t){return rt.call(at.call(arguments,1),(function(e){if(e)for(var o in e)void 0===t[o]&&(t[o]=e[o])})),t}function st(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":et(XMLHttpRequest))}var it,lt,ct,ut=t((function(t,e){var n;if("function"==typeof fetch&&(void 0!==o&&o.fetch?n=o.fetch:"undefined"!=typeof window&&window.fetch&&(n=window.fetch)),void 0!==r&&("undefined"==typeof window||void 0===window.document)){var s=n||a;s.default&&(s=s.default),e.default=s,t.exports=e.default}})),pt=Object.freeze(Object.assign(Object.create(null),ut,{default:ut}));function dt(t){return(dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"function"==typeof fetch&&("undefined"!=typeof global&&global.fetch?it=global.fetch:"undefined"!=typeof window&&window.fetch&&(it=window.fetch)),st&&("undefined"!=typeof global&&global.XMLHttpRequest?lt=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(lt=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?ct=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(ct=window.ActiveXObject)),it||!pt||lt||ct||(it=ut||pt),"function"!=typeof it&&(it=void 0);var gt=function(t,e){if(e&&"object"===dt(e)){var o="";for(var r in e)o+="&"+encodeURIComponent(r)+"="+encodeURIComponent(e[r]);if(!o)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+o.slice(1)}return t},ft=function(t,e,o,r){return"function"==typeof o&&(r=o,o=void 0),r=r||function(){},it?function(t,e,o,r){t.queryStringParams&&(e=gt(e,t.queryStringParams));var a=nt({},"function"==typeof t.customHeaders?t.customHeaders():t.customHeaders);o&&(a["Content-Type"]="application/json"),it(e,nt({method:o?"POST":"GET",body:o?t.stringify(o):void 0,headers:a},"function"==typeof t.requestOptions?t.requestOptions(o):t.requestOptions)).then((function(t){if(!t.ok)return r(t.statusText||"Error",{status:t.status});t.text().then((function(e){r(null,{status:t.status,data:e})})).catch(r)})).catch(r)}(t,e,o,r):st||"function"==typeof ActiveXObject?function(t,e,o,r){o&&"object"===dt(o)&&(o=gt("",o).slice(1)),t.queryStringParams&&(e=gt(e,t.queryStringParams));try{var a;(a=lt?new lt:new ct("MSXML2.XMLHTTP.3.0")).open(o?"POST":"GET",e,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,o&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var n=t.customHeaders;if(n="function"==typeof n?n():n)for(var s in n)a.setRequestHeader(s,n[s]);a.onreadystatechange=function(){a.readyState>3&&r(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(o)}catch(t){console&&console.log(t)}}(t,e,o,r):void 0};function ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mt(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var vt=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,e,o){return function(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}({},e,o||"")},request:ft,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},yt=function(){function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ht(this,t),this.services=e,this.options=o,this.allOptions=r,this.type="backend",this.init(e,o,r)}var e,o,r;return e=t,(o=[{key:"init",value:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t,this.options=nt(o,this.options||{},vt()),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return e.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(t,e,o){var r=this.options.loadPath;"function"==typeof this.options.loadPath&&(r=this.options.loadPath(t,e));var a=this.services.interpolator.interpolate(r,{lng:t.join("+"),ns:e.join("+")});this.loadUrl(a,o,t,e)}},{key:"read",value:function(t,e,o){var r=this.options.loadPath;"function"==typeof this.options.loadPath&&(r=this.options.loadPath([t],[e]));var a=this.services.interpolator.interpolate(r,{lng:t,ns:e});this.loadUrl(a,o,t,e)}},{key:"loadUrl",value:function(t,e,o,r){var a=this;this.options.request(this.options,t,void 0,(function(n,s){if(s&&(s.status>=500&&s.status<600||!s.status))return e("failed loading "+t+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return e("failed loading "+t+"; status code: "+s.status,!1);if(!s&&n&&n.message&&n.message.indexOf("Failed to fetch")>-1)return e("failed loading "+t+": "+n.message,!0);if(n)return e(n,!1);var i,l;try{i="string"==typeof s.data?a.options.parse(s.data,o,r):s.data}catch(e){l="failed parsing "+t+" to json"}if(l)return e(l,!1);e(null,i)}))}},{key:"create",value:function(t,e,o,r,a){var n=this;if(this.options.addPath){"string"==typeof t&&(t=[t]);var s=this.options.parsePayload(e,o,r),i=0,l=[],c=[];t.forEach((function(o){var r=n.options.addPath;"function"==typeof n.options.addPath&&(r=n.options.addPath(o,e));var u=n.services.interpolator.interpolate(r,{lng:o,ns:e});n.options.request(n.options,u,s,(function(e,o){i+=1,l.push(e),c.push(o),i===t.length&&a&&a(l,c)}))}))}}},{key:"reload",value:function(){var t=this,e=this.services,o=e.backendConnector,r=e.languageUtils,a=e.logger,n=o.language;if(!n||"cimode"!==n.toLowerCase()){var s=[],i=function(t){r.toResolveHierarchy(t).forEach((function(t){s.indexOf(t)<0&&s.push(t)}))};i(n),this.allOptions.preload&&this.allOptions.preload.forEach((function(t){return i(t)})),s.forEach((function(e){t.allOptions.ns.forEach((function(t){o.read(e,t,"read",null,null,(function(r,n){r&&a.warn("loading namespace ".concat(t," for language ").concat(e," failed"),r),!r&&n&&a.log("loaded namespace ".concat(t," for language ").concat(e),n),o.loaded("".concat(e,"|").concat(t),r,n)}))}))}))}}}])&&mt(e.prototype,o),r&&mt(e,r),t}();yt.type="backend";const bt=t=>class extends t{connectedCallback(){super.connectedCallback();const t=Object.entries({sm:640,md:768,lg:1024,xl:1280}),e=new ResizeObserver((e=>{requestAnimationFrame((()=>{e.forEach((({contentRect:e,target:o})=>{t.forEach((([t,r])=>{e.width>=r?o.hasAttribute(t)||o.setAttribute(t,""):o.hasAttribute(t)&&o.removeAttribute(t)}))}))}))}));e.observe(this),this.__removeBreakpoints=()=>e.disconnect()}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.__removeBreakpoints)||void 0===t||t.call(this)}},wt=new WeakMap;let xt=Math.round(1e5*Math.random());const kt=new RegExp("[a-z](-|\\.|[0-9]|[a-z])*-(-|\\.|[0-9]|[a-z])*"),St=(t,e)=>{const o=`${t}-${xt+=1}`;return((t,e)=>!!e.get(t))(o,e)?St(t,e):o};function Lt(t,e=customElements){if(o=t,null===kt.exec(o))throw new Error("tagName is invalid");var o;return St(t,e)}const Ot=new Map,jt=(t,e)=>Ot.set(e,t),Rt=(t,e,o=customElements)=>{jt(t,e),o.define(t,class extends e{})},Ct=(t,e,o)=>{const r=customElements;if(!(t=>Object.prototype.isPrototypeOf.call(HTMLElement,t))(e))return((t,e,o)=>{const r=Lt(t,e);if(!o)throw new Error("Lazy scoped elements requires the use of tags cache");return o.set(t,r),r})(t,r,o);if(e===customElements.get(t))return jt(t,e),t;const a=Lt(t,r);return Rt(a,e,r),a};function Et(t,e,o){return(t=>Ot.get(t))(e)||o&&o.get(t)||Ct(t,e,o)}const Nt="-|\\.|[0-9]|[a-z]",_t=new RegExp(`<\\/?([a-z](${Nt})*-(${Nt})*)`,"g"),Pt=new Map,zt=(t,e,o,r)=>{const a=t.map((t=>{let o=t;const a=(t=>{const e=[];let o;for(;null!==(o=_t.exec(t));)e.push(o);return e})(t);for(let t=a.length-1;t>=0;t-=1){const n=a[t],[s,i]=n,l=Et(i,e[i],r),c=n.index+s.length-i.length,u=c+i.length,p=0===s.indexOf("</");o=o.slice(0,c)+(p?l:`${l} data-tag-name="${i}"`)+o.slice(u)}return o}));return o.set(t,a),a};let Mt=!0;const{ShadyCSS:Tt}=window;(void 0===Tt||void 0===Tt.prepareTemplateDom)&&(Mt=!1);const At=new WeakMap,Ft=new WeakMap,It=t=>(Ft.has(t)||Ft.set(t,new Map),Ft.get(t)),Ut=(t,e,o,r)=>t.map((t=>t instanceof l?qt(t,e,o,r):Array.isArray(t)?Ut(t,e,o,r):t)),qt=(t,e,o,r)=>new l(function(t,e,o=Pt,r){return o.get(t)||zt(t,e,o,r)}(t.strings,e,o,r),Ut(t.values,e,o,r),t.type,t.processor),Ht=(t,e,o,r)=>a=>{const l=qt(a,e,o,r);return(t=>e=>{const o=((t,e)=>`${t}--${e}`)(e.type,t);let r=n.get(o);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},n.set(o,r));let a=r.stringsArray.get(e.strings);if(void 0!==a)return a;const l=e.strings.join(s);if(a=r.keyString.get(l),void 0===a){const o=e.getTemplateElement();Mt&&Tt.prepareTemplateDom(o,t),a=new i(e,o),r.keyString.set(l,a)}return r.stringsArray.set(e.strings,a),a})(t)(l)},Vt=(Dt=t=>class extends t{static get scopedElements(){return{}}static render(t,e,o){if(!o||"object"!=typeof o||!o.scopeName)throw new Error("The `scopeName` option is required.");const{scopeName:r}=o,a=(n=this,At.has(n)||At.set(n,new Map),At.get(n));var n;const s=It(this),{scopedElements:i}=this;return super.render(t,e,{...o,templateFactory:Ht(r,i,a,s)})}defineScopedElement(t,e){return function(t,e,o){const r=o.get(t);r?void 0===customElements.get(r)&&Rt(r,e,customElements):o.set(t,Et(t,e,o))}(t,e,It(this.constructor))}static getScopedTagName(t){const e=this.scopedElements[t];return e?Et(t,e,It(this)):It(this).get(t)}},t=>{if(function(t,e){let o=e;for(;o;){if(wt.get(o)===t)return!0;o=Object.getPrototypeOf(o)}return!1}(Dt,t))return t;const e=Dt(t);return wt.set(e,Dt),e});var Dt;let $t,Bt=t=>t;const Kt=t=>class extends t{static get styles(){const t=super.styles;return[...t?Array.isArray(t)?t:[t]:[],c($t||($t=Bt`/*! tailwindcss v2.2.4 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,::after,::before{box-sizing:border-box}html{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji'}hr{height:0;color:inherit}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,::after,::before{border-color:currentColor}*{-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host{display:block}details>summary::-webkit-details-marker{display:none}details>summary{list-style:none}vaadin-select{margin-top:-4px;margin-bottom:-4px}vaadin-combo-box::part(text-field),vaadin-custom-field,vaadin-date-picker,vaadin-email-field,vaadin-integer-field,vaadin-number-field,vaadin-password-field,vaadin-text-area,vaadin-text-field{padding-top:0;padding-bottom:0}vaadin-date-picker::part(text-field){padding-top:0;padding-bottom:0}vaadin-button{margin:0}vaadin-checkbox::part(checkbox){margin:0}vaadin-checkbox::part(label){margin:.1875em var(--lumo-space-m)}.container{width:100%}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.top{top:var(--lumo-space-m,1rem)}.right-0{right:0}.right{right:var(--lumo-space-m,1rem)}.bottom{bottom:var(--lumo-space-m,1rem)}.left{left:var(--lumo-space-m,1rem)}.isolate{isolation:isolate}.z-50{z-index:50}.order-1{order:1}:host([sm]) .sm-order-1{order:1}.col-span-2{grid-column:span 2/span 2}.float-left{float:left}.m-auto{margin:auto}.m-xs{margin:var(--lumo-space-xs,.25rem)}.m-s{margin:var(--lumo-space-s,.5rem)}.m-m{margin:var(--lumo-space-m,1rem)}.m-l{margin:var(--lumo-space-l,1.5rem)}.m{margin:var(--lumo-space-m,1rem)}.-m-s{margin:calc(var(--lumo-space-s,.5rem) * -1)}:host([sm]) .sm-m-xl{margin:var(--lumo-space-xl,2.5rem)}.mx-auto{margin-left:auto;margin-right:auto}.mx-xs{margin-left:var(--lumo-space-xs,.25rem);margin-right:var(--lumo-space-xs,.25rem)}.mx-m{margin-left:var(--lumo-space-m,1rem);margin-right:var(--lumo-space-m,1rem)}.-mx-xs{margin-left:calc(var(--lumo-space-xs,.25rem) * -1);margin-right:calc(var(--lumo-space-xs,.25rem) * -1)}.-mx-s{margin-left:calc(var(--lumo-space-s,.5rem) * -1);margin-right:calc(var(--lumo-space-s,.5rem) * -1)}.my-xs{margin-top:var(--lumo-space-xs,.25rem);margin-bottom:var(--lumo-space-xs,.25rem)}.my-m{margin-top:var(--lumo-space-m,1rem);margin-bottom:var(--lumo-space-m,1rem)}.my{margin-top:var(--lumo-space-m,1rem);margin-bottom:var(--lumo-space-m,1rem)}.-my-xs{margin-top:calc(var(--lumo-space-xs,.25rem) * -1);margin-bottom:calc(var(--lumo-space-xs,.25rem) * -1)}.mt-0{margin-top:0}.mt-xs{margin-top:var(--lumo-space-xs,.25rem)}.mt-s{margin-top:var(--lumo-space-s,.5rem)}.mt-m{margin-top:var(--lumo-space-m,1rem)}.mt-xl{margin-top:var(--lumo-space-xl,2.5rem)}.-mt-xs{margin-top:calc(var(--lumo-space-xs,.25rem) * -1)}.-mt-m{margin-top:calc(var(--lumo-space-m,1rem) * -1)}.mr-auto{margin-right:auto}.mr-s{margin-right:var(--lumo-space-s,.5rem)}.mr-m{margin-right:var(--lumo-space-m,1rem)}.mr-l{margin-right:var(--lumo-space-l,1.5rem)}.mr-xl{margin-right:var(--lumo-space-xl,2.5rem)}.mb-xs{margin-bottom:var(--lumo-space-xs,.25rem)}.mb-s{margin-bottom:var(--lumo-space-s,.5rem)}.mb-m{margin-bottom:var(--lumo-space-m,1rem)}.mb-l{margin-bottom:var(--lumo-space-l,1.5rem)}.-mb-xs{margin-bottom:calc(var(--lumo-space-xs,.25rem) * -1)}.ml-auto{margin-left:auto}.ml-s{margin-left:var(--lumo-space-s,.5rem)}.ml-m{margin-left:var(--lumo-space-m,1rem)}:host([sm]) .sm-mt-0{margin-top:0}:host([sm]) .sm-mr-s{margin-right:var(--lumo-space-s,.5rem)}:host([sm]) .sm-mb-0{margin-bottom:0}:host([sm]) .sm-ml-s{margin-left:var(--lumo-space-s,.5rem)}:host([sm]) .sm-ml-m{margin-left:var(--lumo-space-m,1rem)}:host([md]) .md-mr-s{margin-right:var(--lumo-space-s,.5rem)}:host([md]) .md-mb-0{margin-bottom:0}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}:host([sm]) .sm-flex{display:flex}:host([sm]) .sm-table-cell{display:table-cell}:host([md]) .md-flex{display:flex}:host([md]) .md-table-cell{display:table-cell}:host([lg]) .lg-table-cell{display:table-cell}:host([xl]) .xl-table-cell{display:table-cell}.h-auto{height:auto}.h-xxs{height:var(--lumo-size-xxs,1.5rem)}.h-xs{height:var(--lumo-size-xs,1.625rem)}.h-m{height:var(--lumo-size-m,2.25rem)}.h-l{height:var(--lumo-size-l,2.75rem)}.h-xl{height:var(--lumo-size-xl,3.5rem)}.h-full{height:100%}:host([sm]) .sm-h-m{height:var(--lumo-size-m,2.25rem)}.min-h-0{min-height:0}.w-auto{width:auto}.w-xxs{width:var(--lumo-size-xxs,1.5rem)}.w-l{width:var(--lumo-size-l,2.75rem)}.w-xl{width:var(--lumo-size-xl,3.5rem)}.w-1-3{width:33.333333%}.w-2-3{width:66.666667%}.w-full{width:100%}:host([sm]) .sm-w-auto{width:auto}:host([sm]) .sm-w-l{width:var(--lumo-size-l,2.75rem)}:host([md]) .md-w-auto{width:auto}:host([md]) .md-w-1-2{width:50%}.min-w-0{min-width:0}.max-w-0{max-width:0}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.origin-top-right{transform-origin:top right}.origin-bottom-right{transform-origin:bottom right}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:bottom left}.origin-top-left{transform-origin:top left}:host([sm]) .sm-origin-center{transform-origin:center}.translate-x-0{--tw-translate-x:0}.translate-x-l{--tw-translate-x:var(--lumo-space-l, 1.5rem)}.translate-y-0{--tw-translate-y:0}.-translate-y-s{--tw-translate-y:calc(var(--lumo-space-s, 0.5rem) * -1)}.-translate-y-m{--tw-translate-y:calc(var(--lumo-space-m, 1rem) * -1)}.-translate-y-l{--tw-translate-y:calc(var(--lumo-space-l, 1.5rem) * -1)}.translate-y-full{--tw-translate-y:100%}:host([sm]) .sm-translate-x-full{--tw-translate-x:100%}:host([sm]) .sm-translate-y-0{--tw-translate-y:0}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-90{--tw-scale-x:.9;--tw-scale-y:.9}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}:host([sm]) .sm-scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}.group:hover .group-hover-scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{100%,75%{transform:scale(2);opacity:0}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.cursor-pointer{cursor:pointer}.disabled-cursor-default:disabled{cursor:default}.select-none{user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}:host([sm]) .sm-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}:host([sm]) .sm-flex-row{flex-direction:row}:host([md]) .md-flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}:host([sm]) .sm-items-start{align-items:flex-start}:host([sm]) .sm-items-end{align-items:flex-end}:host([sm]) .sm-items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-s{gap:var(--lumo-space-s,.5rem)}.gap-m{gap:var(--lumo-space-m,1rem)}.gap-l{gap:var(--lumo-space-l,1.5rem)}.space-x-xs>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(var(--lumo-space-xs,.25rem) * var(--tw-space-x-reverse));margin-left:calc(var(--lumo-space-xs,.25rem) * calc(1 - var(--tw-space-x-reverse)))}.space-x-s>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(var(--lumo-space-s,.5rem) * var(--tw-space-x-reverse));margin-left:calc(var(--lumo-space-s,.5rem) * calc(1 - var(--tw-space-x-reverse)))}.space-x-m>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(var(--lumo-space-m,1rem) * var(--tw-space-x-reverse));margin-left:calc(var(--lumo-space-m,1rem) * calc(1 - var(--tw-space-x-reverse)))}.space-y-xs>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(var(--lumo-space-xs,.25rem) * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(var(--lumo-space-xs,.25rem) * var(--tw-space-y-reverse))}.space-y-s>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(var(--lumo-space-s,.5rem) * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(var(--lumo-space-s,.5rem) * var(--tw-space-y-reverse))}.space-y-m>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(var(--lumo-space-m,1rem) * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(var(--lumo-space-m,1rem) * var(--tw-space-y-reverse))}.space-y-l>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(var(--lumo-space-l,1.5rem) * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(var(--lumo-space-l,1.5rem) * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-contrast-10>:not([hidden])~:not([hidden]){border-color:var(--lumo-contrast-10pct,hsla(214,57%,24%,.1))}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded-s{border-radius:var(--lumo-border-radius-s,.25em)}.rounded-full{border-radius:100%}.rounded{border-radius:var(--lumo-border-radius-m,.5em)}.rounded-t-l{border-top-left-radius:var(--lumo-border-radius-l,.75em);border-top-right-radius:var(--lumo-border-radius-l,.75em)}.rounded-b-l{border-bottom-right-radius:var(--lumo-border-radius-l,.75em);border-bottom-left-radius:var(--lumo-border-radius-l,.75em)}:host([sm]) .sm-rounded-b-l{border-bottom-right-radius:var(--lumo-border-radius-l,.75em);border-bottom-left-radius:var(--lumo-border-radius-l,.75em)}.border{border-width:1px}.border-t{border-top-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}:host([md]) .md-border-r{border-right-width:1px}.border-dashed{border-style:dashed}.border-transparent{border-color:transparent}.border-contrast-10{border-color:var(--lumo-contrast-10pct,hsla(214,57%,24%,.1))}.border-contrast-20{border-color:var(--lumo-contrast-20pct,hsla(214,53%,23%,.16))}.border-contrast{border-color:var(--lumo-contrast,#182433)}.border-primary{border-color:var(--lumo-primary-color,#1675f2)}.border-error{border-color:var(--lumo-error-color,#fe4238)}:host([md]) .md-border-contrast-10{border-color:var(--lumo-contrast-10pct,hsla(214,57%,24%,.1))}.hover-border-contrast-30:hover{border-color:var(--lumo-contrast-30pct,hsla(214,50%,22%,.26))}.hover-border-primary-10:hover{border-color:var(--lumo-primary-color-10pct,hsla(214,90%,52%,.1))}.focus-border-primary:focus{border-color:var(--lumo-primary-color,#1675f2)}.bg-base{background-color:var(--lumo-base-color,#fff)}.bg-tint{background-color:var(--lumo-tint,#fff)}.bg-contrast-5{background-color:var(--lumo-contrast-5pct,hsla(214,61%,25%,.05))}.bg-contrast-10{background-color:var(--lumo-contrast-10pct,hsla(214,57%,24%,.1))}.bg-contrast-20{background-color:var(--lumo-contrast-20pct,hsla(214,53%,23%,.16))}.bg-contrast-50{background-color:var(--lumo-contrast-50pct,hsla(214,45%,20%,.5))}.bg-contrast{background-color:var(--lumo-contrast,#182433)}.bg-primary-10{background-color:var(--lumo-primary-color-10pct,hsla(214,90%,52%,.1))}.bg-primary-50{background-color:var(--lumo-primary-color-50pct,hsla(214,90%,52%,.5))}.bg-primary{background-color:var(--lumo-primary-color,#1675f2)}.bg-error-10{background-color:var(--lumo-error-color-10pct,hsla(3,100%,60%,.1))}.bg-error{background-color:var(--lumo-error-color,#fe4238)}.bg-success-10{background-color:var(--lumo-success-color-10pct,hsla(145,76%,44%,.12))}.bg-success{background-color:var(--lumo-success-color,#15c05c)}.group:hover .group-hover-bg-contrast-30{background-color:var(--lumo-contrast-30pct,hsla(214,50%,22%,.26))}.hover-bg-contrast-10:hover{background-color:var(--lumo-contrast-10pct,hsla(214,57%,24%,.1))}.hover-bg-primary-10:hover{background-color:var(--lumo-primary-color-10pct,hsla(214,90%,52%,.1))}.fill-current{fill:currentColor}.object-cover{object-fit:cover}.p-0{padding:0}.p-xs{padding:var(--lumo-space-xs,.25rem)}.p-s{padding:var(--lumo-space-s,.5rem)}.p-m{padding:var(--lumo-space-m,1rem)}.p-l{padding:var(--lumo-space-l,1.5rem)}.p{padding:var(--lumo-space-m,1rem)}:host([sm]) .sm-p-0{padding:0}.px-xs{padding-left:var(--lumo-space-xs,.25rem);padding-right:var(--lumo-space-xs,.25rem)}.px-s{padding-left:var(--lumo-space-s,.5rem);padding-right:var(--lumo-space-s,.5rem)}.px-m{padding-left:var(--lumo-space-m,1rem);padding-right:var(--lumo-space-m,1rem)}.py-xs{padding-top:var(--lumo-space-xs,.25rem);padding-bottom:var(--lumo-space-xs,.25rem)}.py-s{padding-top:var(--lumo-space-s,.5rem);padding-bottom:var(--lumo-space-s,.5rem)}.pt-s{padding-top:var(--lumo-space-s,.5rem)}.pt-m{padding-top:var(--lumo-space-m,1rem)}.pr-m{padding-right:var(--lumo-space-m,1rem)}.pb-s{padding-bottom:var(--lumo-space-s,.5rem)}.pb-m{padding-bottom:var(--lumo-space-m,1rem)}.pl-xs{padding-left:var(--lumo-space-xs,.25rem)}.pl-s{padding-left:var(--lumo-space-s,.5rem)}.pl-m{padding-left:var(--lumo-space-m,1rem)}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}:host([sm]) .sm-text-left{text-align:left}:host([sm]) .sm-text-right{text-align:right}:host([md]) .md-text-left{text-align:left}.font-lumo{font-family:var(--lumo-font-family, -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol")}.text-xxs{font-size:var(--lumo-font-size-xxs,.75rem)}.text-xs{font-size:var(--lumo-font-size-xs,.8125rem)}.text-s{font-size:var(--lumo-font-size-s,.875rem)}.text-m{font-size:var(--lumo-font-size-m,1rem)}.text-l{font-size:var(--lumo-font-size-l,1.125rem)}.text-xl{font-size:var(--lumo-font-size-xl,1.375rem)}.text-xxl{font-size:var(--lumo-font-size-xxl,1.75rem)}.text-xxxl{font-size:var(--lumo-font-size-xxxl,2.5rem)}:host([sm]) .sm-text-l{font-size:var(--lumo-font-size-l,1.125rem)}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}:host([sm]) .sm-normal-case{text-transform:none}.leading-none{line-height:1}.leading-xs{line-height:var(--lumo-line-height-xs,1.25)}.leading-s{line-height:var(--lumo-line-height-s,1.375)}.leading-m{line-height:var(--lumo-line-height-m,1.625)}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}:host([sm]) .sm-tracking-normal{letter-spacing:0}.text-transparent{color:transparent}.text-base{color:var(--lumo-base-color,#fff)}.text-tint{color:var(--lumo-tint,#fff)}.text-contrast-20{color:var(--lumo-contrast-20pct,hsla(214,53%,23%,.16))}.text-contrast{color:var(--lumo-contrast,#182433)}.text-primary{color:var(--lumo-primary-text-color,#1675f2)}.text-primary-contrast{color:var(--lumo-primary-contrast-color,#fff)}.text-error{color:var(--lumo-error-text-color,#f52318)}.text-success{color:var(--lumo-success-text-color,#00a344)}.text-header{color:var(--lumo-header-text-color,#182433)}.text-body{color:var(--lumo-body-text-color,hsla(214,40%,16%,.94))}.text-disabled{color:var(--lumo-disabled-text-color,hsla(214,50%,22%,.26))}.text-secondary{color:var(--lumo-secondary-text-color,hsla(214,42%,18%,.72))}.text-tertiary{color:var(--lumo-tertiary-text-color,hsla(214,45%,20%,.5))}:host([sm]) .sm-text-body{color:var(--lumo-body-text-color,hsla(214,40%,16%,.94))}.hover-text-primary:hover{color:var(--lumo-primary-text-color,#1675f2)}.hover-text-body:hover{color:var(--lumo-body-text-color,hsla(214,40%,16%,.94))}.hover-text-secondary:hover{color:var(--lumo-secondary-text-color,hsla(214,42%,18%,.72))}.focus-text-primary:focus{color:var(--lumo-primary-text-color,#1675f2)}.focus-text-body:focus{color:var(--lumo-body-text-color,hsla(214,40%,16%,.94))}.disabled-text-tertiary:disabled{color:var(--lumo-tertiary-text-color,hsla(214,45%,20%,.5))}.hover-underline:hover{text-decoration:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-100{opacity:1}:host([sm]) .sm-opacity-0{opacity:0}.disabled-opacity-50:disabled{opacity:.5}*,::after,::before{--tw-shadow:0 0 #0000}.shadow-xs{--tw-shadow:var(--lumo-box-shadow-xs, 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-m{--tw-shadow:var(--lumo-box-shadow-m, 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.4));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xxl{--tw-shadow:var(--lumo-box-shadow-xxl, 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.4));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group:hover .group-hover-shadow-s{--tw-shadow:var(--lumo-box-shadow-s, 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.4));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus-within-shadow-outline:focus-within{--tw-shadow:0 0 0 2px var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus-within-shadow-outline-success:focus-within{--tw-shadow:0 0 0 2px var(--lumo-success-color-50pct, hsla(145, 76%, 44%, 0.55));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus-within-shadow-outline-error:focus-within{--tw-shadow:0 0 0 2px var(--lumo-error-color-50pct, hsla(3, 100%, 60%, 0.1));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus-shadow-outline:focus{--tw-shadow:0 0 0 2px var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus-outline-none:focus{outline:2px solid transparent;outline-offset:2px}*,::after,::before{--tw-ring-inset:var(--tw-empty, );/*!*//*!*/--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59, 130, 246, 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.focus-within-ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-primary-50{--tw-ring-color:var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5))}.focus-within-ring-primary-50:focus-within{--tw-ring-color:var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5))}.focus-ring-primary-50:focus{--tw-ring-color:var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5))}.ring-offset-4{--tw-ring-offset-width:4px}.focus-ring-offset-2:focus{--tw-ring-offset-width:2px}.filter{--tw-blur:var(--tw-empty, );/*!*//*!*/--tw-brightness:var(--tw-empty, );/*!*//*!*/--tw-contrast:var(--tw-empty, );/*!*//*!*/--tw-grayscale:var(--tw-empty, );/*!*//*!*/--tw-hue-rotate:var(--tw-empty, );/*!*//*!*/--tw-invert:var(--tw-empty, );/*!*//*!*/--tw-saturate:var(--tw-empty, );/*!*//*!*/--tw-sepia:var(--tw-empty, );/*!*//*!*/--tw-drop-shadow:var(--tw-empty, );/*!*//*!*/filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur:blur(8px)}.grayscale{--tw-grayscale:grayscale(100%)}.backdrop-filter{--tw-backdrop-blur:var(--tw-empty, );/*!*//*!*/--tw-backdrop-brightness:var(--tw-empty, );/*!*//*!*/--tw-backdrop-contrast:var(--tw-empty, );/*!*//*!*/--tw-backdrop-grayscale:var(--tw-empty, );/*!*//*!*/--tw-backdrop-hue-rotate:var(--tw-empty, );/*!*//*!*/--tw-backdrop-invert:var(--tw-empty, );/*!*//*!*/--tw-backdrop-opacity:var(--tw-empty, );/*!*//*!*/--tw-backdrop-saturate:var(--tw-empty, );/*!*//*!*/--tw-backdrop-sepia:var(--tw-empty, );/*!*//*!*/backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms}.transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms}.transition-colors{transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:150ms}.duration-100{transition-duration:.1s}.duration-150{transition-duration:150ms}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.border-radius-overflow-fix{-webkit-mask-image:-webkit-radial-gradient(white,#000)}.grid-rows-auto{grid-auto-rows:1fr}.icon-inline{--iron-icon-height:1em;--iron-icon-width:1em}.bg-blurred{backdrop-filter:blur(25px);background:var(--lumo-tint-80pct)}.max-w-modal{max-width:28rem}.w-narrow-modal{width:18rem}.snap-x-mandatory{scroll-snap-type:x mandatory}.snap-start{scroll-snap-align:start}:host([sm]) .sm-max-w-modal{max-width:28rem}:host([sm]) .sm-w-narrow-modal{width:18rem}`))]}};class Xt extends(Vt(bt(Kt(u)))){}let Wt="";try{Wt="https://static.www.foxycart.com/beta/foxy-elements/0.3.0"}catch(t){}class Jt extends Xt{constructor(t="global"){super(),this.__lang=this._i18n.options.fallbackLng[0],this.__ns=this._i18n.options.fallbackNS[0],this.ns=t,this._whenI18nReady.then((()=>this.requestUpdate()))}static get properties(){return p(p({},super.properties),{},{lang:{type:String,noAccessor:!0},ns:{type:String,noAccessor:!0}})}get lang(){return this.__lang}set lang(t){t&&"undefined"!==t&&(this.__lang=t,this._i18n.loadLanguages(t).then((()=>{this.__lang===t&&this.requestUpdate()})))}get ns(){return this.__ns}set ns(t){this.__ns=t,this._i18n.loadNamespaces(t).then((()=>{this.__ns===t&&this.requestUpdate()}))}static __initI18N(){return this.__i18n=tt.createInstance(),this.__i18n.use(yt),this.__whenI18NReady=this.__i18n.init({ns:["global"],supportedLngs:["nl","en","es","sv","fi","fr","de","zh","no","it"],interpolation:{format:Jt.__f},fallbackLng:"en",fallbackNS:"global",defaultNS:"global",detection:{order:["querystring","navigator","htmlTag","path","subdomain"],caches:[]},backend:{loadPath:`${Wt}/translations/{{ns}}/{{lng}}.json`}}),this.__whenI18NReady.then((()=>this.__isI18NReady=!0)),this.__i18n}get _i18n(){var t;return null!==(t=Jt.__i18n)&&void 0!==t?t:Jt.__initI18N()}get _whenI18nReady(){return Jt.__whenI18NReady}get _isI18nReady(){return Jt.__isI18NReady}get _t(){const t=[this.__ns,this._i18n.options.fallbackNS];return this._i18n.getFixedT(this.__lang,t)}}Jt.__fLowercase=t=>t.toLowerCase(),Jt.__fList=t=>t.map(((t,e,o)=>{if(0===e)return t;return`${e===o.length-1?" $t(and) ":","} ${t}`})).join(""),Jt.__f=(...t)=>{var e,o;const r=t[0];return(null!==(o=null===(e=t[1])||void 0===e?void 0:e.split(" "))&&void 0!==o?o:[]).reduce(((t,e)=>{switch(e){case"lowercase":return Jt.__fLowercase(t);case"list":return Jt.__fList(t);default:return t}}),r)},Jt.__isI18NReady=!1;const Yt=(t,e="")=>class extends t{constructor(){super(...arguments),this.lang="",this.ns=e,this.t=(t,o)=>{const r=customElements.get("foxy-i18n");if(!r)return t;const a=[...[e,...this.ns.split(" ").reverse()].map((t=>t.trim())).filter(((t,e,o)=>o.indexOf(t)===e&&t.length>0)).reverse().map(((e,o,r)=>`${e}:${[...r.slice(o+1),t].join(".")}`)),`shared:${t}`];return r.i18next.t(a,o).toString()}}static get properties(){return p(p({},super.properties),{},{lang:{type:String},ns:{type:String}})}static get defaultNS(){return e}connectedCallback(){super.connectedCallback();const t=customElements.get("foxy-i18n");this.__untrackTranslations=null==t?void 0:t.onTranslationChange((()=>this.requestUpdate()))}updated(t){super.updated(t);const e=customElements.get("foxy-i18n");e&&(t.has("lang")&&e.i18next.loadLanguages(this.lang),t.has("ns")&&e.i18next.loadNamespaces(this.ns.split(" ")))}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.__untrackTranslations)||void 0===t||t.call(this)}};export{bt as R,Vt as S,Kt as T,Yt as a,Xt as b,Jt as c,tt as i};
|