ui.shipaid.com 0.3.36 → 0.3.38

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/widget.es.js CHANGED
@@ -82,17 +82,6 @@ function getIdFromShopifyGid(gid) {
82
82
  return ((_a = gid == null ? void 0 : gid.match(/\d+/)) == null ? void 0 : _a[0]) ?? null;
83
83
  }
84
84
  const common = { calculateProtectionTotal, findProtectionVariant };
85
- /**
86
- * @license
87
- * Copyright 2017 Google LLC
88
- * SPDX-License-Identifier: BSD-3-Clause
89
- */
90
- const e$7 = (e2) => (n2) => "function" == typeof n2 ? ((e3, n3) => (customElements.define(e3, n3), n3))(e2, n2) : ((e3, n3) => {
91
- const { kind: t2, elements: s3 } = n3;
92
- return { kind: t2, elements: s3, finisher(n4) {
93
- customElements.define(e3, n4);
94
- } };
95
- })(e2, n2);
96
85
  /**
97
86
  * @license
98
87
  * Copyright 2017 Google LLC
@@ -1505,7 +1494,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
1505
1494
  __defProp$1(target, key, result);
1506
1495
  return result;
1507
1496
  };
1508
- let LearnMorePopup = class extends s$1 {
1497
+ class LearnMorePopup extends s$1 {
1509
1498
  constructor() {
1510
1499
  super(...arguments);
1511
1500
  this.active = false;
@@ -1577,14 +1566,14 @@ let LearnMorePopup = class extends s$1 {
1577
1566
  <div class="blocker" @click=${this.handleClosePopup}></div>
1578
1567
  `;
1579
1568
  }
1580
- };
1569
+ }
1581
1570
  LearnMorePopup.styles = styles$1;
1582
1571
  __decorateClass$1([
1583
1572
  n$7({ type: Boolean, attribute: true })
1584
1573
  ], LearnMorePopup.prototype, "active", 2);
1585
- LearnMorePopup = __decorateClass$1([
1586
- e$7("shipaid-popup-learn-more")
1587
- ], LearnMorePopup);
1574
+ if (!customElements.get("shipaid-popup-learn-more")) {
1575
+ customElements.define("shipaid-popup-learn-more", LearnMorePopup);
1576
+ }
1588
1577
  const loading = "Loading ShipAid Widget...";
1589
1578
  const title = "Delivery Guarantee";
1590
1579
  const description = "in case of Loss, Damage or Theft";
@@ -1855,7 +1844,7 @@ registerTranslateConfig({
1855
1844
  return fileImport ? await fileImport() : defaultLangFile;
1856
1845
  }
1857
1846
  });
1858
- let ShipAidWidget = class extends s$1 {
1847
+ class ShipAidWidget extends s$1 {
1859
1848
  constructor() {
1860
1849
  var _a, _b, _c;
1861
1850
  super(...arguments);
@@ -2416,10 +2405,6 @@ let ShipAidWidget = class extends s$1 {
2416
2405
  const hasSessionPayload = !!sessionStorage.getItem(LOCAL_STORAGE_KEY);
2417
2406
  if (hasSessionPayload)
2418
2407
  return;
2419
- sessionStorage.setItem(
2420
- LOCAL_STORAGE_KEY,
2421
- JSON.stringify({ loaded: true })
2422
- );
2423
2408
  if (
2424
2409
  // If we first check that no protection items are in the cart
2425
2410
  !this._hasProtectionInCart && // Then check we have some items in the cart
@@ -2427,6 +2412,10 @@ let ShipAidWidget = class extends s$1 {
2427
2412
  this._store.widgetShowCart
2428
2413
  ) {
2429
2414
  await this.addProtection();
2415
+ sessionStorage.setItem(
2416
+ LOCAL_STORAGE_KEY,
2417
+ JSON.stringify({ loaded: true })
2418
+ );
2430
2419
  }
2431
2420
  }, 500);
2432
2421
  if (this.disablePolling)
@@ -2471,7 +2460,7 @@ let ShipAidWidget = class extends s$1 {
2471
2460
  if (!this._store)
2472
2461
  return;
2473
2462
  const protectionFee = await this.calculateProtectionTotal(this._cart);
2474
- if (this._cart.item_count > 0 && !!protectionCartItem && (this._cart.total_price === protectionCartItem.final_line_price || !protectionFee)) {
2463
+ if (this._cart.item_count > 0 && !!protectionCartItem && (this._cart.total_price === (protectionCartItem == null ? void 0 : protectionCartItem.final_line_price) || !protectionFee)) {
2475
2464
  const removePayload = {
2476
2465
  id: protectionCartItem.key,
2477
2466
  quantity: 0
@@ -2838,7 +2827,7 @@ let ShipAidWidget = class extends s$1 {
2838
2827
  </div>
2839
2828
  `;
2840
2829
  }
2841
- };
2830
+ }
2842
2831
  ShipAidWidget.styles = styles;
2843
2832
  __decorateClass([
2844
2833
  n$7({ type: Boolean, attribute: true })
@@ -2915,9 +2904,9 @@ __decorateClass([
2915
2904
  __decorateClass([
2916
2905
  t$3()
2917
2906
  ], ShipAidWidget.prototype, "_popup", 2);
2918
- ShipAidWidget = __decorateClass([
2919
- e$7("shipaid-widget")
2920
- ], ShipAidWidget);
2907
+ if (!customElements.get("shipaid-widget")) {
2908
+ customElements.define("shipaid-widget", ShipAidWidget);
2909
+ }
2921
2910
  export {
2922
2911
  ShipAidWidget
2923
2912
  };
@@ -1,73 +1,68 @@
1
- var ShipAidWidget=function(t){"use strict";function e(t){var e;return(null==(e=null==t?void 0:t.match(/\d+/))?void 0:e[0])??null}const i={calculateProtectionTotal:function(t,e,i){var o,r;if(!t)throw new Error("Missing store settings.");if(!e)throw new Error("Missing protectionProduct.");if(!i)throw new Error("Missing Shopify cart.");const s=null==t?void 0:t.protectionSettings;if(!s)throw new Error("Tried to find protection variant, but protection settings for this store are missing.");const n=Array.isArray(null==t?void 0:t.excludedProductSkus)?t.excludedProductSkus.map((t=>t.trim())):[],a=Array.isArray(null==t?void 0:t.excludedProductsVariantsId)?t.excludedProductsVariantsId.map((t=>{var e;return parseInt((null==(e=t.match(/\d+/))?void 0:e[0])??"",10)})):[],d=(i.items??[]).reduce(((t,e)=>(t=>!(!t.sku||!n.includes(t.sku.trim()))||!(!t.variant_id||!a.includes(t.variant_id)))(e)?t-e.final_line_price:t),i.total_price||0)-((null==(o=i.items)?void 0:o.filter((t=>{var i;return null==(i=null==e?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})))??[]).reduce(((t,e)=>t+e.final_line_price),0);if(0===d)return d;if("FIXED"===s.protectionType){if("number"!=typeof s.defaultFee)throw new Error("Missing default fee amount.");if(!(null==(r=s.rules)?void 0:r.length))return s.defaultFee;const t=d/100,e=s.rules.sort(((t,e)=>t.rangeLower&&e.rangeLower?t.rangeLower-e.rangeLower:0)).find((e=>{const i=Boolean(e.rangeLower&&e.rangeLower<t);return e.rangeUpper?i&&e.rangeUpper>=t:i}));return"number"==typeof(null==e?void 0:e.fee)?e.fee:s.defaultFee}if("PERCENTAGE"===s.protectionType){const t=d*s.percentage/100;return t>=s.minimumFee?t:s.minimumFee}throw new Error("No protection type handler found for this store.")},findProtectionVariant:function(t,e,i){var o;if(!(null==t?void 0:t.protectionSettings)||!(null==(o=null==e?void 0:e.variants)?void 0:o.length))throw new Error("Missing product and variants from protection settings.");const r=null==e?void 0:e.variants.flatMap((t=>{if(!(null==t?void 0:t.price))return[];const e=Number(t.price);return[{...t,formattedPrice:e}]})).sort(((t,e)=>t.formattedPrice-e.formattedPrice)),s=r.find((t=>t.formattedPrice>=i));return s||r[r.length-1]}},o=t=>e=>{return"function"==typeof e?(i=t,o=e,customElements.define(i,o),o):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){customElements.define(t,e)}}})(t,e);
1
+ var ShipAidWidget=function(t){"use strict";function e(t){var e;return(null==(e=null==t?void 0:t.match(/\d+/))?void 0:e[0])??null}const i={calculateProtectionTotal:function(t,e,i){var o,r;if(!t)throw new Error("Missing store settings.");if(!e)throw new Error("Missing protectionProduct.");if(!i)throw new Error("Missing Shopify cart.");const s=null==t?void 0:t.protectionSettings;if(!s)throw new Error("Tried to find protection variant, but protection settings for this store are missing.");const n=Array.isArray(null==t?void 0:t.excludedProductSkus)?t.excludedProductSkus.map((t=>t.trim())):[],a=Array.isArray(null==t?void 0:t.excludedProductsVariantsId)?t.excludedProductsVariantsId.map((t=>{var e;return parseInt((null==(e=t.match(/\d+/))?void 0:e[0])??"",10)})):[],d=(i.items??[]).reduce(((t,e)=>(t=>!(!t.sku||!n.includes(t.sku.trim()))||!(!t.variant_id||!a.includes(t.variant_id)))(e)?t-e.final_line_price:t),i.total_price||0)-((null==(o=i.items)?void 0:o.filter((t=>{var i;return null==(i=null==e?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})))??[]).reduce(((t,e)=>t+e.final_line_price),0);if(0===d)return d;if("FIXED"===s.protectionType){if("number"!=typeof s.defaultFee)throw new Error("Missing default fee amount.");if(!(null==(r=s.rules)?void 0:r.length))return s.defaultFee;const t=d/100,e=s.rules.sort(((t,e)=>t.rangeLower&&e.rangeLower?t.rangeLower-e.rangeLower:0)).find((e=>{const i=Boolean(e.rangeLower&&e.rangeLower<t);return e.rangeUpper?i&&e.rangeUpper>=t:i}));return"number"==typeof(null==e?void 0:e.fee)?e.fee:s.defaultFee}if("PERCENTAGE"===s.protectionType){const t=d*s.percentage/100;return t>=s.minimumFee?t:s.minimumFee}throw new Error("No protection type handler found for this store.")},findProtectionVariant:function(t,e,i){var o;if(!(null==t?void 0:t.protectionSettings)||!(null==(o=null==e?void 0:e.variants)?void 0:o.length))throw new Error("Missing product and variants from protection settings.");const r=null==e?void 0:e.variants.flatMap((t=>{if(!(null==t?void 0:t.price))return[];const e=Number(t.price);return[{...t,formattedPrice:e}]})).sort(((t,e)=>t.formattedPrice-e.formattedPrice)),s=r.find((t=>t.formattedPrice>=i));return s||r[r.length-1]}},o=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},r=(t,e,i)=>{e.constructor.createProperty(i,t)};
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
- */var i,o},r=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},s=(t,e,i)=>{e.constructor.createProperty(i,t)};
6
+ */function s(t){return(e,i)=>void 0!==i?r(t,e,i):o(t,e)}
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */function n(t){return(e,i)=>void 0!==i?s(t,e,i):r(t,e)}
12
- /**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- */function a(t){return n({...t,state:!0})}
11
+ */function n(t){return s({...t,state:!0})}
17
12
  /**
18
13
  * @license
19
14
  * Copyright 2021 Google LLC
20
15
  * SPDX-License-Identifier: BSD-3-Clause
21
- */var d;null===(d=window.HTMLSlotElement)||void 0===d||d.prototype.assignedElements;
16
+ */var a;null===(a=window.HTMLSlotElement)||void 0===a||a.prototype.assignedElements;
22
17
  /**
23
18
  * @license
24
19
  * Copyright 2019 Google LLC
25
20
  * SPDX-License-Identifier: BSD-3-Clause
26
21
  */
