stripe-pwa-elements 3.1.0 → 4.0.0
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/cjs/app-globals-V2Kpy_OQ.js +0 -3
- package/dist/cjs/error-FFC4kSs5.js +0 -3
- package/dist/cjs/{factory-Hsw0e7-d.js → factory-da3xAKkz.js} +194 -73
- package/dist/cjs/{index-Ba1pBePA.js → index-CYbA1N_k.js} +24 -6
- package/dist/cjs/index-Dkb0SxZc.js +4694 -0
- package/dist/cjs/index.cjs.js +0 -1
- package/dist/cjs/ion-icon.cjs.entry.js +22 -13
- package/dist/cjs/loader.cjs.js +2 -3
- package/dist/cjs/stripe-address-element.cjs.entry.js +34 -26
- package/dist/cjs/stripe-card-element-modal.cjs.entry.js +6 -7
- package/dist/cjs/stripe-card-element_2.cjs.entry.js +135 -73
- package/dist/cjs/stripe-currency-selector.cjs.entry.js +13 -10
- package/dist/cjs/stripe-elements.cjs.js +31 -5
- package/dist/cjs/stripe-express-checkout-element.cjs.entry.js +25 -22
- package/dist/cjs/stripe-link-authentication-element.cjs.entry.js +13 -10
- package/dist/cjs/stripe-payment-element.cjs.entry.js +190 -131
- package/dist/cjs/stripe-payment-request-button.cjs.entry.js +12 -7
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/stripe-address-element/stripe-address-element.js +29 -21
- package/dist/collection/components/stripe-card-element/stripe-card-element.helpers.js +57 -0
- package/dist/collection/components/stripe-card-element/stripe-card-element.js +55 -68
- package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.css +2 -2
- package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js +16 -12
- package/dist/collection/components/stripe-currency-selector/stripe-currency-selector.js +10 -6
- package/dist/collection/components/stripe-express-checkout-element/stripe-express-checkout-element.js +28 -20
- package/dist/collection/components/stripe-link-authentication-element/stripe-link-authentication-element.js +12 -7
- package/dist/collection/components/stripe-modal/stripe-modal.css +36 -2
- package/dist/collection/components/stripe-modal/stripe-modal.js +34 -7
- package/dist/collection/components/stripe-payment-element/stripe-payment-element.helpers.js +114 -0
- package/dist/collection/components/stripe-payment-element/stripe-payment-element.js +69 -126
- package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js +34 -12
- package/dist/collection/index.js +0 -1
- package/dist/collection/interfaces.js +0 -1
- package/dist/collection/services/address-element-manager.js +3 -4
- package/dist/collection/services/card-element-manager.js +3 -4
- package/dist/collection/services/currency-selector-element-manager.js +3 -4
- package/dist/collection/services/express-checkout-element-manager.js +9 -10
- package/dist/collection/services/factory.js +0 -1
- package/dist/collection/services/interfaces.js +0 -1
- package/dist/collection/services/link-authentication-element-manager.js +3 -4
- package/dist/collection/services/payment-element-manager.js +4 -5
- package/dist/collection/services/stripe-service.js +5 -6
- package/dist/collection/utils/element-finder.js +2 -3
- package/dist/collection/utils/error.js +0 -1
- package/dist/collection/utils/i18n.js +0 -1
- package/dist/collection/utils/platform.js +0 -1
- package/dist/collection/utils/test-setup.js +5 -0
- package/dist/collection/utils/utils.js +2 -3
- package/dist/components/error.js +1 -16
- package/dist/components/factory.js +1 -3736
- package/dist/components/icon.js +1 -459
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -4
- package/dist/components/index2.js +1 -192
- package/dist/components/ion-icon.js +1 -9
- package/dist/components/stripe-address-element.js +1 -327
- package/dist/components/stripe-card-element-modal.js +1 -174
- package/dist/components/stripe-card-element.js +1 -9
- package/dist/components/stripe-card-element2.js +1 -440
- package/dist/components/stripe-currency-selector.js +1 -218
- package/dist/components/stripe-express-checkout-element.js +1 -332
- package/dist/components/stripe-link-authentication-element.js +1 -256
- package/dist/components/stripe-modal.js +1 -9
- package/dist/components/stripe-modal2.js +1 -88
- package/dist/components/stripe-payment-element.js +1 -510
- package/dist/components/stripe-payment-request-button.js +1 -9
- package/dist/components/stripe-payment-request-button2.js +1 -224
- package/dist/components/utils.js +1 -89
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/error-XRfh5Wrs.js +0 -3
- package/dist/esm/{factory-Li_TGt9P.js → factory-DeqoYLf_.js} +194 -73
- package/dist/esm/index-C6bbmyga.js +4677 -0
- package/dist/esm/{index-BHDCxQOb.js → index-CBXaOfXU.js} +24 -6
- package/dist/esm/index.js +0 -1
- package/dist/esm/ion-icon.entry.js +22 -13
- package/dist/esm/loader.js +3 -4
- package/dist/esm/stripe-address-element.entry.js +34 -26
- package/dist/esm/stripe-card-element-modal.entry.js +6 -7
- package/dist/esm/stripe-card-element_2.entry.js +135 -73
- package/dist/esm/stripe-currency-selector.entry.js +13 -10
- package/dist/esm/stripe-elements.js +32 -6
- package/dist/esm/stripe-express-checkout-element.entry.js +25 -22
- package/dist/esm/stripe-link-authentication-element.entry.js +13 -10
- package/dist/esm/stripe-payment-element.entry.js +190 -131
- package/dist/esm/stripe-payment-request-button.entry.js +12 -7
- package/dist/stripe-elements/index.esm.js +0 -2
- package/dist/stripe-elements/p--sA2m1ad.js +1 -0
- package/dist/stripe-elements/p-38e7b187.entry.js +1 -0
- package/dist/stripe-elements/p-44495284.entry.js +1 -0
- package/dist/stripe-elements/p-4ba675fa.entry.js +1 -0
- package/dist/stripe-elements/p-5cf62945.entry.js +1 -0
- package/dist/stripe-elements/p-C6bbmyga.js +2 -0
- package/dist/stripe-elements/p-CBXaOfXU.js +1 -0
- package/dist/stripe-elements/p-DQuL1Twl.js +1 -2
- package/dist/stripe-elements/p-XRfh5Wrs.js +1 -2
- package/dist/stripe-elements/p-c24ae181.entry.js +1 -0
- package/dist/stripe-elements/p-d9e86451.entry.js +1 -0
- package/dist/stripe-elements/p-f09c86a0.entry.js +1 -0
- package/dist/stripe-elements/p-f64f394d.entry.js +1 -0
- package/dist/stripe-elements/p-f6d2425e.entry.js +1 -0
- package/dist/stripe-elements/stripe-elements.esm.js +1 -2
- package/dist/stripe-elements/svg/.gitignore +4 -0
- package/dist/types/components/stripe-card-element/stripe-card-element.d.ts +5 -1
- package/dist/types/components/stripe-card-element/stripe-card-element.helpers.d.ts +29 -0
- package/dist/types/components/stripe-card-element-modal/stripe-card-element-modal.d.ts +4 -4
- package/dist/types/components/stripe-modal/stripe-modal.d.ts +6 -0
- package/dist/types/components/stripe-payment-element/stripe-payment-element.d.ts +2 -2
- package/dist/types/components/stripe-payment-element/stripe-payment-element.helpers.d.ts +54 -0
- package/dist/types/components/stripe-payment-request-button/stripe-payment-request-button.d.ts +8 -0
- package/dist/types/components.d.ts +139 -29
- package/dist/types/index.d.ts +1 -0
- package/dist/types/services/interfaces.d.ts +3 -3
- package/dist/types/services/stripe-service.d.ts +2 -2
- package/dist/types/stencil-public-runtime.d.ts +110 -5
- package/dist/types/utils/test-setup.d.ts +1 -0
- package/package.json +50 -30
- package/readme.md +386 -133
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
- package/dist/cjs/error-FFC4kSs5.js.map +0 -1
- package/dist/cjs/factory-Hsw0e7-d.js.map +0 -1
- package/dist/cjs/index-Ba1pBePA.js.map +0 -1
- package/dist/cjs/index-C1haN5iF.js +0 -1907
- package/dist/cjs/index-C1haN5iF.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/ion-icon.entry.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/stripe-address-element.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-card-element-modal.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-card-element.stripe-modal.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-currency-selector.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-elements.cjs.js.map +0 -1
- package/dist/cjs/stripe-express-checkout-element.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-link-authentication-element.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-payment-element.entry.cjs.js.map +0 -1
- package/dist/cjs/stripe-payment-request-button.entry.cjs.js.map +0 -1
- package/dist/collection/components/stripe-address-element/stripe-address-element.js.map +0 -1
- package/dist/collection/components/stripe-card-element/stripe-card-element.js.map +0 -1
- package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js.map +0 -1
- package/dist/collection/components/stripe-currency-selector/stripe-currency-selector.js.map +0 -1
- package/dist/collection/components/stripe-express-checkout-element/stripe-express-checkout-element.js.map +0 -1
- package/dist/collection/components/stripe-link-authentication-element/stripe-link-authentication-element.js.map +0 -1
- package/dist/collection/components/stripe-modal/stripe-modal.js.map +0 -1
- package/dist/collection/components/stripe-payment-element/stripe-payment-element.js.map +0 -1
- package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/interfaces.js.map +0 -1
- package/dist/collection/services/address-element-manager.js.map +0 -1
- package/dist/collection/services/card-element-manager.js.map +0 -1
- package/dist/collection/services/currency-selector-element-manager.js.map +0 -1
- package/dist/collection/services/express-checkout-element-manager.js.map +0 -1
- package/dist/collection/services/factory.js.map +0 -1
- package/dist/collection/services/interfaces.js.map +0 -1
- package/dist/collection/services/link-authentication-element-manager.js.map +0 -1
- package/dist/collection/services/payment-element-manager.js.map +0 -1
- package/dist/collection/services/stripe-service.js.map +0 -1
- package/dist/collection/utils/element-finder.js.map +0 -1
- package/dist/collection/utils/error.js.map +0 -1
- package/dist/collection/utils/i18n.js.map +0 -1
- package/dist/collection/utils/platform.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/error.js.map +0 -1
- package/dist/components/factory.js.map +0 -1
- package/dist/components/icon.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js.map +0 -1
- package/dist/components/ion-icon.js.map +0 -1
- package/dist/components/stripe-address-element.js.map +0 -1
- package/dist/components/stripe-card-element-modal.js.map +0 -1
- package/dist/components/stripe-card-element.js.map +0 -1
- package/dist/components/stripe-card-element2.js.map +0 -1
- package/dist/components/stripe-currency-selector.js.map +0 -1
- package/dist/components/stripe-express-checkout-element.js.map +0 -1
- package/dist/components/stripe-link-authentication-element.js.map +0 -1
- package/dist/components/stripe-modal.js.map +0 -1
- package/dist/components/stripe-modal2.js.map +0 -1
- package/dist/components/stripe-payment-element.js.map +0 -1
- package/dist/components/stripe-payment-request-button.js.map +0 -1
- package/dist/components/stripe-payment-request-button2.js.map +0 -1
- package/dist/components/utils.js.map +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
- package/dist/esm/error-XRfh5Wrs.js.map +0 -1
- package/dist/esm/factory-Li_TGt9P.js.map +0 -1
- package/dist/esm/index-BHDCxQOb.js.map +0 -1
- package/dist/esm/index-Dkis4t79.js +0 -1895
- package/dist/esm/index-Dkis4t79.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/ion-icon.entry.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/stripe-address-element.entry.js.map +0 -1
- package/dist/esm/stripe-card-element-modal.entry.js.map +0 -1
- package/dist/esm/stripe-card-element.stripe-modal.entry.js.map +0 -1
- package/dist/esm/stripe-currency-selector.entry.js.map +0 -1
- package/dist/esm/stripe-elements.js.map +0 -1
- package/dist/esm/stripe-express-checkout-element.entry.js.map +0 -1
- package/dist/esm/stripe-link-authentication-element.entry.js.map +0 -1
- package/dist/esm/stripe-payment-element.entry.js.map +0 -1
- package/dist/esm/stripe-payment-request-button.entry.js.map +0 -1
- package/dist/stripe-elements/index.esm.js.map +0 -1
- package/dist/stripe-elements/ion-icon.entry.esm.js.map +0 -1
- package/dist/stripe-elements/loader.esm.js.map +0 -1
- package/dist/stripe-elements/p-01d63033.entry.js +0 -2
- package/dist/stripe-elements/p-01d63033.entry.js.map +0 -1
- package/dist/stripe-elements/p-1b8f9c7f.entry.js +0 -2
- package/dist/stripe-elements/p-1b8f9c7f.entry.js.map +0 -1
- package/dist/stripe-elements/p-37008853.entry.js +0 -2
- package/dist/stripe-elements/p-37008853.entry.js.map +0 -1
- package/dist/stripe-elements/p-5d152193.entry.js +0 -2
- package/dist/stripe-elements/p-5d152193.entry.js.map +0 -1
- package/dist/stripe-elements/p-623f13e6.entry.js +0 -2
- package/dist/stripe-elements/p-623f13e6.entry.js.map +0 -1
- package/dist/stripe-elements/p-809c9f2f.entry.js +0 -2
- package/dist/stripe-elements/p-809c9f2f.entry.js.map +0 -1
- package/dist/stripe-elements/p-BHDCxQOb.js +0 -2
- package/dist/stripe-elements/p-BHDCxQOb.js.map +0 -1
- package/dist/stripe-elements/p-DQuL1Twl.js.map +0 -1
- package/dist/stripe-elements/p-Dkis4t79.js +0 -3
- package/dist/stripe-elements/p-Dkis4t79.js.map +0 -1
- package/dist/stripe-elements/p-WnA32N4v.js +0 -2
- package/dist/stripe-elements/p-WnA32N4v.js.map +0 -1
- package/dist/stripe-elements/p-XRfh5Wrs.js.map +0 -1
- package/dist/stripe-elements/p-ba41e196.entry.js +0 -2
- package/dist/stripe-elements/p-ba41e196.entry.js.map +0 -1
- package/dist/stripe-elements/p-bb1bc49a.entry.js +0 -2
- package/dist/stripe-elements/p-bb1bc49a.entry.js.map +0 -1
- package/dist/stripe-elements/p-f21ea941.entry.js +0 -2
- package/dist/stripe-elements/p-f21ea941.entry.js.map +0 -1
- package/dist/stripe-elements/stripe-address-element.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-card-element-modal.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-card-element.stripe-modal.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-currency-selector.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-elements.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-express-checkout-element.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-link-authentication-element.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-payment-element.entry.esm.js.map +0 -1
- package/dist/stripe-elements/stripe-payment-request-button.entry.esm.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import { l as loadStripe } from './index-
|
|
1
|
+
import { r as registerInstance, a as createEvent, h, d as Host, g as getElement } from './index-C6bbmyga.js';
|
|
2
|
+
import { l as loadStripe } from './index-CBXaOfXU.js';
|
|
3
3
|
|
|
4
|
-
const stripePaymentRequestButtonCss =
|
|
4
|
+
const stripePaymentRequestButtonCss = () => `:host{display:block}`;
|
|
5
5
|
|
|
6
6
|
const StripePaymentRequestButton = class {
|
|
7
7
|
/**
|
|
@@ -58,7 +58,7 @@ const StripePaymentRequestButton = class {
|
|
|
58
58
|
}
|
|
59
59
|
constructor(hostRef) {
|
|
60
60
|
registerInstance(this, hostRef);
|
|
61
|
-
this.stripeLoaded = createEvent(this, "stripeLoaded");
|
|
61
|
+
this.stripeLoaded = createEvent(this, "stripeLoaded", 7);
|
|
62
62
|
this.loadStripeStatus = '';
|
|
63
63
|
/**
|
|
64
64
|
* Overwrite the application name that registered
|
|
@@ -74,6 +74,12 @@ const StripePaymentRequestButton = class {
|
|
|
74
74
|
this.loadStripeStatus = 'failure';
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
connectedCallback() {
|
|
78
|
+
console.warn('[stripe-pwa-elements] <stripe-payment-request-button> is deprecated. ' +
|
|
79
|
+
'stripe.paymentRequest() is being removed in Stripe.js 9.x (deprecated 2025-09-30 / removed 2026-03-25). ' +
|
|
80
|
+
'Please migrate to <stripe-express-checkout-element>, which supports Apple Pay, Google Pay, Link, PayPal, and more. ' +
|
|
81
|
+
'Migration guide: https://hideokamoto.github.io/stripe-pwa-elements/guides/migrate-payment-request-button-to-express-checkout/');
|
|
82
|
+
}
|
|
77
83
|
/**
|
|
78
84
|
* @param option
|
|
79
85
|
* @private
|
|
@@ -179,11 +185,10 @@ const StripePaymentRequestButton = class {
|
|
|
179
185
|
this.stripe = undefined;
|
|
180
186
|
}
|
|
181
187
|
render() {
|
|
182
|
-
return (h(Host, { key: '
|
|
188
|
+
return (h(Host, { key: '6340656e6d6f7ac25db9c42e8cd82be9e342640d' }, h("div", { key: '2c83b290ee0fc7663b15d6e5ee7a76380f54875b', id: "payment-request" }, h("div", { key: 'bff7ac4d9f5cba737fa7addbc594c275164ff04a', id: "payment-request-button" })), h("slot", { key: 'de55b77ffa140ba83a6de8592f95bc75f4ffabf5' })));
|
|
183
189
|
}
|
|
184
190
|
get el() { return getElement(this); }
|
|
185
191
|
};
|
|
186
|
-
StripePaymentRequestButton.style = stripePaymentRequestButtonCss;
|
|
192
|
+
StripePaymentRequestButton.style = stripePaymentRequestButtonCss();
|
|
187
193
|
|
|
188
194
|
export { StripePaymentRequestButton as stripe_payment_request_button };
|
|
189
|
-
//# sourceMappingURL=stripe-payment-request-button.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as t}from"./p-C6bbmyga.js";import{l as e}from"./p-CBXaOfXU.js";const i=t=>Object.keys(u).filter((e=>u[e](t))),s=t=>!!l(t,/iPad/i)||!(!l(t,/Macintosh/i)||!r(t)),n=t=>l(t,/android|sink/i),r=t=>c(t,"(any-pointer:coarse)"),o=t=>a(t)||h(t),a=t=>!!(t.cordova||t.phonegap||t.PhoneGap),h=t=>{const e=t.Capacitor;return!(!e||!e.isNative)},l=(t,e)=>e.test(t.navigator.userAgent),c=(t,e)=>t.matchMedia(e).matches,u={ipad:s,iphone:t=>l(t,/iPhone/i),ios:t=>l(t,/iPhone|iPod/i)||s(t),android:n,phablet:t=>{const e=t.innerWidth,i=t.innerHeight,s=Math.min(e,i),n=Math.max(e,i);return s>390&&s<520&&n>620&&n<800},tablet:t=>{const e=t.innerWidth,i=t.innerHeight,r=Math.min(e,i),o=Math.max(e,i);return s(t)||(t=>n(t)&&!l(t,/mobile/i))(t)||r>460&&r<820&&o>780&&o<1400},cordova:a,capacitor:h,electron:t=>l(t,/electron/i),pwa:t=>!(!t.matchMedia("(display-mode: standalone)").matches&&!t.navigator.standalone),mobile:r,mobileweb:t=>r(t)&&!o(t),desktop:t=>!r(t),hybrid:o},d=()=>{const t=((t=window)=>{if(void 0===t)return[];t.Ionic=t.Ionic||{};let e=t.Ionic.platforms;return null==e&&(e=t.Ionic.platforms=i(t),e.forEach((e=>t.document.documentElement.classList.add(`plt-${e}`)))),e})(undefined);return t.includes("ios")?"ios":t.includes("android")?"android":void 0},f=t=>"string"==typeof t,p=()=>{let t,e;const i=new Promise(((i,s)=>{t=i,e=s}));return i.resolve=t,i.reject=e,i},g=t=>null==t?"":""+t,m=/###/g,y=t=>t&&t.indexOf("###")>-1?t.replace(m,"."):t,v=t=>!t||f(t),w=(t,e,i)=>{const s=f(e)?e.split("."):e;let n=0;for(;n<s.length-1;){if(v(t))return{};const e=y(s[n]);!t[e]&&i&&(t[e]=new i),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++n}return v(t)?{}:{obj:t,k:y(s[n])}},b=(t,e,i)=>{const{obj:s,k:n}=w(t,e,Object);if(void 0!==s||1===e.length)return void(s[n]=i);let r=e[e.length-1],o=e.slice(0,e.length-1),a=w(t,o,Object);for(;void 0===a.obj&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),a=w(t,o,Object),a?.obj&&void 0!==a.obj[`${a.k}.${r}`]&&(a.obj=void 0);a.obj[`${a.k}.${r}`]=i},S=(t,e)=>{const{obj:i,k:s}=w(t,e);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},$=(t,e,i)=>{for(const s in e)"__proto__"!==s&&"constructor"!==s&&(s in t?f(t[s])||t[s]instanceof String||f(e[s])||e[s]instanceof String?i&&(t[s]=e[s]):$(t[s],e[s],i):t[s]=e[s]);return t},k=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const C=t=>f(t)?t.replace(/[&<>"'\/]/g,(t=>x[t])):t,j=[" ",",","?","!",";"],O=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}(20),E=(t,e,i=".")=>{if(!t)return;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return;return t[e]}const s=e.split(i);let n=t;for(let t=0;t<s.length;){if(!n||"object"!=typeof n)return;let e,r="";for(let o=t;o<s.length;++o)if(o!==t&&(r+=i),r+=s[o],e=n[r],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&o<s.length-1)continue;t+=o-t+1;break}n=e}return n},N=t=>t?.replace(/_/g,"-"),M={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class L{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:",this.logger=t||M,this.options=e,this.debug=e.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,i,s){return s&&!this.debug?null:(f(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new L(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new L(this.logger,t)}}var P=new L;class z{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const i=this.observers[t].get(e)||0;this.observers[t].set(e,i+1)})),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}emit(t,...e){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,i])=>{for(let s=0;s<i;s++)t(...e)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([i,s])=>{for(let n=0;n<s;n++)i.apply(i,[t,...e])}))}}class A extends z{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,i,s={}){const n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,r=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.indexOf(".")>-1?o=t.split("."):(o=[t,e],i&&(Array.isArray(i)?o.push(...i):f(i)&&n?o.push(...i.split(n)):o.push(i)));const a=S(this.data,o);return!a&&!e&&!i&&t.indexOf(".")>-1&&(t=o[0],e=o[1],i=o.slice(2).join(".")),!a&&r&&f(i)?E(this.data?.[t]?.[e],i,n):a}addResource(t,e,i,s,n={silent:!1}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator;let o=[t,e];i&&(o=o.concat(r?i.split(r):i)),t.indexOf(".")>-1&&(o=t.split("."),s=e,e=o[1]),this.addNamespaces(e),b(this.data,o,s),n.silent||this.emit("added",t,e,i,s)}addResources(t,e,i,s={silent:!1}){for(const s in i)(f(i[s])||Array.isArray(i[s]))&&this.addResource(t,e,s,i[s],{silent:!0});s.silent||this.emit("added",t,e,i)}addResourceBundle(t,e,i,s,n,r={silent:!1,skipCopy:!1}){let o=[t,e];t.indexOf(".")>-1&&(o=t.split("."),s=i,i=e,e=o[1]),this.addNamespaces(e);let a=S(this.data,o)||{};r.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?$(a,i,n):a={...a,...i},b(this.data,o,a),r.silent||this.emit("added",t,e,i)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var R={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,i,s,n){return t.forEach((t=>{e=this.processors[t]?.process(e,i,s,n)??e})),e}};const T=Symbol("i18next/PATH_KEY");function I(t,e){const{[T]:i}=t(function(){const t=[],e=Object.create(null);let i;return e.get=(s,n)=>(i?.revoke?.(),n===T?t:(t.push(n),i=Proxy.revocable(s,e),i.proxy)),Proxy.revocable(Object.create(null),e).proxy}()),s=e?.keySeparator??".",n=e?.nsSeparator??":";if(i.length>1&&n){const t=e?.ns,r=Array.isArray(t)?t:null;if(r&&r.length>1&&r.slice(1).includes(i[0]))return`${i[0]}${n}${i.slice(1).join(s)}`}return i.join(s)}const F={},V=t=>!f(t)&&"boolean"!=typeof t&&"number"!=typeof t;class D extends z{constructor(t,e={}){var i,s;super(),i=t,s=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{i[t]&&(s[t]=i[t])})),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=P.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,e={interpolation:{}}){const i={...e};if(null==t)return!1;const s=this.resolve(t,i);if(void 0===s?.res)return!1;const n=V(s.res);return!1!==i.returnObjects||!n}extractFromKey(t,e){let i=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");const s=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator;let n=e.ns||this.options.defaultNS||[];const r=i&&t.indexOf(i)>-1,o=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||((t,e,i)=>{e=e||"",i=i||"";const s=j.filter((t=>e.indexOf(t)<0&&i.indexOf(t)<0));if(0===s.length)return!0;const n=O.getRegExp(`(${s.map((t=>"?"===t?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(i);e>0&&!n.test(t.substring(0,e))&&(r=!0)}return r})(t,i,s));if(r&&!o){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0)return{key:t,namespaces:f(n)?[n]:n};const r=t.split(i);(i!==s||i===s&&this.options.ns.indexOf(r[0])>-1)&&(n=r.shift()),t=r.join(s)}return{key:t,namespaces:f(n)?[n]:n}}translate(t,e,i){let s="object"==typeof e?{...e}:e;if("object"!=typeof s&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof s&&(s={...s}),s||(s={}),null==t)return"";"function"==typeof t&&(t=I(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?I(t,{...this.options,...s}):String(t)));const n=void 0!==s.returnDetails?s.returnDetails:this.options.returnDetails,r=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],s),h=a[a.length-1];let l=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const c=s.lng||this.language,u=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===c?.toLowerCase())return u?n?{res:`${h}${l}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${l}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:o;const d=this.resolve(t,s);let p=d?.res;const g=d?.usedKey||o,m=d?.exactUsedKey||o,y=void 0!==s.joinArrays?s.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,w=void 0!==s.count&&!f(s.count),b=D.hasDefaultValue(s),S=w?this.pluralResolver.getSuffix(c,s.count,s):"",$=s.ordinal&&w?this.pluralResolver.getSuffix(c,s.count,{ordinal:!1}):"",k=w&&!s.ordinal&&0===s.count,x=k&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${S}`]||s[`defaultValue${$}`]||s.defaultValue;let C=p;v&&!p&&b&&(C=x);const j=V(C),O=Object.prototype.toString.apply(C);if(!(v&&C&&j&&["[object Number]","[object Function]","[object RegExp]"].indexOf(O)<0)||f(y)&&Array.isArray(C))if(v&&f(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,i));else{let e=!1,n=!1;!this.isValidLookup(p)&&b&&(e=!0,p=x),this.isValidLookup(p)||(n=!0,p=o);const a=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:p,u=b&&x!==p&&this.options.updateMissing;if(n||e||u){if(this.logger.log(u?"updateKey":"missingKey",c,h,o,u?x:p),r){const t=this.resolve(o,{...s,keySeparator:!1});t&&t.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.")}let t=[];const e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if("fallback"===this.options.saveMissingTo&&e&&e[0])for(let i=0;i<e.length;i++)t.push(e[i]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(s.lng||this.language):t.push(s.lng||this.language);const i=(t,e,i)=>{const n=b&&i!==p?i:a;this.options.missingKeyHandler?this.options.missingKeyHandler(t,h,e,n,u,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,h,e,n,u,s),this.emit("missingKey",t,h,e,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,s);k&&s[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0&&e.push(`${this.options.pluralSeparator}zero`),e.forEach((e=>{i([t],o+e,s[`defaultValue${e}`]||x)}))})):i(t,o,x))}p=this.extendTranslation(p,t,s,d,i),n&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${h}${l}${o}`),(n||e)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${l}${o}`:o,e?p:void 0,s))}else{if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,C,{...s,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(d.res=t,d.usedParams=this.getUsedParamsDetails(s),d):t}if(r){const t=Array.isArray(C),e=t?[]:{},i=t?m:g;for(const t in C)if(Object.prototype.hasOwnProperty.call(C,t)){const n=`${i}${r}${t}`;e[t]=this.translate(n,b&&!p?{...s,defaultValue:V(x)?x[t]:void 0,joinArrays:!1,ns:a}:{...s,joinArrays:!1,ns:a}),e[t]===n&&(e[t]=C[t])}p=e}}return n?(d.res=p,d.usedParams=this.getUsedParamsDetails(s),d):p}extendTranslation(t,e,i,s,n){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const r=f(t)&&(void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let o;if(r){const e=t.match(this.interpolator.nestingRegexp);o=e&&e.length}let a=i.replace&&!f(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),t=this.interpolator.interpolate(t,a,i.lng||this.language||s.usedLng,i),r){const e=t.match(this.interpolator.nestingRegexp);o<(e&&e.length)&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),!1!==i.nest&&(t=this.interpolator.nest(t,((...t)=>n?.[0]!==t[0]||i.context?this.translate(...t,e):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${e[0]}`),null)),i)),i.interpolation&&this.interpolator.reset()}const r=i.postProcess||this.options.postProcess,o=f(r)?[r]:r;return null!=t&&o?.length&&!1!==i.applyPostProcessor&&(t=R.handle(o,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,e={}){let i,s,n,r,o;return f(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?I(t,{...this.options,...e}):t))),t.forEach((t=>{if(this.isValidLookup(i))return;const a=this.extractFromKey(t,e),h=a.key;s=h;let l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==e.count&&!f(e.count),u=c&&!e.ordinal&&0===e.count,d=void 0!==e.context&&(f(e.context)||"number"==typeof e.context)&&""!==e.context,p=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);l.forEach((t=>{this.isValidLookup(i)||(o=t,F[`${p[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(o)||(F[`${p[0]}-${t}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),p.forEach((s=>{if(this.isValidLookup(i))return;r=s;const o=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,h,s,t,e);else{let t;c&&(t=this.pluralResolver.getSuffix(s,e.count,e));const i=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(e.ordinal&&0===t.indexOf(n)&&o.push(h+t.replace(n,this.options.pluralSeparator)),o.push(h+t),u&&o.push(h+i)),d){const s=`${h}${this.options.contextSeparator||"_"}${e.context}`;o.push(s),c&&(e.ordinal&&0===t.indexOf(n)&&o.push(s+t.replace(n,this.options.pluralSeparator)),o.push(s+t),u&&o.push(s+i))}}let a;for(;a=o.pop();)this.isValidLookup(i)||(n=a,i=this.getResource(s,t,a,e))})))}))})),{res:i,usedKey:s,exactUsedKey:n,usedLng:r,usedNS:o}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,i,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,e,i,s):this.resourceStore.getResource(t,e,i,s)}getUsedParamsDetails(t={}){const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!f(t.replace);let s=i?t.replace:t;if(i&&void 0!==t.count&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const t of e)delete s[t]}return s}static hasDefaultValue(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&"defaultValue"===e.substring(0,12)&&void 0!==t[e])return!0;return!1}}class B{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=P.create("languageUtils")}getScriptPartFromCode(t){if(!(t=N(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=N(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(f(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const i=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(i)||(e=i)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const i=this.getScriptPartFromCode(t);if(this.isSupportedCode(i))return e=i;const s=this.getLanguagePartFromCode(t);if(this.isSupportedCode(s))return e=s;e=this.options.supportedLngs.find((t=>t===s?t:t.indexOf("-")<0&&s.indexOf("-")<0?void 0:t.indexOf("-")>0&&s.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===s||0===t.indexOf(s)&&s.length>1?t:void 0))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),f(t)&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let i=t[e];return i||(i=t[this.getScriptPartFromCode(e)]),i||(i=t[this.formatLanguageCode(e)]),i||(i=t[this.getLanguagePartFromCode(e)]),i||(i=t.default),i||[]}toResolveHierarchy(t,e){const i=this.getFallbackCodes((!1===e?[]:e)||this.options.fallbackLng||[],t),s=[],n=t=>{t&&(this.isSupportedCode(t)?s.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return f(t)&&(t.indexOf("-")>-1||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))):f(t)&&n(this.formatLanguageCode(t)),i.forEach((t=>{s.indexOf(t)<0&&n(this.formatLanguageCode(t))})),s}}const K={zero:0,one:1,two:2,few:3,many:4,other:5},U={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class _{constructor(t,e={}){this.languageUtils=t,this.options=e,this.logger=P.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const i=N("dev"===t?"en":t),s=e.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:s});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let r;try{r=new Intl.PluralRules(i,{type:s})}catch(i){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),U;if(!t.match(/-|_/))return U;const s=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(s,e)}return this.pluralRulesCache[n]=r,r}needsPlural(t,e={}){let i=this.getRule(t,e);return i||(i=this.getRule("dev",e)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,i={}){return this.getSuffixes(t,i).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let i=this.getRule(t,e);return i||(i=this.getRule("dev",e)),i?i.resolvedOptions().pluralCategories.sort(((t,e)=>K[t]-K[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,e,i={}){const s=this.getRule(t,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(e)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",e,i))}}const H=(t,e,i,s=".",n=!0)=>{let r=((t,e,i)=>{const s=S(t,i);return void 0!==s?s:S(e,i)})(t,e,i);return!r&&n&&f(i)&&(r=E(t,i,s),void 0===r&&(r=E(e,i,s))),r},Y=t=>t.replace(/\$/g,"$$$$");class W{constructor(t={}){this.logger=P.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(t=>t),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:u,nestingPrefixEscaped:d,nestingSuffix:f,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=void 0!==e?e:C,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==s&&s,this.prefix=n?k(n):r||"{{",this.suffix=o?k(o):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=u?k(u):d||k("$t("),this.nestingSuffix=f?k(f):p||k(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t?.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,e,i,s){let n,r,o;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=t=>{if(t.indexOf(this.formatSeparator)<0){const n=H(e,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(n,void 0,i,{...s,...e,interpolationkey:t}):n}const n=t.split(this.formatSeparator),r=n.shift().trim(),o=n.join(this.formatSeparator).trim();return this.format(H(e,a,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,i,{...s,...e,interpolationkey:r})};this.resetRegExp();const l=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>Y(t)},{regex:this.regexp,safeValue:t=>Y(this.escapeValue?this.escape(t):t)}].forEach((e=>{for(o=0;n=e.regex.exec(t);){const i=n[1].trim();if(r=h(i),void 0===r)if("function"==typeof l){const e=l(t,n,s);r=f(e)?e:""}else if(s&&Object.prototype.hasOwnProperty.call(s,i))r="";else{if(c){r=n[0];continue}this.logger.warn(`missed to pass in variable ${i} for interpolating ${t}`),r=""}else f(r)||this.useRawValueToEscape||(r=g(r));const a=e.safeValue(r);if(t=t.replace(n[0],a),c?(e.regex.lastIndex+=r.length,e.regex.lastIndex-=n[0].length):e.regex.lastIndex=0,o++,o>=this.maxReplaces)break}})),t}nest(t,e,i={}){let s,n,r;const o=(t,e)=>{const i=this.nestingOptionsSeparator;if(t.indexOf(i)<0)return t;const s=t.split(new RegExp(`${k(i)}[ ]*{`));let n=`{${s[1]}`;t=s[0],n=this.interpolate(n,r);const o=n.match(/'/g),a=n.match(/"/g);((o?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(n=n.replace(/'/g,'"'));try{r=JSON.parse(n),e&&(r={...e,...r})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${i}${n}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,t};for(;s=this.nestingRegexp.exec(t);){let a=[];r={...i},r=r.replace&&!f(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(-1!==h&&(a=s[1].slice(h).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),s[1]=s[1].slice(0,h)),n=e(o.call(this,s[1].trim(),r),r),n&&s[0]===t&&!f(n))return n;f(n)||(n=g(n)),n||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),n=""),a.length&&(n=a.reduce(((t,e)=>this.format(t,e,i.lng,{...i,interpolationkey:s[1].trim()})),n.trim())),t=t.replace(s[0],n),this.regexp.lastIndex=0}return t}}const J=t=>{const e={};return(i,s,n)=>{let r=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(r={...r,[n.interpolationkey]:void 0});const o=s+JSON.stringify(r);let a=e[o];return a||(a=t(N(s),n),e[o]=a),a(i)}},q=t=>(e,i,s)=>t(N(i),s)(e);class G{constructor(t={}){this.logger=P.create("formatter"),this.options=t,this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const i=e.cacheInBuiltFormats?J:q;this.formats={number:i(((t,e)=>{const i=new Intl.NumberFormat(t,{...e});return t=>i.format(t)})),currency:i(((t,e)=>{const i=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>i.format(t)})),datetime:i(((t,e)=>{const i=new Intl.DateTimeFormat(t,{...e});return t=>i.format(t)})),relativetime:i(((t,e)=>{const i=new Intl.RelativeTimeFormat(t,{...e});return t=>i.format(t,e.range||"day")})),list:i(((t,e)=>{const i=new Intl.ListFormat(t,{...e});return t=>i.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=J(e)}format(t,e,i,s={}){const n=e.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find((t=>t.indexOf(")")>-1))){const t=n.findIndex((t=>t.indexOf(")")>-1));n[0]=[n[0],...n.splice(1,t)].join(this.formatSeparator)}return n.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=(t=>{let e=t.toLowerCase().trim();const i={};if(t.indexOf("(")>-1){const s=t.split("(");e=s[0].toLowerCase().trim();const n=s[1].substring(0,s[1].length-1);"currency"===e&&n.indexOf(":")<0?i.currency||(i.currency=n.trim()):"relativetime"===e&&n.indexOf(":")<0?i.range||(i.range=n.trim()):n.split(";").forEach((t=>{if(t){const[e,...s]=t.split(":"),n=s.join(":").trim().replace(/^'+|'+$/g,""),r=e.trim();i[r]||(i[r]=n),"false"===n&&(i[r]=!1),"true"===n&&(i[r]=!0),isNaN(n)||(i[r]=parseInt(n,10))}}))}return{formatName:e,formatOptions:i}})(e);if(this.formats[n]){let e=t;try{const o=s?.formatParams?.[s.interpolationkey]||{};e=this.formats[n](t,o.locale||o.lng||s.locale||s.lng||i,{...r,...s,...o})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${n}`),t}),t)}}class Q extends z{constructor(t,e,i,s={}){super(),this.backend=t,this.store=e,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=P.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,s.backend,s)}queueLoad(t,e,i,s){const n={},r={},o={},a={};return t.forEach((t=>{let s=!0;e.forEach((e=>{const o=`${t}|${e}`;!i.reload&&this.store.hasResourceBundle(t,e)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,s=!1,void 0===r[o]&&(r[o]=!0),void 0===n[o]&&(n[o]=!0),void 0===a[e]&&(a[e]=!0)))})),s||(o[t]=!0)})),(Object.keys(n).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(t,e,i){const s=t.split("|"),n=s[0],r=s[1];e&&this.emit("failedLoading",n,r,e),!e&&i&&this.store.addResourceBundle(n,r,i,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&i&&(this.state[t]=0);const o={};this.queue.forEach((i=>{((t,e,i)=>{const{obj:s,k:n}=w(t,e,Object);s[n]=s[n]||[],s[n].push(i)})(i.loaded,[n],r),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(i,t),e&&i.errors.push(e),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach((t=>{o[t]||(o[t]={});const e=i.loaded[t];e.length&&e.forEach((e=>{void 0===o[t][e]&&(o[t][e]=!0)}))})),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())})),this.emit("loaded",o),this.queue=this.queue.filter((t=>!t.done))}read(t,e,i,s=0,n=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:i,tried:s,wait:n,callback:r});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}o&&a&&s<this.maxRetries?setTimeout((()=>{this.read.call(this,t,e,i,s+1,2*n,r)}),n):r(o,a)},a=this.backend[i].bind(this.backend);if(2!==a.length)return a(t,e,o);try{const i=a(t,e);i&&"function"==typeof i.then?i.then((t=>o(null,t))).catch(o):o(null,i)}catch(t){o(t)}}prepareLoading(t,e,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();f(t)&&(t=this.languageUtils.toResolveHierarchy(t)),f(e)&&(e=[e]);const n=this.queueLoad(t,e,i,s);if(!n.toLoad.length)return n.pending.length||s(),null;n.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,i){this.prepareLoading(t,e,{},i)}reload(t,e,i){this.prepareLoading(t,e,{reload:!0},i)}loadOne(t,e=""){const i=t.split("|"),s=i[0],n=i[1];this.read(s,n,"read",void 0,void 0,((i,r)=>{i&&this.logger.warn(`${e}loading namespace ${n} for language ${s} failed`,i),!i&&r&&this.logger.log(`${e}loaded namespace ${n} for language ${s}`,r),this.loaded(t,i,r)}))}saveMissing(t,e,i,s,n,r={},o=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(e)){if(null!=i&&""!==i){if(this.backend?.create){const a={...r,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let n;n=5===h.length?h(t,e,i,s,a):h(t,e,i,s),n&&"function"==typeof n.then?n.then((t=>o(null,t))).catch(o):o(null,n)}catch(t){o(t)}else h(t,e,i,s,o,a)}t&&t[0]&&this.store.addResource(t[0],e,i,s)}}else this.logger.warn(`did not save key "${i}" as the namespace "${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!!!")}}const X=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if("object"==typeof t[1]&&(e=t[1]),f(t[1])&&(e.defaultValue=t[1]),f(t[2])&&(e.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const i=t[3]||t[2];Object.keys(i).forEach((t=>{e[t]=i[t]}))}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Z=t=>(f(t.ns)&&(t.ns=[t.ns]),f(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),f(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),"boolean"==typeof t.initImmediate&&(t.initAsync=t.initImmediate),t),tt=()=>{},et="__i18next_supportNoticeShown";class it extends z{constructor(t={},e){var i;if(super(),this.options=Z(t),this.services={},this.logger=P,this.modules={external:[]},i=this,Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t=>{"function"==typeof i[t]&&(i[t]=i[t].bind(i))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(t={},e){this.isInitializing=!0,"function"==typeof t&&(e=t,t={}),null==t.defaultNS&&t.ns&&(f(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=X();var s;this.options={...i,...this.options,...Z(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(s=this,s?.modules?.backend?.name?.indexOf("Locize")>0||s?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||s?.options?.backend?.backends&&s.options.backend.backends.some((t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0))||s?.options?.backend?.projectId||s?.options?.backend?.backendOptions&&s.options.backend.backendOptions.some((t=>t?.projectId)))||"undefined"!=typeof globalThis&&globalThis[et]||"undefined"!=typeof process&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||"undefined"!=typeof process&&process.env||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[et]=!0));const n=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;P.init(this.modules.logger?n(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:G;const e=new B(this.options);this.store=new A(this.options.resources,this.options);const s=this.services;s.logger=P,s.resourceStore=this.store,s.languageUtils=e,s.pluralResolver=new _(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!t||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(s.formatter=n(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new W(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new Q(n(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.languageDetector&&(s.languageDetector=n(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=n(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new D(this.services,this.options),this.translator.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,e||(e=tt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=(...e)=>this.store[t](...e)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...e)=>(this.store[t](...e),this)}));const r=p(),o=()=>{const t=(t,i)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),r.resolve(i),e(t,i)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),r}loadResources(t,e=tt){let i=e;const s=f(t)?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===s?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return i();const t=[],e=e=>{e&&"cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{"cimode"!==e&&t.indexOf(e)<0&&t.push(e)}))};s?e(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>e(t))),this.options.preload?.forEach?.((t=>e(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(t)}))}else i(null)}reloadResources(t,e,i){const s=p();return"function"==typeof t&&(i=t,t=void 0),"function"==typeof e&&(i=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),i||(i=tt),this.services.backendConnector.reload(t,e,(t=>{s.resolve(),i(t)})),s}use(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&&R.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1)){for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,e){this.isLanguageChangingTo=t;const i=p();this.emit("languageChanging",t);const s=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},n=(n,r)=>{r?this.isLanguageChangingTo===t&&(s(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,i.resolve(((...t)=>this.t(...t))),e&&e(n,((...t)=>this.t(...t)))},r=e=>{t||e||!this.services.languageDetector||(e=[]);const i=f(e)?e:e&&e[0],r=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(f(e)?[e]:e);r&&(this.language||s(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector?.cacheUserLanguage?.(r)),this.loadResources(r,(t=>{n(t,r)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(t):r(this.services.languageDetector.detect()),i}getFixedT(t,e,i){const s=(t,e,...n)=>{let r;r="object"!=typeof e?this.options.overloadTranslationOptionHandler([t,e].concat(n)):{...e},r.lng=r.lng||s.lng,r.lngs=r.lngs||s.lngs,r.ns=r.ns||s.ns,""!==r.keyPrefix&&(r.keyPrefix=r.keyPrefix||i||s.keyPrefix);const o={...this.options,...r};"function"==typeof r.keyPrefix&&(r.keyPrefix=I(r.keyPrefix,o));const a=this.options.keySeparator||".";let h;return r.keyPrefix&&Array.isArray(t)?h=t.map((t=>("function"==typeof t&&(t=I(t,o)),`${r.keyPrefix}${a}${t}`))):("function"==typeof t&&(t=I(t,o)),h=r.keyPrefix?`${r.keyPrefix}${a}${t}`:t),this.t(h,r)};return f(t)?s.lng=t:s.lngs=t,s.ns=e,s.keyPrefix=i,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){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;const i=e.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,n=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;const r=(t,e)=>{const i=this.services.backendConnector.state[`${t}|${e}`];return-1===i||0===i||2===i};if(e.precheck){const t=e.precheck(this,r);if(void 0!==t)return t}return!(!this.hasResourceBundle(i,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!r(i,t)||s&&!r(n,t)))}loadNamespaces(t,e){const i=p();return this.options.ns?(f(t)&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{i.resolve(),e&&e(t)})),i):(e&&e(),Promise.resolve())}loadLanguages(t,e){const i=p();f(t)&&(t=[t]);const s=this.options.preload||[],n=t.filter((t=>s.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));return n.length?(this.options.preload=s.concat(n),this.loadResources((t=>{i.resolve(),e&&e(t)})),i):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const e=new Intl.Locale(t);if(e&&e.getTextInfo){const t=e.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const e=this.services?.languageUtils||new B(X());return t.toLowerCase().indexOf("-latn")>1?"ltr":["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","ckb"].indexOf(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){const i=new it(t,e);return i.createInstance=it.createInstance,i}cloneInstance(t={},e=tt){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},n=new it(s);if(void 0===t.debug&&void 0===t.prefix||(n.logger=n.logger.clone(t)),["store","services","language"].forEach((t=>{n[t]=this[t]})),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},i){const t=Object.keys(this.store.data).reduce(((t,e)=>(t[e]={...this.store.data[e]},t[e]=Object.keys(t[e]).reduce(((i,s)=>(i[s]={...t[e][s]},i)),t[e]),t)),{});n.store=new A(t,s),n.services.resourceStore=n.store}if(t.interpolation){const e={...X().interpolation,...this.options.interpolation,...t.interpolation},i={...s,interpolation:e};n.services.interpolator=new W(i)}return n.translator=new D(n.services,s),n.translator.on("*",((t,...e)=>{n.emit(t,...e)})),n.init(s,e),n.translator.options=s,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const st=it.createInstance(),{slice:nt,forEach:rt}=[],ot=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,at={create(t,e,i,s){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};i&&(n.expires=new Date,n.expires.setTime(n.expires.getTime()+60*i*1e3)),s&&(n.domain=s),document.cookie=function(t,e){const i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let s=`${t}=${encodeURIComponent(e)}`;if(i.maxAge>0){const t=i.maxAge-0;if(Number.isNaN(t))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(t)}`}if(i.domain){if(!ot.test(i.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${i.domain}`}if(i.path){if(!ot.test(i.path))throw new TypeError("option path is invalid");s+=`; Path=${i.path}`}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");s+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(s+="; Partitioned"),s}(t,e,n)},read(t){const e=`${t}=`,i=document.cookie.split(";");for(let t=0;t<i.length;t++){let s=i[t];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(e))return s.substring(e.length,s.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var ht={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&"undefined"!=typeof document)return at.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:i,cookieMinutes:s,cookieDomain:n,cookieOptions:r}=e;i&&"undefined"!=typeof document&&at.create(i,t,s,n,r)}},lt={name:"querystring",lookup(t){let e,{lookupQuerystring:i}=t;if("undefined"!=typeof window){let{search:t}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(t=window.location.hash.substring(window.location.hash.indexOf("?")));const s=t.substring(1).split("&");for(let t=0;t<s.length;t++){const n=s[t].indexOf("=");n>0&&s[t].substring(0,n)===i&&(e=s[t].substring(n+1))}}return e}},ct={name:"hash",lookup(t){let e,{lookupHash:i,lookupFromHashIndex:s}=t;if("undefined"!=typeof window){const{hash:t}=window.location;if(t&&t.length>2){const n=t.substring(1);if(i){const t=n.split("&");for(let s=0;s<t.length;s++){const n=t[s].indexOf("=");n>0&&t[s].substring(0,n)===i&&(e=t[s].substring(n+1))}}if(e)return e;if(!e&&s>-1){const e=t.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(e))return;const i="number"==typeof s?s:0;return e[i]?.replace("/","")}}}return e}};let ut=null;const dt=()=>{if(null!==ut)return ut;try{if(ut="undefined"!=typeof window&&null!==window.localStorage,!ut)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(t){ut=!1}return ut};var ft={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&dt())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:i}=e;i&&dt()&&window.localStorage.setItem(i,t)}};let pt=null;const gt=()=>{if(null!==pt)return pt;try{if(pt="undefined"!=typeof window&&null!==window.sessionStorage,!pt)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(t){pt=!1}return pt};var mt={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&>())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:i}=e;i&>()&&window.sessionStorage.setItem(i,t)}},yt={name:"navigator",lookup(t){const e=[];if("undefined"!=typeof navigator){const{languages:t,userLanguage:i,language:s}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);i&&e.push(i),s&&e.push(s)}return e.length>0?e:void 0}},vt={name:"htmlTag",lookup(t){let e,{htmlTag:i}=t;const s=i||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(e=s.getAttribute("lang")),e}},wt={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if("undefined"==typeof window)return;const i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(i))return;const s="number"==typeof e?e:0;return i[s]?.replace("/","")}},bt={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const i="number"==typeof e?e+1:1,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[i]}};let St=!1;try{St=!0}catch(t){}const $t=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];St||$t.splice(1,1);class kt{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,e)}init(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(t){return rt.call(nt.call(arguments,1),(e=>{if(e)for(const i in e)void 0===t[i]&&(t[i]=e[i])})),t}(t,this.options||{},{order:$t,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=t=>t.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=e,this.addDetector(ht),this.addDetector(lt),this.addDetector(ft),this.addDetector(mt),this.addDetector(yt),this.addDetector(vt),this.addDetector(wt),this.addDetector(bt),this.addDetector(ct)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((e=>{if(this.detectors[e]){let i=this.detectors[e].lookup(this.options);i&&"string"==typeof i&&(i=[i]),i&&(t=t.concat(i))}})),t=t.filter((t=>{return null!=t&&!("string"==typeof(e=t)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((t=>t.test(e))));var e})).map((t=>this.options.convertDetectedLanguage(t))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;e&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||e.forEach((e=>{this.detectors[e]&&this.detectors[e].cacheUserLanguage(t,this.options)})))}}kt.type="languageDetector",st.use(kt).init({fallbackLng:"en",debug:!1,resources:{en:{translation:{}},ja:{translation:{Pay:"支払う","Failed to load Stripe":"ライブラリの読み込みに失敗しました。","Add your payment information":"支払情報を追加","Add card":"カードを追加","Add a card":"カードを追加",Add:"追加","Card information":"カード情報","Card Number":"カード番号","MM / YY":"月 / 年",CVC:"セキュリティコード(CVC)","Country or region":"地域","Postal Code":"郵便番号"}},"pt-BR":{translation:{Pay:"Pagar","Failed to load Stripe":"Falha ao ler Stripe","Add your payment information":"Informações do seu Pagamento","Add card":"Adicionar Cartão","Add a card":"Adicionar um Cartão",Add:"Adicionar","Card information":"Informações do Cartão","Card Number":"Número do Cartão","MM / YY":"MM / AA",CVC:"Número de Segurança(CVC)","Country or region":"País ou região","Postal Code":"Cep"}}}});const xt=st,Ct=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys()){const i=t.get(e).filter((t=>{const e=t.deref();return e&&(!("isConnected"in(i=e))||i.isConnected);var i}));t.set(e,i)}})(...e)}),2e3)}})(),jt=t.forceUpdate,Ot=t.getRenderingRef,Et=(t,e)=>{const i=t.indexOf(e);i>=0&&(t[i]=t[t.length-1],t.length--)},Nt=(t,e)=>{const i=((t,e=(t,e)=>t!==e)=>{const i=()=>{return("function"==typeof(e=t)?e():e)??{};var e},s=i();let n=new Map(Object.entries(s));const r="undefined"!=typeof Proxy,o=r?null:{},a={dispose:[],get:[],set:[],reset:[]},h=new Map,l=()=>{n=new Map(Object.entries(i())),r||g(),a.reset.forEach((t=>t()))},c=t=>(a.get.forEach((e=>e(t))),n.get(t)),u=(t,i)=>{const s=n.get(t);e(i,s,t)&&(n.set(t,i),r||p(t),a.set.forEach((e=>e(t,i,s))))},d=r?new Proxy(s,{get:(t,e)=>c(e),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>n.has(e),set:(t,e,i)=>(u(e,i),!0)}):(g(),o),f=(t,e)=>(a[t].push(e),()=>{Et(a[t],e)});function p(t){!r&&o&&(Object.prototype.hasOwnProperty.call(o,t)||Object.defineProperty(o,t,{configurable:!0,enumerable:!0,get:()=>c(t),set(e){u(t,e)}}))}function g(){if(r||!o)return;const t=new Set(n.keys());for(const e of Object.keys(o))t.has(e)||delete o[e];for(const e of t)p(e)}return{state:d,get:c,set:u,on:f,onChange:(t,e)=>{const s=(i,s)=>{i===t&&e(s)},n=()=>{const s=i();e(s[t])},r=f("set",s),o=f("reset",n);return h.set(e,{setHandler:s,resetHandler:n,propName:t}),()=>{r(),o(),h.delete(e)}},use:(...t)=>{const e=t.reduce(((t,e)=>(e.set&&t.push(f("set",e.set)),e.get&&t.push(f("get",e.get)),e.reset&&t.push(f("reset",e.reset)),e.dispose&&t.push(f("dispose",e.dispose)),t)),[]);return()=>e.forEach((t=>t()))},dispose:()=>{a.dispose.forEach((t=>t())),l()},reset:l,forceUpdate:t=>{const e=n.get(t);a.set.forEach((i=>i(t,e,e)))},removeListener:(t,e)=>{const i=h.get(e);i&&i.propName===t&&(Et(a.set,i.setHandler),Et(a.reset,i.resetHandler),h.delete(e))}}})(t,e);return i.use((()=>{if("function"!=typeof Ot||"function"!=typeof jt)return{};const t=jt,e=Ot,i=new Map;return{dispose:()=>i.clear(),get:t=>{const s=e();s&&((t,e,i)=>{let s=t.get(e);s||(s=[],t.set(e,s)),s.some((t=>t.deref()===i))||s.push(new WeakRef(i))})(i,t,s)},set:e=>{const s=i.get(e);if(s){const n=s.filter((e=>{const i=e.deref();return!!i&&t(i)}));i.set(e,n)}Ct(i)},reset:()=>{i.forEach((e=>{e.forEach((e=>{const i=e.deref();i&&t(i)}))})),Ct(i)}}})()),i};class Mt{constructor(){this.store=Nt({loadStripeStatus:"",applicationName:"stripe-pwa-elements",isCheckoutSession:!1}),this.changeListeners=new Map}get state(){return this.store.state}onChange(t,e){const i=this.store.onChange(t,e);return this.changeListeners.has(t)||this.changeListeners.set(t,[]),this.changeListeners.get(t).push(i),i}async initialize(t,i){if(this.store.state.publishableKey=t,this.store.state.isCheckoutSession=!1,null!=(null==i?void 0:i.stripeAccount)&&""!==(null==i?void 0:i.stripeAccount)&&(this.store.state.stripeAccount=i.stripeAccount),null!=(null==i?void 0:i.applicationName)&&""!==(null==i?void 0:i.applicationName)&&(this.store.state.applicationName=i.applicationName),!this.store.state.stripe||this.store.state.publishableKey!==t||this.store.state.stripeAccount!==(null==i?void 0:i.stripeAccount)||this.store.state.isCheckoutSession){this.store.state.loadStripeStatus="loading";try{const s=await e(t,{stripeAccount:null==i?void 0:i.stripeAccount});s.registerAppInfo({name:this.store.state.applicationName}),this.store.state.stripe=s,this.store.state.elements=s.elements(),this.store.state.checkout=void 0,this.store.state.loadStripeStatus="success"}catch(t){console.error("Failed to load Stripe.js:",t),this.store.state.loadStripeStatus="failure"}}}async initializeWithCheckoutSession(t,i,s){this.store.state.publishableKey=t,this.store.state.isCheckoutSession=!0,null!=(null==s?void 0:s.stripeAccount)&&""!==(null==s?void 0:s.stripeAccount)&&(this.store.state.stripeAccount=s.stripeAccount),null!=(null==s?void 0:s.applicationName)&&""!==(null==s?void 0:s.applicationName)&&(this.store.state.applicationName=s.applicationName),this.store.state.loadStripeStatus="loading";try{const n=await e(t,{stripeAccount:null==s?void 0:s.stripeAccount});n.registerAppInfo({name:this.store.state.applicationName}),this.store.state.stripe=n;const r=n.initCheckoutElementsSdk({clientSecret:i,elementsOptions:null==s?void 0:s.elementsOptions});this.store.state.checkout=r,this.store.state.elements=void 0,this.store.state.loadStripeStatus="success"}catch(t){console.error("Failed to initialize Stripe Checkout:",t),this.store.state.loadStripeStatus="failure"}}getStripe(){return this.store.state.stripe}getElements(){return this.store.state.elements}getCheckout(){return this.store.state.checkout}reset(){this.store.reset()}dispose(){this.changeListeners.forEach((t=>{t.forEach((t=>t()))})),this.changeListeners.clear(),this.store.dispose()}}function Lt(t,e,i=5e3){return new Promise(((s,n)=>{const r=t.querySelector(e);if(null!=r)return s(r);const o=setTimeout((()=>{a.disconnect(),n(new Error(`Element "${e}" not found within ${i}ms`))}),i),a=new MutationObserver((()=>{const i=t.querySelector(e);null!=i&&(clearTimeout(o),a.disconnect(),s(i))}));a.observe(t,{childList:!0,subtree:!0})}))}new Mt;class Pt{constructor(t){this.stripeService=t,this.store=Nt({errorMessage:"",errorSource:void 0})}getState(){return this.store.state}async initialize(t){const e=this.stripeService.getElements();if(null==e)throw new Error("StripeService not initialized. Call StripeService.initialize() first.");null!=this.cardElements&&this.unmount();const i=e.create("cardNumber",{placeholder:xt.t("Card Number")}),s=await Lt(t,"#card-number");i.mount(s),i.on("change",this.handleCardError("cardNumber"));const n=e.create("cardExpiry"),r=await Lt(t,"#card-expiry");n.mount(r),n.on("change",this.handleCardError("cardExpiry"));const o=e.create("cardCvc"),a=await Lt(t,"#card-cvc");return o.mount(a),o.on("change",this.handleCardError("cardCvc")),this.cardElements={cardNumber:i,cardExpiry:n,cardCVC:o},this.cardElements}getElements(){return this.cardElements}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage",""),this.store.set("errorSource",void 0)}unmount(){var t,e,i;null!=this.cardElements&&(null===(t=this.cardElements.cardNumber)||void 0===t||t.unmount(),null===(e=this.cardElements.cardExpiry)||void 0===e||e.unmount(),null===(i=this.cardElements.cardCVC)||void 0===i||i.unmount(),this.cardElements=void 0)}handleCardError(t){return({error:e})=>{if(e)return this.store.set("errorMessage",e.message),void this.store.set("errorSource",t);this.store.state.errorSource===t&&(this.store.set("errorMessage",""),this.store.set("errorSource",void 0))}}}class zt{constructor(t){this.stripeService=t,this.store=Nt({errorMessage:""})}getState(){return this.store.state}async initialize(t,e){const i=this.stripeService.state.isCheckoutSession;if(null!=this.paymentElement&&this.unmount(),i){const t=this.stripeService.getCheckout();if(null==t)throw new Error("StripeService not initialized with Checkout Session. Call StripeService.initializeWithCheckoutSession() first.");this.paymentElement=t.createPaymentElement(e)}else{const t=this.stripeService.getElements();if(null==t)throw new Error("StripeService not initialized. Call StripeService.initialize() first.");this.paymentElement=t.create("payment",e||{})}const s=await Lt(t,"#payment-element");return this.paymentElement.mount(s),this.paymentElement}getElement(){return this.paymentElement}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){null!=this.paymentElement&&(this.paymentElement.unmount(),this.paymentElement=void 0)}}class At{constructor(t){this.stripeService=t,this.store=Nt({errorMessage:"",isComplete:!1})}getState(){return this.store.state}async initialize(t,e){const i=this.stripeService.getElements();if(null==i)throw new Error("StripeService not initialized. Call StripeService.initialize() first.");null!=this.addressElement&&this.unmount(),this.addressElement=i.create("address",e||{mode:"billing"});const s=await Lt(t,"#address-element");return this.addressElement.mount(s),this.addressElement.on("change",(t=>{this.store.set("errorMessage",""),this.store.set("isComplete",t.complete)})),this.addressElement}getElement(){return this.addressElement}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){null!=this.addressElement&&(this.addressElement.unmount(),this.addressElement=void 0)}}class Rt{constructor(t){this.stripeService=t,this.store=Nt({errorMessage:"",email:void 0})}getState(){return this.store.state}onChange(t,e){return this.store.onChange(t,e)}async initialize(t,e){const i=this.stripeService.getElements();if(null==i)throw new Error("StripeService not initialized. Call StripeService.initialize() first.");null!=this.linkAuthenticationElement&&this.unmount();const s=i.create("linkAuthentication",e),n=await Lt(t,"#link-authentication-element");return s.mount(n),s.on("change",(t=>{var e;this.store.set("email",null===(e=t.value)||void 0===e?void 0:e.email)})),this.linkAuthenticationElement=s,this.linkAuthenticationElement}getElement(){return this.linkAuthenticationElement}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){null!=this.linkAuthenticationElement&&(this.linkAuthenticationElement.unmount(),this.linkAuthenticationElement=void 0)}}class Tt{constructor(t){this.stripeService=t,this.store=Nt({errorMessage:"",selectedCurrency:void 0})}getState(){return this.store.state}async initialize(t,e){const i=this.stripeService.getElements();if(null==i)throw new Error("StripeService not initialized. Call StripeService.initialize() first.");null!=this.currencySelectorElement&&this.unmount();const s=await Lt(t,"#currency-selector");return this.currencySelectorElement=i.create("currencySelector",e||{}),this.currencySelectorElement.mount(s),this.currencySelectorElement.on("change",(t=>{var e;this.store.set("errorMessage",""),(null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.currency)&&this.store.set("selectedCurrency",t.value.currency)})),this.currencySelectorElement}getElement(){return this.currencySelectorElement}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){null!=this.currencySelectorElement&&(this.currencySelectorElement.unmount(),this.currencySelectorElement=void 0)}}class It{constructor(t){this.stripeService=t,this.store=Nt({errorMessage:"",isReady:!1})}getState(){return this.store.state}async initialize(t,e,i){const s=this.stripeService.getElements();if(null==s)throw new Error("StripeService not initialized. Call StripeService.initialize() first.");null!=this.expressCheckoutElement&&this.unmount();const n=Object.assign({},e);if(n.buttonHeight&&"string"==typeof n.buttonHeight){const t=parseInt(n.buttonHeight.replace("px",""),10);isNaN(t)||(n.buttonHeight=t)}const r=s.create("expressCheckout",n),o=await Lt(t,"#express-checkout-element");return null!=(null==i?void 0:i.onConfirm)&&r.on("confirm",i.onConfirm),null!=(null==i?void 0:i.onClick)&&r.on("click",i.onClick),null!=(null==i?void 0:i.onCancel)&&r.on("cancel",i.onCancel),null!=(null==i?void 0:i.onShippingAddressChange)&&r.on("shippingaddresschange",i.onShippingAddressChange),null!=(null==i?void 0:i.onShippingRateChange)&&r.on("shippingratechange",i.onShippingRateChange),r.on("ready",(()=>{this.store.set("isReady",!0)})),r.mount(o),this.expressCheckoutElement=r,this.expressCheckoutElement}getElement(){return this.expressCheckoutElement}update(t){if(null==this.expressCheckoutElement)return void console.warn("Express Checkout Element not initialized. Cannot update options.");const e=Object.assign({},t);if(e.buttonHeight&&"string"==typeof e.buttonHeight){const t=parseInt(e.buttonHeight.replace("px",""),10);isNaN(t)||(e.buttonHeight=t)}this.expressCheckoutElement.update(e)}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){null!=this.expressCheckoutElement&&(this.expressCheckoutElement.unmount(),this.expressCheckoutElement=void 0,this.store.set("isReady",!1))}}const Ft=new class{createStripeService(){return new Mt}createCardElementManager(t){return new Pt(t)}createPaymentElementManager(t){return new zt(t)}createAddressElementManager(t){return new At(t)}createLinkAuthenticationElementManager(t){return new Rt(t)}createCurrencySelectorElementManager(t){return new Tt(t)}createExpressCheckoutElementManager(t){return new It(t)}};export{d as c,xt as i,Ft as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,a as e,h as s,g as i}from"./p-C6bbmyga.js";const r=class{constructor(s){t(this,s),this.closed=e(this,"closed",7),this.showLabel=!1,this.shouldUseDefaultFormSubmitAction=!0,this.intentType="payment",this.showCloseButton=!0,this.zip=!0,this.open=!1}componentDidLoad(){this.el.querySelector("stripe-modal").addEventListener("close",(()=>{this.closed.emit()}))}async getStripeCardElementElement(){return this.el.querySelector("stripe-card-element")}async present(){return this.open=!0,new Promise(((t,e)=>{this.el.querySelector("stripe-card-element").addEventListener("formSubmit",(async e=>{t(e)})),this.el.addEventListener("closed",(()=>e()))}))}async updateProgress(t){return this.el.querySelector("stripe-card-element").updateProgress(t)}async destroy(){this.el.querySelector("stripe-card-element").remove(),this.el.remove()}async setPaymentRequestButton(t){const e=this.el.getElementsByTagName("stripe-card-element");if(e.length<1)return;const s=e[0];s&&(s.setAttribute("show-payment-request-button","true"),this.applicationName&&s.setAttribute("application-name",this.applicationName),s.setPaymentRequestOption(t))}render(){return s("stripe-modal",{key:"236b4910e4f2ff792def134e7726623f2a09475e",open:this.open,showCloseButton:this.showCloseButton},s("stripe-card-element",{key:"5748af4f6df67571289236435c7481d6f445fce8",showLabel:this.showLabel,publishableKey:this.publishableKey,intentClientSecret:this.intentClientSecret,shouldUseDefaultFormSubmitAction:this.shouldUseDefaultFormSubmitAction,handleSubmit:this.handleSubmit,stripeDidLoaded:this.stripeDidLoaded,intentType:this.intentType,zip:this.zip,buttonLabel:this.buttonLabel,sheetTitle:this.sheetTitle,applicationName:this.applicationName}))}get el(){return i(this)}};r.style="stripe-card-element-modal{display:block}";export{r as stripe_card_element_modal}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,a as s,h as e,g as r}from"./p-C6bbmyga.js";import{s as i,c as o,i as c}from"./p--sA2m1ad.js";import"./p-CBXaOfXU.js";const a=class{updatePublishableKey(t){this.initStripe(t,{stripeAccount:this.stripeAccount})}updateStripeAccountId(t){const s=this.stripeService.state.publishableKey||this.publishableKey;s&&this.initStripe(s,{stripeAccount:t})}async initStripe(t,s){if(await this.stripeService.initialize(t,{stripeAccount:null==s?void 0:s.stripeAccount,applicationName:this.applicationName}),"success"===this.stripeService.state.loadStripeStatus)await this.initElement(),this.stripeLoadedEventHandler();else{const t=this.stripeService.onChange("loadStripeStatus",(async s=>{"success"===s&&(await this.initElement(),this.stripeLoadedEventHandler(),t())}))}}async setErrorMessage(t){return this.currencySelectorElementManager.setError(t),this}async getSelectedCurrency(){return this.currencySelectorElementManager.getState().selectedCurrency}stripeLoadedEventHandler(){const t={stripe:this.stripeService.getStripe()};this.stripeDidLoaded&&this.stripeDidLoaded(t),this.stripeLoaded.emit(t)}async currencyChangeEventHandler(t){const s={currency:t};this.currencyChange.emit(s),this.handleCurrencyChange&&await this.handleCurrencyChange(s)}componentWillRender(){this.stripeService.state.publishableKey&&(["success","loading"].includes(this.stripeService.state.loadStripeStatus)||this.initStripe(this.stripeService.state.publishableKey,{stripeAccount:this.stripeService.state.stripeAccount}))}constructor(e){t(this,e),this.stripeLoaded=s(this,"stripeLoaded",7),this.currencyChange=s(this,"currencyChange",7),this.applicationName="stripe-pwa-elements",this.stripeService=i.createStripeService(),this.currencySelectorElementManager=i.createCurrencySelectorElementManager(this.stripeService),this.publishableKey&&this.initStripe(this.publishableKey,{stripeAccount:this.stripeAccount})}async initElement(){const t={};this.clientSecret&&(t.clientSecret=this.clientSecret),(await this.currencySelectorElementManager.initialize(this.el,t)).on("change",(t=>{var s;(null===(s=null==t?void 0:t.value)||void 0===s?void 0:s.currency)&&this.currencyChangeEventHandler(t.value.currency)}))}componentDidLoad(){const t=o();t&&this.el.classList.add(t)}disconnectedCallback(){this.currencySelectorElementManager.unmount()}render(){const{loadStripeStatus:t}=this.stripeService.state,{errorMessage:s}=this.currencySelectorElementManager.getState();return"failure"===t?e("p",null,c.t("Failed to load Stripe")):e("div",{class:"stripe-currency-selector-wrap"},e("div",{id:"currency-selector"}),s?e("div",{id:"currency-selector-errors",class:"stripe-element-errors"},s):null)}get el(){return r(this)}static get watchers(){return{publishableKey:[{updatePublishableKey:0}],stripeAccount:[{updateStripeAccountId:0}]}}};a.style=':root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}:host{box-sizing:border-box}:host *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:"Roboto", sans-serif;box-sizing:border-box}:host button{cursor:pointer}:host{display:block;width:100%}.stripe-currency-selector-wrap{width:100%;padding:0;margin:0}.stripe-currency-selector-wrap #currency-selector{width:100%;min-height:40px}.stripe-currency-selector-wrap #currency-selector-errors{margin-top:8px}';export{a as stripe_currency_selector}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,a as i,h as e,g as n}from"./p-C6bbmyga.js";import{s,c as a,i as r}from"./p--sA2m1ad.js";import"./p-CBXaOfXU.js";const o=class{updatePublishableKey(t){const i={};this.stripeAccount&&(i.stripeAccount=this.stripeAccount),this.initStripe(t,Object.keys(i).length?i:void 0)}updateStripeAccountId(t){const i=this.stripeService.state.publishableKey||this.publishableKey;i&&this.initStripe(i,{stripeAccount:t})}async initStripe(t,i){if(await this.stripeService.initialize(t,{stripeAccount:null==i?void 0:i.stripeAccount,applicationName:this.applicationName}),"success"===this.stripeService.state.loadStripeStatus)await this.initElement(),this.stripeLoadedEventHandler();else{const t=this.stripeService.onChange("loadStripeStatus",(async i=>{"success"===i&&(await this.initElement(),this.stripeLoadedEventHandler(),t())}))}}async updateProgress(t){return this.progress=t,this}async setErrorMessage(t){return this.linkAuthenticationElementManager.setError(t),this}async getEmail(){return this.linkAuthenticationElementManager.getState().email}stripeLoadedEventHandler(){const t=this.stripeService.getStripe();if(!t)return void console.error("Stripe instance is not available");const i={stripe:t};this.stripeDidLoaded&&this.stripeDidLoaded(i),this.stripeLoaded.emit(i)}linkAuthenticationChangeEventHandler(t){const i=this.linkAuthenticationElementManager.getElement(),e=this.stripeService.getStripe();if(!i||!e)return void console.error("Link Authentication Element not initialized");const n={stripe:e,linkAuthenticationElement:i,email:t};this.handleChange&&this.handleChange(n),this.linkAuthenticationChange.emit(n)}componentWillRender(){this.stripeService.state.publishableKey&&(["success","loading"].includes(this.stripeService.state.loadStripeStatus)||this.initStripe(this.stripeService.state.publishableKey,{stripeAccount:this.stripeService.state.stripeAccount}))}constructor(e){t(this,e),this.stripeLoaded=i(this,"stripeLoaded",7),this.linkAuthenticationChange=i(this,"linkAuthenticationChange",7),this.applicationName="stripe-pwa-elements",this.progress="",this.stripeService=s.createStripeService(),this.linkAuthenticationElementManager=s.createLinkAuthenticationElementManager(this.stripeService),this.publishableKey&&this.initStripe(this.publishableKey,{stripeAccount:this.stripeAccount})}async initElement(){const t={};this.defaultEmail&&(t.defaultValues={email:this.defaultEmail}),await this.linkAuthenticationElementManager.initialize(this.el,Object.keys(t).length?t:void 0),this.linkAuthenticationElementManager.onChange("email",(t=>{this.linkAuthenticationChangeEventHandler(t)}))}componentDidLoad(){const t=a();t&&this.el.classList.add(t)}disconnectedCallback(){this.linkAuthenticationElementManager.unmount()}render(){const{loadStripeStatus:t}=this.stripeService.state,{errorMessage:i}=this.linkAuthenticationElementManager.getState();return"failure"===t?e("p",null,r.t("Failed to load Stripe")):e("div",{class:"stripe-link-authentication-wrap"},e("div",{class:"stripe-link-authentication-container"},e("div",{id:"link-authentication-element"}),e("div",{id:"link-authentication-errors",class:"stripe-element-errors"},i)))}get el(){return n(this)}static get watchers(){return{publishableKey:[{updatePublishableKey:0}],stripeAccount:[{updateStripeAccountId:0}]}}};o.style=':root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}.stripe-link-authentication-wrap{box-sizing:border-box}.stripe-link-authentication-wrap *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:"Roboto", sans-serif;box-sizing:border-box}.stripe-link-authentication-wrap button{cursor:pointer}.stripe-link-authentication-wrap{display:block;width:100%;background:#fff;padding:16px}.stripe-link-authentication-wrap .stripe-link-authentication-container #link-authentication-element .StripeElement{padding:8px 16px;min-height:64px;border-radius:6px;display:flex;justify-content:center;align-items:center}.stripe-link-authentication-wrap .stripe-link-authentication-container #link-authentication-element .StripeElement>.__PrivateStripeElement{width:100%}.stripe-link-authentication-wrap .stripe-link-authentication-container .stripe-element-errors{margin-top:8px;font-size:14px;color:var(--color-text-error)}';export{o as stripe_link_authentication_element}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as o,r as t,f as n,h as i,d as r,g as s}from"./p-C6bbmyga.js";let e;const c=(o,t,n,i,r)=>(n="ios"===(n&&h(n))?"ios":"md",i&&"ios"===n?o=h(i):r&&"md"===n?o=h(r):(o||!t||a(t)||(o=t),d(o)&&(o=h(o))),d(o)&&""!==o.trim()?""!==o.replace(/[a-z]|-|\d/gi,"")?null:o:null),l=o=>d(o)&&(o=o.trim(),a(o))?o:null,a=o=>o.length>0&&/(\/|\.)/.test(o),d=o=>"string"==typeof o,h=o=>o.toLowerCase(),f=o=>{if(1===o.nodeType){if("script"===o.nodeName.toLowerCase())return!1;for(let t=0;t<o.attributes.length;t++){const n=o.attributes[t].name;if(d(n)&&0===n.toLowerCase().indexOf("on"))return!1}for(let t=0;t<o.childNodes.length;t++)if(!f(o.childNodes[t]))return!1}return!0},u=new Map,m=new Map;let p;function g(o){return u.set(o,""),""}const w=class{constructor(o){t(this,o),this.iconName=null,this.inheritedAttributes={},this.didLoadIcon=!1,this.isVisible=!1,this.mode=v(),this.lazy=!1,this.sanitize=!0}componentWillLoad(){this.inheritedAttributes=((o,t=[])=>{const n={};return t.forEach((t=>{o.hasAttribute(t)&&(null!==o.getAttribute(t)&&(n[t]=o.getAttribute(t)),o.removeAttribute(t))})),n})(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",(()=>{this.isVisible=!0,this.loadIcon()}))}componentDidLoad(){this.didLoadIcon||this.loadIcon()}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0)}waitUntilVisible(o,t,i){if(!Boolean(n.isBrowser&&this.lazy&&"undefined"!=typeof window&&window.IntersectionObserver))return i();const r=this.io=new window.IntersectionObserver((o=>{o[0].isIntersecting&&(r.disconnect(),this.io=void 0,i())}),{rootMargin:t});r.observe(o)}loadIcon(){if(n.isBrowser&&this.isVisible){const t=(t=>{let n=l(t.src);if(n)return n;if(n=c(t.name,t.icon,t.mode,t.ios,t.md),n)return((t,n)=>{const i=(()=>{if("undefined"==typeof window)return new Map;if(!e){const o=window;o.Ionicons=o.Ionicons||{},e=o.Ionicons.map=o.Ionicons.map||new Map}return e})().get(t);if(i)return i;try{return o(`svg/${t}.svg`)}catch(o){console.log("e",o),console.warn(`[Ionicons Warning]: Could not load icon with name "${t}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,n)}})(n,t);if(t.icon){if(n=l(t.icon),n)return n;if(n=l(t.icon[t.mode]),n)return n}return null})(this);t&&(u.has(t)?this.svgContent=u.get(t):((o,t)=>m.get(o)||("undefined"!=typeof fetch&&"undefined"!=typeof document?(o=>o.startsWith("data:image/svg+xml"))(o)&&(o=>-1!==o.indexOf(";utf8,"))(o)?Promise.resolve(function(o){p||(p=new DOMParser);const t=p.parseFromString(o,"text/html").querySelector("svg");if(t)return u.set(o,t.outerHTML),t.outerHTML;throw new Error(`Could not parse svg from ${o}`)}(o)):function(o,t){const n=fetch(o).then((n=>n.text().then((n=>{n&&!1!==t&&(n=(o=>{const t=document.createElement("div");t.innerHTML=o;for(let o=t.childNodes.length-1;o>=0;o--)"svg"!==t.childNodes[o].nodeName.toLowerCase()&&t.removeChild(t.childNodes[o]);const n=t.firstElementChild;if(n&&"svg"===n.nodeName.toLowerCase()){const o=n.getAttribute("class")||"";if(n.setAttribute("class",(o+" s-ion-icon").trim()),f(n))return t.innerHTML}return""})(n));const i=n||"";return u.set(o,i),i})).catch((()=>g(o))))).catch((()=>g(o)));return m.set(o,n),n}(o,t):Promise.resolve(g(o))))(t,this.sanitize).then((()=>this.svgContent=u.get(t))),this.didLoadIcon=!0)}this.iconName=c(this.name,this.icon,this.mode,this.ios,this.md)}render(){const{flipRtl:o,iconName:t,inheritedAttributes:s,el:e}=this,c=this.mode||"md",l=!!t&&(t.includes("arrow")||t.includes("chevron"))&&!1!==o,a=o||l;return i(r,Object.assign({key:"0578c899781ca145dd8205acd9670af39b57cf2e",role:"img",class:Object.assign(Object.assign({[c]:!0},b(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":a,"icon-rtl":a&&(d=e,d&&""!==d.dir?"rtl"===d.dir.toLowerCase():"rtl"===(null===document||void 0===document?void 0:document.dir.toLowerCase()))})},s),i("div",n.isBrowser&&this.svgContent?{class:"icon-inner",innerHTML:this.svgContent}:{class:"icon-inner"}));var d}static get assetsDirs(){return["svg"]}get el(){return s(this)}static get watchers(){return{name:[{loadIcon:0}],src:[{loadIcon:0}],icon:[{loadIcon:0}],ios:[{loadIcon:0}],md:[{loadIcon:0}]}}},v=()=>n.isBrowser&&"undefined"!=typeof document&&document.documentElement.getAttribute("mode")||"md",b=o=>o?{"ion-color":!0,[`ion-color-${o}`]:!0}:null;w.style=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";export{w as ion_icon}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const t="stripe-elements",e={allRenderFn:!0,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,constructableCSS:!0,cssAnnotations:!0,deserializer:!1,devTools:!1,element:!1,event:!0,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!1,hostListenerTarget:!1,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!1,hotModuleReplacement:!1,hydrateClientSide:!1,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",initializeNextTick:!1,invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!0,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!0,mode:!1,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propChangeCallback:!0,propMutable:!0,propNumber:!0,propString:!0,reflect:!0,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,serializer:!1,shadowDelegatesFocus:!1,shadowDom:!0,shadowSlotAssignmentManual:!1,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!0,svg:!0,taskQueue:!0,transformTagName:!1,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!1,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!0};var n={isDev:!!e.isDev,isBrowser:!0,isServer:!1,isTesting:!!e.isTesting},o=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(o||{}),s=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(s||{}),r="type",i="value",l="serialized:";function c(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var a,u,f=(t,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[s]])=>{if((e.state||e.prop)&&(31&s||32&s)){const e=t[o],s=c(Object.getPrototypeOf(t),o,!0)||Object.getOwnPropertyDescriptor(t,o);s&&Object.defineProperty(t,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.i.has(o)?t[o]=n.i.get(o):void 0!==e&&(t[o]=e)}}))},d=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},h=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.l=t,512&n.o.u&&(e.state||e.prop)&&f(t,n))},p=(t,n)=>{const o={u:0,$hostElement$:t,o:n,i:new Map,p:new Map};e.isDev&&(o.m=0),e.method&&e.lazyLoad&&(o.v=new Promise((t=>o.$=t))),e.asyncLoading&&(o.S=new Promise((t=>o.j=t)),t["s-p"]=[],t["s-rc"]=[]),e.lazyLoad&&(o.O=[]);const s=o;return t.__stencil__getHostRef=()=>s,!e.lazyLoad&&512&n.u&&(e.state||e.prop)&&f(t,o),s},m=(t,e)=>e in t,v=(t,e)=>(a||console.error)(t,e),g=e.isTesting?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],$=(...t)=>console.error(...g,...t),b=(...t)=>console.warn(...g,...t),y=(...t)=>console.info(...g,...t),w=new Map,S=(t,n,o)=>{const s=t.C.replace(/-/g,"_"),r=t._;if(e.isDev&&"string"!=typeof r)return void $(`Trying to lazily load component <${t.C}> with style mode "${n.k}", but it does not exist.`);if(!r)return;const i=!e.hotModuleReplacement&&w.get(r);return i?i[s]:import(`./${r}.entry.js${e.hotModuleReplacement&&o?"?s-hmr="+o:""}`).then((t=>(e.hotModuleReplacement||w.set(r,t),t[s])),(t=>{v(t,n.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},j=new Map,x=[],O="s-id",C="sty-id",_="c-id",E="_stencilDocData",k={hostIds:0,rootLevelIds:0,staticComponents:new Set},N="slot-fb{display:contents}slot-fb[hidden]{display:none}",T="http://www.w3.org/1999/xlink",L=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],R="undefined"!=typeof window?window:{},M=R.HTMLElement||class{},A={u:0,N:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},D=e.shadowDom,I=t=>Promise.resolve(t),H=!!e.constructableCSS&&(()=>{try{return!!R.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),P=!!H&&(()=>!!R.document&&Object.getOwnPropertyDescriptor(R.document.adoptedStyleSheets,"length").writable)(),F=0,U=!1,B=[],z=[],V=[],W=(t,e)=>n=>{t.push(n),U||(U=!0,e&&4&A.u?q(X):A.raf(X))},Y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){v(t)}t.length=0},J=(t,e)=>{let n=0,o=0;for(;n<t.length&&(o=performance.now())<e;)try{t[n++](o)}catch(t){v(t)}n===t.length?t.length=0:0!==n&&t.splice(0,n)},X=()=>{if(e.asyncQueue&&F++,Y(B),e.asyncQueue){const t=2==(6&A.u)?performance.now()+14*Math.ceil(.1*F):1/0;J(z,t),J(V,t),z.length>0&&(V.push(...z),z.length=0),(U=B.length+z.length+V.length>0)?A.raf(X):F=0}else Y(z),(U=B.length>0)&&A.raf(X)},q=t=>I().then(t),K=W(B,!1),Q=W(z,!0),G=t=>{const e=new URL(t,A.N);return e.origin!==R.location.origin?e.href:e.pathname};function Z(t){const n={mode:"open"};e.shadowDelegatesFocus&&(n.delegatesFocus=!!(16&t.u)),e.shadowSlotAssignmentManual&&1024&t.u&&(n.slotAssignment="manual");const o=this.attachShadow(n);void 0===u&&(u=null),u&&(P?o.adoptedStyleSheets.push(u):o.adoptedStyleSheets=[...o.adoptedStyleSheets,u])}var tt=t=>{const e=Tt(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&nt(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!ot(t,it(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&Tt(t,"childNodes").length&&tt(t)}},et=t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e};function nt(t,e,n){let o,s=0,r=[];for(;s<t.length;s++){if(o=t[s],o["s-sr"]&&(!e||o["s-hn"]===e)&&(void 0===n||it(o)===n)&&(r.push(o),void 0!==n))return r;r=[...r,...nt(o.childNodes,e,n)]}return r}var ot=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let s=t;for(;s=s.nextSibling;)it(s)!==e||!n&&s["s-sr"]||o.push(s);return o},st=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,rt=(t,n,o,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const r=document.createTextNode("");if(r["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const i=n["s-cr"].parentNode,l=Tt(i,o?"prepend":"appendChild");if(e.hydrateClientSide&&void 0!==s){r["s-oo"]=s;const t=Tt(i,"childNodes"),e=[r];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>l.call(i,t)))}else l.call(i,r);t["s-ol"]=r,t["s-sh"]=n["s-hn"]},it=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function lt(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const s=this["s-cr"].parentElement;return(s.__childNodes?s.childNodes:et(s.childNodes)).forEach((t=>{o===it(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}function ct(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}function at(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=it(t)||"";return{slotNode:nt(Tt(e,"childNodes"),e.tagName,o)[0],slotName:o}}var ut=t=>{ft(t),dt(t),mt(t),pt(t),bt(t),vt(t),gt(t),$t(t),yt(t),wt(t),ht(t)},ft=t=>{if(t.__cloneNode)return;const n=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const o=!!e.shadowDom&&this.shadowRoot&&D,s=n.call(this,!!o&&t);if(e.slot&&!o&&t){let t,n,o=0;const r=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],i=this.__childNodes||this.childNodes;for(;o<i.length;o++)t=i[o]["s-nr"],n=r.every((t=>!i[o][t])),t&&(e.appendChildSlotFix&&s.__appendChild?s.__appendChild(t.cloneNode(!0)):s.appendChild(t.cloneNode(!0))),n&&s.appendChild(i[o].cloneNode(!0))}return s}},dt=t=>{t.__appendChild||(t.__appendChild=t.appendChild,t.appendChild=function(t){const{slotName:e,slotNode:n}=at(t,this);if(n){rt(t,n);const o=ot(n,e),s=o[o.length-1],r=Tt(s,"parentNode"),i=Tt(r,"insertBefore")(t,s.nextSibling);return ct(n),tt(this),i}return this.__appendChild(t)})},ht=t=>{t.__removeChild||(t.__removeChild=t.removeChild,t.removeChild=function(t){return t&&void 0!==t["s-sn"]&&nt(this.__childNodes||this.childNodes,this.tagName,t["s-sn"])&&t.isConnected?(t.remove(),void tt(this)):this.__removeChild(t)})},pt=t=>{t.__prepend||(t.__prepend=t.prepend,t.prepend=function(...e){e.forEach((e=>{"string"==typeof e&&(e=this.ownerDocument.createTextNode(e));const n=(e["s-sn"]=it(e))||"",o=nt(Tt(this,"childNodes"),this.tagName,n)[0];if(o){rt(e,o,!0);const t=ot(o,n)[0],s=Tt(t,"parentNode"),r=Tt(s,"insertBefore")(e,Tt(t,"nextSibling"));return ct(o),r}return 1===e.nodeType&&e.getAttribute("slot")&&(e.hidden=!0),t.__prepend(e)}))})},mt=t=>{t.__append||(t.__append=t.append,t.append=function(...t){t.forEach((t=>{"string"==typeof t&&(t=this.ownerDocument.createTextNode(t)),this.appendChild(t)}))})},vt=t=>{if(t.__insertAdjacentHTML)return;const e=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,n){if("afterbegin"!==t&&"beforeend"!==t)return e.call(this,t,n);const o=this.ownerDocument.createElement("_");let s;if(o.innerHTML=n,"afterbegin"===t)for(;s=o.firstChild;)this.prepend(s);else if("beforeend"===t)for(;s=o.firstChild;)this.append(s)}},gt=t=>{t.insertAdjacentText=function(t,e){this.insertAdjacentHTML(t,e)}},$t=t=>{t.__insertBefore||t.__insertBefore||(t.__insertBefore=t.insertBefore,t.insertBefore=function(t,e){const{slotName:n,slotNode:o}=at(t,this),s=this.__childNodes?this.childNodes:et(this.childNodes);if(o){let r=!1;if(s.forEach((s=>{if(s!==e&&null!==e);else{if(r=!0,null===e||n!==e["s-sn"])return void this.appendChild(t);if(n===e["s-sn"]){rt(t,o);const n=Tt(e,"parentNode");Tt(n,"insertBefore")(t,e),ct(o)}}})),r)return t}const r=null==e?void 0:e.__parentNode;return r&&!this.isSameNode(r)?this.appendChild(t):this.__insertBefore(t,e)})},bt=t=>{if(t.__insertAdjacentElement)return;const e=t.insertAdjacentElement;t.insertAdjacentElement=function(t,n){return"afterbegin"!==t&&"beforeend"!==t?e.call(this,t,n):"afterbegin"===t?(this.prepend(n),n):"beforeend"===t?(this.append(n),n):n}},yt=t=>{Nt("textContent",t),Object.defineProperty(t,"textContent",{get:function(){let t="";return(this.__childNodes?this.childNodes:et(this.childNodes)).forEach((e=>t+=e.textContent||"")),t},set:function(t){(this.__childNodes?this.childNodes:et(this.childNodes)).forEach((t=>{t["s-ol"]&&t["s-ol"].remove(),t.remove()})),this.insertAdjacentHTML("beforeend",t)}})},wt=t=>{class e extends Array{item(t){return this[t]}}Nt("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),Nt("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),Nt("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),Nt("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new e;return t.push(...et(this.__childNodes)),t}})},St=t=>{t&&void 0===t.__nextSibling&&globalThis.Node&&(jt(t),Ot(t),_t(t),t.nodeType===Node.ELEMENT_NODE&&(xt(t),Ct(t)))},jt=t=>{t&&!t.__nextSibling&&(Nt("nextSibling",t),Object.defineProperty(t,"nextSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.childNodes,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n+1]:this.__nextSibling}}))},xt=t=>{t&&!t.__nextElementSibling&&(Nt("nextElementSibling",t),Object.defineProperty(t,"nextElementSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.children,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n+1]:this.__nextElementSibling}}))},Ot=t=>{t&&!t.__previousSibling&&(Nt("previousSibling",t),Object.defineProperty(t,"previousSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.childNodes,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n-1]:this.__previousSibling}}))},Ct=t=>{t&&!t.__previousElementSibling&&(Nt("previousElementSibling",t),Object.defineProperty(t,"previousElementSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.children,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n-1]:this.__previousElementSibling}}))},_t=t=>{t&&!t.__parentNode&&(Nt("parentNode",t),Object.defineProperty(t,"parentNode",{get:function(){var t;return(null==(t=this["s-ol"])?void 0:t.parentNode)||this.__parentNode},set:function(t){this.__parentNode=t}}))},Et=["children","nextElementSibling","previousElementSibling"],kt=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function Nt(t,e){if(!globalThis.Node||!globalThis.Element)return;let n;Et.includes(t)?n=Object.getOwnPropertyDescriptor(Element.prototype,t):kt.includes(t)&&(n=Object.getOwnPropertyDescriptor(Node.prototype,t)),n||(n=Object.getOwnPropertyDescriptor(e,t)),n&&Object.defineProperty(e,"__"+t,n)}function Tt(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var Lt=0,Rt=(t,n="")=>{if(e.profile&&performance.mark){const e=`st:${t}:${n}:${Lt++}`;return performance.mark(e),()=>performance.measure(`[Stencil] ${t}() <${n}>`,e)}return()=>{}};function Mt(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var At=new WeakMap,Dt=(t,e,n)=>{let o=j.get(t);H&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,j.set(t,o)},It=(t,n,o)=>{var s,r,i;const l=Pt(n,o),c=j.get(l);if(!e.attachStyles||!R.document)return l;if(t=11===t.nodeType?t:R.document,c)if("string"==typeof c){let o,i=At.get(t=t.head||t);i||At.set(t,i=new Set);const a=(e.hydrateClientSide||e.hotModuleReplacement)&&t.querySelector(`[${C}="${l}"]`);if(a)a.textContent=c;else if(!i.has(l)){o=R.document.createElement("style"),o.textContent=c;const a=null!=(s=A.T)?s:Mt(R.document);if(null!=a&&o.setAttribute("nonce",a),(e.hydrateServerSide||e.hotModuleReplacement)&&(2&n.u||128&n.u||1&n.u)&&o.setAttribute(C,l),!(1&n.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(H){const e=new(null!=(r=t.defaultView)?r:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),P?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n&&!e.hotModuleReplacement?n.textContent=c+n.textContent:t.prepend(o)}else t.append(o);1&n.u&&t.insertBefore(o,null),4&n.u&&(o.textContent+=N),i&&i.add(l)}}else if(e.constructableCSS){let n=At.get(t);if(n||At.set(t,n=new Set),!n.has(l)){const o=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let s;if(c.constructor===o.CSSStyleSheet)s=c;else{s=new o.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)s.insertRule(c.cssRules[t].cssText,t)}if(P?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],n.add(l),e.hydrateClientSide&&"host"in t){const e=t.querySelector(`[${C}="${l}"]`);e&&Q((()=>e.remove()))}}}return l},Ht=t=>{const n=t.o,o=t.$hostElement$,s=n.u,r=Rt("attachStyles",n.C),i=It(e.shadowDom&&D&&o.shadowRoot?o.shadowRoot:o.getRootNode(),n,t.k);(e.shadowDom||e.scoped)&&e.cssAnnotations&&10&s&&(o["s-sc"]=i,o.classList.add(i+"-h")),r()},Pt=(t,n)=>"sc-"+(e.mode&&n&&32&t.u?t.C+"-"+n:t.C),Ft=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),Ut=()=>{if(!R.document)return;const t=R.document.querySelectorAll(`[${C}]`);let e=0;for(;e<t.length;e++)Dt(t[e].getAttribute(C),Ft(t[e].innerHTML),!0)},Bt=t=>"object"==(t=typeof t)||"function"===t,zt=(t,n,...o)=>{"string"==typeof t&&(t=Zn(t));let s=null,r=null,i=null,l=!1,c=!1;const a=[],u=n=>{for(let o=0;o<n.length;o++)s=n[o],Array.isArray(s)?u(s):null!=s&&"boolean"!=typeof s&&((l="function"!=typeof t&&!Bt(s))?s+="":e.isDev&&"function"!=typeof t&&void 0===s.u&&$("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),l&&c?a[a.length-1].L+=s:a.push(l?Vt(null,s):s),c=l)};if(u(o),n&&(e.isDev&&"input"===t&&Kt(n),e.vdomKey&&n.key&&(r=n.key),e.slotRelocation&&n.name&&(i=n.name),e.vdomClass)){const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}if(e.isDev&&a.some(Yt)&&$("The <Host> must be the single root component. Make sure:\n- You are NOT using hostData() and <Host> in the same component.\n- <Host> is used once, and it's the single root component of the render() function."),e.vdomFunctional&&"function"==typeof t)return t(null===n?{}:n,a,Jt);const f=Vt(t,null);return f.R=n,a.length>0&&(f.M=a),e.vdomKey&&(f.A=r),e.slotRelocation&&(f.D=i),f},Vt=(t,n)=>{const o={u:0,I:t,L:null!=n?n:null,P:null,M:null};return e.vdomAttribute&&(o.R=null),e.vdomKey&&(o.A=null),e.slotRelocation&&(o.D=null),o},Wt={},Yt=t=>t&&t.I===Wt,Jt={forEach:(t,e)=>t.map(Xt).forEach(e),map:(t,e)=>t.map(Xt).map(e).map(qt)},Xt=t=>({vattrs:t.R,vchildren:t.M,vkey:t.A,vname:t.D,vtag:t.I,vtext:t.L}),qt=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),zt(t.vtag,e,...t.vchildren||[])}const e=Vt(t.vtag,t.vtext);return e.R=t.vattrs,e.M=t.vchildren,e.A=t.vkey,e.D=t.vname,e},Kt=t=>{const e=Object.keys(t),n=e.indexOf("value");if(-1===n)return;const o=e.indexOf("type"),s=e.indexOf("min"),r=e.indexOf("max"),i=e.indexOf("step");(n<o||n<s||n<r||n<i)&&b('The "value" prop of <input> should be set after "min", "max", "type" and "step"')},Qt=(t,n,o,s,r,i,l,c=[])=>{let a,u,f,d;const h=r["s-sc"];if(1===i.nodeType){if(a=i.getAttribute(_),a&&(u=a.split("."),u[0]===l||"0"===u[0])){f=Zt({u:0,F:u[0],U:u[1],B:u[2],V:u[3],I:i.tagName.toLowerCase(),P:i,R:{class:i.className||""}}),n.push(f),i.removeAttribute(_),t.M||(t.M=[]),e.scoped&&h&&u[0]===l&&(i["s-si"]=h,f.R.class+=" "+h);const r=f.P.getAttribute("s-sn");"string"==typeof r&&("slot-fb"===f.I&&(te(r,u[2],f,i,t,n,o,s,c),e.scoped&&h&&i.classList.add(h)),f.P["s-sn"]=r,f.P.removeAttribute("s-sn")),void 0!==f.V&&(t.M[f.V]=f),t=f,s&&"0"===f.B&&(s[f.V]=f.P)}if(i.shadowRoot)for(d=i.shadowRoot.childNodes.length-1;d>=0;d--)Qt(t,n,o,s,r,i.shadowRoot.childNodes[d],l,c);const p=i.__childNodes||i.childNodes;for(d=p.length-1;d>=0;d--)Qt(t,n,o,s,r,p[d],l,c)}else if(8===i.nodeType)u=i.nodeValue.split("."),(u[1]===l||"0"===u[1])&&(a=u[0],f=Zt({F:u[1],U:u[2],B:u[3],V:u[4]||"0",P:i,R:null,M:null,A:null,D:null,I:null,L:null}),"t"===a?(f.P=ne(i,3),f.P&&3===f.P.nodeType&&(f.L=f.P.textContent,n.push(f),i.remove(),l===f.F&&(t.M||(t.M=[]),t.M[f.V]=f),s&&"0"===f.B&&(s[f.V]=f.P))):"c"===a?(f.P=ne(i,8),f.P&&8===f.P.nodeType&&(n.push(f),i.remove())):f.F===l&&("s"===a?te(i["s-sn"]=u[5]||"",u[2],f,i,t,n,o,s,c):"r"===a&&(e.shadowDom&&s?i.remove():e.slotRelocation&&(r["s-cr"]=i,i["s-cn"]=!0))));else if(t&&"style"===t.I){const e=Vt(null,i.textContent);e.P=i,e.V="0",t.M=[e]}return t},Gt=(t,e)=>{if(1===t.nodeType){const n=t[O]||t.getAttribute(O);n&&e.set(n,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)Gt(t.shadowRoot.childNodes[o],e);const s=t.__childNodes||t.childNodes;for(o=0;o<s.length;o++)Gt(s[o],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},Zt=t=>({u:0,F:null,U:null,B:null,V:"0",P:null,R:null,M:null,A:null,D:null,I:null,L:null,...t});function te(t,n,o,s,r,i,l,c,a){s["s-sr"]=!0,o.D=t||null,o.I="slot";const u=(null==r?void 0:r.P)?r.P["s-id"]||r.P.getAttribute("s-id"):"";if(e.shadowDom&&c&&R.document){const e=o.P=R.document.createElement(o.I);o.D&&o.P.setAttribute("name",t),r.P.shadowRoot&&u&&u!==o.F?Tt(r.P,"insertBefore")(e,Tt(r.P,"children")[0]):Tt(Tt(s,"parentNode"),"insertBefore")(e,s),ee(a,n,t,s,o.F),s.remove(),"0"===o.B&&(c[o.V]=o.P)}else{const e=o.P,i=u&&u!==o.F&&r.P.shadowRoot;ee(a,n,t,s,i?u:o.F),lt(s),i&&r.P.insertBefore(e,r.P.children[0])}i.push(o),l.push(o),r.M||(r.M=[]),r.M[o.V]=o}var ee=(t,e,n,o,s)=>{var r,i;let l=o.nextSibling;if(t[e]=t[e]||[],l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:o,node:l,hostId:s})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(i=l.nodeValue)?void 0:i.startsWith("s.")))},ne=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},oe=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),se="-shadowcsshost",re="-shadowcssslotted",ie="-shadowcsscontext",le=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",ce=RegExp("("+se+le,"gim"),ae=RegExp("("+ie+le,"gim"),ue=RegExp("("+re+le,"gim"),fe=se+"-no-combinator",de=/-shadowcsshost-no-combinator([^\s]*)/,he=[/::shadow/g,/::content/g],pe=/__part-(\d+)__/g,me=/-shadowcsshost/gim,ve=t=>{const e=oe(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")},ge=/\/\*\s*[\s\S]*?\*\//g,$e=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,be=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,ye=/([{}])/g,we=/(^.*?[^\\])??((:+)(.*)|$)/,Se="%BLOCK%",je=(t,e)=>{const n=xe(t);let o=0;return n.escapedString.replace(be,((...t)=>{const s=t[2];let r="",i=t[4],l="";i&&i.startsWith("{"+Se)&&(r=n.blocks[o++],i=i.substring(8),l="{");const c=e({selector:s,content:r});return`${t[1]}${c.selector}${t[3]}${l}${c.content}${i}`}))},xe=t=>{const e=t.split(ye),n=[],o=[];let s=0,r=[];for(let t=0;t<e.length;t++){const i=e[t];"}"===i&&s--,s>0?r.push(i):(r.length>0&&(o.push(r.join("")),n.push(Se),r=[]),n.push(i)),"{"===i&&s++}return r.length>0&&(o.push(r.join("")),n.push(Se)),{escapedString:n.join(""),blocks:o}},Oe=(t,e,n)=>t.replace(e,((...t)=>{if(t[2]){const e=t[2].split(","),o=[];for(let s=0;s<e.length;s++){const r=e[s].trim();if(!r)break;o.push(n(fe,r,t[3]))}return o.join(",")}return fe+t[3]})),Ce=(t,e,n)=>t+e.replace(se,"")+n,_e=(t,e,n)=>e.indexOf(se)>-1?Ce(t,e,n):t+e+n+", "+e+" "+t+n,Ee=(t,e)=>t.replace(we,((t,n="",o,s="",r="")=>n+e+s+r)),ke=(t,e,n,o)=>je(t,(t=>{let s=t.selector,r=t.content;return"@"!==t.selector[0]?s=((t,e,n,o)=>t.split(",").map((t=>o&&t.indexOf("."+o)>-1?t.trim():((t,e)=>!(t=>(t=t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),RegExp("^("+t+")([>\\s~+[.,{:][\\s\\S]*)?$","m")))(e).test(t))(t,e)?((t,e,n)=>{const o="."+(e=e.replace(/\[is=([^\]]*)\]/g,((t,...e)=>e[0]))),s=t=>{let s=t.trim();if(!s)return"";if(t.indexOf(fe)>-1)s=((t,e,n)=>{if(me.lastIndex=0,me.test(t)){const e="."+n;return t.replace(de,((t,n)=>Ee(n,e))).replace(me,e+" ")}return e+" "+t})(t,e,n);else{const e=t.replace(me,"");e.length>0&&(s=Ee(e,o))}return s},r=(t=>{const e=[];let n=0;return{content:(t=(t=t.replace(/(\[\s*part~=\s*("[^"]*"|'[^']*')\s*\])/g,((t,o)=>{const s=`__part-${n}__`;return e.push(o),n++,s}))).replace(/(\[[^\]]*\])/g,((t,o)=>{const s=`__ph-${n}__`;return e.push(o),n++,s}))).replace(/(:nth-[-\w]+)(\([^)]+\))/g,((t,o,s)=>{const r=`__ph-${n}__`;return e.push(s),n++,o+r})),placeholders:e}})(t);let i,l="",c=0;const a=/( |>|\+|~(?!=))(?=(?:[^()]*\([^()]*\))*[^()]*$)\s*/g;let u=!((t=r.content).indexOf(fe)>-1);for(;null!==(i=a.exec(t));){const e=i[1],n=t.slice(c,i.index).trim();u=u||n.indexOf(fe)>-1,l+=`${u?s(n):n} ${e} `,c=a.lastIndex}const f=t.substring(c);return u=!f.match(pe)&&(u||f.indexOf(fe)>-1),l+=u?s(f):f,((t,e)=>(e=e.replace(/__part-(\d+)__/g,((e,n)=>t[+n]))).replace(/__ph-(\d+)__/g,((e,n)=>t[+n])))(r.placeholders,l)})(t,e,n).trim():t.trim())).join(", "))(t.selector,e,n,o):(t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document"))&&(r=ke(t.content,e,n,o)),{selector:s.replace(/\s{2,}/g," ").trim(),content:r}})),Ne=(t,e)=>t.replace(/-shadowcsshost-no-combinator/g,"."+e),Te=(t,e)=>{const n=e+"-h",o=e+"-s",s=(t=>t.match($e)||[])(t);t=(t=>t.replace(ge,""))(t);const r=[];{const e=t=>{const e=`/*!@___${r.length}___*/`;return r.push({placeholder:e,comment:`/*!@${t.selector}*/`}),t.selector=e+t.selector,t};t=je(t,(t=>"@"!==t.selector[0]?e(t):t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document")?(t.content=je(t.content,e),t):t))}const i=((t,e,n,o)=>{const s=((t,e)=>{const n="."+e+" > ",o=[];return t=t.replace(ue,((...t)=>{if(t[2]){const e=t[2].trim(),s=n+e+t[3];let r="";for(let e=t[4]-1;e>=0;e--){const n=t[5][e];if("}"===n||","===n)break;r=n+r}const i=(r+s).trim(),l=`${r.trimEnd()}${s.trim()}`.trim();return i!==l&&o.push({orgSelector:i,updatedSelector:`${l}, ${i}`}),s}return fe+t[3]})),{selectors:o,cssText:t}})(t=(t=>Oe(t,ae,_e))(t=(t=>Oe(t,ce,Ce))(t=(t=>{const e=[];t=t.replace(/@supports\s+selector\s*\(\s*([^)]*)\s*\)/g,((t,n)=>{const o=`__supports_${e.length}__`;return e.push(n),`@supports selector(${o})`}));const n=ve("::slotted"),o=ve(":host"),s=ve(":host-context");return t=t.replace(s,"$1"+ie).replace(o,"$1"+se).replace(n,"$1"+re),e.forEach(((e,n)=>{t=t.replace(`__supports_${n}__`,e)})),t})(t))),o);return t=(t=>he.reduce(((t,e)=>t.replace(e," ")),t))(t=s.cssText),e&&(t=ke(t,e,n,o)),{cssText:(t=(t=Ne(t,n)).replace(/>\s*\*\s+([^{, ]+)/gm," $1 ")).trim(),slottedSelectors:s.selectors.map((t=>({orgSelector:Ne(t.orgSelector,n),updatedSelector:Ne(t.updatedSelector,n)})))}})(t,e,n,o);return t=[i.cssText,...s].join("\n"),r.forEach((({placeholder:e,comment:n})=>{t=t.replace(e,n)})),i.slottedSelectors.forEach((e=>{const n=RegExp(oe(e.orgSelector)+"(?=\\s*[,{]|$)","g");t=t.replace(n,e.updatedSelector)})),t=(t=>{const e=/([^\s,{][^,{]*?)::part\(\s*([^)]+?)\s*\)((?:[:.][^,{]*)*)/g;return je(t,(t=>{if("@"===t.selector[0])return t;const n=t.selector.split(",").map((n=>{const o=[n.trim()];let s;for(;null!==(s=e.exec(n));){const e=s[1].trimEnd(),r=s[2].trim().split(/\s+/),i=s[3]||"",l=r.flatMap((e=>t.selector.includes(`[part~="${e}"]`)?[]:[`[part~="${e}"]`])).join(""),c=`${e} ${l}${i}`;l&&c!==n.trim()&&o.push(c)}return o.join(", ")}));return t.selector=n.join(", "),t}))})(t)},Le=t=>x.map((e=>e(t))).find((t=>!!t)),Re=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},Me=class t{static fromLocalValue(e){const n=e[r],o=i in e?e[i]:void 0;switch(n){case"string":case"boolean":return o;case"bigint":return BigInt(o);case"undefined":return;case"null":return null;case"number":return"NaN"===o?NaN:"-0"===o?-0:"Infinity"===o?1/0:"-Infinity"===o?-1/0:o;case"array":return o.map((e=>t.fromLocalValue(e)));case"date":return new Date(o);case"map":const e=new Map;for(const[n,s]of o){const o="object"==typeof n&&null!==n?t.fromLocalValue(n):n,r=t.fromLocalValue(s);e.set(o,r)}return e;case"object":const s={};for(const[e,n]of o)s[e]=t.fromLocalValue(n);return s;case"regexp":const{pattern:r,flags:i}=o;return RegExp(r,i);case"set":const l=new Set;for(const e of o)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(o);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(r))return!1;const e=t[r];return!!Object.values({...o,...s}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(i))}};var Ae,De,Ie,He=(t,n,o)=>(e.hydrateClientSide||e.hydrateServerSide)&&"string"==typeof t&&t.startsWith(l)?t=function(t){return"string"==typeof t&&t.startsWith(l)?Me.fromLocalValue(JSON.parse(function(t){const e=atob(t),n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return(new TextDecoder).decode(n)}(t.slice(11)))):t}(t):null==t||Bt(t)?t:e.propBoolean&&4&n?(e.formAssociated&&o&&"string"==typeof t||"false"!==t)&&(""===t||!!t):e.propNumber&&2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:e.propString&&1&n?t+"":t,Pe=t=>{var n;return e.lazyLoad?null==(n=d(t))?void 0:n.$hostElement$:t},Fe=(t,n,o)=>{const s=Pe(t);return{emit:t=>(e.isDev&&!s.isConnected&&b(`The "${n}" event was emitted, but the dispatcher node is no longer connected to the dom.`),Ue(s,n,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:t}))}},Ue=(t,e,n)=>{const o=A.ce(e,n);return t.dispatchEvent(o),o},Be=(t,n,o,s,r,i,l)=>{if(o===s)return;let c=m(t,n),a=n.toLowerCase();if(e.vdomClass&&"class"===n){const n=t.classList,r=Ve(o);let i=Ve(s);if(e.hydrateClientSide&&(t["s-si"]||t["s-sc"])&&l){const e=t["s-sc"]||t["s-si"];i.push(e),r.forEach((t=>{t.startsWith(e)&&i.push(t)})),i=[...new Set(i)].filter((t=>t)),n.add(...i)}else n.remove(...r.filter((t=>t&&!i.includes(t)))),n.add(...i.filter((t=>t&&!r.includes(t))))}else if(e.vdomStyle&&"style"===n){if(e.updatable)for(const n in o)s&&null!=s[n]||(!e.hydrateServerSide&&n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in s)o&&s[n]===o[n]||(!e.hydrateServerSide&&n.includes("-")?t.style.setProperty(n,s[n]):t.style[n]=s[n])}else if(e.vdomKey&&"key"===n);else if(e.vdomRef&&"ref"===n)s&&hn(s,t);else if(!e.vdomListener||(e.lazyLoad?c:t.__lookupSetter__(n))||"o"!==n[0]||"n"!==n[1]){if(e.vdomPropOrAttr&&"a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let r;if(e.member){const e=d(t);if(e&&e.o&&e.o.t){const t=e.o.t[o];t&&t[1]&&(r=t[1])}}return r||(r=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(r)||t.removeAttribute(r):t.setAttribute(r,!0===s?"":s))}if(e.vdomPropOrAttr&&"p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}if(e.vdomPropOrAttr){const l=Bt(s);if((c||l&&null!==s)&&!r)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?c=!1:null!=o&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}let u=!1;e.vdomXlink&&a!==(a=a.replace(/^xlink\:?/,""))&&(n=a,u=!0),null==s||!1===s?!1===s&&""!==t.getAttribute(n)||(e.vdomXlink&&u?t.removeAttributeNS(T,n):t.removeAttribute(n)):(!c||4&i||r)&&!l&&1===t.nodeType&&(s=!0===s?"":s,e.vdomXlink&&u?t.setAttributeNS(T,n,s):t.setAttribute(n,s))}}else if(n="-"===n[2]?n.slice(3):m(R,a)?a.slice(2):a[2]+n.slice(3),o||s){const e=n.endsWith(We);n=n.replace(Ye,""),o&&A.rel(t,n,o,e),s&&A.ael(t,n,s,e)}},ze=/\s/,Ve=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ze):[]),We="Capture",Ye=RegExp(We+"$"),Je=(t,n,o,s)=>{const r=11===n.P.nodeType&&n.P.host?n.P.host:n.P,i=t&&t.R||{},l=n.R||{};if(e.updatable)for(const t of Xe(Object.keys(i)))t in l||Be(r,t,i[t],void 0,o,n.u,s);for(const t of Xe(Object.keys(l)))Be(r,t,i[t],l[t],o,n.u,s)};function Xe(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var qe=!1,Ke=!1,Qe=!1,Ge=!1,Ze=[],tn=[],en=(t,n,o)=>{var s;const r=n.M[o];let i,l,c,a=0;if(e.slotRelocation&&!qe&&(Qe=!0,"slot"===r.I&&(r.u|=r.M?2:1)),e.isDev&&r.P&&$(`The JSX ${null!==r.L?`"${r.L}" text`:`"${r.I}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),e.vdomText&&null!=r.L)i=r.P=R.document.createTextNode(r.L);else if(e.slotRelocation&&1&r.u)i=r.P=e.isDebug||e.hydrateServerSide?gn(r):R.document.createTextNode(""),e.vdomAttribute&&Je(null,r,Ge);else{if(e.svg&&!Ge&&(Ge="svg"===r.I),!R.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(i=r.P=e.svg?R.document.createElementNS(Ge?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!qe&&e.slotRelocation&&2&r.u?"slot-fb":r.I):R.document.createElement(!qe&&e.slotRelocation&&2&r.u?"slot-fb":r.I),e.svg&&Ge&&"foreignObject"===r.I&&(Ge=!1),e.vdomAttribute&&Je(null,r,Ge),(e.scoped||e.hydrateServerSide)&&null!=Ae&&void 0!==Ae&&i["s-si"]!==Ae&&i.classList.add(i["s-si"]=Ae),r.M){const e="template"===r.I?i.content:i;for(a=0;a<r.M.length;++a)l=en(t,r,a),l&&e.appendChild(l)}e.svg&&("svg"===r.I?Ge=!1:"foreignObject"===i.tagName&&(Ge=!0))}return i["s-hn"]=Ie,e.slotRelocation&&3&r.u&&(i["s-sr"]=!0,i["s-cr"]=De,i["s-sn"]=r.D||"",i["s-rf"]=null==(s=r.R)?void 0:s.ref,lt(i),c=t&&t.M&&t.M[o],c&&c.I===r.I&&t.P&&nn(t.P),(e.scoped||e.hydrateServerSide)&&mn(De,i,n.P,null==t?void 0:t.P)),i},nn=t=>{A.u|=1;const e=t.closest(Ie.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(pn(e,t,null!=n?n:null),t["s-sh"]=void 0,Qe=!0)}A.u&=-2},on=(t,e)=>{A.u|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===Ie&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==Ie&&o["s-ol"]&&(pn(cn(o).parentNode,o,cn(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Qe=!0),e&&on(o,e)}A.u&=-2},sn=(t,n,o,s,r,i)=>{let l,c=e.slotRelocation&&t["s-cr"]&&t["s-cr"].parentNode||t;for(e.shadowDom&&c.shadowRoot&&c.tagName===Ie&&(c=c.shadowRoot),"template"===o.I&&(c=c.content);r<=i;++r)s[r]&&(l=en(null,o,r),l&&(s[r].P=l,pn(c,l,e.slotRelocation?cn(n):n)))},rn=(t,n,o)=>{for(let s=n;s<=o;++s){const n=t[s];if(n){const t=n.P;dn(n),t&&(e.slotRelocation&&(Ke=!0,t["s-ol"]?t["s-ol"].remove():on(t,!0)),t.remove())}}},ln=(t,n,o=!1)=>t.I===n.I&&(e.slotRelocation&&"slot"===t.I?t.D===n.D:e.vdomKey&&!o?t.A===n.A:(o&&!t.A&&n.A&&(t.A=n.A),!0)),cn=t=>t&&t["s-ol"]||t,an=(t,n,o=!1)=>{const s=n.P=t.P,r=t.M,i=n.M,l=n.I,c=n.L;let a;e.vdomText&&null!=c?e.vdomText&&e.slotRelocation&&(a=s["s-cr"])?a.parentNode.textContent=c:e.vdomText&&t.L!==c&&(s.data=c):(e.svg&&(Ge="svg"===l||"foreignObject"!==l&&Ge),(e.vdomAttribute||e.reflect)&&(e.slot&&"slot"===l&&!qe&&t.D!==n.D&&(n.P["s-sn"]=n.D||"",nn(n.P.parentElement)),Je(t,n,Ge,o)),e.updatable&&null!==r&&null!==i?((t,n,o,s,r=!1)=>{let i,l,c=0,a=0,u=0,f=0,d=n.length-1,h=n[0],p=n[d],m=s.length-1,v=s[0],g=s[m];const $="template"===o.I?t.content:t;for(;c<=d&&a<=m;)if(null==h)h=n[++c];else if(null==p)p=n[--d];else if(null==v)v=s[++a];else if(null==g)g=s[--m];else if(ln(h,v,r))an(h,v,r),h=n[++c],v=s[++a];else if(ln(p,g,r))an(p,g,r),p=n[--d],g=s[--m];else if(ln(h,g,r))!e.slotRelocation||"slot"!==h.I&&"slot"!==g.I||on(h.P.parentNode,!1),an(h,g,r),pn($,h.P,p.P.nextSibling),h=n[++c],g=s[--m];else if(ln(p,v,r))!e.slotRelocation||"slot"!==h.I&&"slot"!==g.I||on(p.P.parentNode,!1),an(p,v,r),pn($,p.P,h.P),p=n[--d],v=s[++a];else{if(u=-1,e.vdomKey)for(f=c;f<=d;++f)if(n[f]&&null!==n[f].A&&n[f].A===v.A){u=f;break}e.vdomKey&&u>=0?(l=n[u],l.I!==v.I?i=en(n&&n[a],o,u):(an(l,v,r),n[u]=void 0,i=l.P),v=s[++a]):(i=en(n&&n[a],o,a),v=s[++a]),i&&(e.slotRelocation?pn(cn(h.P).parentNode,i,cn(h.P)):pn(h.P.parentNode,i,h.P))}c>d?sn(t,null==s[m+1]?null:s[m+1].P,o,s,a,m):e.updatable&&a>m&&rn(n,c,d)})(s,r,n,i,o):null!==i?(e.updatable&&e.vdomText&&null!==t.L&&(s.textContent=""),sn(s,null,n,i,0,i.length-1)):!o&&e.updatable&&null!==r?rn(r,0,r.length-1):e.hydrateClientSide&&o&&e.updatable&&null!==r&&null===i&&(n.M=r),e.svg&&Ge&&"svg"===l&&(Ge=!1))},un=[],fn=t=>{let e,n,o;const s=t.__childNodes||t.childNodes;for(const t of s){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const s=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(st(e,s)){let n=un.find((t=>t.W===e));Ke=!0,e["s-sn"]=e["s-sn"]||s,n?(n.W["s-sh"]=t["s-hn"],n.Y=t):(e["s-sh"]=t["s-hn"],un.push({Y:t,W:e})),e["s-sr"]&&un.map((t=>{st(t.W,e["s-sn"])&&(n=un.find((t=>t.W===e)),n&&!t.Y&&(t.Y=n.Y))}))}else un.some((t=>t.W===e))||un.push({W:e})}1===t.nodeType&&fn(t)}},dn=t=>{e.vdomRef&&(t.R&&t.R.ref&&Ze.push((()=>t.R.ref(null))),t.M&&t.M.map(dn))},hn=(t,n)=>{e.vdomRef&&tn.push((()=>t(n)))},pn=(t,n,o,s)=>{if(e.slotRelocation)if(e.scoped&&"string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])mn(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){e.experimentalSlotFixes&&11!==t.getRootNode().nodeType&&_t(n),t.insertBefore(n,o);const{slotNode:r}=at(n);return r&&!s&&ct(r),n}return t.__insertBefore?t.__insertBefore(n,o):null==t?void 0:t.insertBefore(n,o)};function mn(t,e,n,o){var s,r;let i;if(t&&"string"==typeof e["s-sn"]&&e["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=e["s-si"]||t.parentNode["s-sc"])){const t=e["s-sn"],l=e["s-hn"];if(null==(s=n.classList)||s.add(i+"-s"),o&&(null==(r=o.classList)?void 0:r.contains(i+"-s"))){let e=(o.__childNodes||o.childNodes)[0],n=!1;for(;e;){if(e["s-sn"]!==t&&e["s-hn"]===l&&e["s-sr"]){n=!0;break}e=e.nextSibling}n||o.classList.remove(i+"-s")}}}var vn=(t,n,o=!1)=>{var s,r,i,l,c;const a=t.$hostElement$,u=t.o,f=t.J||Vt(null,null),d=Yt(n)?n:zt(null,null,n);if(Ie=a.tagName,e.isDev&&Array.isArray(n)&&n.some(Yt))throw Error(`The <Host> must be the single root component.\nLooks like the render() function of "${Ie.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);if(e.reflect&&u.X&&(d.R=d.R||{},u.X.forEach((([n,o])=>{d.R[o]=e.serializer&&t.p.has(n)?t.p.get(n):a[n]}))),o&&d.R)for(const t of Object.keys(d.R))a.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(d.R[t]=a[t]);if(d.I=null,d.u|=4,t.J=d,d.P=f.P=e.shadowDom&&a.shadowRoot||a,(e.scoped||e.shadowDom)&&(Ae=a["s-sc"]),qe=D&&!!(1&u.u)&&!(128&u.u),e.slotRelocation&&(De=a["s-cr"],Ke=!1),an(f,d,o),e.slotRelocation){if(A.u|=1,Qe){fn(d.P);for(const t of un){const n=t.W;if(!n["s-ol"]&&R.document){const t=e.isDebug||e.hydrateServerSide?$n(n):R.document.createTextNode("");t["s-nr"]=n,pn(n.parentNode,n["s-ol"]=t,n,o)}}for(const t of un){const n=t.W,c=t.Y;if(1===n.nodeType&&o&&(n["s-ih"]=null!=(s=n.hidden)&&s),c){const t=c.parentNode;let s=c.nextSibling;if(!e.hydrateServerSide&&s&&1===s.nodeType){let e=null==(r=n["s-ol"])?void 0:r.previousSibling;for(;e;){let o=null!=(i=e["s-nr"])?i:null;if(o&&o["s-sn"]===n["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===n||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){s=o;break}}e=e.previousSibling}}if((!s&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==s)&&n!==s){if(pn(t,n,s,o),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=R.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,pn(n.parentNode,t,n,o),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(l=n["s-ih"])&&l)}n&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===n.nodeType&&(n.hidden=!0)}}Ke&&tt(d.P),A.u&=-2,un.length=0}if(e.slotRelocation&&!qe&&!(1&u.u)&&a["s-cr"]){const t=d.P.__childNodes||d.P.childNodes;for(const e of t)if(e["s-hn"]!==Ie&&!e["s-sh"])if(o&&null==e["s-ih"]&&(e["s-ih"]=null!=(c=e.hidden)&&c),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=R.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],pn(e.parentNode,t,e,o),e.parentNode.removeChild(e)}}De=void 0,e.vdomRef&&(Ze.forEach((t=>t())),Ze.length=0,tn.forEach((t=>t())),tn.length=0)},gn=t=>{var e;return null==(e=R.document)?void 0:e.createComment(`<slot${t.D?' name="'+t.D+'"':""}> (host=${Ie.toLowerCase()})`)},$n=t=>{var e;return null==(e=R.document)?void 0:e.createComment("org-location for "+(t.localName?`<${t.localName}> (host=${t["s-hn"]})`:`[${t.textContent}]`))},bn=(t,n)=>{if(e.asyncLoading&&n&&!t.q&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.q=()=>{n["s-p"].splice(e-1,1),o()})))}},yn=(t,n)=>{if(e.taskQueue&&e.updatable&&(t.u|=16),e.asyncLoading&&4&t.u)return void(t.u|=512);bn(t,t.K);const o=()=>wn(t,n);if(!n)return e.taskQueue?Q(o):o();queueMicrotask((()=>{o()}))},wn=(t,n)=>{const o=t.$hostElement$,s=Rt("scheduleUpdate",t.o.C),r=e.lazyLoad?t.l:o;if(!r)throw Error(`Can't render component <${o.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return n?(e.lazyLoad&&(e.slotRelocation&&t.G&&(t.G=!1,Nn(r,"connectedCallback",void 0,o)),e.hostListener&&(t.u|=256,t.Z&&(t.Z.map((([t,e])=>Nn(r,t,e,o))),t.Z=void 0)),t.O.length&&t.O.forEach((t=>t(o)))),Tn(o,"componentWillLoad"),i=Nn(r,"componentWillLoad",void 0,o)):(Tn(o,"componentWillUpdate"),i=Nn(r,"componentWillUpdate",void 0,o)),Tn(o,"componentWillRender"),i=Sn(i,(()=>Nn(r,"componentWillRender",void 0,o))),s(),Sn(i,(()=>xn(t,r,n)))},Sn=(t,e)=>jn(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),jn=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,xn=async(t,n,o)=>{var s;const r=t.$hostElement$,i=Rt("update",t.o.C),l=r["s-rc"];e.style&&o&&Ht(t);const c=Rt("render",t.o.C);if(e.isDev&&(t.u|=1024),e.hydrateServerSide?await Cn(t,n,r,o):Cn(t,n,r,o),e.isDev&&(t.m=void 0===t.m?1:t.m+1,t.u&=-1025),e.hydrateServerSide)try{Rn(r),o&&(1&t.o.u?r["s-en"]="":2&t.o.u&&(r["s-en"]="c"))}catch(t){v(t,r)}if(e.asyncLoading&&l&&(l.map((t=>t())),r["s-rc"]=void 0),c(),i(),e.asyncLoading){const e=null!=(s=r["s-p"])?s:[],n=()=>_n(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}else _n(t)},On=null,Cn=(t,n,o,s)=>{const r=!!e.allRenderFn,i=!!e.lazyLoad,l=!!e.taskQueue,c=!!e.updatable;try{if(On=n,n=(r||n.render)&&n.render(),c&&l&&(t.u&=-17),(c||i)&&(t.u|=2),e.hasRenderFn||e.reflect)if(e.vdomRender||e.reflect){if(e.hydrateServerSide)return Promise.resolve(n).then((e=>vn(t,e,s)));vn(t,n,s)}else 1&t.o.u?o.shadowRoot.textContent=n:o.textContent=n}catch(e){v(e,t.$hostElement$)}return On=null,null},_n=t=>{const n=t.o.C,o=t.$hostElement$,s=Rt("postUpdate",n),r=e.lazyLoad?t.l:o,i=t.K;e.isDev&&(t.u|=1024),Nn(r,"componentDidRender",void 0,o),e.isDev&&(t.u&=-1025),Tn(o,"componentDidRender"),64&t.u?(e.isDev&&(t.u|=1024),Nn(r,"componentDidUpdate",void 0,o),e.isDev&&(t.u&=-1025),Tn(o,"componentDidUpdate"),s()):(t.u|=64,e.asyncLoading&&e.cssAnnotations&&Ln(o),e.isDev&&(t.u|=2048),Nn(r,"componentDidLoad",void 0,o),e.isDev&&(t.u&=-2049),Tn(o,"componentDidLoad"),s(),e.asyncLoading&&(t.j(o),i||kn(n))),e.method&&e.lazyLoad&&t.$(o),e.asyncLoading&&(t.q&&(t.q(),t.q=void 0),512&t.u&&q((()=>yn(t,!1))),t.u&=-517)},En=t=>{var o;if(e.updatable&&(n.isBrowser||n.isTesting)){const e=d(t),n=null==(o=null==e?void 0:e.$hostElement$)?void 0:o.isConnected;return n&&2==(18&e.u)&&yn(e,!1),n}return!1},kn=n=>{var o;e.asyncQueue&&(A.u|=2),q((()=>Ue(R,"appload",{detail:{namespace:t}}))),e.hydrateClientSide&&(null==(o=A.tt)?void 0:o.size)&&A.tt.clear(),e.profile&&performance.measure&&performance.measure(`[Stencil] ${t} initial load (by ${n})`,"st:app:start")},Nn=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){v(t,o)}},Tn=(n,o)=>{e.lifecycleDOMEvents&&Ue(n,"stencil_"+o,{bubbles:!0,composed:!0,detail:{namespace:t}})},Ln=t=>{var n,o;return e.hydratedClass?t.classList.add(null!=(n=e.hydratedSelectorName)?n:"hydrated"):e.hydratedAttribute?t.setAttribute(null!=(o=e.hydratedSelectorName)?o:"hydrated",""):void 0},Rn=t=>{const e=t.children;if(null!=e)for(let t=0,n=e.length;t<n;t++){const n=e[t];"function"==typeof n.connectedCallback&&n.connectedCallback(),Rn(n)}},Mn=(t,e)=>d(t).i.get(e),An=(t,n,o,s)=>{const r=d(t);if(!r)return;if(e.lazyLoad&&!r)throw Error(`Couldn't find host element for "${s.C}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);if(e.serializer&&r.p.has(n)&&r.p.get(n)===o)return;const i=e.lazyLoad?r.$hostElement$:t,l=r.i.get(n),c=r.u,a=e.lazyLoad?r.l:i;if(o=He(o,s.t[n][0],e.formAssociated&&!!(64&s.u)),!(e.lazyLoad&&8&c&&void 0!==l||o===l||Number.isNaN(l)&&Number.isNaN(o))){if(r.i.set(n,o),e.serializer&&e.reflect&&s.X&&s.et&&s.et[n]){const t=t=>{let e=o;for(const o of s.et[n]){const[[s]]=Object.entries(o);e=t[s](e,n)}r.p.set(n,e)};a?t(a):r.O.push((()=>{t(r.l)}))}if(e.isDev&&(1024&r.u?b(`The state/prop "${n}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,"\nElement",i,"\nNew value",o,"\nOld value",l):2048&r.u&&b(`The state/prop "${n}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,"\nElement",i,"\nNew value",o,"\nOld value",l)),e.propChangeCallback&&s.nt){const t=s.nt[n];t&&t.map((t=>{try{const[[e,s]]=Object.entries(t);(128&c||1&s)&&(a?a[e](o,l,n):r.O.push((()=>{r.l[e](o,l,n)})))}catch(t){v(t,i)}}))}if(e.updatable&&2&c){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,l,n)&&!(16&c))return;16&c||yn(r,!1)}}},Dn=(t,n,o)=>{var s,r;const i=t.prototype;if(e.isTesting){if(i.__stencilAugmented)return;i.__stencilAugmented=!0}if(e.formAssociated&&64&n.u&&1&o&&L.forEach((t=>{const n=i[t];Object.defineProperty(i,t,{value(...o){var s;const r=d(this),i=e.lazyLoad?null==r?void 0:r.l:this;if(i){const s=e.lazyLoad?i[t]:n;"function"==typeof s&&s.call(i,...o)}else null==(s=null==r?void 0:r.S)||s.then((e=>{const n=e[t];"function"==typeof n&&n.call(e,...o)}))}})})),e.member&&n.t||e.propChangeCallback){e.propChangeCallback&&(t.watchers&&!n.nt&&(n.nt=Re(t.watchers)),t.deserializers&&!n.ot&&(n.ot=t.deserializers),t.serializers&&!n.et&&(n.et=t.serializers));const l=Object.entries(null!=(s=n.t)?s:{});if(l.map((([t,[s]])=>{if((e.prop||e.state)&&(31&s||(!e.lazyLoad||2&o)&&32&s)){const{get:r,set:l}=c(i,t)||{};r&&(n.t[t][0]|=2048),l&&(n.t[t][0]|=4096),(1&o||!r)&&Object.defineProperty(i,t,{get(){if(e.lazyLoad){if(!(2048&n.t[t][0]))return Mn(this,t);const e=d(this),o=e?e.l:i;if(!o)return;return o[t]}if(!e.lazyLoad)return r?r.apply(this):Mn(this,t)},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(r){const i=d(this);if(i){if(e.isDev&&(1&o||4096&n.t[t][0]||0!==(i&&8&i.u)||!(31&s)||1024&s||b(`@Prop() "${t}" on <${n.C}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`)),l)return void 0===(32&s?this[t]:i.$hostElement$[t])&&i.i.get(t)&&(r=i.i.get(t)),l.call(this,He(r,s,e.formAssociated&&!!(64&n.u))),void An(this,t,r=32&s?this[t]:i.$hostElement$[t],n);if(e.lazyLoad){if(e.lazyLoad){if(!(1&o&&4096&n.t[t][0]))return An(this,t,r,n),void(1&o&&!i.l&&i.O.push((()=>{4096&n.t[t][0]&&i.l[t]!==i.i.get(t)&&(i.l[t]=r)})));const l=()=>{const o=i.l[t];!i.i.get(t)&&o&&i.i.set(t,o),i.l[t]=He(r,s,e.formAssociated&&!!(64&n.u)),An(this,t,i.l[t],n)};i.l?l():i.O.push((()=>{l()}))}}else An(this,t,r,n)}}})}else e.lazyLoad&&e.method&&1&o&&64&s&&Object.defineProperty(i,t,{value(...e){var n;const o=d(this);return null==(n=null==o?void 0:o.v)?void 0:n.then((()=>{var n;return null==(n=o.l)?void 0:n[t](...e)}))}})})),e.observeAttribute&&(!e.lazyLoad||1&o)){const o=new Map;i.attributeChangedCallback=function(t,s,r){A.jmp((()=>{var c;const a=o.get(t),u=d(this);if(e.serializer&&u.p.has(a)&&u.p.get(a)===r)return;if(this.hasOwnProperty(a)&&e.lazyLoad&&(r=this[a],delete this[a]),e.deserializer&&n.ot&&n.ot[a]){const t=(t,e)=>{const n=null==e?void 0:e[t](r,a);n!==this[a]&&(this[a]=n)};for(const o of n.ot[a]){const[[n]]=Object.entries(o);e.lazyLoad?u.l?t(n,u.l):u.O.push((()=>{t(n,u.l)})):t(n,this)}return}if(i.hasOwnProperty(a)&&"number"==typeof this[a]&&this[a]==r)return;if(null==a){const o=null==u?void 0:u.u;if(u&&o&&!(8&o)&&r!==s){const i=e.lazyLoad?u.l:e.lazyLoad?u.$hostElement$:this,l=null==(c=n.nt)?void 0:c[t];null==l||l.forEach((e=>{const[[n,l]]=Object.entries(e);null!=i[n]&&(128&o||1&l)&&i[n].call(i,r,s,t)}))}return}const f=l.find((([t])=>t===a)),h=f&&4&f[1][0],p=h&&null===r&&void 0===this[a];h&&(r=null!==r&&"false"!==r);const m=Object.getOwnPropertyDescriptor(i,a);p||r==this[a]||m.get&&!m.set||(this[a]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=n.nt)?r:{}),...l.filter((([t,e])=>31&e[0])).map((([t,s])=>{var r;const i=s[1]||t;return o.set(i,t),e.reflect&&512&s[0]&&(null==(r=n.X)||r.push([t,i])),i}))]))}}return t},In=async(t,n,o,s)=>{let r;try{if(!(32&n.u)){if(n.u|=32,e.lazyLoad&&o._){const i=S(o,n,s);if(i&&"then"in i){const t=((t,n)=>e.profile&&performance.mark?(0===performance.getEntriesByName(t,"mark").length&&performance.mark(t),()=>{0===performance.getEntriesByName(n,"measure").length&&performance.measure(n,t)}):()=>{})(`st:load:${o.C}:${n.k}`,`[Stencil] Load module for <${o.C}>`);r=await i,t()}else r=i;if(!r)throw Error(`Constructor for "${o.C}#${n.k}" was not found`);e.member&&!r.isProxied&&(e.propChangeCallback&&(o.nt=Re(r.watchers),o.et=r.serializers,o.ot=r.deserializers),Dn(r,o,2),r.isProxied=!0);const l=Rt("createInstance",o.C);e.member&&(n.u|=8);try{new r(n)}catch(e){v(e,t)}e.member&&(n.u&=-9),e.propChangeCallback&&(n.u|=128),l(),e.slotRelocation&&4&o.u?n.G=!0:Hn(n.l,t)}else r=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(e.style&&r&&r.style){let i;"string"==typeof r.style?i=r.style:e.mode&&"string"!=typeof r.style&&(n.k=Le(t),n.k&&(i=r.style[n.k]),e.hydrateServerSide&&n.k&&t.setAttribute("s-mode",n.k));const l=Pt(o,n.k);if(!j.has(l)||e.hotModuleReplacement&&s){const t=Rt("registerStyles",o.C);e.hydrateServerSide&&e.shadowDom&&128&o.u&&(i=Te(i,l)),Dt(l,i,!!(1&o.u)),t()}}}const i=n.K,l=()=>yn(n,!0);e.asyncLoading&&i&&i["s-rc"]?i["s-rc"].push(l):l()}catch(o){v(o,t),e.asyncLoading&&n.q&&(n.q(),n.q=void 0),e.asyncLoading&&n.j&&n.j(t)}},Hn=(t,n)=>{e.lazyLoad&&Nn(t,"connectedCallback",void 0,n)},Pn=t=>{if(!(1&A.u)){const n=d(t);if(!n)return;const o=n.o,s=Rt("connectedCallback",o.C);if(e.hostListenerTargetParent&&Wn(t,n,o.st,!0),1&n.u)Wn(t,n,o.st,!1),(null==n?void 0:n.l)?Hn(n.l,t):(null==n?void 0:n.S)&&n.S.then((()=>Hn(n.l,t)));else{let s;if(n.u|=1,e.hydrateClientSide&&(s=t.getAttribute(O),s)){if(e.shadowDom&&D&&1&o.u){const n=e.mode?It(t.shadowRoot,o,t.getAttribute("s-mode")):It(t.shadowRoot,o);t.classList.remove(n+"-h",n+"-s")}else if(e.scoped&&2&o.u){const n=Pt(o,e.mode?t.getAttribute("s-mode"):void 0);t["s-sc"]=n}((t,n,o,s)=>{var r,i,l,c;const a=Rt("hydrateClient",n),u=t.shadowRoot,f=[],h=[],p=[],m=e.shadowDom&&u?[]:null,v=Vt(n,null);let g;if(v.P=t,e.scoped){const e=s.o;e&&10&e.u&&t["s-sc"]?(g=t["s-sc"],t.classList.add(g+"-h")):t["s-sc"]&&delete t["s-sc"]}!R.document||A.tt&&A.tt.size||Gt(R.document.body,A.tt=new Map),t[O]=o,t.removeAttribute(O),s.J=Qt(v,f,h,m,t,t,o,p);let $=0;const b=f.length;let y;for(;$<b;$++){y=f[$];const o=y.F+"."+y.U,s=A.tt.get(o),i=y.P;if(u){if((null==(r=y.I)?void 0:(""+r).includes("-"))&&"slot-fb"!==y.I&&!y.P.shadowRoot){const t=d(y.P);if(t){const n=Pt(t.o,e.mode?y.P.getAttribute("s-mode"):void 0),o=R.document.querySelector(`style[sty-id="${n}"]`);o&&m.unshift(o.cloneNode(!0))}}}else i["s-hn"]=Zn(n).toUpperCase(),"slot"===y.I&&(i["s-cr"]=t["s-cr"]);"slot"===y.I&&(y.D=y.P["s-sn"]||y.P.name||null,y.M?(y.u|=2,y.P.childNodes.length||y.M.forEach((t=>{y.P.appendChild(t.P)}))):y.u|=1),s&&s.isConnected&&(s.parentElement.shadowRoot&&""===s["s-en"]&&s.parentNode.insertBefore(i,s.nextSibling),s.parentNode.removeChild(s),u||(i["s-oo"]=parseInt(y.U))),s&&!s["s-id"]&&A.tt.delete(o)}const w=[],S=p.length;let j,x,C,_,E=0,k=0;for(;E<S;E++)if(j=p[E],j&&j.length)for(C=j.length,x=0;x<C;x++){if(_=j[x],w[_.hostId]||(w[_.hostId]=A.tt.get(_.hostId)),!w[_.hostId])continue;const t=w[_.hostId];t.shadowRoot&&_.node.parentElement!==t&&t.insertBefore(_.node,null==(l=null==(i=j[x-1])?void 0:i.node)?void 0:l.nextSibling),t.shadowRoot&&u||(_.slot["s-cr"]||(_.slot["s-cr"]=t["s-cr"],_.slot["s-cr"]=!_.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),rt(_.node,_.slot,!1,_.node["s-oo"]||k),(null==(c=_.node.parentElement)?void 0:c.shadowRoot)&&_.node.getAttribute&&_.node.getAttribute("slot")&&_.node.removeAttribute("slot"),e.experimentalSlotFixes&&St(_.node)),k=(_.node["s-oo"]||k)+1}if(e.scoped&&g&&h.length&&h.forEach((t=>{t.P.parentElement.classList.add(g+"-s")})),e.shadowDom&&u&&!u.childNodes.length){let e=0;const n=m.length;if(n){for(;e<n;e++){const t=m[e];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}s.$hostElement$=t,a()})(t,o.C,s,n)}if(e.slotRelocation&&!s&&(e.hydrateServerSide||(e.slot||e.shadowDom)&&12&o.u)&&Fn(t),e.asyncLoading){let o=t;for(;o=o.parentNode||o.host;)if(e.hydrateClientSide&&1===o.nodeType&&o.hasAttribute("s-id")&&o["s-p"]||o["s-p"]){bn(n,n.K=o);break}}e.prop&&!e.hydrateServerSide&&o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),e.initializeNextTick?q((()=>In(t,n,o))):In(t,n,o)}s()}},Fn=t=>{if(!R.document)return;const n=t["s-cr"]=R.document.createComment(e.isDebug?`content-ref (host=${t.localName})`:"");n["s-cn"]=!0,pn(t,n,t.firstChild)},Un=(t,n)=>{e.lazyLoad&&Nn(t,"disconnectedCallback",void 0,n||t)},Bn=async t=>{if(!(1&A.u)){const n=d(t);e.hostListener&&(null==n?void 0:n.rt)&&(n.rt.map((t=>t())),n.rt=void 0),e.lazyLoad?(null==n?void 0:n.l)?Un(n.l,t):(null==n?void 0:n.S)&&n.S.then((()=>Un(n.l,t))):Un(t)}At.has(t)&&At.delete(t),t.shadowRoot&&At.has(t.shadowRoot)&&At.delete(t.shadowRoot)},zn=(t,n)=>{const o={u:n[0],C:n[1]};try{e.member&&(o.t=n[2]),e.hostListener&&(o.st=n[3]),e.propChangeCallback&&(o.nt=Re(t.nt),o.ot=t.ot,o.et=t.et),e.reflect&&(o.X=[]),e.shadowDom&&!D&&1&o.u&&(o.u|=8),!(1&o.u)&&256&o.u?e.experimentalSlotFixes?ut(t.prototype):(e.slotChildNodesFix&&wt(t.prototype),e.cloneNodeFix&&ft(t.prototype),e.appendChildSlotFix&&dt(t.prototype),e.scopedSlotTextContentFix&&2&o.u&&yt(t.prototype)):e.cloneNodeFix&&ft(t.prototype),e.hydrateClientSide&&e.shadowDom&&Ut();const s=t.prototype.connectedCallback,r=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){p(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=d(this);if(!t)return;Wn(this,t,o.st,!1),this.__hasHostListenerAttached=!0}Pn(this),s&&s.call(this)},disconnectedCallback(){Bn(this),r&&r.call(this)},__attachShadow(){if(D)if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.C}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Z.call(this,o);else this.shadowRoot=this}}),Object.defineProperty(t,"is",{value:o.C,configurable:!0}),Dn(t,o,3)}catch(e){return v(e),t}},Vn=(t,n={})=>{var o;if(e.profile&&performance.mark&&performance.mark("st:app:start"),(()=>{if(e.devTools){const t=R.stencil=R.stencil||{},e=t.inspect;t.inspect=t=>{let n=(t=>{const e=d(t);if(!e)return;const n=e.u,o=e.$hostElement$;return{renderCount:e.m,flags:{hasRendered:!!(2&n),hasConnected:!!(1&n),isWaitingForChildren:!!(4&n),isConstructingInstance:!!(8&n),isQueuedForUpdate:!!(16&n),hasInitializedComponent:!!(32&n),hasLoadedComponent:!!(64&n),isWatchReady:!!(128&n),isListenReady:!!(256&n),needsRerender:!!(512&n)},instanceValues:e.i,serializerValues:e.p,ancestorComponent:e.K,hostElement:o,lazyInstance:e.l,vnode:e.J,modeName:e.k,fetchedCbList:e.O,onReadyPromise:e.S,onReadyResolve:e.j,onInstancePromise:e.v,onInstanceResolve:e.$,onRenderResolve:e.q,queuedListeners:e.Z,rmListeners:e.rt,"s-id":o["s-id"],"s-cr":o["s-cr"],"s-lr":o["s-lr"],"s-p":o["s-p"],"s-rc":o["s-rc"],"s-sc":o["s-sc"]}})(t);return n||"function"!=typeof e||(n=e(t)),n}}})(),!R.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const s=Rt("bootstrapLazy"),r=[],i=n.exclude||[],l=R.customElements,c=R.document.head,a=c.querySelector("meta[charset]"),u=R.document.createElement("style"),f=[];let h,m=!0;Object.assign(A,n),A.N=new URL(n.resourcesUrl||"./",R.document.baseURI).href,e.asyncQueue&&n.syncQueue&&(A.u|=4),e.hydrateClientSide&&(A.u|=2),e.hydrateClientSide&&e.shadowDom&&Ut();let v=!1;if(t.map((t=>{t[1].map((o=>{var s,c;const a={u:o[0],C:o[1],t:o[2],st:o[3]};4&a.u&&(v=!0),e.member&&(a.t=o[2]),e.hostListener&&(a.st=o[3]),e.reflect&&(a.X=[]),e.propChangeCallback&&(a.nt=Re(o[4]),a.et=null!=(s=o[5])?s:{},a.ot=null!=(c=o[6])?c:{}),e.shadowDom&&!D&&1&a.u&&(a.u|=8);const u=e.transformTagName&&n.transformTagName?n.transformTagName(a.C):Zn(a.C),g=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),p(t=this,a),e.shadowDom&&1&a.u)if(D)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${a.C}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Z.call(t,a);else e.hydrateServerSide||"shadowRoot"in t||(t.shadowRoot=t)}connectedCallback(){const t=d(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Wn(this,t,a.st,!1)),h&&(clearTimeout(h),h=null),m?f.push(this):A.jmp((()=>Pn(this))))}disconnectedCallback(){A.jmp((()=>Bn(this))),A.raf((()=>{var t;const e=d(this);if(!e)return;const n=f.findIndex((t=>t===this));n>-1&&f.splice(n,1),(null==(t=null==e?void 0:e.J)?void 0:t.P)instanceof Node&&!e.J.P.isConnected&&delete e.J.P}))}componentOnReady(){var t;return null==(t=d(this))?void 0:t.S}};!(1&a.u)&&256&a.u?e.experimentalSlotFixes?ut(g.prototype):(e.slotChildNodesFix&&wt(g.prototype),e.cloneNodeFix&&ft(g.prototype),e.appendChildSlotFix&&dt(g.prototype),e.scopedSlotTextContentFix&&2&a.u&&yt(g.prototype)):e.cloneNodeFix&&ft(g.prototype),e.formAssociated&&64&a.u&&(g.formAssociated=!0),e.hotModuleReplacement&&(g.prototype["s-hmr"]=function(t){((t,e,n)=>{const o=d(t);o&&(o.u=1,In(t,o,e,n))})(this,a,t)}),a._=t[0],i.includes(u)||l.get(u)||(r.push(u),l.define(u,Dn(g,a,1)))}))})),r.length>0&&(e.slotRelocation&&v&&(u.textContent+=N),e.invisiblePrehydration&&(e.hydratedClass||e.hydratedAttribute)&&(u.textContent+=r.sort()+"{visibility:hidden}.hydrated{visibility:inherit}"),u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(o=A.T)?o:Mt(R.document);null!=t&&u.setAttribute("nonce",t),c.insertBefore(u,a?a.nextSibling:c.firstChild)}m=!1,f.length?f.map((t=>t.connectedCallback())):A.jmp(e.profile?()=>h=setTimeout(kn,30,"timeout"):()=>h=setTimeout(kn,30)),s()},Wn=(t,n,o,s)=>{e.hostListener&&o&&R.document&&(e.hostListenerTargetParent&&(o=o.filter(s?([t])=>32&t:([t])=>!(32&t))),o.map((([o,s,r])=>{const i=e.hostListenerTarget?Jn(R.document,t,o):t,l=Yn(n,r),c=Xn(o);A.ael(i,s,l,c),(n.rt=n.rt||[]).push((()=>A.rel(i,s,l,c)))})))},Yn=(t,n)=>o=>{var s;try{e.lazyLoad?256&t.u?null==(s=t.l)||s[n](o):(t.Z=t.Z||[]).push([n,o]):t.$hostElement$[n](o)}catch(e){v(e,t.$hostElement$)}},Jn=(t,n,o)=>e.hostListenerTargetDocument&&4&o?t:e.hostListenerTargetWindow&&8&o?R:e.hostListenerTargetBody&&16&o?t.body:e.hostListenerTargetParent&&32&o&&n.parentElement?n.parentElement:n,Xn=t=>({passive:!!(1&t),capture:!!(2&t)}),qn=e.lazyLoad?class{}:globalThis.HTMLElement||class{},Kn=t=>A.T=t,Qn=new WeakMap,Gn=void 0;function Zn(t){return Gn?Gn(t):t}function to(t,e,n){const o=e||{},{children:s,...r}=o;let i=r;return void 0===n||"key"in r||(i={...r,key:n}),i&&0===Object.keys(i).length&&(i=null),void 0!==s?Array.isArray(s)?zt(t,i,...s):zt(t,i,s):zt(t,i)}var eo=(t,e,n,o)=>{var s;null!=e&&(null!=e["s-nr"]&&o.push(e),1===e.nodeType)&&[...Array.from(e.childNodes),...Array.from((null==(s=e.shadowRoot)?void 0:s.childNodes)||[])].forEach((e=>{const s=d(e);null==s||n.staticComponents.has(e.nodeName.toLowerCase())||no(t,e,s.J,n,{nodeIds:0}),eo(t,e,n,o)}))},no=(t,e,n,o,s)=>{if(null!=n){const r=++o.hostIds;if(e.setAttribute(O,r),null!=e["s-cr"]&&(e["s-cr"].nodeValue="r."+r),null!=n.M){const e=0;n.M.forEach(((n,o)=>{oo(t,n,s,r,e,o)}))}if(e&&n&&n.P&&!e.hasAttribute(_)){const t=e.parentElement;if(t&&t.childNodes){const o=Array.from(t.childNodes),s=o.find((t=>8===t.nodeType&&t["s-sr"]));if(s){const t=o.indexOf(e)-1;n.P.setAttribute(_,`${s["s-host-id"]}.${s["s-node-id"]}.0.${t}`)}}}}},oo=(t,e,n,o,s,r)=>{const i=e.P;if(null==i)return;const l=n.nodeIds++,c=`${o}.${l}.${s}.${r}`;if(i["s-host-id"]=o,i["s-node-id"]=l,1===i.nodeType)i.setAttribute(_,c),"string"!=typeof i["s-sn"]||i.getAttribute("slot")||i.setAttribute("s-sn",i["s-sn"]);else if(3===i.nodeType){const e=i.parentNode,n=null==e?void 0:e.nodeName;if("STYLE"!==n&&"SCRIPT"!==n){const n=t.createComment("t."+c);pn(e,n,i)}}else 8===i.nodeType&&i["s-sr"]&&(i.nodeValue=`s.${c}.${i["s-sn"]||""}`);if(null!=e.M){const r=s+1;e.M.forEach(((e,s)=>{oo(t,e,n,o,r,s)}))}},so=Object.freeze({__proto__:null,BUILD:e,Build:n,Env:{},Fragment:(t,e)=>e,H:M,HTMLElement:M,HYDRATED_STYLE_ID:C,Host:Wt,Mixin:function(...t){return t.reduceRight(((t,e)=>e(t)),qn)},NAMESPACE:t,STENCIL_DEV_MODE:g,addHostEventListeners:Wn,bootstrapLazy:Vn,cmpModules:w,connectedCallback:Pn,consoleDevError:$,consoleDevInfo:y,consoleDevWarn:b,consoleError:v,createEvent:Fe,defineCustomElement:(t,e)=>{customElements.define(Zn(e[1]),zn(t,e))},disconnectedCallback:Bn,forceModeUpdate:t=>{if(e.style&&e.mode&&!e.lazyLoad){const e=Le(t),n=d(t);if(n&&n.k!==e){const o=n.o,s=t["s-sc"],r=Pt(o,e),i=t.constructor.style[e],l=o.u;i&&(j.has(r)||Dt(r,i,!!(1&l)),n.k=e,t.classList.remove(s+"-h",s+"-s"),Ht(n),En(t))}}},forceUpdate:En,getAssetPath:G,getElement:Pe,getHostRef:d,getMode:t=>{var e;return null==(e=d(t))?void 0:e.k},getRenderingRef:()=>On,getValue:Mn,h:zt,insertVdomAnnotations:(t,e)=>{if(null!=t){const n=E in t?t[E]:{...k};n.staticComponents=new Set(e);const o=[];eo(t,t.body,n,o),o.forEach((e=>{var o;if(null!=e&&e["s-nr"]){const s=e["s-nr"];let r=s["s-host-id"],i=s["s-node-id"],l=`${r}.${i}`;if(null==r)if(r=0,n.rootLevelIds++,i=n.rootLevelIds,l=`${r}.${i}`,1===s.nodeType)s.setAttribute(_,l),"string"!=typeof s["s-sn"]||s.getAttribute("slot")||s.setAttribute("s-sn",s["s-sn"]);else if(3===s.nodeType){if(0===r&&""===(null==(o=s.nodeValue)?void 0:o.trim()))return void e.remove();const n=t.createComment(l);n.nodeValue="t."+l,pn(s.parentNode,n,s)}else if(8===s.nodeType){const e=t.createComment(l);e.nodeValue="c."+l,s.parentNode.insertBefore(e,s)}let c="o."+l;const a=e.parentElement;a&&(""===a["s-en"]?c+=".":"c"===a["s-en"]&&(c+=".c")),e.nodeValue=c}}))}},isMemberInElement:m,jsx:to,jsxDEV:function(t,e,n){const o=e||{},{children:s,...r}=o;let i=r;return void 0===n||"key"in r||(i={...r,key:n}),i&&0===Object.keys(i).length&&(i=null),void 0!==s?Array.isArray(s)?zt(t,i,...s):zt(t,i,s):zt(t,i)},jsxs:function(t,e,n){return to(t,e,n)},loadModule:S,modeResolutionChain:x,needsScopedSSR:()=>!1,nextTick:q,normalizeWatchers:Re,parsePropertyValue:He,plt:A,postUpdateComponent:_n,promiseResolve:I,proxyComponent:Dn,proxyCustomElement:zn,readTask:K,registerHost:p,registerInstance:h,render:function(t,e){let n=Qn.get(e);n||(n={u:0,o:{u:0,C:e.tagName},$hostElement$:e},Qn.set(e,n)),vn(n,t)},renderVdom:vn,setAssetPath:t=>A.N=t,setErrorHandler:t=>a=t,setMode:t=>x.push(t),setNonce:Kn,setPlatformHelpers:t=>{Object.assign(A,t)},setPlatformOptions:t=>Object.assign(A,t),setScopedSSR:()=>{},setTagTransformer:function(t){Gn&&console.warn("\n A tagTransformer has already been set. \n Overwriting it may lead to error and unexpected results if your components have already been defined.\n "),Gn=t},setValue:An,styles:j,supportsConstructableStylesheets:H,supportsListenerOptions:!0,supportsMutableAdoptedStyleSheets:P,supportsShadow:D,transformTag:Zn,win:R,writeTask:Q});export{e as B,M as H,t as N,so as S,Fe as a,Vn as b,y as c,Wt as d,G as e,n as f,Pe as g,zt as h,I as p,h as r,Kn as s,R as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},n(e)}var e,r="dahlia",t="https://js.stripe.com",o="".concat(t,"/").concat(r,"/stripe.js"),i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,u=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,s=function(){var n=document.createElement("script");n.src="".concat(o).concat("");var e=document.head||document.body;if(!e)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return e.appendChild(n),n},l=null,c=null,f=null,a=!1,p=function(){return e||(e=(null!==l?l:(l=new Promise((function(n,e){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe)n(window.Stripe);else try{var r=function(){for(var n,e=document.querySelectorAll('script[src^="'.concat(t,'"]')),r=0;r<e.length;r++){var o=e[r];if(i.test(n=o.src)||u.test(n))return o}return null}();if(r){if(r&&null!==f&&null!==c){var o;r.removeEventListener("load",f),r.removeEventListener("error",c),null===(o=r.parentNode)||void 0===o||o.removeChild(r),r=s()}}else r=s();f=function(n,e){return function(){window.Stripe?n(window.Stripe):e(new Error("Stripe.js not available"))}}(n,e),c=function(n){return function(e){n(new Error("Failed to load Stripe.js",{cause:e}))}}(e),r.addEventListener("load",f),r.addEventListener("error",c)}catch(n){return void e(n)}else n(null)}))).catch((function(n){return l=null,Promise.reject(n)}))).catch((function(n){return e=null,Promise.reject(n)})))};Promise.resolve().then((function(){return p()})).catch((function(n){a||console.warn(n)}));var d=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];a=!0;var i=Date.now();return p().then((function(e){return function(e,t,o){if(null===e)return null;var i=t[0];if("string"!=typeof i)throw new Error("Expected publishable key to be of type string, got type ".concat(n(i)," instead."));var u=i.match(/^pk_test/),s=function(n){return 3===n?"v3":n}(e.version),l=r;u&&s!==l&&console.warn("Stripe.js@".concat(s," was loaded on the page, but @stripe/stripe-js@").concat("9.17.0"," expected Stripe.js@").concat(l,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var c=e.apply(void 0,t);return function(n,e){n&&n._registerWrapper&&n._registerWrapper({name:"stripe-js",version:"9.17.0",startTime:e})}(c,o),c}(e,t,i)}))};export{d as l}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
const o=()=>{};export{o as g}
|
|
2
|
-
//# sourceMappingURL=p-DQuL1Twl.js.map
|
|
1
|
+
const o=()=>{};export{o as g}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
class s extends Error{constructor(s){super(s.message)
|
|
2
|
-
//# sourceMappingURL=p-XRfh5Wrs.js.map
|
|
1
|
+
class s extends Error{constructor(s){super(s.message),this.code=s.code,this.docUrl=s.doc_url,this.message=s.message,this.param=s.param,this.requestLogUrl=s.request_log_url,this.type=s.type}}export{s as S}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,a as e,h as i,g as o,d as s}from"./p-C6bbmyga.js";import{s as a,c as n,i as r}from"./p--sA2m1ad.js";import{S as l}from"./p-XRfh5Wrs.js";import"./p-CBXaOfXU.js";const d=t=>{if(null!=t&&""!==t)return{stripeAccount:t}},c=class{async initStripe(t,e){if(await this.stripeService.initialize(t,{stripeAccount:null==e?void 0:e.stripeAccount,applicationName:this.applicationName}),"success"===this.stripeService.state.loadStripeStatus)await this.initElement(),this.stripeLoadedEventHandler();else{const t=this.stripeService.onChange("loadStripeStatus",(async e=>{"success"===e&&(await this.initElement(),this.stripeLoadedEventHandler(),t())}))}}async updateProgress(t){return this.progress=t,this}async setErrorMessage(t){return this.cardElementManager.setError(t),this}updatePublishableKey(t){null!=t&&""!==t&&this.initStripe(t,d(this.stripeAccount))}updateStripeAccountId(t){const e=this.stripeService.state.publishableKey||this.publishableKey;null!=e&&""!==e&&this.initStripe(e,{stripeAccount:t})}async setPaymentRequestOption(t){return this.paymentRequestOption=t,this.createPaymentRequestButton(),this}stripeLoadedEventHandler(){const t={stripe:this.stripeService.getStripe()};null!=this.stripeDidLoaded&&this.stripeDidLoaded(t),this.stripeLoaded.emit(t)}async formSubmitEventHandler(){const t=this.cardElementManager.getElements(),e=this.stripeService.getStripe();null!=t?this.formSubmit.emit({cardCVCElement:t.cardCVC,cardExpiryElement:t.cardExpiry,cardNumberElement:t.cardNumber,stripe:e}):console.error("Card elements not initialized")}async defaultFormSubmitResultHandler(t){this.defaultFormSubmitResult.emit(t)}componentWillRender(){const{publishableKey:t}=this.stripeService.state;null!=t&&""!==t&&(["success","loading"].includes(this.stripeService.state.loadStripeStatus)||this.initStripe(t,d(this.stripeService.state.stripeAccount)))}async defaultFormSubmitAction(t,{stripe:e,cardNumberElement:i,intentClientSecret:o}){t.preventDefault();try{const t=await((t,e,i,o)=>"payment"===this.intentType?t.confirmCardPayment(i,{payment_method:{card:o}}):t.confirmCardSetup(i,{payment_method:{card:o}}))(e,0,o,i);if(null!=t.error)throw new l(t.error);this.defaultFormSubmitResultHandler(t)}catch(t){throw console.error(t),this.defaultFormSubmitResultHandler(t),t}}constructor(i){t(this,i),this.stripeLoaded=e(this,"stripeLoaded",7),this.formSubmit=e(this,"formSubmit",7),this.defaultFormSubmitResult=e(this,"defaultFormSubmitResult",7),this.paymentRequestButtonCreated=!1,this.intentType="payment",this.zip=!0,this.sheetTitle="Add your payment information",this.buttonLabel="Pay",this.progress="",this.zipCode="",this.applicationName="stripe-pwa-elements",this.showLabel=!1,this.shouldUseDefaultFormSubmitAction=!0,this.stripeService=a.createStripeService(),this.cardElementManager=a.createCardElementManager(this.stripeService),null!=this.publishableKey&&""!==this.publishableKey&&this.initStripe(this.publishableKey,d(this.stripeAccount))}async initElement(){await this.cardElementManager.initialize(this.el);const t=this.el.querySelector("#stripe-card-element");null!=t?t.addEventListener("submit",(async t=>{const e=this.cardElementManager.getElements(),i=this.stripeService.getStripe(),{intentClientSecret:o}=this;if(null==e||null==i)return void console.error("Stripe not properly initialized");const s={cardCVCElement:e.cardCVC,cardExpiryElement:e.cardExpiry,cardNumberElement:e.cardNumber,stripe:i,intentClientSecret:o,zipCode:this.zipCode};this.progress="loading";try{null!=this.handleSubmit?await this.handleSubmit(t,s):!0===this.shouldUseDefaultFormSubmitAction&&null!=o&&""!==o?await this.defaultFormSubmitAction(t,s):t.preventDefault(),await this.formSubmitEventHandler(),null==this.handleSubmit&&!0!==this.shouldUseDefaultFormSubmitAction||(this.progress="success")}catch(t){this.cardElementManager.setError(t.message),this.progress="failure"}})):console.error("Form element #stripe-card-element not found")}componentDidLoad(){this.el.classList.add(n())}componentDidRender(){this.showPaymentRequestButton&&this.paymentRequestOption&&!this.paymentRequestButtonCreated&&this.createPaymentRequestButton()}disconnectedCallback(){this.cardElementManager.unmount()}createPaymentRequestButton(){const{showPaymentRequestButton:t,paymentRequestOption:e}=this;if(this.paymentRequestButtonCreated)return null;if(!t||null==e)return null;if(null==document)return null;const i=this.el.querySelector("#stripe-payment-request-button");if(null==i)return console.error("Target element #stripe-payment-request-button not found"),null;if(null!=i.querySelector("stripe-payment-request-button"))return this.paymentRequestButtonCreated=!0,null;const o=document.createElement("stripe-payment-request-button");i.appendChild(o),customElements.whenDefined("stripe-payment-request-button").then((()=>(((t,e)=>{const{paymentRequestPaymentMethodHandler:i,paymentRequestShippingOptionChangeHandler:o,paymentRequestShippingAddressChangeHandler:s}=e;t.setPaymentRequestOption(e),null!=i&&t.setPaymentMethodEventHandler(i),null!=o&&t.setPaymentRequestShippingOptionEventHandler(o),null!=s&&t.setPaymentRequestShippingAddressEventHandler(s)})(o,e),o.initStripe(this.publishableKey)))),this.paymentRequestButtonCreated=!0}render(){const{loadStripeStatus:t}=this.stripeService.state,{errorMessage:e}=this.cardElementManager.getState();if("failure"===t)return i("p",null,r.t("Failed to load Stripe"));const o="loading"===this.progress;return i("div",{class:"stripe-payment-sheet-wrap"},i("form",{id:"stripe-card-element"},i("div",{class:"stripe-heading"},r.t(this.sheetTitle)),i("div",{id:"stripe-payment-request-button"}),i("div",null,i("div",{class:"stripe-section-title"},r.t("Card information"))),i("div",{class:"payment-info card visible"},i("fieldset",{class:"stripe-input-box"},i("div",null,i("label",null,this.showLabel?i("lenged",null,r.t("Card Number")):null,i("div",{id:"card-number"}))),i("div",{class:"stripe-input-column",style:{display:"flex"}},i("label",{style:{width:"50%"}},this.showLabel?i("lenged",null,r.t("MM / YY")):null,i("div",{id:"card-expiry"})),i("label",{style:{width:"50%"}},this.showLabel?i("lenged",null,r.t("CVC")):null,i("div",{id:"card-cvc"}))))),i("div",{id:"card-errors",class:"stripe-element-errors"},e),this.zip?i("div",{style:{marginTop:"1.5rem"}},i("div",{class:"stripe-section-title"},r.t("Country or region"))):null,this.zip?i("div",{class:"payment-info card visible"},i("fieldset",{class:"stripe-input-box"},i("div",null,i("label",null,this.showLabel?i("lenged",null,r.t("Postal Code")):null,i("input",{id:"zip",name:"zip",type:"text",inputmode:"numeric",class:"StripeElement",style:{width:"100%"},placeholder:r.t("Postal Code"),value:this.zipCode,onInput:t=>{this.zipCode=t.target.value}}))))):null,i("div",{style:{marginTop:"32px"}},i("button",{type:"submit",disabled:o},r.t("loading"===this.progress?"Loading":this.buttonLabel)))))}get el(){return o(this)}static get watchers(){return{publishableKey:[{updatePublishableKey:0}],stripeAccount:[{updateStripeAccountId:0}]}}};c.style=':root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}.stripe-payment-sheet-wrap{box-sizing:border-box}.stripe-payment-sheet-wrap *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:"Roboto", sans-serif;box-sizing:border-box}.stripe-payment-sheet-wrap button{cursor:pointer}.stripe-payment-sheet-wrap{display:block;width:100%;background:#fff;padding:32px 16px}.stripe-payment-sheet-wrap .StripeElement{padding:8px 16px;min-height:64px;display:flex;justify-content:center;align-items:center}.stripe-payment-sheet-wrap .StripeElement>.__PrivateStripeElement{width:100%}.stripe-payment-sheet-wrap .stripe-input-box{background-color:#fff;border-radius:6px;border:1px solid var(--color-input-border);overflow:hidden;filter:drop-shadow(0 0 2px var(--color-input-border-shadow))}.stripe-payment-sheet-wrap .stripe-input-box>*{border-bottom:1px solid var(--color-input-border)}.stripe-payment-sheet-wrap .stripe-input-box>*:last-child{border-bottom:none}.stripe-payment-sheet-wrap .stripe-input-column>*{border-right:1px solid var(--color-input-border)}.stripe-payment-sheet-wrap .stripe-input-column>*:last-child{border-right:none}.stripe-payment-sheet-wrap .stripe-heading{font-size:24px;font-weight:bold;color:var(--color-heading-text);margin-bottom:24px}.stripe-payment-sheet-wrap .stripe-section-title{font-size:14px;font-weight:bold;color:var(--color-label);margin-bottom:8px}.stripe-payment-sheet-wrap .payment-info label{color:var(--color-label)}.stripe-payment-sheet-wrap .stripe-element-errors{margin-top:8px;font-size:14px;color:var(--color-text-error)}.stripe-payment-sheet-wrap button{display:block;color:var(--color-button-text);background-color:var(--color-primary);width:100%;text-align:center;padding:16px 16px;font-size:18px;border-radius:6px;min-height:42px}.stripe-payment-sheet-wrap button:disabled{color:var(--color-button-text-disabled)}';const p=class{constructor(i){t(this,i),this.close=e(this,"close",7),this.showCloseButton=!0,this.open=!1,this.renderedOpen=!1}async toggleModal(){this.open?await this.closeModal():await this.openModal()}async openModal(){this.open=!0,this.openModalAnimation()}async closeModal(){this.open=!1,this.renderedOpen=!1,this.close.emit()}componentDidLoad(){const t=n();t&&this.el.classList.add(t),this.open&&this.openModalAnimation()}openModalAnimation(){if(!this.el.shadowRoot)return void(this.renderedOpen=!0);const t=this.el.shadowRoot.querySelector(".modal-child");t.classList.add("loading"),t.style.willChange="transform",t.addEventListener("transitionend",(()=>{t.style.willChange="auto",t.classList.remove("loading")}),{once:!0}),requestAnimationFrame((()=>{this.renderedOpen=!0}))}render(){const{renderedOpen:t,showCloseButton:e}=this;return i(s,{key:"dee14229db3c17744ae5013e5f9aab813a77880b"},i("div",{key:"c82f4f18286a3d341932bacf09973da80ee2acdd",class:"modal-row"+(t?" open":""),onClick:()=>this.closeModal()},i("div",{key:"20b5dc2db1509486e74ff2f6049f5c27de4d4793",class:"modal-child",onClick:t=>t.stopPropagation()},e?i("div",{class:"modal-close-button-wrap"},i("ion-icon",{name:"close",size:"large",class:"modal-close-button",onClick:()=>this.closeModal()})):null,i("div",{key:"863c6285045ad9dcbfeb286ee8ffa8aa1581f90e",class:"modal-loading"},i("svg",{key:"ba5d9e80236600f4b64a7fa735d49241eb1c3f29",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2400 2400"},i("g",{key:"290f7a2e79dc54f36603fa4a6b7d3922e4d1f432","stroke-width":"200","stroke-linecap":"round",stroke:"currentColor",fill:"none",id:"spinner"},i("line",{key:"92cafdfad5a2631046bdd5f1fb6431b623808961",x1:"1200",y1:"600",x2:"1200",y2:"100"}),i("line",{key:"8b6e7260dcc41f969c7bac0fec073928e8e146a7",opacity:"0.5",x1:"1200",y1:"2300",x2:"1200",y2:"1800"}),i("line",{key:"a5eb02131aa60cd6126a2be5f874e8f3bf3b6d5f",opacity:"0.917",x1:"900",y1:"680.4",x2:"650",y2:"247.4"}),i("line",{key:"1052903918a67fc53c0df06af43ad564fc9180f7",opacity:"0.417",x1:"1750",y1:"2152.6",x2:"1500",y2:"1719.6"}),i("line",{key:"ac37ac0104a2738375b8f71481b826ae63730dce",opacity:"0.833",x1:"680.4",y1:"900",x2:"247.4",y2:"650"}),i("line",{key:"0623f6448f636a6f5f65cb68387ab81381a56acf",opacity:"0.333",x1:"2152.6",y1:"1750",x2:"1719.6",y2:"1500"}),i("line",{key:"f3dbc37979ad51676728ac79eccab6d7be4d9192",opacity:"0.75",x1:"600",y1:"1200",x2:"100",y2:"1200"}),i("line",{key:"c5d92ff42dbe24d6c2136b24cdf2d57835f11b76",opacity:"0.25",x1:"2300",y1:"1200",x2:"1800",y2:"1200"}),i("line",{key:"3339f4fefcc7222050da34aa7b8b60c9ac511aea",opacity:"0.667",x1:"680.4",y1:"1500",x2:"247.4",y2:"1750"}),i("line",{key:"7ddc8d68d7f7deb0fe377b508180bc0b1123bf7f",opacity:"0.167",x1:"2152.6",y1:"650",x2:"1719.6",y2:"900"}),i("line",{key:"8825e19d81b7ade6d1ee327ac7b8bc24607a7c47",opacity:"0.583",x1:"900",y1:"1719.6",x2:"650",y2:"2152.6"}),i("line",{key:"9562d8c1dcc59a4884cff618edc35e951b19794c",opacity:"0.083",x1:"1750",y1:"247.4",x2:"1500",y2:"680.4"}),i("animateTransform",{key:"648f2a04edef2c2908782aa2296e4dba2b27d7b1",attributeName:"transform",attributeType:"XML",type:"rotate",keyTimes:"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667",values:"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199",dur:"0.83333s",begin:"0s",repeatCount:"indefinite",calcMode:"discrete"})))),i("div",{key:"a86fb232eb5df0737c870e0e788c0c1e230b434e",class:"modal-content"},i("slot",{key:"b5ee41fc9dd113c3e2716f01350641fc2adebd7b"})))))}get el(){return o(this)}};p.style=':root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}:host{box-sizing:border-box}:host *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:"Roboto", sans-serif;box-sizing:border-box}:host button{cursor:pointer}:host{display:block}.modal-row{opacity:0;pointer-events:none;will-change:transform}.modal-row.open{opacity:1;pointer-events:auto;position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:1ch;background:rgba(0, 0, 0, 0.3)}.modal-row .modal-child{transform:translateY(100%);transition:transform 420ms ease;position:relative}.modal-row .modal-child .modal-loading{display:none;position:absolute;top:160px;left:50%;transform:translateX(-50%);width:24px;height:24px}.modal-row .modal-child.loading .modal-loading{display:flex;justify-content:center;align-items:center}.modal-row .modal-child.loading .modal-loading svg{width:24px;height:24px}.modal-row .modal-child.loading .modal-content{visibility:hidden}.modal-row.open .modal-child{transform:translateY(0%)}.modal-child{padding:16px 8px 24px;background-color:#fff;width:100%}.modal-close-button-wrap{padding-left:8px}.modal-close-button-wrap .modal-close-button{width:32px;display:block;fill:var(--color-label);cursor:pointer}';export{c as stripe_card_element,p as stripe_modal}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,a as e,h as s,d as i,g as a}from"./p-C6bbmyga.js";import{l as n}from"./p-CBXaOfXU.js";const o=class{async isAvailable(t){if(void 0===this.publishableKey)throw new Error("You should set publishableKey before calling this method.");const e=(await n(this.publishableKey,{stripeAccount:this.stripeAccount})).paymentRequest({country:"US",currency:"usd",total:{label:"Demo total",amount:1099},disableWallets:["applePay","googlePay","browserCard"].filter((e=>e!==t))}),s=await e.canMakePayment();if(!s||"applePay"===t&&!s[t]||"googlePay"===t&&!s[t])throw new Error(`This device cannot use ${t}.`)}async setPaymentMethodEventHandler(t){this.paymentMethodEventHandler=t}async setPaymentRequestShippingOptionEventHandler(t){this.shippingOptionEventHandler=t}async setPaymentRequestShippingAddressEventHandler(t){this.shippingAddressEventHandler=t}stripeLoadedEventHandler(){const t={stripe:this.stripe};this.stripeDidLoaded&&this.stripeDidLoaded(t),this.stripeLoaded.emit(t)}constructor(s){t(this,s),this.stripeLoaded=e(this,"stripeLoaded",7),this.loadStripeStatus="",this.applicationName="stripe-pwa-elements",void 0!==this.publishableKey&&void 0!==this.paymentRequestOption?this.initStripe(this.publishableKey,{stripeAccount:this.stripeAccount}):this.loadStripeStatus="failure"}connectedCallback(){console.warn("[stripe-pwa-elements] <stripe-payment-request-button> is deprecated. stripe.paymentRequest() is being removed in Stripe.js 9.x (deprecated 2025-09-30 / removed 2026-03-25). Please migrate to <stripe-express-checkout-element>, which supports Apple Pay, Google Pay, Link, PayPal, and more. Migration guide: https://hideokamoto.github.io/stripe-pwa-elements/guides/migrate-payment-request-button-to-express-checkout/")}async setPaymentRequestOption(t){return this.paymentRequestOption=t,this}async initStripe(t,e){this.loadStripeStatus="loading",n(t,{stripeAccount:null==e?void 0:e.stripeAccount}).then((t=>{this.loadStripeStatus="success",t.registerAppInfo({name:this.applicationName}),this.stripe=t})).catch((t=>{console.log(t),this.loadStripeStatus="failure"})).then((()=>{if(this.stripe)return this.initElement(0==!(null==e?void 0:e.showButton))})).then((()=>{this.stripe&&this.stripeLoadedEventHandler()}))}async initElement(t=!0){const e=this.stripe.paymentRequest(this.paymentRequestOption);if(!await e.canMakePayment())throw new Error("Payment Request is not supported.");if(this.paymentMethodEventHandler&&e.on("paymentmethod",(t=>{this.paymentMethodEventHandler(t,this.stripe)})),this.shippingOptionEventHandler&&e.on("shippingoptionchange",(t=>{this.shippingOptionEventHandler(t,this.stripe)})),this.shippingAddressEventHandler&&e.on("shippingaddresschange",(t=>{this.shippingAddressEventHandler(t,this.stripe)})),t){this.paymentRequestElement&&this.paymentRequestElement.unmount();const t=this.stripe.elements().create("paymentRequestButton",{paymentRequest:e});this.paymentRequestElement=t;const s=this.el.querySelector("#payment-request-button");t.mount(s),this.el.querySelector("#payment-request").classList.add("visible")}else e.show()}disconnectedCallback(){this.paymentRequestElement&&(this.paymentRequestElement.unmount(),this.paymentRequestElement=void 0),this.stripe=void 0}render(){return s(i,{key:"6340656e6d6f7ac25db9c42e8cd82be9e342640d"},s("div",{key:"2c83b290ee0fc7663b15d6e5ee7a76380f54875b",id:"payment-request"},s("div",{key:"bff7ac4d9f5cba737fa7addbc594c275164ff04a",id:"payment-request-button"})),s("slot",{key:"de55b77ffa140ba83a6de8592f95bc75f4ffabf5"}))}get el(){return a(this)}};o.style=":host{display:block}";export{o as stripe_payment_request_button}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,a as s,h as e,g as i}from"./p-C6bbmyga.js";import{s as r,c as o,i as a}from"./p--sA2m1ad.js";import{S as n}from"./p-XRfh5Wrs.js";import"./p-CBXaOfXU.js";const c=class{updatePublishableKey(t){const s={};s.stripeAccount=this.stripeService.state.stripeAccount;const e=Object.values(s).filter(Boolean).length>0;this.initStripe(t,e?s:void 0)}updateStripeAccountId(t){this.initStripe(this.stripeService.state.publishableKey,{stripeAccount:t})}async updateProgress(t){return this.progress=t,this}async setErrorMessage(t){return this.expressCheckoutManager.setError(t),this}async initStripe(t,s){if(await this.stripeService.initialize(t,{stripeAccount:null==s?void 0:s.stripeAccount,applicationName:this.applicationName}),"success"===this.stripeService.state.loadStripeStatus)await this.initElement(),this.stripeLoadedEventHandler();else{const t=this.stripeService.onChange("loadStripeStatus",(async s=>{"success"===s&&(await this.initElement(),this.stripeLoadedEventHandler(),t())}))}}async updateElementOptions(t){return this.expressCheckoutManager.update(t),this}stripeLoadedEventHandler(){const t={stripe:this.stripeService.getStripe()};null!=this.stripeDidLoaded&&this.stripeDidLoaded(t),this.stripeLoaded.emit(t)}async defaultConfirmResultHandler(t){this.defaultConfirmResult.emit(t)}constructor(e){t(this,e),this.stripeLoaded=s(this,"stripeLoaded",7),this.confirm=s(this,"confirm",7),this.expressCheckoutClick=s(this,"expressCheckoutClick",7),this.cancel=s(this,"cancel",7),this.defaultConfirmResult=s(this,"defaultConfirmResult",7),this.intentType="payment",this.applicationName="stripe-pwa-elements",this.shouldUseDefaultConfirmAction=!0,this.progress="",this.stripeService=r.createStripeService(),this.expressCheckoutManager=r.createExpressCheckoutElementManager(this.stripeService),null!=this.publishableKey&&""!==this.publishableKey&&this.initStripe(this.publishableKey,{stripeAccount:this.stripeAccount})}componentWillUpdate(){null!=this.stripeService.state.publishableKey&&""!==this.stripeService.state.publishableKey&&(["success","loading"].includes(this.stripeService.state.loadStripeStatus)||this.initStripe(this.stripeService.state.publishableKey,{stripeAccount:this.stripeService.state.stripeAccount}))}async defaultConfirmAction(t){try{this.progress="loading";const s=this.stripeService.getStripe(),{intentType:e,clientSecret:i}=this;if(null==s)throw new Error("Stripe not initialized");if(null==i||""===i)throw new Error("Client secret is required");const r=await(()=>"payment"===e?s.confirmPayment({elements:this.stripeService.getElements(),clientSecret:i,confirmParams:{return_url:`${window.location.origin}${window.location.pathname}`},redirect:"if_required"}):s.confirmSetup({elements:this.stripeService.getElements(),clientSecret:i,confirmParams:{return_url:`${window.location.origin}${window.location.pathname}`},redirect:"if_required"}))();if(null!=r.error)throw new n(r.error);t.complete("success"),this.progress="success",this.defaultConfirmResultHandler(r)}catch(s){console.error(s),t.complete("fail"),this.expressCheckoutManager.setError(s.message),this.progress="failure",this.defaultConfirmResultHandler(s)}}async initElement(){const t={mode:"payment"===this.intentType?"payment":"setup"};if(void 0!==this.amount&&(t.amount=this.amount),null!=this.currency&&""!==this.currency&&(t.currency=this.currency),null!=this.buttonHeight&&""!==this.buttonHeight)if("string"==typeof this.buttonHeight){const s=parseInt(this.buttonHeight.replace("px",""),10);isNaN(s)||(t.buttonHeight=s)}else t.buttonHeight=this.buttonHeight;await this.expressCheckoutManager.initialize(this.el,t,{onConfirm:async t=>{this.confirm.emit(t),this.shouldUseDefaultConfirmAction&&null!=this.clientSecret&&""!==this.clientSecret&&await this.defaultConfirmAction(t)},onClick:t=>{this.expressCheckoutClick.emit(t)},onCancel:()=>{this.cancel.emit(),this.progress=""}})}componentDidLoad(){this.el.classList.add(o())}disconnectedCallback(){this.expressCheckoutManager.unmount()}render(){const{loadStripeStatus:t}=this.stripeService.state,{errorMessage:s,isReady:i}=this.expressCheckoutManager.getState();return"failure"===t?e("p",null,a.t("Failed to load Stripe")):"loading"===t?e("p",null,a.t("Loading")):e("div",{class:"stripe-express-checkout-wrap"},e("div",{id:"express-checkout-element"}),s&&e("div",{id:"express-checkout-errors",class:"stripe-element-errors"},s),!i&&"success"===t&&e("div",{class:"stripe-express-checkout-loading"},a.t("Loading")))}get el(){return i(this)}static get watchers(){return{publishableKey:[{updatePublishableKey:0}],stripeAccount:[{updateStripeAccountId:0}]}}};c.style=":root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}.stripe-express-checkout-wrap{width:100%;max-width:500px;margin:0 auto;padding:1rem 0}.stripe-express-checkout-wrap #express-checkout-element{margin-bottom:1rem}.stripe-express-checkout-wrap .stripe-element-errors{color:var(--stripe-error-color, #fa755a);font-size:14px;margin-top:0.5rem;padding:0.5rem;background-color:var(--stripe-error-bg, #fff5f5);border:1px solid var(--stripe-error-border, #fdd);border-radius:6px}.stripe-express-checkout-wrap .stripe-express-checkout-loading{text-align:center;padding:1rem;color:var(--stripe-loading-color, #6772e5);font-size:14px}";export{c as stripe_express_checkout_element}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,a as s,h as e,g as i}from"./p-C6bbmyga.js";import{s as r,c as o,i as a}from"./p--sA2m1ad.js";import"./p-CBXaOfXU.js";const n=class{async initStripe(t,s){if(await this.stripeService.initialize(t,{stripeAccount:null==s?void 0:s.stripeAccount,applicationName:this.applicationName}),"success"===this.stripeService.state.loadStripeStatus)await this.initElement(),this.stripeLoadedEventHandler();else{const t=this.stripeService.onChange("loadStripeStatus",(async s=>{"success"===s&&(await this.initElement(),this.stripeLoadedEventHandler(),t())}))}}async updateProgress(t){return this.progress=t,this}async setErrorMessage(t){return this.addressElementManager.setError(t),this}async getValue(){const t=this.addressElementManager.getElement();if(null==t)throw new Error("Address element not initialized");return await t.getValue({format:"localized"})}updatePublishableKey(t){const s={};null!=this.stripeAccount&&""!==this.stripeAccount&&(s.stripeAccount=this.stripeAccount),this.initStripe(t,Object.keys(s).length>0?s:void 0)}updateStripeAccountId(t){const s=this.stripeService.state.publishableKey||this.publishableKey;null!=s&&""!==s&&this.initStripe(s,{stripeAccount:t})}stripeLoadedEventHandler(){const t={stripe:this.stripeService.getStripe()};null!=this.stripeDidLoaded&&this.stripeDidLoaded(t),this.stripeLoaded.emit(t)}async formSubmitEventHandler(){const t=await this.getValue();this.formSubmit.emit({address:t})}componentWillRender(){null!=this.stripeService.state.publishableKey&&""!==this.stripeService.state.publishableKey&&(["success","loading"].includes(this.stripeService.state.loadStripeStatus)||this.initStripe(this.stripeService.state.publishableKey,{stripeAccount:this.stripeService.state.stripeAccount}))}constructor(e){t(this,e),this.stripeLoaded=s(this,"stripeLoaded",7),this.formSubmit=s(this,"formSubmit",7),this.mode="billing",this.sheetTitle="Billing address",this.buttonLabel="Save",this.progress="",this.applicationName="stripe-pwa-elements",this.showLabel=!1,this.stripeService=r.createStripeService(),this.addressElementManager=r.createAddressElementManager(this.stripeService),null!=this.publishableKey&&""!==this.publishableKey&&this.initStripe(this.publishableKey,{stripeAccount:this.stripeAccount})}async initElement(){const t={mode:this.mode};null!=this.defaultCountry&&""!==this.defaultCountry&&(t.defaultValues={address:{country:this.defaultCountry}}),this.allowedCountries&&this.allowedCountries.length>0&&(t.allowedCountries=this.allowedCountries),await this.addressElementManager.initialize(this.el,t);const s=this.el.querySelector("#stripe-address-element-form");null!=s?(null!=this.formSubmitListener&&s.removeEventListener("submit",this.formSubmitListener),this.formSubmitListener=async t=>{if(t.preventDefault(),null!=this.addressElementManager.getElement()){this.progress="loading";try{const s=await this.getValue();null!=this.handleSubmit&&await this.handleSubmit(t,{address:s}),await this.formSubmitEventHandler(),null!=this.handleSubmit&&(this.progress="success")}catch(t){const s=t instanceof Error?t.message:String(t);this.addressElementManager.setError(s),this.progress="failure"}}else console.error("Address element not initialized")},s.addEventListener("submit",this.formSubmitListener)):console.error("Form element #stripe-address-element-form not found")}componentDidLoad(){this.el.classList.add(o())}disconnectedCallback(){if(null!=this.formSubmitListener){const t=this.el.querySelector("#stripe-address-element-form");null!=t&&t.removeEventListener("submit",this.formSubmitListener),this.formSubmitListener=void 0}this.addressElementManager.unmount()}render(){const{loadStripeStatus:t}=this.stripeService.state,{errorMessage:s}=this.addressElementManager.getState();if("failure"===t)return e("p",null,a.t("Failed to load Stripe"));const i="loading"===this.progress;return e("div",{class:"stripe-payment-sheet-wrap"},e("form",{id:"stripe-address-element-form"},e("div",{class:"stripe-heading"},a.t(this.sheetTitle)),e("div",{class:"payment-info address visible"},e("div",{id:"address-element"})),e("div",{id:"address-errors",class:"stripe-element-errors"},s),e("div",{class:"submit-button-wrapper"},e("button",{type:"submit",disabled:i},a.t("loading"===this.progress?"Loading":this.buttonLabel)))))}get el(){return i(this)}static get watchers(){return{publishableKey:[{updatePublishableKey:0}],stripeAccount:[{updateStripeAccountId:0}]}}};n.style=':root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}.stripe-payment-sheet-wrap{box-sizing:border-box}.stripe-payment-sheet-wrap *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:"Roboto", sans-serif;box-sizing:border-box}.stripe-payment-sheet-wrap button{cursor:pointer}.stripe-payment-sheet-wrap{display:block;width:100%;background:#fff;padding:32px 16px}.stripe-payment-sheet-wrap #address-element{margin-top:16px}.stripe-payment-sheet-wrap .stripe-heading{font-size:24px;font-weight:bold;color:var(--color-heading-text);margin-bottom:24px}.stripe-payment-sheet-wrap .stripe-section-title{font-size:14px;font-weight:bold;color:var(--color-label);margin-bottom:8px}.stripe-payment-sheet-wrap .payment-info.address{margin-bottom:16px}.stripe-payment-sheet-wrap .stripe-element-errors{margin-top:8px;font-size:14px;color:var(--color-text-error)}.stripe-payment-sheet-wrap .submit-button-wrapper{margin-top:32px}.stripe-payment-sheet-wrap button{display:block;color:var(--color-button-text);background-color:var(--color-primary);width:100%;text-align:center;padding:16px 16px;font-size:18px;border-radius:6px;min-height:42px}.stripe-payment-sheet-wrap button:disabled{color:var(--color-button-text-disabled)}';export{n as stripe_address_element}
|