27
- const p=window,l=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),h=new WeakMap;let u=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(l&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=h.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&h.set(e,t))}return t}toString(){return this.cssText}};const g=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new u(i,t,c)},f=l?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,c))(e)})(t):t
22
+ const d=window,l=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,p=Symbol(),c=new WeakMap;let h=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==p)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(l&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=c.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&c.set(e,t))}return t}toString(){return this.cssText}};const u=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new h(i,t,p)},m=l?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new h("string"==typeof t?t:t+"",void 0,p))(e)})(t):t
28
23
  /**
29
24
  * @license
30
25
  * Copyright 2017 Google LLC
31
26
  * SPDX-License-Identifier: BSD-3-Clause
32
- */;var m;const v=window,_=v.trustedTypes,b=_?_.emptyScript:"",y=v.reactiveElementPolyfillSupport,C={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},w=(t,e)=>e!==t&&(e==e||t==t),x={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:w},$="finalized";let S=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||x}static finalize(){if(this.hasOwnProperty($))return!1;this[$]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(f(t))}else void 0!==t&&e.push(f(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{l?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=p.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=x){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:C).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:C;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||w)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
27
+ */;var f;const g=window,v=g.trustedTypes,_=v?v.emptyScript:"",b=g.reactiveElementPolyfillSupport,y={toAttribute(t,e){switch(e){case Boolean:t=t?_:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},C=(t,e)=>e!==t&&(e==e||t==t),w={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:C},x="finalized";let $=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||w}static finalize(){if(this.hasOwnProperty(x))return!1;this[x]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(m(t))}else void 0!==t&&e.push(m(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{l?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=d.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=w){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:y).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:y;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||C)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
33
28
  /**
34
29
  * @license
35
30
  * Copyright 2017 Google LLC
36
31
  * SPDX-License-Identifier: BSD-3-Clause
37
32
  */
38
- var A;S[$]=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:S}),(null!==(m=v.reactiveElementVersions)&&void 0!==m?m:v.reactiveElementVersions=[]).push("1.6.3");const L=window,P=L.trustedTypes,k=P?P.createPolicy("lit-html",{createHTML:t=>t}):void 0,z="$lit$",E=`lit$${(Math.random()+"").slice(9)}$`,M="?"+E,q=`<${M}>`,I=document,T=()=>I.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,j="[ \t\n\f\r]",R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,U=/-->/g,V=/>/g,W=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,H=/"/g,B=/^(?:script|style|textarea|title)$/i,F=(J=1,(t,...e)=>({_$litType$:J,strings:t,values:e})),Z=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),K=new WeakMap,Y=I.createTreeWalker(I,129,null,!1);var J;function Q(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(e):e}class X{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[d,p]=((t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=R;for(let a=0;a<i;a++){const e=t[a];let i,d,p=-1,l=0;for(;l<e.length&&(n.lastIndex=l,d=n.exec(e),null!==d);)l=n.lastIndex,n===R?"!--"===d[1]?n=U:void 0!==d[1]?n=V:void 0!==d[2]?(B.test(d[2])&&(r=RegExp("</"+d[2],"g")),n=W):void 0!==d[3]&&(n=W):n===W?">"===d[0]?(n=null!=r?r:R,p=-1):void 0===d[1]?p=-2:(p=n.lastIndex-d[2].length,i=d[1],n=void 0===d[3]?W:'"'===d[3]?H:D):n===H||n===D?n=W:n===U||n===V?n=R:(n=W,r=void 0);const c=n===W&&t[a+1].startsWith("/>")?" ":"";s+=n===R?e+q:p>=0?(o.push(i),e.slice(0,p)+z+e.slice(p)+E+c):e+E+(-2===p?(o.push(void 0),a):c)}return[Q(t,s+(t[i]||"<?>")+(2===e?"</svg>":"")),o]})(t,e);if(this.el=X.createElement(d,i),Y.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Y.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(z)||e.startsWith(E)){const i=p[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+z).split(E),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?rt:"?"===e[1]?nt:"@"===e[1]?at:ot})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(B.test(o.tagName)){const t=o.textContent.split(E),e=t.length-1;if(e>0){o.textContent=P?P.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],T()),Y.nextNode(),a.push({type:2,index:++r});o.append(t[e],T())}}}else if(8===o.nodeType)if(o.data===M)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(E,t+1));)a.push({type:7,index:r}),t+=E.length-1}r++}}static createElement(t,e){const i=I.createElement("template");return i.innerHTML=t,i}}function tt(t,e,i=t,o){var r,s,n,a;if(e===Z)return e;let d=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const p=O(e)?void 0:e._$litDirective$;return(null==d?void 0:d.constructor)!==p&&(null===(s=null==d?void 0:d._$AO)||void 0===s||s.call(d,!1),void 0===p?d=void 0:(d=new p(t),d._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=d:i._$Cl=d),void 0!==d&&(e=tt(t,d._$AS(t,e.values),d,o)),e}class et{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:I).importNode(i,!0);Y.currentNode=r;let s=Y.nextNode(),n=0,a=0,d=o[0];for(;void 0!==d;){if(n===d.index){let e;2===d.type?e=new it(s,s.nextSibling,this,t):1===d.type?e=new d.ctor(s,d.name,d.strings,this,t):6===d.type&&(e=new dt(s,this,t)),this._$AV.push(e),d=o[++a]}n!==(null==d?void 0:d.index)&&(s=Y.nextNode(),n++)}return Y.currentNode=I,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class it{constructor(t,e,i,o){var r;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=tt(this,t,e),O(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==Z&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==G&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(I.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=X.createElement(Q(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new et(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new X(t)),e}T(t){N(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new it(this.k(T()),this.k(T()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ot{constructor(t,e,i,o,r){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=tt(this,t,e,0),s=!O(t)||t!==this._$AH&&t!==Z,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=tt(this,o[i+n],e,n),a===Z&&(a=this._$AH[n]),s||(s=!O(a)||a!==this._$AH[n]),a===G?t=G:t!==G&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const st=P?P.emptyScript:"";class nt extends ot{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}}class at extends ot{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=tt(this,t,e,0))&&void 0!==i?i:G)===Z)return;const o=this._$AH,r=t===G&&o!==G||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==G&&(o===G||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class dt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){tt(this,t)}}const pt=L.litHtmlPolyfillSupport;null==pt||pt(X,it),(null!==(A=L.litHtmlVersions)&&void 0!==A?A:L.litHtmlVersions=[]).push("2.8.0");const lt=(t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new it(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n};
33
+ var S;$[x]=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==b||b({ReactiveElement:$}),(null!==(f=g.reactiveElementVersions)&&void 0!==f?f:g.reactiveElementVersions=[]).push("1.6.3");const A=window,L=A.trustedTypes,P=L?L.createPolicy("lit-html",{createHTML:t=>t}):void 0,k="$lit$",E=`lit$${(Math.random()+"").slice(9)}$`,z="?"+E,M=`<${z}>`,q=document,I=()=>q.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,N="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,U=/>/g,V=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,H=/"/g,B=/^(?:script|style|textarea|title)$/i,F=(Y=1,(t,...e)=>({_$litType$:Y,strings:t,values:e})),Z=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),G=new WeakMap,K=q.createTreeWalker(q,129,null,!1);var Y;function J(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(e):e}class Q{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[d,l]=((t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=j;for(let a=0;a<i;a++){const e=t[a];let i,d,l=-1,p=0;for(;p<e.length&&(n.lastIndex=p,d=n.exec(e),null!==d);)p=n.lastIndex,n===j?"!--"===d[1]?n=R:void 0!==d[1]?n=U:void 0!==d[2]?(B.test(d[2])&&(r=RegExp("</"+d[2],"g")),n=V):void 0!==d[3]&&(n=V):n===V?">"===d[0]?(n=null!=r?r:j,l=-1):void 0===d[1]?l=-2:(l=n.lastIndex-d[2].length,i=d[1],n=void 0===d[3]?V:'"'===d[3]?H:D):n===H||n===D?n=V:n===R||n===U?n=j:(n=V,r=void 0);const c=n===V&&t[a+1].startsWith("/>")?" ":"";s+=n===j?e+M:l>=0?(o.push(i),e.slice(0,l)+k+e.slice(l)+E+c):e+E+(-2===l?(o.push(void 0),a):c)}return[J(t,s+(t[i]||"<?>")+(2===e?"</svg>":"")),o]})(t,e);if(this.el=Q.createElement(d,i),K.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=K.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(k)||e.startsWith(E)){const i=l[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+k).split(E),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?ot:"?"===e[1]?st:"@"===e[1]?nt:it})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(B.test(o.tagName)){const t=o.textContent.split(E),e=t.length-1;if(e>0){o.textContent=L?L.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],I()),K.nextNode(),a.push({type:2,index:++r});o.append(t[e],I())}}}else if(8===o.nodeType)if(o.data===z)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(E,t+1));)a.push({type:7,index:r}),t+=E.length-1}r++}}static createElement(t,e){const i=q.createElement("template");return i.innerHTML=t,i}}function X(t,e,i=t,o){var r,s,n,a;if(e===Z)return e;let d=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const l=T(e)?void 0:e._$litDirective$;return(null==d?void 0:d.constructor)!==l&&(null===(s=null==d?void 0:d._$AO)||void 0===s||s.call(d,!1),void 0===l?d=void 0:(d=new l(t),d._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=d:i._$Cl=d),void 0!==d&&(e=X(t,d._$AS(t,e.values),d,o)),e}class tt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:q).importNode(i,!0);K.currentNode=r;let s=K.nextNode(),n=0,a=0,d=o[0];for(;void 0!==d;){if(n===d.index){let e;2===d.type?e=new et(s,s.nextSibling,this,t):1===d.type?e=new d.ctor(s,d.name,d.strings,this,t):6===d.type&&(e=new at(s,this,t)),this._$AV.push(e),d=o[++a]}n!==(null==d?void 0:d.index)&&(s=K.nextNode(),n++)}return K.currentNode=q,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,o){var r;this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),T(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==Z&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>O(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==W&&T(this._$AH)?this._$AA.nextSibling.data=t:this.$(q.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Q.createElement(J(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new tt(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new Q(t)),e}T(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new et(this.k(I()),this.k(I()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,o,r){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=X(this,t,e,0),s=!T(t)||t!==this._$AH&&t!==Z,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=X(this,o[i+n],e,n),a===Z&&(a=this._$AH[n]),s||(s=!T(a)||a!==this._$AH[n]),a===W?t=W:t!==W&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ot extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}const rt=L?L.emptyScript:"";class st extends it{constructor(){super(...arguments),this.type=4}j(t){t&&t!==W?this.element.setAttribute(this.name,rt):this.element.removeAttribute(this.name)}}class nt extends it{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=X(this,t,e,0))&&void 0!==i?i:W)===Z)return;const o=this._$AH,r=t===W&&o!==W||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==W&&(o===W||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const dt=A.litHtmlPolyfillSupport;null==dt||dt(Q,et),(null!==(S=A.litHtmlVersions)&&void 0!==S?S:A.litHtmlVersions=[]).push("2.8.0");const lt=(t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new et(e.insertBefore(I(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n};
39
34
  /**
40
35
  * @license
41
36
  * Copyright 2017 Google LLC
42
37
  * SPDX-License-Identifier: BSD-3-Clause
43
- */var ct,ht;let ut=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}};ut.finalized=!0,ut._$litElement$=!0,null===(ct=globalThis.litElementHydrateSupport)||void 0===ct||ct.call(globalThis,{LitElement:ut});const gt=globalThis.litElementPolyfillSupport;null==gt||gt({LitElement:ut}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.3.3");const ft="langChanged";function mt(t,e,i){return Object.entries(_t(e||{})).reduce(((t,[e,i])=>t.replace(new RegExp(`{{[  ]*${e}[  ]*}}`,"gm"),String(_t(i)))),t)}function vt(t,e){const i=t.split(".");let o=e.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function _t(t){return"function"==typeof t?t():t}let bt={loader:()=>Promise.resolve({}),empty:t=>`[${t}]`,lookup:vt,interpolate:mt,translationCache:{}};function yt(t,e,i=bt){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=t,strings:i.strings=e},window.dispatchEvent(new CustomEvent(ft,{detail:o}))}
38
+ */var pt,ct;let ht=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}};ht.finalized=!0,ht._$litElement$=!0,null===(pt=globalThis.litElementHydrateSupport)||void 0===pt||pt.call(globalThis,{LitElement:ht});const ut=globalThis.litElementPolyfillSupport;null==ut||ut({LitElement:ht}),(null!==(ct=globalThis.litElementVersions)&&void 0!==ct?ct:globalThis.litElementVersions=[]).push("3.3.3");const mt="langChanged";function ft(t,e,i){return Object.entries(vt(e||{})).reduce(((t,[e,i])=>t.replace(new RegExp(`{{[  ]*${e}[  ]*}}`,"gm"),String(vt(i)))),t)}function gt(t,e){const i=t.split(".");let o=e.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function vt(t){return"function"==typeof t?t():t}let _t={loader:()=>Promise.resolve({}),empty:t=>`[${t}]`,lookup:gt,interpolate:ft,translationCache:{}};function bt(t,e,i=_t){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=t,strings:i.strings=e},window.dispatchEvent(new CustomEvent(mt,{detail:o}))}
44
39
  /**
45
40
  * @license
46
41
  * Copyright 2017 Google LLC
47
42
  * SPDX-License-Identifier: BSD-3-Clause
48
43
  */
49
- const Ct=2;class wt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
44
+ const yt=2;class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
50
45
  /**
51
46
  * @license
52
47
  * Copyright 2020 Google LLC
53
48
  * SPDX-License-Identifier: BSD-3-Clause
54
- */const xt=(t,e)=>{var i,o;const r=t._$AN;if(void 0===r)return!1;for(const s of r)null===(o=(i=s)._$AO)||void 0===o||o.call(i,e,!1),xt(s,e);return!0},$t=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},St=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Pt(e)}};
49
+ */const wt=(t,e)=>{var i,o;const r=t._$AN;if(void 0===r)return!1;for(const s of r)null===(o=(i=s)._$AO)||void 0===o||o.call(i,e,!1),wt(s,e);return!0},xt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},$t=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Lt(e)}};
55
50
  /**
56
51
  * @license
57
52
  * Copyright 2017 Google LLC
58
53
  * SPDX-License-Identifier: BSD-3-Clause
59
- */function At(t){void 0!==this._$AN?($t(this),this._$AM=t,St(this)):this._$AM=t}function Lt(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)xt(o[s],!1),$t(o[s]);else null!=o&&(xt(o,!1),$t(o));else xt(this,t)}const Pt=t=>{var e,i,o,r;t.type==Ct&&(null!==(e=(o=t)._$AP)&&void 0!==e||(o._$AP=Lt),null!==(i=(r=t)._$AQ)&&void 0!==i||(r._$AQ=At))};class kt extends wt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),St(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),e&&(xt(this,t),$t(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class zt extends kt{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(t){return this.getValue=t,this.subscribe(),this.getValue()}langChanged(t){this.setValue(this.getValue(t))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(t,e){const i=e=>t(e.detail);return window.addEventListener(ft,i,e),()=>window.removeEventListener(ft,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const Et=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends zt{render(t,e,i){return this.renderValue((()=>function(t,e,i=bt){let o=i.translationCache[t]||(i.translationCache[t]=i.lookup(t,i)||i.empty(t,i));return null!=(e=null!=e?_t(e):null)?i.interpolate(o,e,i):o}(t,e,i)))}});
54
+ */function St(t){void 0!==this._$AN?(xt(this),this._$AM=t,$t(this)):this._$AM=t}function At(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)wt(o[s],!1),xt(o[s]);else null!=o&&(wt(o,!1),xt(o));else wt(this,t)}const Lt=t=>{var e,i,o,r;t.type==yt&&(null!==(e=(o=t)._$AP)&&void 0!==e||(o._$AP=At),null!==(i=(r=t)._$AQ)&&void 0!==i||(r._$AQ=St))};class Pt extends Ct{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),$t(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),e&&(wt(this,t),xt(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class kt extends Pt{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(t){return this.getValue=t,this.subscribe(),this.getValue()}langChanged(t){this.setValue(this.getValue(t))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(t,e){const i=e=>t(e.detail);return window.addEventListener(mt,i,e),()=>window.removeEventListener(mt,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const Et=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends kt{render(t,e,i){return this.renderValue((()=>function(t,e,i=_t){let o=i.translationCache[t]||(i.translationCache[t]=i.lookup(t,i)||i.empty(t,i));return null!=(e=null!=e?vt(e):null)?i.interpolate(o,e,i):o}(t,e,i)))}});
60
55
  /**
61
56
  * @license
62
57
  * Copyright 2017 Google LLC
63
58
  * SPDX-License-Identifier: BSD-3-Clause
64
- */class Mt extends wt{constructor(t){if(super(t),this.et=G,t.type!==Ct)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===G||null==t)return this.ft=void 0,this.et=t;if(t===Z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Mt.directiveName="unsafeHTML",Mt.resultType=1;const qt="__registered_effects";function It(t){const e=t;if(e[qt])return e;const i=function(t){if(!t.dispatchEvent||!t.requestUpdate)throw new Error("Element missing required functions (dispatchEvent/requestUpdate)");return t}(t),o=i.updated;return e[qt]={index:0,count:0,effects:[]},i.updated=t=>(e[qt].index=0,o(t)),e}function Tt(t,e,i){const o=function(t,e){const i=It(t),{index:o,count:r}=i[qt];return o===r?(i[qt].index++,i[qt].count++,i[qt].effects.push(e),e):(i[qt].index++,i[qt].effects[o])}(t,{on:e,observe:["__initial__dirty"]});o.observe.some(((t,e)=>i[e]!==t))&&o.on(),o.observe=i}
59
+ */class zt extends Ct{constructor(t){if(super(t),this.et=W,t.type!==yt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===W||null==t)return this.ft=void 0,this.et=t;if(t===Z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}zt.directiveName="unsafeHTML",zt.resultType=1;const Mt="__registered_effects";function qt(t){const e=t;if(e[Mt])return e;const i=function(t){if(!t.dispatchEvent||!t.requestUpdate)throw new Error("Element missing required functions (dispatchEvent/requestUpdate)");return t}(t),o=i.updated;return e[Mt]={index:0,count:0,effects:[]},i.updated=t=>(e[Mt].index=0,o(t)),e}function It(t,e,i){const o=function(t,e){const i=qt(t),{index:o,count:r}=i[Mt];return o===r?(i[Mt].index++,i[Mt].count++,i[Mt].effects.push(e),e):(i[Mt].index++,i[Mt].effects[o])}(t,{on:e,observe:["__initial__dirty"]});o.observe.some(((t,e)=>i[e]!==t))&&o.on(),o.observe=i}
65
60
  /**
66
61
  * @license
67
62
  * Copyright 2021 Google LLC
68
63
  * SPDX-License-Identifier: BSD-3-Clause
69
64
  */
70
- function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
65
+ function Tt(t,e,i){return t?e():null==i?void 0:i()}const Ot=u`
71
66
  :host {
72
67
  --shipaid-primary: #0056d6;
73
68
  --shipaid-secondary: #0076ff;
@@ -271,7 +266,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
271
266
  background: transparent;
272
267
  z-index: -1;
273
268
  }
274
- `,jt=F`
269
+ `,Nt=F`
275
270
  <svg
276
271
  version="1.0"
277
272
  width="50.000000pt"
@@ -292,7 +287,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
292
287
  />
293
288
  </g>
294
289
  </svg>
295
- `,Rt=F`
290
+ `,jt=F`
296
291
  <svg
297
292
  version="1.0"
298
293
  width="50.000000pt"
@@ -313,7 +308,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
313
308
  />
314
309
  </g>
315
310
  </svg>
316
- `,Ut=F`
311
+ `,Rt=F`
317
312
  <svg
318
313
  width="50.000000pt"
319
314
  height="50.000000pt"
@@ -397,7 +392,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
397
392
  />
398
393
  </g>
399
394
  </svg>
400
- `,Vt=F`
395
+ `,Ut=F`
401
396
  <svg
402
397
  width="300.000000pt"
403
398
  height="75.000000pt"
@@ -481,7 +476,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
481
476
  />
482
477
  </g>
483
478
  </svg>
484
- `,Wt=F`
479
+ `,Vt=F`
485
480
  <svg
486
481
  version="1.0"
487
482
  viewBox="0 0 500.000000 500.000000"
@@ -576,7 +571,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
576
571
  />
577
572
  </g>
578
573
  </svg>
579
- `;var Ft=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Gt=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Zt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ft(e,i,s),s};let Kt=class extends ut{constructor(){super(...arguments),this.active=!1}handleClosePopup(){const t=new Event("close");this.dispatchEvent(t)}render(){return F`
574
+ `;var Ft=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor;class Wt extends ht{constructor(){super(...arguments),this.active=!1}handleClosePopup(){const t=new Event("close");this.dispatchEvent(t)}render(){return F`
580
575
  <div class=${`shipaid-popup ${this.active&&"active"}`}>
581
576
  <button
582
577
  type="button"
@@ -585,10 +580,10 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
585
580
  >
586
581
  ${Et("learn-more-popup.close")}
587
582
  </button>
588
- <div class="popup-logo">${Vt}</div>
583
+ <div class="popup-logo">${Ut}</div>
589
584
  <p class="popup-title">${Et("learn-more-popup.title")}</p>
590
585
  <div class="popup-disclaimer-subtitle">
591
- <div class="popup-icon">${Wt}</div>
586
+ <div class="popup-icon">${Vt}</div>
592
587
  <p>${Et("learn-more-popup.disclaimer.subtitle-enable")}</p>
593
588
  </div>
594
589
  <div class="popup-disclaimer-subtitle">
@@ -636,7 +631,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
636
631
  </div>
637
632
  </div>
638
633
  <div class="blocker" @click=${this.handleClosePopup}></div>
639
- `}};Kt.styles=Nt,Gt([n({type:Boolean,attribute:!0})],Kt.prototype,"active",2),Kt=Gt([o("shipaid-popup-learn-more")],Kt);const Yt="Loading ShipAid Widget...",Jt="Delivery Guarantee",Qt="in case of Loss, Damage or Theft",Xt={button:"Powered by"},te={add:"Add",remove:"Remove",loading:"Loading..."},ee={loading:Yt,title:Jt,description:Qt,footer:Xt,actions:te,"learn-more-popup":{close:"Close",title:"Delivery Guarantee",disclaimer:{"subtitle-enable":"We enable your favorite brands to provide a delivery guarantee because we know that every order is precious, and things happen!","subtitle-monitor":"We continuously monitor your package and offer a convenient portal for you to track your order's progress at any moment!","subtitle-notify":"You'll be notified throughout the entire shipping process, ensuring you stay up to date every step of the way.","subtitle-resolution":"In case of any issues during transit, we offer a quick and easy method to report the problem directly to the brand, for a swift resolution.",text:"By purchasing this delivery guarantee, you agree to our Terms Of Service and Privacy Policy. You are not obligated to purchase this guarantee. This guarantee is NOT insurance and does not provide indemnification against loss, damage, or liability arising from a contingent or unknown event, but rather, through ShipAid brands provide a delivery guarantee whereby if the product you ordered is not delivered in satisfactory condition, the brand from which you ordered the product may replace the product free of charge. ShipAid does not provide any products or services directly to consumers, but instead provides a service that allow brands to facilitate product replacement to their customers. Purchasing this guarantee does not mean that you will automatically be reimbursed for any product or shipping costs because the resolution process and decision for compensation is strictly decided by the brand you a purchasing from. The brand will require proof of damage or undelivered product."},links:{terms:"Terms of Service",privacy:"Privacy Policy"}}},ie=Object.freeze(Object.defineProperty({__proto__:null,actions:te,default:ee,description:Qt,footer:Xt,loading:Yt,title:Jt},Symbol.toStringTag,{value:"Module"})),oe=g`
634
+ `}}Wt.styles=Ot,((t,e,i,o)=>{for(var r,s=o>1?void 0:o?Zt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);o&&s&&Ft(e,i,s)})([s({type:Boolean,attribute:!0})],Wt.prototype,"active",2),customElements.get("shipaid-popup-learn-more")||customElements.define("shipaid-popup-learn-more",Wt);const Gt="Loading ShipAid Widget...",Kt="Delivery Guarantee",Yt="in case of Loss, Damage or Theft",Jt={button:"Powered by"},Qt={add:"Add",remove:"Remove",loading:"Loading..."},Xt={loading:Gt,title:Kt,description:Yt,footer:Jt,actions:Qt,"learn-more-popup":{close:"Close",title:"Delivery Guarantee",disclaimer:{"subtitle-enable":"We enable your favorite brands to provide a delivery guarantee because we know that every order is precious, and things happen!","subtitle-monitor":"We continuously monitor your package and offer a convenient portal for you to track your order's progress at any moment!","subtitle-notify":"You'll be notified throughout the entire shipping process, ensuring you stay up to date every step of the way.","subtitle-resolution":"In case of any issues during transit, we offer a quick and easy method to report the problem directly to the brand, for a swift resolution.",text:"By purchasing this delivery guarantee, you agree to our Terms Of Service and Privacy Policy. You are not obligated to purchase this guarantee. This guarantee is NOT insurance and does not provide indemnification against loss, damage, or liability arising from a contingent or unknown event, but rather, through ShipAid brands provide a delivery guarantee whereby if the product you ordered is not delivered in satisfactory condition, the brand from which you ordered the product may replace the product free of charge. ShipAid does not provide any products or services directly to consumers, but instead provides a service that allow brands to facilitate product replacement to their customers. Purchasing this guarantee does not mean that you will automatically be reimbursed for any product or shipping costs because the resolution process and decision for compensation is strictly decided by the brand you a purchasing from. The brand will require proof of damage or undelivered product."},links:{terms:"Terms of Service",privacy:"Privacy Policy"}}},te=Object.freeze(Object.defineProperty({__proto__:null,actions:Qt,default:Xt,description:Yt,footer:Jt,loading:Gt,title:Kt},Symbol.toStringTag,{value:"Module"})),ee=u`
640
635
  :host {
641
636
  --shipaid-primary: #002bd6;
642
637
  --shipaid-secondary: #0076ff;
@@ -792,22 +787,22 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
792
787
  .shipaid-prompt .prompt-footer .prompt-footer-badge svg {
793
788
  height:var(--shipaid-footer-badge-logo-height, 9px);
794
789
  }
795
- `;var re=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(re||{}),se=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,ae=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ne(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&se(e,i,s),s};const de=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},pe=t=>console.warn(`[ShipAid] ${t}`),le=t=>console.error(`[ShipAid] ${t}`),ce="shipaid-protection",he="shipaid-protection-popup-show",ue=Object.assign({"./lang/de.json":()=>Promise.resolve().then((()=>Ce)).then((t=>t.default)),"./lang/en.json":()=>Promise.resolve().then((()=>ie)).then((t=>t.default)),"./lang/es.json":()=>Promise.resolve().then((()=>Pe)).then((t=>t.default)),"./lang/fr.json":()=>Promise.resolve().then((()=>Te)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>We)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>Ke)).then((t=>t.default))});var ge;ge={loader:async t=>{if("en"===t)return ee;const e=Reflect.get(ue,`./lang/${t}.json`);return e?await e():ee}},bt=Object.assign(Object.assign({},bt),ge),t.ShipAidWidget=class extends ut{constructor(){var t,e,i;super(...arguments),this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.refreshCart=!1,this.persistPopup=!1,this.defaultToggleButton=!1,this.lang="en",this.currency=void 0,this.customerId=void 0,this.supportSubscriptions=!1,this._apiEndpoint="/apps/shipaid",this._storeDomain=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._hasFinishedSetup=!1,this._shouldShowWidget=!1,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this.intervalId=0,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>de(t),post:(t,e)=>de(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}shouldPersistPopup(){return"true"===localStorage.getItem(`${he}`)?"learn-more":null}setPopupKey(){this.persistPopup&&localStorage.setItem(`${he}`,"true")}get shouldRefreshOnUpdate(){return!this.disablePolling&&!this.disableRefresh}get planActive(){var t,e;const{searchParams:i}=new URL(window.location.href);return(null==(t=window.Shopify)?void 0:t.designMode)||i.has("shipaid-test")?(pe("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o,r,s,n;const a=this.currency||(null==(i=null==(e=window.Shopify)?void 0:e.currency)?void 0:i.active)||(null==(o=this._store)?void 0:o.currency)||"USD";if(null==(n=null==(s=null==(r=this._store)?void 0:r.widgetConfigurations)?void 0:s.widget)?void 0:n.currencyFormat){return this._store.widgetConfigurations.widget.currencyFormat.replace("_value_",Number(t)).replace("_currency_",a)}return new Intl.NumberFormat(void 0,{currency:a,style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}_handleRefreshCart(){if(this.refreshCart)return window.location.reload()}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(re.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.calculateProtectionTotal(this._store,this._protectionProduct,t)}_findProtectionVariant(t){if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.findProtectionVariant(this._store,this._protectionProduct,t)}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}async _updateProtection(){return this._hasProtectionInCart?this.removeProtection():this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;const s=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!s)throw new Error("No shop found in Shopify object.");try{const t=new URL(window.location.href);t.pathname=this._apiEndpoint;const e={query:"query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetPollProtection\n widgetShowCart\n excludedProductSkus\n excludedCustomersIdsAutoOptIn\n protectionSettings\n widgetConfigurations\n }\n}",variables:{store:s}},i=await this._fetch.post(t.toString(),e);if(!i)throw new Error("Missing response for store query.");if(null==(o=i.errors)?void 0:o.length)throw new Error(i.errors[0].message);if(!(null==(r=i.data)?void 0:r.store))throw new Error("Missing store from store query response.");return i.data.store}catch(n){throw console.error(n),new Error(`Could not find a store for ${this._storeDomain}`)}}_findSellingPlanByName(t,e){for(const i of t){const t=i.node;for(const i of t.sellingPlans.edges){const t=i.node;if(e===t.name)return t}}return null}async _fetchSellingPlanFromVariant(t){var e,i,o,r,s,n,a,d,p,l,c,h,u;const g=(null==(e=window.Shopify)?void 0:e.shop)??(null==(o=null==(i=window.Shopify)?void 0:i.Checkout)?void 0:o.apiHost);if(!g)throw new Error("No shop found in Shopify object.");try{const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={query:"query SellingPlanFromVariant($store: String!, $variantId: String!){\n sellingPlanFromVariant(input: {store: $store, variantId: $variantId })\n}",variables:{store:g,variantId:`gid://shopify/ProductVariant/${null==(r=this._protectionVariant)?void 0:r.id}`}},o=await this._fetch.post(e.toString(),i);if(!o)throw new Error("Missing response for selling plan query.");if(null==(s=o.errors)?void 0:s.length)throw new Error(o.errors[0].message);if(!(null==(n=o.data)?void 0:n.sellingPlanFromVariant))throw new Error("Missing variant from selling plan query response.");const f=(null==(d=null==(a=o.data.sellingPlanFromVariant)?void 0:a.sellingPlanGroups)?void 0:d.edges)||[],m=(null==(u=null==(h=null==(c=null==(l=null==(p=f[0])?void 0:p.node)?void 0:l.sellingPlans)?void 0:c.edges)?void 0:h[0])?void 0:u.node)||null;return this._findSellingPlanByName(f,t.name)||m}catch(f){console.error("Error during the query ====>",f)}}async _fetchCart(){try{return await this._fetch.get("/cart.js")}catch(t){throw le(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){try{const{product:t}=await this._fetch.get("/products/shipaid-protection.json");return t}catch(t){throw le(t.message),new Error("Could not fetch protection product for current domain.")}}hasProtection(){return this._hasProtectionInCart}async updateCart(t){t||(t=await this._fetchCart()),this._cart=t}async addProtection(){var t,i;try{if(!this._store)throw new Error("Store has not been loaded.");if(!(null==(t=this._cart)?void 0:t.items))throw new Error("Cart has not been loaded.");if(!(null==(i=this._protectionVariant)?void 0:i.id))throw new Error("No protection variant found.");this._setState("loading");const o={quantity:1,id:this._protectionVariant.id};if(this.supportSubscriptions){const t=this._cart.items.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));if(t){const i=await this._fetchSellingPlanFromVariant(t.selling_plan_allocation.selling_plan),r=i?e(i.id):null;o.selling_plan=r}}const r=await this._fetch.post("/cart/add.js",o);await this._handleRefresh(r),this._setState("success")}catch(o){le(o.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async removeProtection(){try{if(!this._store)throw new Error("Store has not been loaded.");if(!this._protectionCartItem)throw new Error("Protection product not found.");this._setState("loading");const t={quantity:0,id:this._protectionCartItem.key},e=await this._fetch.post("/cart/change.js",t);await this._handleRefresh(e),this._cart=e,this._setState("success")}catch(t){le(t.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async attemptAddProtection(){var t,e,i,o,r,s;if(!(null==(t=this._store)?void 0:t.widgetAutoOptIn))return;if(!(null==(e=this._cart)?void 0:e.items)||!(null==(i=this._cart)?void 0:i.item_count))return;const n=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),a=null==(r=this._cart)?void 0:r.items[n];if(this._hasProtectionInCart=!!a,1===this._cart.item_count&&a)return;!!sessionStorage.getItem(ce)||(sessionStorage.setItem(ce,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(s=this._cart)?void 0:s.item_count)&&this._store.widgetShowCart&&await this.addProtection())}async handleMultipleProtectionVariants(){var t,e,i,o,r;if(!(null==(t=this._cart)?void 0:t.items)||!(null==(e=this._cart)?void 0:e.item_count))return;let s=0;if(null==(i=this._cart.items)||i.forEach((t=>{var e,i;(null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id)))&&s++})),s>1){const t=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),e={id:(null==(r=this._cart)?void 0:r.items[t]).key,quantity:0},i=await this._fetch.post("/cart/change.js",e);return await this._handleRefresh(i)}}learnMorePopupTemplate(){return this.persistPopup&&(this._popup=this.shouldPersistPopup()),F`
790
+ `;var ie=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(ie||{}),oe=Object.defineProperty,re=Object.getOwnPropertyDescriptor,se=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?re(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&oe(e,i,s),s};const ne=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},ae=t=>console.warn(`[ShipAid] ${t}`),de=t=>console.error(`[ShipAid] ${t}`),le="shipaid-protection",pe="shipaid-protection-popup-show",ce=Object.assign({"./lang/de.json":()=>Promise.resolve().then((()=>ye)).then((t=>t.default)),"./lang/en.json":()=>Promise.resolve().then((()=>te)).then((t=>t.default)),"./lang/es.json":()=>Promise.resolve().then((()=>Le)).then((t=>t.default)),"./lang/fr.json":()=>Promise.resolve().then((()=>Ie)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>Ve)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>Ge)).then((t=>t.default))});var he;he={loader:async t=>{if("en"===t)return Xt;const e=Reflect.get(ce,`./lang/${t}.json`);return e?await e():Xt}},_t=Object.assign(Object.assign({},_t),he);class ue extends ht{constructor(){var t,e,i;super(...arguments),this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.refreshCart=!1,this.persistPopup=!1,this.defaultToggleButton=!1,this.lang="en",this.currency=void 0,this.customerId=void 0,this.supportSubscriptions=!1,this._apiEndpoint="/apps/shipaid",this._storeDomain=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._hasFinishedSetup=!1,this._shouldShowWidget=!1,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this.intervalId=0,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>ne(t),post:(t,e)=>ne(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}shouldPersistPopup(){return"true"===localStorage.getItem(`${pe}`)?"learn-more":null}setPopupKey(){this.persistPopup&&localStorage.setItem(`${pe}`,"true")}get shouldRefreshOnUpdate(){return!this.disablePolling&&!this.disableRefresh}get planActive(){var t,e;const{searchParams:i}=new URL(window.location.href);return(null==(t=window.Shopify)?void 0:t.designMode)||i.has("shipaid-test")?(ae("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o,r,s,n;const a=this.currency||(null==(i=null==(e=window.Shopify)?void 0:e.currency)?void 0:i.active)||(null==(o=this._store)?void 0:o.currency)||"USD";if(null==(n=null==(s=null==(r=this._store)?void 0:r.widgetConfigurations)?void 0:s.widget)?void 0:n.currencyFormat){return this._store.widgetConfigurations.widget.currencyFormat.replace("_value_",Number(t)).replace("_currency_",a)}return new Intl.NumberFormat(void 0,{currency:a,style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}_handleRefreshCart(){if(this.refreshCart)return window.location.reload()}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(ie.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.calculateProtectionTotal(this._store,this._protectionProduct,t)}_findProtectionVariant(t){if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.findProtectionVariant(this._store,this._protectionProduct,t)}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}async _updateProtection(){return this._hasProtectionInCart?this.removeProtection():this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;const s=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!s)throw new Error("No shop found in Shopify object.");try{const t=new URL(window.location.href);t.pathname=this._apiEndpoint;const e={query:"query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetPollProtection\n widgetShowCart\n excludedProductSkus\n excludedCustomersIdsAutoOptIn\n protectionSettings\n widgetConfigurations\n }\n}",variables:{store:s}},i=await this._fetch.post(t.toString(),e);if(!i)throw new Error("Missing response for store query.");if(null==(o=i.errors)?void 0:o.length)throw new Error(i.errors[0].message);if(!(null==(r=i.data)?void 0:r.store))throw new Error("Missing store from store query response.");return i.data.store}catch(n){throw console.error(n),new Error(`Could not find a store for ${this._storeDomain}`)}}_findSellingPlanByName(t,e){for(const i of t){const t=i.node;for(const i of t.sellingPlans.edges){const t=i.node;if(e===t.name)return t}}return null}async _fetchSellingPlanFromVariant(t){var e,i,o,r,s,n,a,d,l,p,c,h,u;const m=(null==(e=window.Shopify)?void 0:e.shop)??(null==(o=null==(i=window.Shopify)?void 0:i.Checkout)?void 0:o.apiHost);if(!m)throw new Error("No shop found in Shopify object.");try{const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={query:"query SellingPlanFromVariant($store: String!, $variantId: String!){\n sellingPlanFromVariant(input: {store: $store, variantId: $variantId })\n}",variables:{store:m,variantId:`gid://shopify/ProductVariant/${null==(r=this._protectionVariant)?void 0:r.id}`}},o=await this._fetch.post(e.toString(),i);if(!o)throw new Error("Missing response for selling plan query.");if(null==(s=o.errors)?void 0:s.length)throw new Error(o.errors[0].message);if(!(null==(n=o.data)?void 0:n.sellingPlanFromVariant))throw new Error("Missing variant from selling plan query response.");const f=(null==(d=null==(a=o.data.sellingPlanFromVariant)?void 0:a.sellingPlanGroups)?void 0:d.edges)||[],g=(null==(u=null==(h=null==(c=null==(p=null==(l=f[0])?void 0:l.node)?void 0:p.sellingPlans)?void 0:c.edges)?void 0:h[0])?void 0:u.node)||null;return this._findSellingPlanByName(f,t.name)||g}catch(f){console.error("Error during the query ====>",f)}}async _fetchCart(){try{return await this._fetch.get("/cart.js")}catch(t){throw de(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){try{const{product:t}=await this._fetch.get("/products/shipaid-protection.json");return t}catch(t){throw de(t.message),new Error("Could not fetch protection product for current domain.")}}hasProtection(){return this._hasProtectionInCart}async updateCart(t){t||(t=await this._fetchCart()),this._cart=t}async addProtection(){var t,i;try{if(!this._store)throw new Error("Store has not been loaded.");if(!(null==(t=this._cart)?void 0:t.items))throw new Error("Cart has not been loaded.");if(!(null==(i=this._protectionVariant)?void 0:i.id))throw new Error("No protection variant found.");this._setState("loading");const o={quantity:1,id:this._protectionVariant.id};if(this.supportSubscriptions){const t=this._cart.items.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));if(t){const i=await this._fetchSellingPlanFromVariant(t.selling_plan_allocation.selling_plan),r=i?e(i.id):null;o.selling_plan=r}}const r=await this._fetch.post("/cart/add.js",o);await this._handleRefresh(r),this._setState("success")}catch(o){de(o.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async removeProtection(){try{if(!this._store)throw new Error("Store has not been loaded.");if(!this._protectionCartItem)throw new Error("Protection product not found.");this._setState("loading");const t={quantity:0,id:this._protectionCartItem.key},e=await this._fetch.post("/cart/change.js",t);await this._handleRefresh(e),this._cart=e,this._setState("success")}catch(t){de(t.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async attemptAddProtection(){var t,e,i,o,r,s;if(!(null==(t=this._store)?void 0:t.widgetAutoOptIn))return;if(!(null==(e=this._cart)?void 0:e.items)||!(null==(i=this._cart)?void 0:i.item_count))return;const n=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),a=null==(r=this._cart)?void 0:r.items[n];if(this._hasProtectionInCart=!!a,1===this._cart.item_count&&a)return;!!sessionStorage.getItem(le)||(sessionStorage.setItem(le,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(s=this._cart)?void 0:s.item_count)&&this._store.widgetShowCart&&await this.addProtection())}async handleMultipleProtectionVariants(){var t,e,i,o,r;if(!(null==(t=this._cart)?void 0:t.items)||!(null==(e=this._cart)?void 0:e.item_count))return;let s=0;if(null==(i=this._cart.items)||i.forEach((t=>{var e,i;(null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id)))&&s++})),s>1){const t=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),e={id:(null==(r=this._cart)?void 0:r.items[t]).key,quantity:0},i=await this._fetch.post("/cart/change.js",e);return await this._handleRefresh(i)}}learnMorePopupTemplate(){return this.persistPopup&&(this._popup=this.shouldPersistPopup()),F`
796
791
  <shipaid-popup-learn-more
797
792
  ?active=${"learn-more"===this._popup}
798
- @close=${()=>{this.persistPopup&&localStorage.removeItem(`${he}`),this._popup=null}}
793
+ @close=${()=>{this.persistPopup&&localStorage.removeItem(`${pe}`),this._popup=null}}
799
794
  ></shipaid-popup-learn-more>
800
795
  `}promptTemplate(){var t,e,i;const{useToggle:o,useCheckbox:r,leftCheckbox:s}=(null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)||{useToggle:!1,useCheckbox:!1,leftCheckbox:!1};return F`
801
796
  <div class="shipaid-prompt">
802
797
  <div class="prompt-product">
803
- ${Ot(!this.disableActions&&s,(()=>F`
798
+ ${Tt(!this.disableActions&&s,(()=>F`
804
799
  <label class="shipaid-checkbox">
805
800
  ${this._hasProtectionInCart||!this._hasFinishedSetup?F`<input type="checkbox" checked @click=${this._updateProtection} ?disabled=${this._state.loading}>`:F`<input type="checkbox" @click=${this._updateProtection} ?disabled=${this._state.loading}>`}
806
801
  <span class="shipaid-checkMark left"></span>
807
802
  </label>
808
803
  `))}
809
804
  <div class="prompt-product-image">
810
- ${Ot(this._hasProtectionInCart,(()=>Rt),(()=>jt))}
805
+ ${Tt(this._hasProtectionInCart,(()=>jt),(()=>Nt))}
811
806
  </div>
812
807
  <div class="prompt-product-details">
813
808
  <p class="prompt-product-details-title">
@@ -821,12 +816,12 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
821
816
  <p class="prompt-product-actions-price">
822
817
  ${(null==(i=this._protectionVariant)?void 0:i.price)&&this._currencyFormat(this._protectionVariant.price)}
823
818
  </p>
824
- ${o||r||this.defaultToggleButton?Ot(!this.disableActions&&!s,(()=>F`
819
+ ${o||r||this.defaultToggleButton?Tt(!this.disableActions&&!s,(()=>F`
825
820
  <label class="shipaid-${o?"toggle":r?"checkbox":""}">
826
821
  ${this._hasProtectionInCart||!this._hasFinishedSetup?F`<input type="checkbox" checked @click=${this._updateProtection} ?disabled=${this._state.loading}>`:F`<input type="checkbox" @click=${this._updateProtection} ?disabled=${this._state.loading}>`}
827
822
  <span class="shipaid-${o?"slider":r?"checkMark":""}"></span>
828
823
  </label>
829
- `)):Ot(!this.disableActions,(()=>F`
824
+ `)):Tt(!this.disableActions,(()=>F`
830
825
  <button
831
826
  class="prompt-product-actions-button"
832
827
  @click=${this._updateProtection}
@@ -837,14 +832,14 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
837
832
  `))}
838
833
  </div>
839
834
  </div>
840
- ${Ot(this._state.error,(()=>F`<p class="error">${this._state.error}</p>`))}
835
+ ${Tt(this._state.error,(()=>F`<p class="error">${this._state.error}</p>`))}
841
836
  <div class="prompt-footer">
842
837
  <a
843
838
  class="prompt-footer-badge"
844
839
  @click=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}
845
840
  >
846
841
  <span>${Et("footer.button")}</span>
847
- ${Ut}
842
+ ${Rt}
848
843
  <button
849
844
  class="prompt-footer-about"
850
845
  @click=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}
@@ -854,7 +849,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
854
849
  </a>
855
850
  </div>
856
851
  </div>
857
- `}async connectedCallback(){super.connectedCallback(),await async function(t,e=bt){const i=await e.loader(t,e);e.translationCache={},yt(t,i,e)}(this.lang),this.hasLoadedStrings=!0}render(){return Tt(this,(async()=>{var t,e,i,o,r,s;const n=document.createElement("link");n.setAttribute("href","https://fonts.googleapis.com/css2?family=Lato&display=swap"),n.setAttribute("rel","stylesheet"),document.head.appendChild(n);try{const[t,e,i]=await Promise.all([this._fetchShipAidData(),this._fetchCart(),this._fetchProduct()]);this._store=t,this._cart=e,this._protectionProduct=i}catch(a){return le(a.message),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)}return this.planActive?(null==(e=null==(t=this._store)?void 0:t.protectionSettings)?void 0:e.protectionType)?this._protectionProduct?(this._hasFinishedSetup=!0,this._dispatchEvent(re.LOADED,this._store),setTimeout((async()=>{var t,e,i,o;(null==(t=this._store)?void 0:t.widgetAutoOptIn)&&(null==(e=this._cart)?void 0:e.item_count)&&(this.customerId&&this._store.excludedCustomersIdsAutoOptIn&&(null==(i=this._store.excludedCustomersIdsAutoOptIn)?void 0:i.length)&&this._store.excludedCustomersIdsAutoOptIn.includes(`gid://shopify/Customer/${this.customerId}`)||sessionStorage.getItem(ce)||(sessionStorage.setItem(ce,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(o=this._cart)?void 0:o.item_count)&&this._store.widgetShowCart&&await this.addProtection()))}),500),void(this.disablePolling||(setInterval((async()=>{const t=this._cartLastUpdated;t&&(new Date).getTime()-t.getTime()<this.pollingInterval||await this.updateCart()}),this.pollingInterval),(null==(i=this._store)?void 0:i.widgetPollProtection)&&!this.intervalId&&(this.intervalId=setInterval((async()=>{await this.attemptAddProtection()}),400),localStorage.setItem(`polling-shipaid-protection_${this.intervalId}`,`${this.intervalId}`)),(null==(s=null==(r=null==(o=this._store)?void 0:o.widgetConfigurations)?void 0:r.widget)?void 0:s.pollVariantsCheck)&&setInterval((async()=>{await this.handleMultipleProtectionVariants()}),400)))):(pe("No protection settings product for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(pe("No protection settings for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(pe("No plan is active for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1))}),[]),Tt(this,(async()=>{var t,i,o,r;if(this._cartLastUpdated=new Date,!(null==(t=this._cart)?void 0:t.items))return;const s=null==(i=this._cart.items)?void 0:i.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),n=null==(o=this._cart)?void 0:o.items[s];if(this._hasProtectionInCart=!!n,!this._store)return;const a=await this.calculateProtectionTotal(this._cart);if(this._cart.item_count>0&&n&&(this._cart.total_price===n.final_line_price||!a)){const t={id:n.key,quantity:0},e=await this._fetch.post("/cart/change.js",t);return sessionStorage.removeItem(ce),await this._handleRefresh(e)}const d=this._findProtectionVariant(a);if(a?(this._protectionVariant=d,this._shouldShowWidget=!0):this._protectionVariant={id:0,price:"0"},!(null==d?void 0:d.id))return this._shouldShowWidget=!1,void le("No matching protection variant found.");if(!(null==(r=this._protectionVariant)?void 0:r.id))return void(this._shouldShowWidget=!1);if(!n)return;if(this.supportSubscriptions){const t=this._cart.items.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));let i=null;if(!t&&(null==n?void 0:n.selling_plan_allocation))i={id:n.key,quantity:1,selling_plan:null};else if(t&&!(null==n?void 0:n.selling_plan_allocation)){const o=await this._fetchSellingPlanFromVariant(t.selling_plan_allocation.selling_plan),r=o?e(o.id):null;i={id:n.key,quantity:1,selling_plan:r}}if(i){const t=await this._fetch.post("/cart/change.js",i);await this._handleRefresh(t)}}if(d.id===n.variant_id){if(this._protectionCartItem={...n,index:s,position:s+1},1===n.quantity)return;const t={id:n.key,quantity:1},e=await this._fetch.post("/cart/change.js",t);return this._handleRefreshCart(),await this._handleRefresh(e)}const p={updates:{[n.variant_id]:0,[d.id]:1}},l=await this._fetch.post("/cart/update.js",p);await this._handleRefresh(l)}),[this._store,this._cart]),lt(this.learnMorePopupTemplate(),document.body),F`
852
+ `}async connectedCallback(){super.connectedCallback(),await async function(t,e=_t){const i=await e.loader(t,e);e.translationCache={},bt(t,i,e)}(this.lang),this.hasLoadedStrings=!0}render(){return It(this,(async()=>{var t,e,i,o,r,s;const n=document.createElement("link");n.setAttribute("href","https://fonts.googleapis.com/css2?family=Lato&display=swap"),n.setAttribute("rel","stylesheet"),document.head.appendChild(n);try{const[t,e,i]=await Promise.all([this._fetchShipAidData(),this._fetchCart(),this._fetchProduct()]);this._store=t,this._cart=e,this._protectionProduct=i}catch(a){return de(a.message),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)}return this.planActive?(null==(e=null==(t=this._store)?void 0:t.protectionSettings)?void 0:e.protectionType)?this._protectionProduct?(this._hasFinishedSetup=!0,this._dispatchEvent(ie.LOADED,this._store),setTimeout((async()=>{var t,e,i,o;(null==(t=this._store)?void 0:t.widgetAutoOptIn)&&(null==(e=this._cart)?void 0:e.item_count)&&(this.customerId&&this._store.excludedCustomersIdsAutoOptIn&&(null==(i=this._store.excludedCustomersIdsAutoOptIn)?void 0:i.length)&&this._store.excludedCustomersIdsAutoOptIn.includes(`gid://shopify/Customer/${this.customerId}`)||sessionStorage.getItem(le)||!this._hasProtectionInCart&&(null==(o=this._cart)?void 0:o.item_count)&&this._store.widgetShowCart&&(await this.addProtection(),sessionStorage.setItem(le,JSON.stringify({loaded:!0}))))}),500),void(this.disablePolling||(setInterval((async()=>{const t=this._cartLastUpdated;t&&(new Date).getTime()-t.getTime()<this.pollingInterval||await this.updateCart()}),this.pollingInterval),(null==(i=this._store)?void 0:i.widgetPollProtection)&&!this.intervalId&&(this.intervalId=setInterval((async()=>{await this.attemptAddProtection()}),400),localStorage.setItem(`polling-shipaid-protection_${this.intervalId}`,`${this.intervalId}`)),(null==(s=null==(r=null==(o=this._store)?void 0:o.widgetConfigurations)?void 0:r.widget)?void 0:s.pollVariantsCheck)&&setInterval((async()=>{await this.handleMultipleProtectionVariants()}),400)))):(ae("No protection settings product for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(ae("No protection settings for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(ae("No plan is active for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1))}),[]),It(this,(async()=>{var t,i,o,r;if(this._cartLastUpdated=new Date,!(null==(t=this._cart)?void 0:t.items))return;const s=null==(i=this._cart.items)?void 0:i.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),n=null==(o=this._cart)?void 0:o.items[s];if(this._hasProtectionInCart=!!n,!this._store)return;const a=await this.calculateProtectionTotal(this._cart);if(this._cart.item_count>0&&n&&(this._cart.total_price===(null==n?void 0:n.final_line_price)||!a)){const t={id:n.key,quantity:0},e=await this._fetch.post("/cart/change.js",t);return sessionStorage.removeItem(le),await this._handleRefresh(e)}const d=this._findProtectionVariant(a);if(a?(this._protectionVariant=d,this._shouldShowWidget=!0):this._protectionVariant={id:0,price:"0"},!(null==d?void 0:d.id))return this._shouldShowWidget=!1,void de("No matching protection variant found.");if(!(null==(r=this._protectionVariant)?void 0:r.id))return void(this._shouldShowWidget=!1);if(!n)return;if(this.supportSubscriptions){const t=this._cart.items.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));let i=null;if(!t&&(null==n?void 0:n.selling_plan_allocation))i={id:n.key,quantity:1,selling_plan:null};else if(t&&!(null==n?void 0:n.selling_plan_allocation)){const o=await this._fetchSellingPlanFromVariant(t.selling_plan_allocation.selling_plan),r=o?e(o.id):null;i={id:n.key,quantity:1,selling_plan:r}}if(i){const t=await this._fetch.post("/cart/change.js",i);await this._handleRefresh(t)}}if(d.id===n.variant_id){if(this._protectionCartItem={...n,index:s,position:s+1},1===n.quantity)return;const t={id:n.key,quantity:1},e=await this._fetch.post("/cart/change.js",t);return this._handleRefreshCart(),await this._handleRefresh(e)}const l={updates:{[n.variant_id]:0,[d.id]:1}},p=await this._fetch.post("/cart/update.js",l);await this._handleRefresh(p)}),[this._store,this._cart]),lt(this.learnMorePopupTemplate(),document.body),F`
858
853
  <style>
859
854
  :host {
860
855
  --shipaid-primary: #002bd6;
@@ -1121,6 +1116,6 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
1121
1116
  }
1122
1117
  </style>
1123
1118
  <div class="shipaid">
1124
- ${Ot(this._hasFinishedSetup,(()=>{var t;return Ot(this._shouldShowWidget&&this.planActive&&(null==(t=this._store)?void 0:t.widgetShowCart),(()=>this.promptTemplate()),(()=>G))}),(()=>this.promptTemplate()))}
1119
+ ${Tt(this._hasFinishedSetup,(()=>{var t;return Tt(this._shouldShowWidget&&this.planActive&&(null==(t=this._store)?void 0:t.widgetShowCart),(()=>this.promptTemplate()),(()=>W))}),(()=>this.promptTemplate()))}
1125
1120
  </div>
1126
- `}},t.ShipAidWidget.styles=oe,ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disablePolling",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableActions",2),ae([n({type:Number,attribute:!0})],t.ShipAidWidget.prototype,"pollingInterval",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableRefresh",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"refreshCart",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"persistPopup",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"defaultToggleButton",2),ae([n({type:String,attribute:!0})],t.ShipAidWidget.prototype,"lang",2),ae([n({type:String,attribute:!0})],t.ShipAidWidget.prototype,"currency",2),ae([n({type:String,attribute:!0})],t.ShipAidWidget.prototype,"customerId",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"supportSubscriptions",2),ae([a()],t.ShipAidWidget.prototype,"_storeDomain",2),ae([a()],t.ShipAidWidget.prototype,"_store",2),ae([a()],t.ShipAidWidget.prototype,"_cart",2),ae([a()],t.ShipAidWidget.prototype,"_protectionProduct",2),ae([a()],t.ShipAidWidget.prototype,"_cartLastUpdated",2),ae([a()],t.ShipAidWidget.prototype,"_hasFinishedSetup",2),ae([a()],t.ShipAidWidget.prototype,"_shouldShowWidget",2),ae([a()],t.ShipAidWidget.prototype,"_hasProtectionInCart",2),ae([a()],t.ShipAidWidget.prototype,"_protectionCartItem",2),ae([a()],t.ShipAidWidget.prototype,"_protectionVariant",2),ae([a()],t.ShipAidWidget.prototype,"hasLoadedStrings",2),ae([a()],t.ShipAidWidget.prototype,"intervalId",2),ae([a()],t.ShipAidWidget.prototype,"_state",2),ae([a()],t.ShipAidWidget.prototype,"_popup",2),t.ShipAidWidget=ae([o("shipaid-widget")],t.ShipAidWidget);const fe="Laden des ShipAid-Widgets...",me="Liefergarantie",ve="im Falle von Verlust, Beschädigung oder Diebstahl",_e={button:"Bereitgestellt von"},be={add:"Hinzufügen",remove:"Entfernen",loading:"Lädt..."},ye={loading:fe,title:me,description:ve,footer:_e,actions:be,"learn-more-popup":{close:"Schließen",title:"Liefergarantie",subtitle:"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie anzubieten, weil jede Bestellung wertvoll ist!",disclaimer:{"subtitle-enable":"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie zu bieten, denn wir wissen, dass jede Bestellung wertvoll ist und Dinge passieren können!","subtitle-monitor":"Wir überwachen Ihr Paket kontinuierlich und bieten ein praktisches Portal, damit Sie den Fortschritt Ihrer Bestellung jederzeit verfolgen können!","subtitle-notify":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.","subtitle-resolution":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.",text:"Durch den Erwerb dieser Liefergarantie stimmen Sie unseren Servicebedingungen und Datenschutzrichtlinien zu. Diese Garantie ist nicht verpflichtend, IST KEINE Versicherung und bietet keine Entschädigung für Verluste, Schäden oder Haftungen, die aus einem zufälligen oder unbekannten Ereignis resultieren. Sollte das Produkt nicht in zufriedenstellendem Zustand geliefert werden, kann die Marke, bei der Sie gekauft haben, dieses kostenlos ersetzen. ShipAid liefert keine Produkte oder Dienstleistungen direkt an Verbraucher, sondern bietet einen Dienst an, der Marken ermöglicht, den Produktersatz für ihre Kunden zu erleichtern. Der Erwerb dieser Garantie bedeutet nicht, dass Sie automatisch eine Rückerstattung für irgendwelche Produkte oder Versandkosten erhalten, da der Lösungsprozess und die Entscheidung über eine Kompensation strikt von der Marke, bei der Sie kaufen, entschieden werden. Die Marke wird einen Nachweis für Beschädigungen oder die Nichtlieferung des Produkts verlangen."},links:{terms:"Servicebedingungen",privacy:"Datenschutzrichtlinie"}}},Ce=Object.freeze(Object.defineProperty({__proto__:null,actions:be,default:ye,description:ve,footer:_e,loading:fe,title:me},Symbol.toStringTag,{value:"Module"})),we="Cargando el widget ShipAid...",xe="Garantía de entrega",$e="en caso de Pérdida, Daño o Robo",Se={button:"Energizado por"},Ae={add:"Agregar",remove:"Eliminar",loading:"Cargando..."},Le={loading:we,title:xe,description:$e,footer:Se,actions:Ae,"learn-more-popup":{close:"Cerca",title:"Garantía de entrega",disclaimer:{"subtitle-enable":"Permitimos que sus marcas favoritas brinden una garantía de entrega porque sabemos que cada pedido es valioso y las cosas suceden!","subtitle-monitor":"Supervisamos continuamente su paquete y le ofrecemos un portal conveniente para que pueda realizar un seguimiento del progreso de su pedido en cualquier momento.","subtitle-notify":"Se le notificará durante todo el proceso de envío, asegurándose de que esté actualizado en cada paso del camino.","subtitle-resolution":"En caso de cualquier problema durante el tránsito, ofrecemos un método rápido y fácil para informar el problema directamente a la marca, para una resolución rápida.",text:"Al comprar esta garantía de entrega, acepta nuestros Términos de servicio y Política de privacidad. Usted no está obligado a comprar esta garantía. Esta garantía NO es un seguro y no brinda indemnización por pérdida, daño o responsabilidad que surja de un evento contingente o desconocido, sino que, a través de las marcas de ShipAid, brinda una garantía de entrega mediante la cual, si el producto que ordenó no se entrega en condiciones satisfactorias, la marca desde el que ordenó el producto puede reemplazar el producto sin cargo. ShipAid no proporciona ningún producto o servicio directamente a los consumidores, sino que proporciona un servicio que permite a las marcas facilitar el reemplazo de productos a sus clientes. La compra de esta garantía no significa que se le reembolsará automáticamente cualquier producto o costo de envío porque el proceso de resolución y la decisión de compensación lo decide estrictamente la marca a la que le compra. La marca requerirá prueba de daño o producto no entregado."},links:{terms:"Términos de servicio",privacy:"Política de Privacidad"}}},Pe=Object.freeze(Object.defineProperty({__proto__:null,actions:Ae,default:Le,description:$e,footer:Se,loading:we,title:xe},Symbol.toStringTag,{value:"Module"})),ke="Chargement du widget ShipAid...",ze="Garantie de livraison",Ee="en cas de Perte, Dommages ou Vol",Me={button:"Propulsé par"},qe={add:"Ajouter",remove:"Retirer",loading:"Chargement..."},Ie={loading:ke,title:ze,description:Ee,footer:Me,actions:qe,"learn-more-popup":{close:"Fermer",title:"Garantie de livraison",subtitle:"Nous permettons à vos marques préférées d'offrir une garantie de livraison car chaque commande est précieuse !",disclaimer:{"subtitle-enable":"Nous permettons à vos marques préférées de fournir une garantie de livraison car nous savons que chaque commande est précieuse et que des incidents peuvent survenir !","subtitle-monitor":"Nous surveillons continuellement votre colis et offrons un portail pratique pour vous permettre de suivre l'avancement de votre commande à tout moment !","subtitle-notify":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.","subtitle-resolution":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.",text:"En acquérant cette garantie de livraison, vous acceptez nos Conditions de Service et notre Politique de Confidentialité. Cette garantie n'est pas obligatoire, N'EST PAS une assurance et ne fournit pas d'indemnisation pour les pertes, dommages ou responsabilités résultant d'un événement contingent ou inconnu. Si le produit n'est pas livré dans des conditions satisfaisantes, la marque auprès de laquelle vous avez acheté peut le remplacer gratuitement. ShipAid ne fournit aucun produit ou service directement aux consommateurs, mais offre un service permettant aux marques de faciliter le remplacement du produit pour leurs clients. L'achat de cette garantie ne signifie pas que vous serez automatiquement remboursé pour tout produit ou frais de port, car le processus de résolution et la décision de compensation sont strictement décidés par la marque que vous achetez. La marque exigera une preuve de dommage ou de produit non livré."},links:{terms:"Conditions de service",privacy:"Politique de Confidentialité"}}},Te=Object.freeze(Object.defineProperty({__proto__:null,actions:qe,default:Ie,description:Ee,footer:Me,loading:ke,title:ze},Symbol.toStringTag,{value:"Module"})),Oe="Caricamento del widget ShipAid...",Ne="Garanzia di consegna",je="in caso di Perdita, Danno o Furto",Re={button:"Offerto da"},Ue={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},Ve={loading:Oe,title:Ne,description:je,footer:Re,actions:Ue,"learn-more-popup":{close:"Vicina",title:"Garanzia di consegna",subtitle:"Consentiamo ai tuoi marchi preferiti di offrire una garanzia di consegna perché ogni ordine è prezioso!",disclaimer:{"subtitle-enable":"Consentiamo ai tuoi marchi preferiti di fornire una garanzia di consegna perché sappiamo che ogni ordine è prezioso e le cose accadono!","subtitle-monitor":"Monitoriamo continuamente il tuo pacco e ti offriamo un comodo portale per monitorare lo stato di avanzamento del tuo ordine in qualsiasi momento!","subtitle-notify":"Riceverai una notifica durante l'intero processo di spedizione, assicurandoti di rimanere aggiornato in ogni fase del processo.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Acquistando questa garanzia di consegna, accetti i nostri Termini di servizio e l'Informativa sulla privacy. Non sei obbligato ad acquistare questa garanzia. Questa garanzia NON è un'assicurazione e non fornisce un indennizzo contro perdite, danni o responsabilità derivanti da un evento contingente o sconosciuto, ma piuttosto, attraverso ShipAid i marchi forniscono una garanzia di consegna in base alla quale se il prodotto ordinato non viene consegnato in condizioni soddisfacenti, il marchio da cui hai ordinato il prodotto può sostituire il prodotto gratuitamente. ShipAid non fornisce alcun prodotto o servizio direttamente ai consumatori, ma fornisce invece un servizio che consente ai marchi di facilitare la sostituzione del prodotto ai propri clienti. L'acquisto di questa garanzia non significa che verrai automaticamente rimborsato per qualsiasi prodotto o costo di spedizione perché il processo di risoluzione e la decisione per il risarcimento sono rigorosamente decisi dal marchio da cui stai acquistando. Il marchio richiederà la prova del danno o del prodotto non consegnato."},links:{terms:"Termini di servizio",privacy:"Politica sulla riservatezza"}}},We=Object.freeze(Object.defineProperty({__proto__:null,actions:Ue,default:Ve,description:je,footer:Re,loading:Oe,title:Ne},Symbol.toStringTag,{value:"Module"})),De="Carregando o widget ShipAid...",He="Garantia de entrega",Be="em caso de Perda, Danos ou Roubo",Fe={button:"Distribuído por"},Ze={add:"Adicionar",remove:"Remover",loading:"Carregando..."},Ge={loading:De,title:He,description:Be,footer:Fe,actions:Ze,"learn-more-popup":{close:"Fechar",title:"Garantia de entrega",subtitle:"Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",disclaimer:{"subtitle-enable":"Permitimos que suas marcas favoritas forneçam uma garantia de entrega porque sabemos que cada pedido é precioso e as coisas acontecem!","subtitle-monitor":"Monitoramos continuamente o seu pacote e oferecemos um portal conveniente para você acompanhar o andamento do seu pedido a qualquer momento!","subtitle-notify":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Ao adquirir esta garantia de entrega, você concorda com nossos Termos de Serviço e Política de Privacidade. Esta garantia não é obrigatória, NÃO é um seguro e não fornece indenização contra perdas, danos ou responsabilidade decorrentes de um contingente ou desconhecido. Caso o produto não seja entregue em condições satisfatórias, a marca da qual você comprou pode substituí-lo gratuitamente. A ShipAid não fornece nenhum produto ou serviço diretamente aos consumidores, mas sim presta um serviço que permite às marcas facilitar a substituição do produto aos seus clientes. Adquirir esta garantia não significa que você será automaticamente reembolsado por qualquer produto ou custos de envio porque o processo de resolução e decisão de compensação é estritamente decidido pela marca que você está comprando. A marca exigirá prova de danos ou produto não entregue."},links:{terms:"Termos de serviço",privacy:"Política de Privacidade"}}},Ke=Object.freeze(Object.defineProperty({__proto__:null,actions:Ze,default:Ge,description:Be,footer:Fe,loading:De,title:He},Symbol.toStringTag,{value:"Module"}));return Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t}({});
1121
+ `}}ue.styles=ee,se([s({type:Boolean,attribute:!0})],ue.prototype,"disablePolling",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"disableActions",2),se([s({type:Number,attribute:!0})],ue.prototype,"pollingInterval",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"disableRefresh",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"refreshCart",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"persistPopup",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"defaultToggleButton",2),se([s({type:String,attribute:!0})],ue.prototype,"lang",2),se([s({type:String,attribute:!0})],ue.prototype,"currency",2),se([s({type:String,attribute:!0})],ue.prototype,"customerId",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"supportSubscriptions",2),se([n()],ue.prototype,"_storeDomain",2),se([n()],ue.prototype,"_store",2),se([n()],ue.prototype,"_cart",2),se([n()],ue.prototype,"_protectionProduct",2),se([n()],ue.prototype,"_cartLastUpdated",2),se([n()],ue.prototype,"_hasFinishedSetup",2),se([n()],ue.prototype,"_shouldShowWidget",2),se([n()],ue.prototype,"_hasProtectionInCart",2),se([n()],ue.prototype,"_protectionCartItem",2),se([n()],ue.prototype,"_protectionVariant",2),se([n()],ue.prototype,"hasLoadedStrings",2),se([n()],ue.prototype,"intervalId",2),se([n()],ue.prototype,"_state",2),se([n()],ue.prototype,"_popup",2),customElements.get("shipaid-widget")||customElements.define("shipaid-widget",ue);const me="Laden des ShipAid-Widgets...",fe="Liefergarantie",ge="im Falle von Verlust, Beschädigung oder Diebstahl",ve={button:"Bereitgestellt von"},_e={add:"Hinzufügen",remove:"Entfernen",loading:"Lädt..."},be={loading:me,title:fe,description:ge,footer:ve,actions:_e,"learn-more-popup":{close:"Schließen",title:"Liefergarantie",subtitle:"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie anzubieten, weil jede Bestellung wertvoll ist!",disclaimer:{"subtitle-enable":"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie zu bieten, denn wir wissen, dass jede Bestellung wertvoll ist und Dinge passieren können!","subtitle-monitor":"Wir überwachen Ihr Paket kontinuierlich und bieten ein praktisches Portal, damit Sie den Fortschritt Ihrer Bestellung jederzeit verfolgen können!","subtitle-notify":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.","subtitle-resolution":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.",text:"Durch den Erwerb dieser Liefergarantie stimmen Sie unseren Servicebedingungen und Datenschutzrichtlinien zu. Diese Garantie ist nicht verpflichtend, IST KEINE Versicherung und bietet keine Entschädigung für Verluste, Schäden oder Haftungen, die aus einem zufälligen oder unbekannten Ereignis resultieren. Sollte das Produkt nicht in zufriedenstellendem Zustand geliefert werden, kann die Marke, bei der Sie gekauft haben, dieses kostenlos ersetzen. ShipAid liefert keine Produkte oder Dienstleistungen direkt an Verbraucher, sondern bietet einen Dienst an, der Marken ermöglicht, den Produktersatz für ihre Kunden zu erleichtern. Der Erwerb dieser Garantie bedeutet nicht, dass Sie automatisch eine Rückerstattung für irgendwelche Produkte oder Versandkosten erhalten, da der Lösungsprozess und die Entscheidung über eine Kompensation strikt von der Marke, bei der Sie kaufen, entschieden werden. Die Marke wird einen Nachweis für Beschädigungen oder die Nichtlieferung des Produkts verlangen."},links:{terms:"Servicebedingungen",privacy:"Datenschutzrichtlinie"}}},ye=Object.freeze(Object.defineProperty({__proto__:null,actions:_e,default:be,description:ge,footer:ve,loading:me,title:fe},Symbol.toStringTag,{value:"Module"})),Ce="Cargando el widget ShipAid...",we="Garantía de entrega",xe="en caso de Pérdida, Daño o Robo",$e={button:"Energizado por"},Se={add:"Agregar",remove:"Eliminar",loading:"Cargando..."},Ae={loading:Ce,title:we,description:xe,footer:$e,actions:Se,"learn-more-popup":{close:"Cerca",title:"Garantía de entrega",disclaimer:{"subtitle-enable":"Permitimos que sus marcas favoritas brinden una garantía de entrega porque sabemos que cada pedido es valioso y las cosas suceden!","subtitle-monitor":"Supervisamos continuamente su paquete y le ofrecemos un portal conveniente para que pueda realizar un seguimiento del progreso de su pedido en cualquier momento.","subtitle-notify":"Se le notificará durante todo el proceso de envío, asegurándose de que esté actualizado en cada paso del camino.","subtitle-resolution":"En caso de cualquier problema durante el tránsito, ofrecemos un método rápido y fácil para informar el problema directamente a la marca, para una resolución rápida.",text:"Al comprar esta garantía de entrega, acepta nuestros Términos de servicio y Política de privacidad. Usted no está obligado a comprar esta garantía. Esta garantía NO es un seguro y no brinda indemnización por pérdida, daño o responsabilidad que surja de un evento contingente o desconocido, sino que, a través de las marcas de ShipAid, brinda una garantía de entrega mediante la cual, si el producto que ordenó no se entrega en condiciones satisfactorias, la marca desde el que ordenó el producto puede reemplazar el producto sin cargo. ShipAid no proporciona ningún producto o servicio directamente a los consumidores, sino que proporciona un servicio que permite a las marcas facilitar el reemplazo de productos a sus clientes. La compra de esta garantía no significa que se le reembolsará automáticamente cualquier producto o costo de envío porque el proceso de resolución y la decisión de compensación lo decide estrictamente la marca a la que le compra. La marca requerirá prueba de daño o producto no entregado."},links:{terms:"Términos de servicio",privacy:"Política de Privacidad"}}},Le=Object.freeze(Object.defineProperty({__proto__:null,actions:Se,default:Ae,description:xe,footer:$e,loading:Ce,title:we},Symbol.toStringTag,{value:"Module"})),Pe="Chargement du widget ShipAid...",ke="Garantie de livraison",Ee="en cas de Perte, Dommages ou Vol",ze={button:"Propulsé par"},Me={add:"Ajouter",remove:"Retirer",loading:"Chargement..."},qe={loading:Pe,title:ke,description:Ee,footer:ze,actions:Me,"learn-more-popup":{close:"Fermer",title:"Garantie de livraison",subtitle:"Nous permettons à vos marques préférées d'offrir une garantie de livraison car chaque commande est précieuse !",disclaimer:{"subtitle-enable":"Nous permettons à vos marques préférées de fournir une garantie de livraison car nous savons que chaque commande est précieuse et que des incidents peuvent survenir !","subtitle-monitor":"Nous surveillons continuellement votre colis et offrons un portail pratique pour vous permettre de suivre l'avancement de votre commande à tout moment !","subtitle-notify":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.","subtitle-resolution":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.",text:"En acquérant cette garantie de livraison, vous acceptez nos Conditions de Service et notre Politique de Confidentialité. Cette garantie n'est pas obligatoire, N'EST PAS une assurance et ne fournit pas d'indemnisation pour les pertes, dommages ou responsabilités résultant d'un événement contingent ou inconnu. Si le produit n'est pas livré dans des conditions satisfaisantes, la marque auprès de laquelle vous avez acheté peut le remplacer gratuitement. ShipAid ne fournit aucun produit ou service directement aux consommateurs, mais offre un service permettant aux marques de faciliter le remplacement du produit pour leurs clients. L'achat de cette garantie ne signifie pas que vous serez automatiquement remboursé pour tout produit ou frais de port, car le processus de résolution et la décision de compensation sont strictement décidés par la marque que vous achetez. La marque exigera une preuve de dommage ou de produit non livré."},links:{terms:"Conditions de service",privacy:"Politique de Confidentialité"}}},Ie=Object.freeze(Object.defineProperty({__proto__:null,actions:Me,default:qe,description:Ee,footer:ze,loading:Pe,title:ke},Symbol.toStringTag,{value:"Module"})),Te="Caricamento del widget ShipAid...",Oe="Garanzia di consegna",Ne="in caso di Perdita, Danno o Furto",je={button:"Offerto da"},Re={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},Ue={loading:Te,title:Oe,description:Ne,footer:je,actions:Re,"learn-more-popup":{close:"Vicina",title:"Garanzia di consegna",subtitle:"Consentiamo ai tuoi marchi preferiti di offrire una garanzia di consegna perché ogni ordine è prezioso!",disclaimer:{"subtitle-enable":"Consentiamo ai tuoi marchi preferiti di fornire una garanzia di consegna perché sappiamo che ogni ordine è prezioso e le cose accadono!","subtitle-monitor":"Monitoriamo continuamente il tuo pacco e ti offriamo un comodo portale per monitorare lo stato di avanzamento del tuo ordine in qualsiasi momento!","subtitle-notify":"Riceverai una notifica durante l'intero processo di spedizione, assicurandoti di rimanere aggiornato in ogni fase del processo.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Acquistando questa garanzia di consegna, accetti i nostri Termini di servizio e l'Informativa sulla privacy. Non sei obbligato ad acquistare questa garanzia. Questa garanzia NON è un'assicurazione e non fornisce un indennizzo contro perdite, danni o responsabilità derivanti da un evento contingente o sconosciuto, ma piuttosto, attraverso ShipAid i marchi forniscono una garanzia di consegna in base alla quale se il prodotto ordinato non viene consegnato in condizioni soddisfacenti, il marchio da cui hai ordinato il prodotto può sostituire il prodotto gratuitamente. ShipAid non fornisce alcun prodotto o servizio direttamente ai consumatori, ma fornisce invece un servizio che consente ai marchi di facilitare la sostituzione del prodotto ai propri clienti. L'acquisto di questa garanzia non significa che verrai automaticamente rimborsato per qualsiasi prodotto o costo di spedizione perché il processo di risoluzione e la decisione per il risarcimento sono rigorosamente decisi dal marchio da cui stai acquistando. Il marchio richiederà la prova del danno o del prodotto non consegnato."},links:{terms:"Termini di servizio",privacy:"Politica sulla riservatezza"}}},Ve=Object.freeze(Object.defineProperty({__proto__:null,actions:Re,default:Ue,description:Ne,footer:je,loading:Te,title:Oe},Symbol.toStringTag,{value:"Module"})),De="Carregando o widget ShipAid...",He="Garantia de entrega",Be="em caso de Perda, Danos ou Roubo",Fe={button:"Distribuído por"},Ze={add:"Adicionar",remove:"Remover",loading:"Carregando..."},We={loading:De,title:He,description:Be,footer:Fe,actions:Ze,"learn-more-popup":{close:"Fechar",title:"Garantia de entrega",subtitle:"Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",disclaimer:{"subtitle-enable":"Permitimos que suas marcas favoritas forneçam uma garantia de entrega porque sabemos que cada pedido é precioso e as coisas acontecem!","subtitle-monitor":"Monitoramos continuamente o seu pacote e oferecemos um portal conveniente para você acompanhar o andamento do seu pedido a qualquer momento!","subtitle-notify":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Ao adquirir esta garantia de entrega, você concorda com nossos Termos de Serviço e Política de Privacidade. Esta garantia não é obrigatória, NÃO é um seguro e não fornece indenização contra perdas, danos ou responsabilidade decorrentes de um contingente ou desconhecido. Caso o produto não seja entregue em condições satisfatórias, a marca da qual você comprou pode substituí-lo gratuitamente. A ShipAid não fornece nenhum produto ou serviço diretamente aos consumidores, mas sim presta um serviço que permite às marcas facilitar a substituição do produto aos seus clientes. Adquirir esta garantia não significa que você será automaticamente reembolsado por qualquer produto ou custos de envio porque o processo de resolução e decisão de compensação é estritamente decidido pela marca que você está comprando. A marca exigirá prova de danos ou produto não entregue."},links:{terms:"Termos de serviço",privacy:"Política de Privacidade"}}},Ge=Object.freeze(Object.defineProperty({__proto__:null,actions:Ze,default:We,description:Be,footer:Fe,loading:De,title:He},Symbol.toStringTag,{value:"Module"}));return t.ShipAidWidget=ue,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t}({});
@@ -1,73 +1,68 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ShipAidWidget={})}(this,(function(t){"use strict";function e(t){var e;return(null==(e=null==t?void 0:t.match(/\d+/))?void 0:e[0])??null}const i={calculateProtectionTotal:function(t,e,i){var o,r;if(!t)throw new Error("Missing store settings.");if(!e)throw new Error("Missing protectionProduct.");if(!i)throw new Error("Missing Shopify cart.");const s=null==t?void 0:t.protectionSettings;if(!s)throw new Error("Tried to find protection variant, but protection settings for this store are missing.");const n=Array.isArray(null==t?void 0:t.excludedProductSkus)?t.excludedProductSkus.map((t=>t.trim())):[],a=Array.isArray(null==t?void 0:t.excludedProductsVariantsId)?t.excludedProductsVariantsId.map((t=>{var e;return parseInt((null==(e=t.match(/\d+/))?void 0:e[0])??"",10)})):[],d=(i.items??[]).reduce(((t,e)=>(t=>!(!t.sku||!n.includes(t.sku.trim()))||!(!t.variant_id||!a.includes(t.variant_id)))(e)?t-e.final_line_price:t),i.total_price||0)-((null==(o=i.items)?void 0:o.filter((t=>{var i;return null==(i=null==e?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})))??[]).reduce(((t,e)=>t+e.final_line_price),0);if(0===d)return d;if("FIXED"===s.protectionType){if("number"!=typeof s.defaultFee)throw new Error("Missing default fee amount.");if(!(null==(r=s.rules)?void 0:r.length))return s.defaultFee;const t=d/100,e=s.rules.sort(((t,e)=>t.rangeLower&&e.rangeLower?t.rangeLower-e.rangeLower:0)).find((e=>{const i=Boolean(e.rangeLower&&e.rangeLower<t);return e.rangeUpper?i&&e.rangeUpper>=t:i}));return"number"==typeof(null==e?void 0:e.fee)?e.fee:s.defaultFee}if("PERCENTAGE"===s.protectionType){const t=d*s.percentage/100;return t>=s.minimumFee?t:s.minimumFee}throw new Error("No protection type handler found for this store.")},findProtectionVariant:function(t,e,i){var o;if(!(null==t?void 0:t.protectionSettings)||!(null==(o=null==e?void 0:e.variants)?void 0:o.length))throw new Error("Missing product and variants from protection settings.");const r=null==e?void 0:e.variants.flatMap((t=>{if(!(null==t?void 0:t.price))return[];const e=Number(t.price);return[{...t,formattedPrice:e}]})).sort(((t,e)=>t.formattedPrice-e.formattedPrice)),s=r.find((t=>t.formattedPrice>=i));return s||r[r.length-1]}},o=t=>e=>{return"function"==typeof e?(i=t,o=e,customElements.define(i,o),o):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){customElements.define(t,e)}}})(t,e);
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ShipAidWidget={})}(this,(function(t){"use strict";function e(t){var e;return(null==(e=null==t?void 0:t.match(/\d+/))?void 0:e[0])??null}const i={calculateProtectionTotal:function(t,e,i){var o,r;if(!t)throw new Error("Missing store settings.");if(!e)throw new Error("Missing protectionProduct.");if(!i)throw new Error("Missing Shopify cart.");const s=null==t?void 0:t.protectionSettings;if(!s)throw new Error("Tried to find protection variant, but protection settings for this store are missing.");const n=Array.isArray(null==t?void 0:t.excludedProductSkus)?t.excludedProductSkus.map((t=>t.trim())):[],a=Array.isArray(null==t?void 0:t.excludedProductsVariantsId)?t.excludedProductsVariantsId.map((t=>{var e;return parseInt((null==(e=t.match(/\d+/))?void 0:e[0])??"",10)})):[],d=(i.items??[]).reduce(((t,e)=>(t=>!(!t.sku||!n.includes(t.sku.trim()))||!(!t.variant_id||!a.includes(t.variant_id)))(e)?t-e.final_line_price:t),i.total_price||0)-((null==(o=i.items)?void 0:o.filter((t=>{var i;return null==(i=null==e?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})))??[]).reduce(((t,e)=>t+e.final_line_price),0);if(0===d)return d;if("FIXED"===s.protectionType){if("number"!=typeof s.defaultFee)throw new Error("Missing default fee amount.");if(!(null==(r=s.rules)?void 0:r.length))return s.defaultFee;const t=d/100,e=s.rules.sort(((t,e)=>t.rangeLower&&e.rangeLower?t.rangeLower-e.rangeLower:0)).find((e=>{const i=Boolean(e.rangeLower&&e.rangeLower<t);return e.rangeUpper?i&&e.rangeUpper>=t:i}));return"number"==typeof(null==e?void 0:e.fee)?e.fee:s.defaultFee}if("PERCENTAGE"===s.protectionType){const t=d*s.percentage/100;return t>=s.minimumFee?t:s.minimumFee}throw new Error("No protection type handler found for this store.")},findProtectionVariant:function(t,e,i){var o;if(!(null==t?void 0:t.protectionSettings)||!(null==(o=null==e?void 0:e.variants)?void 0:o.length))throw new Error("Missing product and variants from protection settings.");const r=null==e?void 0:e.variants.flatMap((t=>{if(!(null==t?void 0:t.price))return[];const e=Number(t.price);return[{...t,formattedPrice:e}]})).sort(((t,e)=>t.formattedPrice-e.formattedPrice)),s=r.find((t=>t.formattedPrice>=i));return s||r[r.length-1]}},o=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},r=(t,e,i)=>{e.constructor.createProperty(i,t)};
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
- */var i,o},r=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},s=(t,e,i)=>{e.constructor.createProperty(i,t)};
6
+ */function s(t){return(e,i)=>void 0!==i?r(t,e,i):o(t,e)}
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */function n(t){return(e,i)=>void 0!==i?s(t,e,i):r(t,e)}
12
- /**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- */function a(t){return n({...t,state:!0})}
11
+ */function n(t){return s({...t,state:!0})}
17
12
  /**
18
13
  * @license
19
14
  * Copyright 2021 Google LLC
20
15
  * SPDX-License-Identifier: BSD-3-Clause
21
- */var d;null===(d=window.HTMLSlotElement)||void 0===d||d.prototype.assignedElements;
16
+ */var a;null===(a=window.HTMLSlotElement)||void 0===a||a.prototype.assignedElements;
22
17
  /**
23
18
  * @license
24
19
  * Copyright 2019 Google LLC
25
20
  * SPDX-License-Identifier: BSD-3-Clause
26
21
  */
27
- const p=window,l=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),h=new WeakMap;let u=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(l&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=h.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&h.set(e,t))}return t}toString(){return this.cssText}};const g=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new u(i,t,c)},f=l?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,c))(e)})(t):t
22
+ const d=window,l=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,p=Symbol(),c=new WeakMap;let h=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==p)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(l&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=c.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&c.set(e,t))}return t}toString(){return this.cssText}};const u=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new h(i,t,p)},f=l?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new h("string"==typeof t?t:t+"",void 0,p))(e)})(t):t
28
23
  /**
29
24
  * @license
30
25
  * Copyright 2017 Google LLC
31
26
  * SPDX-License-Identifier: BSD-3-Clause
32
- */;var m;const v=window,_=v.trustedTypes,b=_?_.emptyScript:"",y=v.reactiveElementPolyfillSupport,C={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},w=(t,e)=>e!==t&&(e==e||t==t),x={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:w},$="finalized";let S=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||x}static finalize(){if(this.hasOwnProperty($))return!1;this[$]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(f(t))}else void 0!==t&&e.push(f(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{l?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=p.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=x){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:C).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:C;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||w)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
27
+ */;var m;const g=window,v=g.trustedTypes,_=v?v.emptyScript:"",b=g.reactiveElementPolyfillSupport,y={toAttribute(t,e){switch(e){case Boolean:t=t?_:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},C=(t,e)=>e!==t&&(e==e||t==t),w={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:C},x="finalized";let $=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||w}static finalize(){if(this.hasOwnProperty(x))return!1;this[x]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(f(t))}else void 0!==t&&e.push(f(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{l?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=d.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=w){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:y).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:y;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||C)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
33
28
  /**
34
29
  * @license
35
30
  * Copyright 2017 Google LLC
36
31
  * SPDX-License-Identifier: BSD-3-Clause
37
32
  */
38
- var A;S[$]=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:S}),(null!==(m=v.reactiveElementVersions)&&void 0!==m?m:v.reactiveElementVersions=[]).push("1.6.3");const L=window,P=L.trustedTypes,k=P?P.createPolicy("lit-html",{createHTML:t=>t}):void 0,z="$lit$",E=`lit$${(Math.random()+"").slice(9)}$`,M="?"+E,q=`<${M}>`,I=document,T=()=>I.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,j="[ \t\n\f\r]",R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,U=/-->/g,V=/>/g,W=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,H=/"/g,B=/^(?:script|style|textarea|title)$/i,F=(J=1,(t,...e)=>({_$litType$:J,strings:t,values:e})),Z=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),K=new WeakMap,Y=I.createTreeWalker(I,129,null,!1);var J;function Q(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(e):e}class X{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[d,p]=((t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=R;for(let a=0;a<i;a++){const e=t[a];let i,d,p=-1,l=0;for(;l<e.length&&(n.lastIndex=l,d=n.exec(e),null!==d);)l=n.lastIndex,n===R?"!--"===d[1]?n=U:void 0!==d[1]?n=V:void 0!==d[2]?(B.test(d[2])&&(r=RegExp("</"+d[2],"g")),n=W):void 0!==d[3]&&(n=W):n===W?">"===d[0]?(n=null!=r?r:R,p=-1):void 0===d[1]?p=-2:(p=n.lastIndex-d[2].length,i=d[1],n=void 0===d[3]?W:'"'===d[3]?H:D):n===H||n===D?n=W:n===U||n===V?n=R:(n=W,r=void 0);const c=n===W&&t[a+1].startsWith("/>")?" ":"";s+=n===R?e+q:p>=0?(o.push(i),e.slice(0,p)+z+e.slice(p)+E+c):e+E+(-2===p?(o.push(void 0),a):c)}return[Q(t,s+(t[i]||"<?>")+(2===e?"</svg>":"")),o]})(t,e);if(this.el=X.createElement(d,i),Y.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Y.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(z)||e.startsWith(E)){const i=p[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+z).split(E),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?rt:"?"===e[1]?nt:"@"===e[1]?at:ot})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(B.test(o.tagName)){const t=o.textContent.split(E),e=t.length-1;if(e>0){o.textContent=P?P.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],T()),Y.nextNode(),a.push({type:2,index:++r});o.append(t[e],T())}}}else if(8===o.nodeType)if(o.data===M)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(E,t+1));)a.push({type:7,index:r}),t+=E.length-1}r++}}static createElement(t,e){const i=I.createElement("template");return i.innerHTML=t,i}}function tt(t,e,i=t,o){var r,s,n,a;if(e===Z)return e;let d=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const p=O(e)?void 0:e._$litDirective$;return(null==d?void 0:d.constructor)!==p&&(null===(s=null==d?void 0:d._$AO)||void 0===s||s.call(d,!1),void 0===p?d=void 0:(d=new p(t),d._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=d:i._$Cl=d),void 0!==d&&(e=tt(t,d._$AS(t,e.values),d,o)),e}class et{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:I).importNode(i,!0);Y.currentNode=r;let s=Y.nextNode(),n=0,a=0,d=o[0];for(;void 0!==d;){if(n===d.index){let e;2===d.type?e=new it(s,s.nextSibling,this,t):1===d.type?e=new d.ctor(s,d.name,d.strings,this,t):6===d.type&&(e=new dt(s,this,t)),this._$AV.push(e),d=o[++a]}n!==(null==d?void 0:d.index)&&(s=Y.nextNode(),n++)}return Y.currentNode=I,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class it{constructor(t,e,i,o){var r;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=tt(this,t,e),O(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==Z&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>N(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==G&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(I.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=X.createElement(Q(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new et(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new X(t)),e}T(t){N(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new it(this.k(T()),this.k(T()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ot{constructor(t,e,i,o,r){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=tt(this,t,e,0),s=!O(t)||t!==this._$AH&&t!==Z,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=tt(this,o[i+n],e,n),a===Z&&(a=this._$AH[n]),s||(s=!O(a)||a!==this._$AH[n]),a===G?t=G:t!==G&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const st=P?P.emptyScript:"";class nt extends ot{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}}class at extends ot{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=tt(this,t,e,0))&&void 0!==i?i:G)===Z)return;const o=this._$AH,r=t===G&&o!==G||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==G&&(o===G||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class dt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){tt(this,t)}}const pt=L.litHtmlPolyfillSupport;null==pt||pt(X,it),(null!==(A=L.litHtmlVersions)&&void 0!==A?A:L.litHtmlVersions=[]).push("2.8.0");const lt=(t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new it(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n};
33
+ var S;$[x]=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==b||b({ReactiveElement:$}),(null!==(m=g.reactiveElementVersions)&&void 0!==m?m:g.reactiveElementVersions=[]).push("1.6.3");const A=window,L=A.trustedTypes,P=L?L.createPolicy("lit-html",{createHTML:t=>t}):void 0,k="$lit$",E=`lit$${(Math.random()+"").slice(9)}$`,z="?"+E,M=`<${z}>`,q=document,I=()=>q.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,N="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,U=/>/g,V=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,H=/"/g,B=/^(?:script|style|textarea|title)$/i,F=(Y=1,(t,...e)=>({_$litType$:Y,strings:t,values:e})),Z=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),G=new WeakMap,K=q.createTreeWalker(q,129,null,!1);var Y;function J(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(e):e}class Q{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[d,l]=((t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=j;for(let a=0;a<i;a++){const e=t[a];let i,d,l=-1,p=0;for(;p<e.length&&(n.lastIndex=p,d=n.exec(e),null!==d);)p=n.lastIndex,n===j?"!--"===d[1]?n=R:void 0!==d[1]?n=U:void 0!==d[2]?(B.test(d[2])&&(r=RegExp("</"+d[2],"g")),n=V):void 0!==d[3]&&(n=V):n===V?">"===d[0]?(n=null!=r?r:j,l=-1):void 0===d[1]?l=-2:(l=n.lastIndex-d[2].length,i=d[1],n=void 0===d[3]?V:'"'===d[3]?H:D):n===H||n===D?n=V:n===R||n===U?n=j:(n=V,r=void 0);const c=n===V&&t[a+1].startsWith("/>")?" ":"";s+=n===j?e+M:l>=0?(o.push(i),e.slice(0,l)+k+e.slice(l)+E+c):e+E+(-2===l?(o.push(void 0),a):c)}return[J(t,s+(t[i]||"<?>")+(2===e?"</svg>":"")),o]})(t,e);if(this.el=Q.createElement(d,i),K.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=K.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(k)||e.startsWith(E)){const i=l[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+k).split(E),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?ot:"?"===e[1]?st:"@"===e[1]?nt:it})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(B.test(o.tagName)){const t=o.textContent.split(E),e=t.length-1;if(e>0){o.textContent=L?L.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],I()),K.nextNode(),a.push({type:2,index:++r});o.append(t[e],I())}}}else if(8===o.nodeType)if(o.data===z)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(E,t+1));)a.push({type:7,index:r}),t+=E.length-1}r++}}static createElement(t,e){const i=q.createElement("template");return i.innerHTML=t,i}}function X(t,e,i=t,o){var r,s,n,a;if(e===Z)return e;let d=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const l=T(e)?void 0:e._$litDirective$;return(null==d?void 0:d.constructor)!==l&&(null===(s=null==d?void 0:d._$AO)||void 0===s||s.call(d,!1),void 0===l?d=void 0:(d=new l(t),d._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=d:i._$Cl=d),void 0!==d&&(e=X(t,d._$AS(t,e.values),d,o)),e}class tt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:q).importNode(i,!0);K.currentNode=r;let s=K.nextNode(),n=0,a=0,d=o[0];for(;void 0!==d;){if(n===d.index){let e;2===d.type?e=new et(s,s.nextSibling,this,t):1===d.type?e=new d.ctor(s,d.name,d.strings,this,t):6===d.type&&(e=new at(s,this,t)),this._$AV.push(e),d=o[++a]}n!==(null==d?void 0:d.index)&&(s=K.nextNode(),n++)}return K.currentNode=q,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,o){var r;this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),T(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==Z&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>O(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==W&&T(this._$AH)?this._$AA.nextSibling.data=t:this.$(q.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Q.createElement(J(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new tt(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new Q(t)),e}T(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new et(this.k(I()),this.k(I()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,o,r){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=X(this,t,e,0),s=!T(t)||t!==this._$AH&&t!==Z,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=X(this,o[i+n],e,n),a===Z&&(a=this._$AH[n]),s||(s=!T(a)||a!==this._$AH[n]),a===W?t=W:t!==W&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ot extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}const rt=L?L.emptyScript:"";class st extends it{constructor(){super(...arguments),this.type=4}j(t){t&&t!==W?this.element.setAttribute(this.name,rt):this.element.removeAttribute(this.name)}}class nt extends it{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=X(this,t,e,0))&&void 0!==i?i:W)===Z)return;const o=this._$AH,r=t===W&&o!==W||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==W&&(o===W||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const dt=A.litHtmlPolyfillSupport;null==dt||dt(Q,et),(null!==(S=A.litHtmlVersions)&&void 0!==S?S:A.litHtmlVersions=[]).push("2.8.0");const lt=(t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new et(e.insertBefore(I(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n};
39
34
  /**
40
35
  * @license
41
36
  * Copyright 2017 Google LLC
42
37
  * SPDX-License-Identifier: BSD-3-Clause
43
- */var ct,ht;let ut=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}};ut.finalized=!0,ut._$litElement$=!0,null===(ct=globalThis.litElementHydrateSupport)||void 0===ct||ct.call(globalThis,{LitElement:ut});const gt=globalThis.litElementPolyfillSupport;null==gt||gt({LitElement:ut}),(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.3.3");const ft="langChanged";function mt(t,e,i){return Object.entries(_t(e||{})).reduce(((t,[e,i])=>t.replace(new RegExp(`{{[  ]*${e}[  ]*}}`,"gm"),String(_t(i)))),t)}function vt(t,e){const i=t.split(".");let o=e.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function _t(t){return"function"==typeof t?t():t}let bt={loader:()=>Promise.resolve({}),empty:t=>`[${t}]`,lookup:vt,interpolate:mt,translationCache:{}};function yt(t,e,i=bt){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=t,strings:i.strings=e},window.dispatchEvent(new CustomEvent(ft,{detail:o}))}
38
+ */var pt,ct;let ht=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}};ht.finalized=!0,ht._$litElement$=!0,null===(pt=globalThis.litElementHydrateSupport)||void 0===pt||pt.call(globalThis,{LitElement:ht});const ut=globalThis.litElementPolyfillSupport;null==ut||ut({LitElement:ht}),(null!==(ct=globalThis.litElementVersions)&&void 0!==ct?ct:globalThis.litElementVersions=[]).push("3.3.3");const ft="langChanged";function mt(t,e,i){return Object.entries(vt(e||{})).reduce(((t,[e,i])=>t.replace(new RegExp(`{{[  ]*${e}[  ]*}}`,"gm"),String(vt(i)))),t)}function gt(t,e){const i=t.split(".");let o=e.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function vt(t){return"function"==typeof t?t():t}let _t={loader:()=>Promise.resolve({}),empty:t=>`[${t}]`,lookup:gt,interpolate:mt,translationCache:{}};function bt(t,e,i=_t){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=t,strings:i.strings=e},window.dispatchEvent(new CustomEvent(ft,{detail:o}))}
44
39
  /**
45
40
  * @license
46
41
  * Copyright 2017 Google LLC
47
42
  * SPDX-License-Identifier: BSD-3-Clause
48
43
  */
49
- const Ct=2;class wt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
44
+ const yt=2;class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
50
45
  /**
51
46
  * @license
52
47
  * Copyright 2020 Google LLC
53
48
  * SPDX-License-Identifier: BSD-3-Clause
54
- */const xt=(t,e)=>{var i,o;const r=t._$AN;if(void 0===r)return!1;for(const s of r)null===(o=(i=s)._$AO)||void 0===o||o.call(i,e,!1),xt(s,e);return!0},$t=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},St=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Pt(e)}};
49
+ */const wt=(t,e)=>{var i,o;const r=t._$AN;if(void 0===r)return!1;for(const s of r)null===(o=(i=s)._$AO)||void 0===o||o.call(i,e,!1),wt(s,e);return!0},xt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},$t=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Lt(e)}};
55
50
  /**
56
51
  * @license
57
52
  * Copyright 2017 Google LLC
58
53
  * SPDX-License-Identifier: BSD-3-Clause
59
- */function At(t){void 0!==this._$AN?($t(this),this._$AM=t,St(this)):this._$AM=t}function Lt(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)xt(o[s],!1),$t(o[s]);else null!=o&&(xt(o,!1),$t(o));else xt(this,t)}const Pt=t=>{var e,i,o,r;t.type==Ct&&(null!==(e=(o=t)._$AP)&&void 0!==e||(o._$AP=Lt),null!==(i=(r=t)._$AQ)&&void 0!==i||(r._$AQ=At))};class kt extends wt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),St(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),e&&(xt(this,t),$t(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class zt extends kt{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(t){return this.getValue=t,this.subscribe(),this.getValue()}langChanged(t){this.setValue(this.getValue(t))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(t,e){const i=e=>t(e.detail);return window.addEventListener(ft,i,e),()=>window.removeEventListener(ft,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const Et=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends zt{render(t,e,i){return this.renderValue((()=>function(t,e,i=bt){let o=i.translationCache[t]||(i.translationCache[t]=i.lookup(t,i)||i.empty(t,i));return null!=(e=null!=e?_t(e):null)?i.interpolate(o,e,i):o}(t,e,i)))}});
54
+ */function St(t){void 0!==this._$AN?(xt(this),this._$AM=t,$t(this)):this._$AM=t}function At(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)wt(o[s],!1),xt(o[s]);else null!=o&&(wt(o,!1),xt(o));else wt(this,t)}const Lt=t=>{var e,i,o,r;t.type==yt&&(null!==(e=(o=t)._$AP)&&void 0!==e||(o._$AP=At),null!==(i=(r=t)._$AQ)&&void 0!==i||(r._$AQ=St))};class Pt extends Ct{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),$t(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),e&&(wt(this,t),xt(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class kt extends Pt{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(t){return this.getValue=t,this.subscribe(),this.getValue()}langChanged(t){this.setValue(this.getValue(t))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(t,e){const i=e=>t(e.detail);return window.addEventListener(ft,i,e),()=>window.removeEventListener(ft,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const Et=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends kt{render(t,e,i){return this.renderValue((()=>function(t,e,i=_t){let o=i.translationCache[t]||(i.translationCache[t]=i.lookup(t,i)||i.empty(t,i));return null!=(e=null!=e?vt(e):null)?i.interpolate(o,e,i):o}(t,e,i)))}});
60
55
  /**
61
56
  * @license
62
57
  * Copyright 2017 Google LLC
63
58
  * SPDX-License-Identifier: BSD-3-Clause
64
- */class Mt extends wt{constructor(t){if(super(t),this.et=G,t.type!==Ct)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===G||null==t)return this.ft=void 0,this.et=t;if(t===Z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Mt.directiveName="unsafeHTML",Mt.resultType=1;const qt="__registered_effects";function It(t){const e=t;if(e[qt])return e;const i=function(t){if(!t.dispatchEvent||!t.requestUpdate)throw new Error("Element missing required functions (dispatchEvent/requestUpdate)");return t}(t),o=i.updated;return e[qt]={index:0,count:0,effects:[]},i.updated=t=>(e[qt].index=0,o(t)),e}function Tt(t,e,i){const o=function(t,e){const i=It(t),{index:o,count:r}=i[qt];return o===r?(i[qt].index++,i[qt].count++,i[qt].effects.push(e),e):(i[qt].index++,i[qt].effects[o])}(t,{on:e,observe:["__initial__dirty"]});o.observe.some(((t,e)=>i[e]!==t))&&o.on(),o.observe=i}
59
+ */class zt extends Ct{constructor(t){if(super(t),this.et=W,t.type!==yt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===W||null==t)return this.ft=void 0,this.et=t;if(t===Z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}zt.directiveName="unsafeHTML",zt.resultType=1;const Mt="__registered_effects";function qt(t){const e=t;if(e[Mt])return e;const i=function(t){if(!t.dispatchEvent||!t.requestUpdate)throw new Error("Element missing required functions (dispatchEvent/requestUpdate)");return t}(t),o=i.updated;return e[Mt]={index:0,count:0,effects:[]},i.updated=t=>(e[Mt].index=0,o(t)),e}function It(t,e,i){const o=function(t,e){const i=qt(t),{index:o,count:r}=i[Mt];return o===r?(i[Mt].index++,i[Mt].count++,i[Mt].effects.push(e),e):(i[Mt].index++,i[Mt].effects[o])}(t,{on:e,observe:["__initial__dirty"]});o.observe.some(((t,e)=>i[e]!==t))&&o.on(),o.observe=i}
65
60
  /**
66
61
  * @license
67
62
  * Copyright 2021 Google LLC
68
63
  * SPDX-License-Identifier: BSD-3-Clause
69
64
  */
70
- function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
65
+ function Tt(t,e,i){return t?e():null==i?void 0:i()}const Ot=u`
71
66
  :host {
72
67
  --shipaid-primary: #0056d6;
73
68
  --shipaid-secondary: #0076ff;
@@ -271,7 +266,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
271
266
  background: transparent;
272
267
  z-index: -1;
273
268
  }
274
- `,jt=F`
269
+ `,Nt=F`
275
270
  <svg
276
271
  version="1.0"
277
272
  width="50.000000pt"
@@ -292,7 +287,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
292
287
  />
293
288
  </g>
294
289
  </svg>
295
- `,Rt=F`
290
+ `,jt=F`
296
291
  <svg
297
292
  version="1.0"
298
293
  width="50.000000pt"
@@ -313,7 +308,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
313
308
  />
314
309
  </g>
315
310
  </svg>
316
- `,Ut=F`
311
+ `,Rt=F`
317
312
  <svg
318
313
  width="50.000000pt"
319
314
  height="50.000000pt"
@@ -397,7 +392,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
397
392
  />
398
393
  </g>
399
394
  </svg>
400
- `,Vt=F`
395
+ `,Ut=F`
401
396
  <svg
402
397
  width="300.000000pt"
403
398
  height="75.000000pt"
@@ -481,7 +476,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
481
476
  />
482
477
  </g>
483
478
  </svg>
484
- `,Wt=F`
479
+ `,Vt=F`
485
480
  <svg
486
481
  version="1.0"
487
482
  viewBox="0 0 500.000000 500.000000"
@@ -576,7 +571,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
576
571
  />
577
572
  </g>
578
573
  </svg>
579
- `;var Ft=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Gt=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Zt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ft(e,i,s),s};let Kt=class extends ut{constructor(){super(...arguments),this.active=!1}handleClosePopup(){const t=new Event("close");this.dispatchEvent(t)}render(){return F`
574
+ `;var Ft=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor;class Wt extends ht{constructor(){super(...arguments),this.active=!1}handleClosePopup(){const t=new Event("close");this.dispatchEvent(t)}render(){return F`
580
575
  <div class=${`shipaid-popup ${this.active&&"active"}`}>
581
576
  <button
582
577
  type="button"
@@ -585,10 +580,10 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
585
580
  >
586
581
  ${Et("learn-more-popup.close")}
587
582
  </button>
588
- <div class="popup-logo">${Vt}</div>
583
+ <div class="popup-logo">${Ut}</div>
589
584
  <p class="popup-title">${Et("learn-more-popup.title")}</p>
590
585
  <div class="popup-disclaimer-subtitle">
591
- <div class="popup-icon">${Wt}</div>
586
+ <div class="popup-icon">${Vt}</div>
592
587
  <p>${Et("learn-more-popup.disclaimer.subtitle-enable")}</p>
593
588
  </div>
594
589
  <div class="popup-disclaimer-subtitle">
@@ -636,7 +631,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
636
631
  </div>
637
632
  </div>
638
633
  <div class="blocker" @click=${this.handleClosePopup}></div>
639
- `}};Kt.styles=Nt,Gt([n({type:Boolean,attribute:!0})],Kt.prototype,"active",2),Kt=Gt([o("shipaid-popup-learn-more")],Kt);const Yt="Loading ShipAid Widget...",Jt="Delivery Guarantee",Qt="in case of Loss, Damage or Theft",Xt={button:"Powered by"},te={add:"Add",remove:"Remove",loading:"Loading..."},ee={loading:Yt,title:Jt,description:Qt,footer:Xt,actions:te,"learn-more-popup":{close:"Close",title:"Delivery Guarantee",disclaimer:{"subtitle-enable":"We enable your favorite brands to provide a delivery guarantee because we know that every order is precious, and things happen!","subtitle-monitor":"We continuously monitor your package and offer a convenient portal for you to track your order's progress at any moment!","subtitle-notify":"You'll be notified throughout the entire shipping process, ensuring you stay up to date every step of the way.","subtitle-resolution":"In case of any issues during transit, we offer a quick and easy method to report the problem directly to the brand, for a swift resolution.",text:"By purchasing this delivery guarantee, you agree to our Terms Of Service and Privacy Policy. You are not obligated to purchase this guarantee. This guarantee is NOT insurance and does not provide indemnification against loss, damage, or liability arising from a contingent or unknown event, but rather, through ShipAid brands provide a delivery guarantee whereby if the product you ordered is not delivered in satisfactory condition, the brand from which you ordered the product may replace the product free of charge. ShipAid does not provide any products or services directly to consumers, but instead provides a service that allow brands to facilitate product replacement to their customers. Purchasing this guarantee does not mean that you will automatically be reimbursed for any product or shipping costs because the resolution process and decision for compensation is strictly decided by the brand you a purchasing from. The brand will require proof of damage or undelivered product."},links:{terms:"Terms of Service",privacy:"Privacy Policy"}}},ie=Object.freeze(Object.defineProperty({__proto__:null,actions:te,default:ee,description:Qt,footer:Xt,loading:Yt,title:Jt},Symbol.toStringTag,{value:"Module"})),oe=g`
634
+ `}}Wt.styles=Ot,((t,e,i,o)=>{for(var r,s=o>1?void 0:o?Zt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);o&&s&&Ft(e,i,s)})([s({type:Boolean,attribute:!0})],Wt.prototype,"active",2),customElements.get("shipaid-popup-learn-more")||customElements.define("shipaid-popup-learn-more",Wt);const Gt="Loading ShipAid Widget...",Kt="Delivery Guarantee",Yt="in case of Loss, Damage or Theft",Jt={button:"Powered by"},Qt={add:"Add",remove:"Remove",loading:"Loading..."},Xt={loading:Gt,title:Kt,description:Yt,footer:Jt,actions:Qt,"learn-more-popup":{close:"Close",title:"Delivery Guarantee",disclaimer:{"subtitle-enable":"We enable your favorite brands to provide a delivery guarantee because we know that every order is precious, and things happen!","subtitle-monitor":"We continuously monitor your package and offer a convenient portal for you to track your order's progress at any moment!","subtitle-notify":"You'll be notified throughout the entire shipping process, ensuring you stay up to date every step of the way.","subtitle-resolution":"In case of any issues during transit, we offer a quick and easy method to report the problem directly to the brand, for a swift resolution.",text:"By purchasing this delivery guarantee, you agree to our Terms Of Service and Privacy Policy. You are not obligated to purchase this guarantee. This guarantee is NOT insurance and does not provide indemnification against loss, damage, or liability arising from a contingent or unknown event, but rather, through ShipAid brands provide a delivery guarantee whereby if the product you ordered is not delivered in satisfactory condition, the brand from which you ordered the product may replace the product free of charge. ShipAid does not provide any products or services directly to consumers, but instead provides a service that allow brands to facilitate product replacement to their customers. Purchasing this guarantee does not mean that you will automatically be reimbursed for any product or shipping costs because the resolution process and decision for compensation is strictly decided by the brand you a purchasing from. The brand will require proof of damage or undelivered product."},links:{terms:"Terms of Service",privacy:"Privacy Policy"}}},te=Object.freeze(Object.defineProperty({__proto__:null,actions:Qt,default:Xt,description:Yt,footer:Jt,loading:Gt,title:Kt},Symbol.toStringTag,{value:"Module"})),ee=u`
640
635
  :host {
641
636
  --shipaid-primary: #002bd6;
642
637
  --shipaid-secondary: #0076ff;
@@ -792,22 +787,22 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
792
787
  .shipaid-prompt .prompt-footer .prompt-footer-badge svg {
793
788
  height:var(--shipaid-footer-badge-logo-height, 9px);
794
789
  }
795
- `;var re=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(re||{}),se=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,ae=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ne(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&se(e,i,s),s};const de=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},pe=t=>console.warn(`[ShipAid] ${t}`),le=t=>console.error(`[ShipAid] ${t}`),ce="shipaid-protection",he="shipaid-protection-popup-show",ue=Object.assign({"./lang/de.json":()=>Promise.resolve().then((()=>Ce)).then((t=>t.default)),"./lang/en.json":()=>Promise.resolve().then((()=>ie)).then((t=>t.default)),"./lang/es.json":()=>Promise.resolve().then((()=>Pe)).then((t=>t.default)),"./lang/fr.json":()=>Promise.resolve().then((()=>Te)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>We)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>Ke)).then((t=>t.default))});var ge;ge={loader:async t=>{if("en"===t)return ee;const e=Reflect.get(ue,`./lang/${t}.json`);return e?await e():ee}},bt=Object.assign(Object.assign({},bt),ge),t.ShipAidWidget=class extends ut{constructor(){var t,e,i;super(...arguments),this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.refreshCart=!1,this.persistPopup=!1,this.defaultToggleButton=!1,this.lang="en",this.currency=void 0,this.customerId=void 0,this.supportSubscriptions=!1,this._apiEndpoint="/apps/shipaid",this._storeDomain=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._hasFinishedSetup=!1,this._shouldShowWidget=!1,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this.intervalId=0,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>de(t),post:(t,e)=>de(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}shouldPersistPopup(){return"true"===localStorage.getItem(`${he}`)?"learn-more":null}setPopupKey(){this.persistPopup&&localStorage.setItem(`${he}`,"true")}get shouldRefreshOnUpdate(){return!this.disablePolling&&!this.disableRefresh}get planActive(){var t,e;const{searchParams:i}=new URL(window.location.href);return(null==(t=window.Shopify)?void 0:t.designMode)||i.has("shipaid-test")?(pe("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o,r,s,n;const a=this.currency||(null==(i=null==(e=window.Shopify)?void 0:e.currency)?void 0:i.active)||(null==(o=this._store)?void 0:o.currency)||"USD";if(null==(n=null==(s=null==(r=this._store)?void 0:r.widgetConfigurations)?void 0:s.widget)?void 0:n.currencyFormat){return this._store.widgetConfigurations.widget.currencyFormat.replace("_value_",Number(t)).replace("_currency_",a)}return new Intl.NumberFormat(void 0,{currency:a,style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}_handleRefreshCart(){if(this.refreshCart)return window.location.reload()}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(re.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.calculateProtectionTotal(this._store,this._protectionProduct,t)}_findProtectionVariant(t){if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.findProtectionVariant(this._store,this._protectionProduct,t)}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}async _updateProtection(){return this._hasProtectionInCart?this.removeProtection():this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;const s=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!s)throw new Error("No shop found in Shopify object.");try{const t=new URL(window.location.href);t.pathname=this._apiEndpoint;const e={query:"query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetPollProtection\n widgetShowCart\n excludedProductSkus\n excludedCustomersIdsAutoOptIn\n protectionSettings\n widgetConfigurations\n }\n}",variables:{store:s}},i=await this._fetch.post(t.toString(),e);if(!i)throw new Error("Missing response for store query.");if(null==(o=i.errors)?void 0:o.length)throw new Error(i.errors[0].message);if(!(null==(r=i.data)?void 0:r.store))throw new Error("Missing store from store query response.");return i.data.store}catch(n){throw console.error(n),new Error(`Could not find a store for ${this._storeDomain}`)}}_findSellingPlanByName(t,e){for(const i of t){const t=i.node;for(const i of t.sellingPlans.edges){const t=i.node;if(e===t.name)return t}}return null}async _fetchSellingPlanFromVariant(t){var e,i,o,r,s,n,a,d,p,l,c,h,u;const g=(null==(e=window.Shopify)?void 0:e.shop)??(null==(o=null==(i=window.Shopify)?void 0:i.Checkout)?void 0:o.apiHost);if(!g)throw new Error("No shop found in Shopify object.");try{const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={query:"query SellingPlanFromVariant($store: String!, $variantId: String!){\n sellingPlanFromVariant(input: {store: $store, variantId: $variantId })\n}",variables:{store:g,variantId:`gid://shopify/ProductVariant/${null==(r=this._protectionVariant)?void 0:r.id}`}},o=await this._fetch.post(e.toString(),i);if(!o)throw new Error("Missing response for selling plan query.");if(null==(s=o.errors)?void 0:s.length)throw new Error(o.errors[0].message);if(!(null==(n=o.data)?void 0:n.sellingPlanFromVariant))throw new Error("Missing variant from selling plan query response.");const f=(null==(d=null==(a=o.data.sellingPlanFromVariant)?void 0:a.sellingPlanGroups)?void 0:d.edges)||[],m=(null==(u=null==(h=null==(c=null==(l=null==(p=f[0])?void 0:p.node)?void 0:l.sellingPlans)?void 0:c.edges)?void 0:h[0])?void 0:u.node)||null;return this._findSellingPlanByName(f,t.name)||m}catch(f){console.error("Error during the query ====>",f)}}async _fetchCart(){try{return await this._fetch.get("/cart.js")}catch(t){throw le(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){try{const{product:t}=await this._fetch.get("/products/shipaid-protection.json");return t}catch(t){throw le(t.message),new Error("Could not fetch protection product for current domain.")}}hasProtection(){return this._hasProtectionInCart}async updateCart(t){t||(t=await this._fetchCart()),this._cart=t}async addProtection(){var t,i;try{if(!this._store)throw new Error("Store has not been loaded.");if(!(null==(t=this._cart)?void 0:t.items))throw new Error("Cart has not been loaded.");if(!(null==(i=this._protectionVariant)?void 0:i.id))throw new Error("No protection variant found.");this._setState("loading");const o={quantity:1,id:this._protectionVariant.id};if(this.supportSubscriptions){const t=this._cart.items.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));if(t){const i=await this._fetchSellingPlanFromVariant(t.selling_plan_allocation.selling_plan),r=i?e(i.id):null;o.selling_plan=r}}const r=await this._fetch.post("/cart/add.js",o);await this._handleRefresh(r),this._setState("success")}catch(o){le(o.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async removeProtection(){try{if(!this._store)throw new Error("Store has not been loaded.");if(!this._protectionCartItem)throw new Error("Protection product not found.");this._setState("loading");const t={quantity:0,id:this._protectionCartItem.key},e=await this._fetch.post("/cart/change.js",t);await this._handleRefresh(e),this._cart=e,this._setState("success")}catch(t){le(t.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async attemptAddProtection(){var t,e,i,o,r,s;if(!(null==(t=this._store)?void 0:t.widgetAutoOptIn))return;if(!(null==(e=this._cart)?void 0:e.items)||!(null==(i=this._cart)?void 0:i.item_count))return;const n=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),a=null==(r=this._cart)?void 0:r.items[n];if(this._hasProtectionInCart=!!a,1===this._cart.item_count&&a)return;!!sessionStorage.getItem(ce)||(sessionStorage.setItem(ce,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(s=this._cart)?void 0:s.item_count)&&this._store.widgetShowCart&&await this.addProtection())}async handleMultipleProtectionVariants(){var t,e,i,o,r;if(!(null==(t=this._cart)?void 0:t.items)||!(null==(e=this._cart)?void 0:e.item_count))return;let s=0;if(null==(i=this._cart.items)||i.forEach((t=>{var e,i;(null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id)))&&s++})),s>1){const t=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),e={id:(null==(r=this._cart)?void 0:r.items[t]).key,quantity:0},i=await this._fetch.post("/cart/change.js",e);return await this._handleRefresh(i)}}learnMorePopupTemplate(){return this.persistPopup&&(this._popup=this.shouldPersistPopup()),F`
790
+ `;var ie=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(ie||{}),oe=Object.defineProperty,re=Object.getOwnPropertyDescriptor,se=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?re(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&oe(e,i,s),s};const ne=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},ae=t=>console.warn(`[ShipAid] ${t}`),de=t=>console.error(`[ShipAid] ${t}`),le="shipaid-protection",pe="shipaid-protection-popup-show",ce=Object.assign({"./lang/de.json":()=>Promise.resolve().then((()=>ye)).then((t=>t.default)),"./lang/en.json":()=>Promise.resolve().then((()=>te)).then((t=>t.default)),"./lang/es.json":()=>Promise.resolve().then((()=>Le)).then((t=>t.default)),"./lang/fr.json":()=>Promise.resolve().then((()=>Ie)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>Ve)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>Ge)).then((t=>t.default))});var he;he={loader:async t=>{if("en"===t)return Xt;const e=Reflect.get(ce,`./lang/${t}.json`);return e?await e():Xt}},_t=Object.assign(Object.assign({},_t),he);class ue extends ht{constructor(){var t,e,i;super(...arguments),this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.refreshCart=!1,this.persistPopup=!1,this.defaultToggleButton=!1,this.lang="en",this.currency=void 0,this.customerId=void 0,this.supportSubscriptions=!1,this._apiEndpoint="/apps/shipaid",this._storeDomain=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._hasFinishedSetup=!1,this._shouldShowWidget=!1,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this.intervalId=0,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>ne(t),post:(t,e)=>ne(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}shouldPersistPopup(){return"true"===localStorage.getItem(`${pe}`)?"learn-more":null}setPopupKey(){this.persistPopup&&localStorage.setItem(`${pe}`,"true")}get shouldRefreshOnUpdate(){return!this.disablePolling&&!this.disableRefresh}get planActive(){var t,e;const{searchParams:i}=new URL(window.location.href);return(null==(t=window.Shopify)?void 0:t.designMode)||i.has("shipaid-test")?(ae("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o,r,s,n;const a=this.currency||(null==(i=null==(e=window.Shopify)?void 0:e.currency)?void 0:i.active)||(null==(o=this._store)?void 0:o.currency)||"USD";if(null==(n=null==(s=null==(r=this._store)?void 0:r.widgetConfigurations)?void 0:s.widget)?void 0:n.currencyFormat){return this._store.widgetConfigurations.widget.currencyFormat.replace("_value_",Number(t)).replace("_currency_",a)}return new Intl.NumberFormat(void 0,{currency:a,style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}_handleRefreshCart(){if(this.refreshCart)return window.location.reload()}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(ie.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.calculateProtectionTotal(this._store,this._protectionProduct,t)}_findProtectionVariant(t){if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.findProtectionVariant(this._store,this._protectionProduct,t)}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}async _updateProtection(){return this._hasProtectionInCart?this.removeProtection():this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;const s=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!s)throw new Error("No shop found in Shopify object.");try{const t=new URL(window.location.href);t.pathname=this._apiEndpoint;const e={query:"query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetPollProtection\n widgetShowCart\n excludedProductSkus\n excludedCustomersIdsAutoOptIn\n protectionSettings\n widgetConfigurations\n }\n}",variables:{store:s}},i=await this._fetch.post(t.toString(),e);if(!i)throw new Error("Missing response for store query.");if(null==(o=i.errors)?void 0:o.length)throw new Error(i.errors[0].message);if(!(null==(r=i.data)?void 0:r.store))throw new Error("Missing store from store query response.");return i.data.store}catch(n){throw console.error(n),new Error(`Could not find a store for ${this._storeDomain}`)}}_findSellingPlanByName(t,e){for(const i of t){const t=i.node;for(const i of t.sellingPlans.edges){const t=i.node;if(e===t.name)return t}}return null}async _fetchSellingPlanFromVariant(t){var e,i,o,r,s,n,a,d,l,p,c,h,u;const f=(null==(e=window.Shopify)?void 0:e.shop)??(null==(o=null==(i=window.Shopify)?void 0:i.Checkout)?void 0:o.apiHost);if(!f)throw new Error("No shop found in Shopify object.");try{const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={query:"query SellingPlanFromVariant($store: String!, $variantId: String!){\n sellingPlanFromVariant(input: {store: $store, variantId: $variantId })\n}",variables:{store:f,variantId:`gid://shopify/ProductVariant/${null==(r=this._protectionVariant)?void 0:r.id}`}},o=await this._fetch.post(e.toString(),i);if(!o)throw new Error("Missing response for selling plan query.");if(null==(s=o.errors)?void 0:s.length)throw new Error(o.errors[0].message);if(!(null==(n=o.data)?void 0:n.sellingPlanFromVariant))throw new Error("Missing variant from selling plan query response.");const m=(null==(d=null==(a=o.data.sellingPlanFromVariant)?void 0:a.sellingPlanGroups)?void 0:d.edges)||[],g=(null==(u=null==(h=null==(c=null==(p=null==(l=m[0])?void 0:l.node)?void 0:p.sellingPlans)?void 0:c.edges)?void 0:h[0])?void 0:u.node)||null;return this._findSellingPlanByName(m,t.name)||g}catch(m){console.error("Error during the query ====>",m)}}async _fetchCart(){try{return await this._fetch.get("/cart.js")}catch(t){throw de(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){try{const{product:t}=await this._fetch.get("/products/shipaid-protection.json");return t}catch(t){throw de(t.message),new Error("Could not fetch protection product for current domain.")}}hasProtection(){return this._hasProtectionInCart}async updateCart(t){t||(t=await this._fetchCart()),this._cart=t}async addProtection(){var t,i;try{if(!this._store)throw new Error("Store has not been loaded.");if(!(null==(t=this._cart)?void 0:t.items))throw new Error("Cart has not been loaded.");if(!(null==(i=this._protectionVariant)?void 0:i.id))throw new Error("No protection variant found.");this._setState("loading");const o={quantity:1,id:this._protectionVariant.id};if(this.supportSubscriptions){const t=this._cart.items.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));if(t){const i=await this._fetchSellingPlanFromVariant(t.selling_plan_allocation.selling_plan),r=i?e(i.id):null;o.selling_plan=r}}const r=await this._fetch.post("/cart/add.js",o);await this._handleRefresh(r),this._setState("success")}catch(o){de(o.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async removeProtection(){try{if(!this._store)throw new Error("Store has not been loaded.");if(!this._protectionCartItem)throw new Error("Protection product not found.");this._setState("loading");const t={quantity:0,id:this._protectionCartItem.key},e=await this._fetch.post("/cart/change.js",t);await this._handleRefresh(e),this._cart=e,this._setState("success")}catch(t){de(t.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async attemptAddProtection(){var t,e,i,o,r,s;if(!(null==(t=this._store)?void 0:t.widgetAutoOptIn))return;if(!(null==(e=this._cart)?void 0:e.items)||!(null==(i=this._cart)?void 0:i.item_count))return;const n=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),a=null==(r=this._cart)?void 0:r.items[n];if(this._hasProtectionInCart=!!a,1===this._cart.item_count&&a)return;!!sessionStorage.getItem(le)||(sessionStorage.setItem(le,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(s=this._cart)?void 0:s.item_count)&&this._store.widgetShowCart&&await this.addProtection())}async handleMultipleProtectionVariants(){var t,e,i,o,r;if(!(null==(t=this._cart)?void 0:t.items)||!(null==(e=this._cart)?void 0:e.item_count))return;let s=0;if(null==(i=this._cart.items)||i.forEach((t=>{var e,i;(null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id)))&&s++})),s>1){const t=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),e={id:(null==(r=this._cart)?void 0:r.items[t]).key,quantity:0},i=await this._fetch.post("/cart/change.js",e);return await this._handleRefresh(i)}}learnMorePopupTemplate(){return this.persistPopup&&(this._popup=this.shouldPersistPopup()),F`
796
791
  <shipaid-popup-learn-more
797
792
  ?active=${"learn-more"===this._popup}
798
- @close=${()=>{this.persistPopup&&localStorage.removeItem(`${he}`),this._popup=null}}
793
+ @close=${()=>{this.persistPopup&&localStorage.removeItem(`${pe}`),this._popup=null}}
799
794
  ></shipaid-popup-learn-more>
800
795
  `}promptTemplate(){var t,e,i;const{useToggle:o,useCheckbox:r,leftCheckbox:s}=(null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)||{useToggle:!1,useCheckbox:!1,leftCheckbox:!1};return F`
801
796
  <div class="shipaid-prompt">
802
797
  <div class="prompt-product">
803
- ${Ot(!this.disableActions&&s,(()=>F`
798
+ ${Tt(!this.disableActions&&s,(()=>F`
804
799
  <label class="shipaid-checkbox">
805
800
  ${this._hasProtectionInCart||!this._hasFinishedSetup?F`<input type="checkbox" checked @click=${this._updateProtection} ?disabled=${this._state.loading}>`:F`<input type="checkbox" @click=${this._updateProtection} ?disabled=${this._state.loading}>`}
806
801
  <span class="shipaid-checkMark left"></span>
807
802
  </label>
808
803
  `))}
809
804
  <div class="prompt-product-image">
810
- ${Ot(this._hasProtectionInCart,(()=>Rt),(()=>jt))}
805
+ ${Tt(this._hasProtectionInCart,(()=>jt),(()=>Nt))}
811
806
  </div>
812
807
  <div class="prompt-product-details">
813
808
  <p class="prompt-product-details-title">
@@ -821,12 +816,12 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
821
816
  <p class="prompt-product-actions-price">
822
817
  ${(null==(i=this._protectionVariant)?void 0:i.price)&&this._currencyFormat(this._protectionVariant.price)}
823
818
  </p>
824
- ${o||r||this.defaultToggleButton?Ot(!this.disableActions&&!s,(()=>F`
819
+ ${o||r||this.defaultToggleButton?Tt(!this.disableActions&&!s,(()=>F`
825
820
  <label class="shipaid-${o?"toggle":r?"checkbox":""}">
826
821
  ${this._hasProtectionInCart||!this._hasFinishedSetup?F`<input type="checkbox" checked @click=${this._updateProtection} ?disabled=${this._state.loading}>`:F`<input type="checkbox" @click=${this._updateProtection} ?disabled=${this._state.loading}>`}
827
822
  <span class="shipaid-${o?"slider":r?"checkMark":""}"></span>
828
823
  </label>
829
- `)):Ot(!this.disableActions,(()=>F`
824
+ `)):Tt(!this.disableActions,(()=>F`
830
825
  <button
831
826
  class="prompt-product-actions-button"
832
827
  @click=${this._updateProtection}
@@ -837,14 +832,14 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
837
832
  `))}
838
833
  </div>
839
834
  </div>
840
- ${Ot(this._state.error,(()=>F`<p class="error">${this._state.error}</p>`))}
835
+ ${Tt(this._state.error,(()=>F`<p class="error">${this._state.error}</p>`))}
841
836
  <div class="prompt-footer">
842
837
  <a
843
838
  class="prompt-footer-badge"
844
839
  @click=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}
845
840
  >
846
841
  <span>${Et("footer.button")}</span>
847
- ${Ut}
842
+ ${Rt}
848
843
  <button
849
844
  class="prompt-footer-about"
850
845
  @click=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}
@@ -854,7 +849,7 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
854
849
  </a>
855
850
  </div>
856
851
  </div>
857
- `}async connectedCallback(){super.connectedCallback(),await async function(t,e=bt){const i=await e.loader(t,e);e.translationCache={},yt(t,i,e)}(this.lang),this.hasLoadedStrings=!0}render(){return Tt(this,(async()=>{var t,e,i,o,r,s;const n=document.createElement("link");n.setAttribute("href","https://fonts.googleapis.com/css2?family=Lato&display=swap"),n.setAttribute("rel","stylesheet"),document.head.appendChild(n);try{const[t,e,i]=await Promise.all([this._fetchShipAidData(),this._fetchCart(),this._fetchProduct()]);this._store=t,this._cart=e,this._protectionProduct=i}catch(a){return le(a.message),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)}return this.planActive?(null==(e=null==(t=this._store)?void 0:t.protectionSettings)?void 0:e.protectionType)?this._protectionProduct?(this._hasFinishedSetup=!0,this._dispatchEvent(re.LOADED,this._store),setTimeout((async()=>{var t,e,i,o;(null==(t=this._store)?void 0:t.widgetAutoOptIn)&&(null==(e=this._cart)?void 0:e.item_count)&&(this.customerId&&this._store.excludedCustomersIdsAutoOptIn&&(null==(i=this._store.excludedCustomersIdsAutoOptIn)?void 0:i.length)&&this._store.excludedCustomersIdsAutoOptIn.includes(`gid://shopify/Customer/${this.customerId}`)||sessionStorage.getItem(ce)||(sessionStorage.setItem(ce,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(o=this._cart)?void 0:o.item_count)&&this._store.widgetShowCart&&await this.addProtection()))}),500),void(this.disablePolling||(setInterval((async()=>{const t=this._cartLastUpdated;t&&(new Date).getTime()-t.getTime()<this.pollingInterval||await this.updateCart()}),this.pollingInterval),(null==(i=this._store)?void 0:i.widgetPollProtection)&&!this.intervalId&&(this.intervalId=setInterval((async()=>{await this.attemptAddProtection()}),400),localStorage.setItem(`polling-shipaid-protection_${this.intervalId}`,`${this.intervalId}`)),(null==(s=null==(r=null==(o=this._store)?void 0:o.widgetConfigurations)?void 0:r.widget)?void 0:s.pollVariantsCheck)&&setInterval((async()=>{await this.handleMultipleProtectionVariants()}),400)))):(pe("No protection settings product for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(pe("No protection settings for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(pe("No plan is active for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1))}),[]),Tt(this,(async()=>{var t,i,o,r;if(this._cartLastUpdated=new Date,!(null==(t=this._cart)?void 0:t.items))return;const s=null==(i=this._cart.items)?void 0:i.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),n=null==(o=this._cart)?void 0:o.items[s];if(this._hasProtectionInCart=!!n,!this._store)return;const a=await this.calculateProtectionTotal(this._cart);if(this._cart.item_count>0&&n&&(this._cart.total_price===n.final_line_price||!a)){const t={id:n.key,quantity:0},e=await this._fetch.post("/cart/change.js",t);return sessionStorage.removeItem(ce),await this._handleRefresh(e)}const d=this._findProtectionVariant(a);if(a?(this._protectionVariant=d,this._shouldShowWidget=!0):this._protectionVariant={id:0,price:"0"},!(null==d?void 0:d.id))return this._shouldShowWidget=!1,void le("No matching protection variant found.");if(!(null==(r=this._protectionVariant)?void 0:r.id))return void(this._shouldShowWidget=!1);if(!n)return;if(this.supportSubscriptions){const t=this._cart.items.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));let i=null;if(!t&&(null==n?void 0:n.selling_plan_allocation))i={id:n.key,quantity:1,selling_plan:null};else if(t&&!(null==n?void 0:n.selling_plan_allocation)){const o=await this._fetchSellingPlanFromVariant(t.selling_plan_allocation.selling_plan),r=o?e(o.id):null;i={id:n.key,quantity:1,selling_plan:r}}if(i){const t=await this._fetch.post("/cart/change.js",i);await this._handleRefresh(t)}}if(d.id===n.variant_id){if(this._protectionCartItem={...n,index:s,position:s+1},1===n.quantity)return;const t={id:n.key,quantity:1},e=await this._fetch.post("/cart/change.js",t);return this._handleRefreshCart(),await this._handleRefresh(e)}const p={updates:{[n.variant_id]:0,[d.id]:1}},l=await this._fetch.post("/cart/update.js",p);await this._handleRefresh(l)}),[this._store,this._cart]),lt(this.learnMorePopupTemplate(),document.body),F`
852
+ `}async connectedCallback(){super.connectedCallback(),await async function(t,e=_t){const i=await e.loader(t,e);e.translationCache={},bt(t,i,e)}(this.lang),this.hasLoadedStrings=!0}render(){return It(this,(async()=>{var t,e,i,o,r,s;const n=document.createElement("link");n.setAttribute("href","https://fonts.googleapis.com/css2?family=Lato&display=swap"),n.setAttribute("rel","stylesheet"),document.head.appendChild(n);try{const[t,e,i]=await Promise.all([this._fetchShipAidData(),this._fetchCart(),this._fetchProduct()]);this._store=t,this._cart=e,this._protectionProduct=i}catch(a){return de(a.message),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)}return this.planActive?(null==(e=null==(t=this._store)?void 0:t.protectionSettings)?void 0:e.protectionType)?this._protectionProduct?(this._hasFinishedSetup=!0,this._dispatchEvent(ie.LOADED,this._store),setTimeout((async()=>{var t,e,i,o;(null==(t=this._store)?void 0:t.widgetAutoOptIn)&&(null==(e=this._cart)?void 0:e.item_count)&&(this.customerId&&this._store.excludedCustomersIdsAutoOptIn&&(null==(i=this._store.excludedCustomersIdsAutoOptIn)?void 0:i.length)&&this._store.excludedCustomersIdsAutoOptIn.includes(`gid://shopify/Customer/${this.customerId}`)||sessionStorage.getItem(le)||!this._hasProtectionInCart&&(null==(o=this._cart)?void 0:o.item_count)&&this._store.widgetShowCart&&(await this.addProtection(),sessionStorage.setItem(le,JSON.stringify({loaded:!0}))))}),500),void(this.disablePolling||(setInterval((async()=>{const t=this._cartLastUpdated;t&&(new Date).getTime()-t.getTime()<this.pollingInterval||await this.updateCart()}),this.pollingInterval),(null==(i=this._store)?void 0:i.widgetPollProtection)&&!this.intervalId&&(this.intervalId=setInterval((async()=>{await this.attemptAddProtection()}),400),localStorage.setItem(`polling-shipaid-protection_${this.intervalId}`,`${this.intervalId}`)),(null==(s=null==(r=null==(o=this._store)?void 0:o.widgetConfigurations)?void 0:r.widget)?void 0:s.pollVariantsCheck)&&setInterval((async()=>{await this.handleMultipleProtectionVariants()}),400)))):(ae("No protection settings product for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(ae("No protection settings for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(ae("No plan is active for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1))}),[]),It(this,(async()=>{var t,i,o,r;if(this._cartLastUpdated=new Date,!(null==(t=this._cart)?void 0:t.items))return;const s=null==(i=this._cart.items)?void 0:i.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),n=null==(o=this._cart)?void 0:o.items[s];if(this._hasProtectionInCart=!!n,!this._store)return;const a=await this.calculateProtectionTotal(this._cart);if(this._cart.item_count>0&&n&&(this._cart.total_price===(null==n?void 0:n.final_line_price)||!a)){const t={id:n.key,quantity:0},e=await this._fetch.post("/cart/change.js",t);return sessionStorage.removeItem(le),await this._handleRefresh(e)}const d=this._findProtectionVariant(a);if(a?(this._protectionVariant=d,this._shouldShowWidget=!0):this._protectionVariant={id:0,price:"0"},!(null==d?void 0:d.id))return this._shouldShowWidget=!1,void de("No matching protection variant found.");if(!(null==(r=this._protectionVariant)?void 0:r.id))return void(this._shouldShowWidget=!1);if(!n)return;if(this.supportSubscriptions){const t=this._cart.items.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));let i=null;if(!t&&(null==n?void 0:n.selling_plan_allocation))i={id:n.key,quantity:1,selling_plan:null};else if(t&&!(null==n?void 0:n.selling_plan_allocation)){const o=await this._fetchSellingPlanFromVariant(t.selling_plan_allocation.selling_plan),r=o?e(o.id):null;i={id:n.key,quantity:1,selling_plan:r}}if(i){const t=await this._fetch.post("/cart/change.js",i);await this._handleRefresh(t)}}if(d.id===n.variant_id){if(this._protectionCartItem={...n,index:s,position:s+1},1===n.quantity)return;const t={id:n.key,quantity:1},e=await this._fetch.post("/cart/change.js",t);return this._handleRefreshCart(),await this._handleRefresh(e)}const l={updates:{[n.variant_id]:0,[d.id]:1}},p=await this._fetch.post("/cart/update.js",l);await this._handleRefresh(p)}),[this._store,this._cart]),lt(this.learnMorePopupTemplate(),document.body),F`
858
853
  <style>
859
854
  :host {
860
855
  --shipaid-primary: #002bd6;
@@ -1121,6 +1116,6 @@ function Ot(t,e,i){return t?e():null==i?void 0:i()}const Nt=g`
1121
1116
  }
1122
1117
  </style>
1123
1118
  <div class="shipaid">
1124
- ${Ot(this._hasFinishedSetup,(()=>{var t;return Ot(this._shouldShowWidget&&this.planActive&&(null==(t=this._store)?void 0:t.widgetShowCart),(()=>this.promptTemplate()),(()=>G))}),(()=>this.promptTemplate()))}
1119
+ ${Tt(this._hasFinishedSetup,(()=>{var t;return Tt(this._shouldShowWidget&&this.planActive&&(null==(t=this._store)?void 0:t.widgetShowCart),(()=>this.promptTemplate()),(()=>W))}),(()=>this.promptTemplate()))}
1125
1120
  </div>
1126
- `}},t.ShipAidWidget.styles=oe,ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disablePolling",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableActions",2),ae([n({type:Number,attribute:!0})],t.ShipAidWidget.prototype,"pollingInterval",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableRefresh",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"refreshCart",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"persistPopup",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"defaultToggleButton",2),ae([n({type:String,attribute:!0})],t.ShipAidWidget.prototype,"lang",2),ae([n({type:String,attribute:!0})],t.ShipAidWidget.prototype,"currency",2),ae([n({type:String,attribute:!0})],t.ShipAidWidget.prototype,"customerId",2),ae([n({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"supportSubscriptions",2),ae([a()],t.ShipAidWidget.prototype,"_storeDomain",2),ae([a()],t.ShipAidWidget.prototype,"_store",2),ae([a()],t.ShipAidWidget.prototype,"_cart",2),ae([a()],t.ShipAidWidget.prototype,"_protectionProduct",2),ae([a()],t.ShipAidWidget.prototype,"_cartLastUpdated",2),ae([a()],t.ShipAidWidget.prototype,"_hasFinishedSetup",2),ae([a()],t.ShipAidWidget.prototype,"_shouldShowWidget",2),ae([a()],t.ShipAidWidget.prototype,"_hasProtectionInCart",2),ae([a()],t.ShipAidWidget.prototype,"_protectionCartItem",2),ae([a()],t.ShipAidWidget.prototype,"_protectionVariant",2),ae([a()],t.ShipAidWidget.prototype,"hasLoadedStrings",2),ae([a()],t.ShipAidWidget.prototype,"intervalId",2),ae([a()],t.ShipAidWidget.prototype,"_state",2),ae([a()],t.ShipAidWidget.prototype,"_popup",2),t.ShipAidWidget=ae([o("shipaid-widget")],t.ShipAidWidget);const fe="Laden des ShipAid-Widgets...",me="Liefergarantie",ve="im Falle von Verlust, Beschädigung oder Diebstahl",_e={button:"Bereitgestellt von"},be={add:"Hinzufügen",remove:"Entfernen",loading:"Lädt..."},ye={loading:fe,title:me,description:ve,footer:_e,actions:be,"learn-more-popup":{close:"Schließen",title:"Liefergarantie",subtitle:"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie anzubieten, weil jede Bestellung wertvoll ist!",disclaimer:{"subtitle-enable":"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie zu bieten, denn wir wissen, dass jede Bestellung wertvoll ist und Dinge passieren können!","subtitle-monitor":"Wir überwachen Ihr Paket kontinuierlich und bieten ein praktisches Portal, damit Sie den Fortschritt Ihrer Bestellung jederzeit verfolgen können!","subtitle-notify":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.","subtitle-resolution":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.",text:"Durch den Erwerb dieser Liefergarantie stimmen Sie unseren Servicebedingungen und Datenschutzrichtlinien zu. Diese Garantie ist nicht verpflichtend, IST KEINE Versicherung und bietet keine Entschädigung für Verluste, Schäden oder Haftungen, die aus einem zufälligen oder unbekannten Ereignis resultieren. Sollte das Produkt nicht in zufriedenstellendem Zustand geliefert werden, kann die Marke, bei der Sie gekauft haben, dieses kostenlos ersetzen. ShipAid liefert keine Produkte oder Dienstleistungen direkt an Verbraucher, sondern bietet einen Dienst an, der Marken ermöglicht, den Produktersatz für ihre Kunden zu erleichtern. Der Erwerb dieser Garantie bedeutet nicht, dass Sie automatisch eine Rückerstattung für irgendwelche Produkte oder Versandkosten erhalten, da der Lösungsprozess und die Entscheidung über eine Kompensation strikt von der Marke, bei der Sie kaufen, entschieden werden. Die Marke wird einen Nachweis für Beschädigungen oder die Nichtlieferung des Produkts verlangen."},links:{terms:"Servicebedingungen",privacy:"Datenschutzrichtlinie"}}},Ce=Object.freeze(Object.defineProperty({__proto__:null,actions:be,default:ye,description:ve,footer:_e,loading:fe,title:me},Symbol.toStringTag,{value:"Module"})),we="Cargando el widget ShipAid...",xe="Garantía de entrega",$e="en caso de Pérdida, Daño o Robo",Se={button:"Energizado por"},Ae={add:"Agregar",remove:"Eliminar",loading:"Cargando..."},Le={loading:we,title:xe,description:$e,footer:Se,actions:Ae,"learn-more-popup":{close:"Cerca",title:"Garantía de entrega",disclaimer:{"subtitle-enable":"Permitimos que sus marcas favoritas brinden una garantía de entrega porque sabemos que cada pedido es valioso y las cosas suceden!","subtitle-monitor":"Supervisamos continuamente su paquete y le ofrecemos un portal conveniente para que pueda realizar un seguimiento del progreso de su pedido en cualquier momento.","subtitle-notify":"Se le notificará durante todo el proceso de envío, asegurándose de que esté actualizado en cada paso del camino.","subtitle-resolution":"En caso de cualquier problema durante el tránsito, ofrecemos un método rápido y fácil para informar el problema directamente a la marca, para una resolución rápida.",text:"Al comprar esta garantía de entrega, acepta nuestros Términos de servicio y Política de privacidad. Usted no está obligado a comprar esta garantía. Esta garantía NO es un seguro y no brinda indemnización por pérdida, daño o responsabilidad que surja de un evento contingente o desconocido, sino que, a través de las marcas de ShipAid, brinda una garantía de entrega mediante la cual, si el producto que ordenó no se entrega en condiciones satisfactorias, la marca desde el que ordenó el producto puede reemplazar el producto sin cargo. ShipAid no proporciona ningún producto o servicio directamente a los consumidores, sino que proporciona un servicio que permite a las marcas facilitar el reemplazo de productos a sus clientes. La compra de esta garantía no significa que se le reembolsará automáticamente cualquier producto o costo de envío porque el proceso de resolución y la decisión de compensación lo decide estrictamente la marca a la que le compra. La marca requerirá prueba de daño o producto no entregado."},links:{terms:"Términos de servicio",privacy:"Política de Privacidad"}}},Pe=Object.freeze(Object.defineProperty({__proto__:null,actions:Ae,default:Le,description:$e,footer:Se,loading:we,title:xe},Symbol.toStringTag,{value:"Module"})),ke="Chargement du widget ShipAid...",ze="Garantie de livraison",Ee="en cas de Perte, Dommages ou Vol",Me={button:"Propulsé par"},qe={add:"Ajouter",remove:"Retirer",loading:"Chargement..."},Ie={loading:ke,title:ze,description:Ee,footer:Me,actions:qe,"learn-more-popup":{close:"Fermer",title:"Garantie de livraison",subtitle:"Nous permettons à vos marques préférées d'offrir une garantie de livraison car chaque commande est précieuse !",disclaimer:{"subtitle-enable":"Nous permettons à vos marques préférées de fournir une garantie de livraison car nous savons que chaque commande est précieuse et que des incidents peuvent survenir !","subtitle-monitor":"Nous surveillons continuellement votre colis et offrons un portail pratique pour vous permettre de suivre l'avancement de votre commande à tout moment !","subtitle-notify":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.","subtitle-resolution":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.",text:"En acquérant cette garantie de livraison, vous acceptez nos Conditions de Service et notre Politique de Confidentialité. Cette garantie n'est pas obligatoire, N'EST PAS une assurance et ne fournit pas d'indemnisation pour les pertes, dommages ou responsabilités résultant d'un événement contingent ou inconnu. Si le produit n'est pas livré dans des conditions satisfaisantes, la marque auprès de laquelle vous avez acheté peut le remplacer gratuitement. ShipAid ne fournit aucun produit ou service directement aux consommateurs, mais offre un service permettant aux marques de faciliter le remplacement du produit pour leurs clients. L'achat de cette garantie ne signifie pas que vous serez automatiquement remboursé pour tout produit ou frais de port, car le processus de résolution et la décision de compensation sont strictement décidés par la marque que vous achetez. La marque exigera une preuve de dommage ou de produit non livré."},links:{terms:"Conditions de service",privacy:"Politique de Confidentialité"}}},Te=Object.freeze(Object.defineProperty({__proto__:null,actions:qe,default:Ie,description:Ee,footer:Me,loading:ke,title:ze},Symbol.toStringTag,{value:"Module"})),Oe="Caricamento del widget ShipAid...",Ne="Garanzia di consegna",je="in caso di Perdita, Danno o Furto",Re={button:"Offerto da"},Ue={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},Ve={loading:Oe,title:Ne,description:je,footer:Re,actions:Ue,"learn-more-popup":{close:"Vicina",title:"Garanzia di consegna",subtitle:"Consentiamo ai tuoi marchi preferiti di offrire una garanzia di consegna perché ogni ordine è prezioso!",disclaimer:{"subtitle-enable":"Consentiamo ai tuoi marchi preferiti di fornire una garanzia di consegna perché sappiamo che ogni ordine è prezioso e le cose accadono!","subtitle-monitor":"Monitoriamo continuamente il tuo pacco e ti offriamo un comodo portale per monitorare lo stato di avanzamento del tuo ordine in qualsiasi momento!","subtitle-notify":"Riceverai una notifica durante l'intero processo di spedizione, assicurandoti di rimanere aggiornato in ogni fase del processo.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Acquistando questa garanzia di consegna, accetti i nostri Termini di servizio e l'Informativa sulla privacy. Non sei obbligato ad acquistare questa garanzia. Questa garanzia NON è un'assicurazione e non fornisce un indennizzo contro perdite, danni o responsabilità derivanti da un evento contingente o sconosciuto, ma piuttosto, attraverso ShipAid i marchi forniscono una garanzia di consegna in base alla quale se il prodotto ordinato non viene consegnato in condizioni soddisfacenti, il marchio da cui hai ordinato il prodotto può sostituire il prodotto gratuitamente. ShipAid non fornisce alcun prodotto o servizio direttamente ai consumatori, ma fornisce invece un servizio che consente ai marchi di facilitare la sostituzione del prodotto ai propri clienti. L'acquisto di questa garanzia non significa che verrai automaticamente rimborsato per qualsiasi prodotto o costo di spedizione perché il processo di risoluzione e la decisione per il risarcimento sono rigorosamente decisi dal marchio da cui stai acquistando. Il marchio richiederà la prova del danno o del prodotto non consegnato."},links:{terms:"Termini di servizio",privacy:"Politica sulla riservatezza"}}},We=Object.freeze(Object.defineProperty({__proto__:null,actions:Ue,default:Ve,description:je,footer:Re,loading:Oe,title:Ne},Symbol.toStringTag,{value:"Module"})),De="Carregando o widget ShipAid...",He="Garantia de entrega",Be="em caso de Perda, Danos ou Roubo",Fe={button:"Distribuído por"},Ze={add:"Adicionar",remove:"Remover",loading:"Carregando..."},Ge={loading:De,title:He,description:Be,footer:Fe,actions:Ze,"learn-more-popup":{close:"Fechar",title:"Garantia de entrega",subtitle:"Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",disclaimer:{"subtitle-enable":"Permitimos que suas marcas favoritas forneçam uma garantia de entrega porque sabemos que cada pedido é precioso e as coisas acontecem!","subtitle-monitor":"Monitoramos continuamente o seu pacote e oferecemos um portal conveniente para você acompanhar o andamento do seu pedido a qualquer momento!","subtitle-notify":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Ao adquirir esta garantia de entrega, você concorda com nossos Termos de Serviço e Política de Privacidade. Esta garantia não é obrigatória, NÃO é um seguro e não fornece indenização contra perdas, danos ou responsabilidade decorrentes de um contingente ou desconhecido. Caso o produto não seja entregue em condições satisfatórias, a marca da qual você comprou pode substituí-lo gratuitamente. A ShipAid não fornece nenhum produto ou serviço diretamente aos consumidores, mas sim presta um serviço que permite às marcas facilitar a substituição do produto aos seus clientes. Adquirir esta garantia não significa que você será automaticamente reembolsado por qualquer produto ou custos de envio porque o processo de resolução e decisão de compensação é estritamente decidido pela marca que você está comprando. A marca exigirá prova de danos ou produto não entregue."},links:{terms:"Termos de serviço",privacy:"Política de Privacidade"}}},Ke=Object.freeze(Object.defineProperty({__proto__:null,actions:Ze,default:Ge,description:Be,footer:Fe,loading:De,title:He},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
1121
+ `}}ue.styles=ee,se([s({type:Boolean,attribute:!0})],ue.prototype,"disablePolling",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"disableActions",2),se([s({type:Number,attribute:!0})],ue.prototype,"pollingInterval",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"disableRefresh",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"refreshCart",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"persistPopup",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"defaultToggleButton",2),se([s({type:String,attribute:!0})],ue.prototype,"lang",2),se([s({type:String,attribute:!0})],ue.prototype,"currency",2),se([s({type:String,attribute:!0})],ue.prototype,"customerId",2),se([s({type:Boolean,attribute:!0})],ue.prototype,"supportSubscriptions",2),se([n()],ue.prototype,"_storeDomain",2),se([n()],ue.prototype,"_store",2),se([n()],ue.prototype,"_cart",2),se([n()],ue.prototype,"_protectionProduct",2),se([n()],ue.prototype,"_cartLastUpdated",2),se([n()],ue.prototype,"_hasFinishedSetup",2),se([n()],ue.prototype,"_shouldShowWidget",2),se([n()],ue.prototype,"_hasProtectionInCart",2),se([n()],ue.prototype,"_protectionCartItem",2),se([n()],ue.prototype,"_protectionVariant",2),se([n()],ue.prototype,"hasLoadedStrings",2),se([n()],ue.prototype,"intervalId",2),se([n()],ue.prototype,"_state",2),se([n()],ue.prototype,"_popup",2),customElements.get("shipaid-widget")||customElements.define("shipaid-widget",ue);const fe="Laden des ShipAid-Widgets...",me="Liefergarantie",ge="im Falle von Verlust, Beschädigung oder Diebstahl",ve={button:"Bereitgestellt von"},_e={add:"Hinzufügen",remove:"Entfernen",loading:"Lädt..."},be={loading:fe,title:me,description:ge,footer:ve,actions:_e,"learn-more-popup":{close:"Schließen",title:"Liefergarantie",subtitle:"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie anzubieten, weil jede Bestellung wertvoll ist!",disclaimer:{"subtitle-enable":"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie zu bieten, denn wir wissen, dass jede Bestellung wertvoll ist und Dinge passieren können!","subtitle-monitor":"Wir überwachen Ihr Paket kontinuierlich und bieten ein praktisches Portal, damit Sie den Fortschritt Ihrer Bestellung jederzeit verfolgen können!","subtitle-notify":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.","subtitle-resolution":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.",text:"Durch den Erwerb dieser Liefergarantie stimmen Sie unseren Servicebedingungen und Datenschutzrichtlinien zu. Diese Garantie ist nicht verpflichtend, IST KEINE Versicherung und bietet keine Entschädigung für Verluste, Schäden oder Haftungen, die aus einem zufälligen oder unbekannten Ereignis resultieren. Sollte das Produkt nicht in zufriedenstellendem Zustand geliefert werden, kann die Marke, bei der Sie gekauft haben, dieses kostenlos ersetzen. ShipAid liefert keine Produkte oder Dienstleistungen direkt an Verbraucher, sondern bietet einen Dienst an, der Marken ermöglicht, den Produktersatz für ihre Kunden zu erleichtern. Der Erwerb dieser Garantie bedeutet nicht, dass Sie automatisch eine Rückerstattung für irgendwelche Produkte oder Versandkosten erhalten, da der Lösungsprozess und die Entscheidung über eine Kompensation strikt von der Marke, bei der Sie kaufen, entschieden werden. Die Marke wird einen Nachweis für Beschädigungen oder die Nichtlieferung des Produkts verlangen."},links:{terms:"Servicebedingungen",privacy:"Datenschutzrichtlinie"}}},ye=Object.freeze(Object.defineProperty({__proto__:null,actions:_e,default:be,description:ge,footer:ve,loading:fe,title:me},Symbol.toStringTag,{value:"Module"})),Ce="Cargando el widget ShipAid...",we="Garantía de entrega",xe="en caso de Pérdida, Daño o Robo",$e={button:"Energizado por"},Se={add:"Agregar",remove:"Eliminar",loading:"Cargando..."},Ae={loading:Ce,title:we,description:xe,footer:$e,actions:Se,"learn-more-popup":{close:"Cerca",title:"Garantía de entrega",disclaimer:{"subtitle-enable":"Permitimos que sus marcas favoritas brinden una garantía de entrega porque sabemos que cada pedido es valioso y las cosas suceden!","subtitle-monitor":"Supervisamos continuamente su paquete y le ofrecemos un portal conveniente para que pueda realizar un seguimiento del progreso de su pedido en cualquier momento.","subtitle-notify":"Se le notificará durante todo el proceso de envío, asegurándose de que esté actualizado en cada paso del camino.","subtitle-resolution":"En caso de cualquier problema durante el tránsito, ofrecemos un método rápido y fácil para informar el problema directamente a la marca, para una resolución rápida.",text:"Al comprar esta garantía de entrega, acepta nuestros Términos de servicio y Política de privacidad. Usted no está obligado a comprar esta garantía. Esta garantía NO es un seguro y no brinda indemnización por pérdida, daño o responsabilidad que surja de un evento contingente o desconocido, sino que, a través de las marcas de ShipAid, brinda una garantía de entrega mediante la cual, si el producto que ordenó no se entrega en condiciones satisfactorias, la marca desde el que ordenó el producto puede reemplazar el producto sin cargo. ShipAid no proporciona ningún producto o servicio directamente a los consumidores, sino que proporciona un servicio que permite a las marcas facilitar el reemplazo de productos a sus clientes. La compra de esta garantía no significa que se le reembolsará automáticamente cualquier producto o costo de envío porque el proceso de resolución y la decisión de compensación lo decide estrictamente la marca a la que le compra. La marca requerirá prueba de daño o producto no entregado."},links:{terms:"Términos de servicio",privacy:"Política de Privacidad"}}},Le=Object.freeze(Object.defineProperty({__proto__:null,actions:Se,default:Ae,description:xe,footer:$e,loading:Ce,title:we},Symbol.toStringTag,{value:"Module"})),Pe="Chargement du widget ShipAid...",ke="Garantie de livraison",Ee="en cas de Perte, Dommages ou Vol",ze={button:"Propulsé par"},Me={add:"Ajouter",remove:"Retirer",loading:"Chargement..."},qe={loading:Pe,title:ke,description:Ee,footer:ze,actions:Me,"learn-more-popup":{close:"Fermer",title:"Garantie de livraison",subtitle:"Nous permettons à vos marques préférées d'offrir une garantie de livraison car chaque commande est précieuse !",disclaimer:{"subtitle-enable":"Nous permettons à vos marques préférées de fournir une garantie de livraison car nous savons que chaque commande est précieuse et que des incidents peuvent survenir !","subtitle-monitor":"Nous surveillons continuellement votre colis et offrons un portail pratique pour vous permettre de suivre l'avancement de votre commande à tout moment !","subtitle-notify":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.","subtitle-resolution":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.",text:"En acquérant cette garantie de livraison, vous acceptez nos Conditions de Service et notre Politique de Confidentialité. Cette garantie n'est pas obligatoire, N'EST PAS une assurance et ne fournit pas d'indemnisation pour les pertes, dommages ou responsabilités résultant d'un événement contingent ou inconnu. Si le produit n'est pas livré dans des conditions satisfaisantes, la marque auprès de laquelle vous avez acheté peut le remplacer gratuitement. ShipAid ne fournit aucun produit ou service directement aux consommateurs, mais offre un service permettant aux marques de faciliter le remplacement du produit pour leurs clients. L'achat de cette garantie ne signifie pas que vous serez automatiquement remboursé pour tout produit ou frais de port, car le processus de résolution et la décision de compensation sont strictement décidés par la marque que vous achetez. La marque exigera une preuve de dommage ou de produit non livré."},links:{terms:"Conditions de service",privacy:"Politique de Confidentialité"}}},Ie=Object.freeze(Object.defineProperty({__proto__:null,actions:Me,default:qe,description:Ee,footer:ze,loading:Pe,title:ke},Symbol.toStringTag,{value:"Module"})),Te="Caricamento del widget ShipAid...",Oe="Garanzia di consegna",Ne="in caso di Perdita, Danno o Furto",je={button:"Offerto da"},Re={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},Ue={loading:Te,title:Oe,description:Ne,footer:je,actions:Re,"learn-more-popup":{close:"Vicina",title:"Garanzia di consegna",subtitle:"Consentiamo ai tuoi marchi preferiti di offrire una garanzia di consegna perché ogni ordine è prezioso!",disclaimer:{"subtitle-enable":"Consentiamo ai tuoi marchi preferiti di fornire una garanzia di consegna perché sappiamo che ogni ordine è prezioso e le cose accadono!","subtitle-monitor":"Monitoriamo continuamente il tuo pacco e ti offriamo un comodo portale per monitorare lo stato di avanzamento del tuo ordine in qualsiasi momento!","subtitle-notify":"Riceverai una notifica durante l'intero processo di spedizione, assicurandoti di rimanere aggiornato in ogni fase del processo.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Acquistando questa garanzia di consegna, accetti i nostri Termini di servizio e l'Informativa sulla privacy. Non sei obbligato ad acquistare questa garanzia. Questa garanzia NON è un'assicurazione e non fornisce un indennizzo contro perdite, danni o responsabilità derivanti da un evento contingente o sconosciuto, ma piuttosto, attraverso ShipAid i marchi forniscono una garanzia di consegna in base alla quale se il prodotto ordinato non viene consegnato in condizioni soddisfacenti, il marchio da cui hai ordinato il prodotto può sostituire il prodotto gratuitamente. ShipAid non fornisce alcun prodotto o servizio direttamente ai consumatori, ma fornisce invece un servizio che consente ai marchi di facilitare la sostituzione del prodotto ai propri clienti. L'acquisto di questa garanzia non significa che verrai automaticamente rimborsato per qualsiasi prodotto o costo di spedizione perché il processo di risoluzione e la decisione per il risarcimento sono rigorosamente decisi dal marchio da cui stai acquistando. Il marchio richiederà la prova del danno o del prodotto non consegnato."},links:{terms:"Termini di servizio",privacy:"Politica sulla riservatezza"}}},Ve=Object.freeze(Object.defineProperty({__proto__:null,actions:Re,default:Ue,description:Ne,footer:je,loading:Te,title:Oe},Symbol.toStringTag,{value:"Module"})),De="Carregando o widget ShipAid...",He="Garantia de entrega",Be="em caso de Perda, Danos ou Roubo",Fe={button:"Distribuído por"},Ze={add:"Adicionar",remove:"Remover",loading:"Carregando..."},We={loading:De,title:He,description:Be,footer:Fe,actions:Ze,"learn-more-popup":{close:"Fechar",title:"Garantia de entrega",subtitle:"Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",disclaimer:{"subtitle-enable":"Permitimos que suas marcas favoritas forneçam uma garantia de entrega porque sabemos que cada pedido é precioso e as coisas acontecem!","subtitle-monitor":"Monitoramos continuamente o seu pacote e oferecemos um portal conveniente para você acompanhar o andamento do seu pedido a qualquer momento!","subtitle-notify":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Ao adquirir esta garantia de entrega, você concorda com nossos Termos de Serviço e Política de Privacidade. Esta garantia não é obrigatória, NÃO é um seguro e não fornece indenização contra perdas, danos ou responsabilidade decorrentes de um contingente ou desconhecido. Caso o produto não seja entregue em condições satisfatórias, a marca da qual você comprou pode substituí-lo gratuitamente. A ShipAid não fornece nenhum produto ou serviço diretamente aos consumidores, mas sim presta um serviço que permite às marcas facilitar a substituição do produto aos seus clientes. Adquirir esta garantia não significa que você será automaticamente reembolsado por qualquer produto ou custos de envio porque o processo de resolução e decisão de compensação é estritamente decidido pela marca que você está comprando. A marca exigirá prova de danos ou produto não entregue."},links:{terms:"Termos de serviço",privacy:"Política de Privacidade"}}},Ge=Object.freeze(Object.defineProperty({__proto__:null,actions:Ze,default:We,description:Be,footer:Fe,loading:De,title:He},Symbol.toStringTag,{value:"Module"}));t.ShipAidWidget=ue,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui.shipaid.com",
3
3
  "private": false,
4
- "version": "0.3.36",
4
+ "version": "0.3.38",
5
5
  "type": "module",
6
6
  "main": "dist/widget.umd.js",
7
7
  "unpkg": "dist/widget.iife.js",
@@ -40,4 +40,4 @@
40
40
  "typescript": "^4.9.4",
41
41
  "vite": "^4.0.4"
42
42
  }
43
- }
43
+ }