xactsize-webcomponents 1.0.22 → 1.0.23

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.
@@ -1201,53 +1201,102 @@ E.styles = N`
1201
1201
  margin: 0 auto;
1202
1202
  }
1203
1203
 
1204
- @media (max-width: 754px) {
1205
- .main-section {
1206
- flex-direction: column;
1207
- gap: 8px;
1208
- }
1204
+ @media (max-width: 754px) {
1205
+ .main-section {
1206
+ flex-direction: column;
1207
+ gap: 16px;
1208
+ align-items: center;
1209
+ }
1209
1210
 
1210
- .images-section {
1211
- order: -1;
1212
- max-width: 100%;
1213
- margin-bottom: 8px;
1214
- }
1211
+ .images-section {
1212
+ order: -1;
1213
+ width: 100%;
1214
+ }
1215
1215
 
1216
- .images-section svg {
1217
- width: 80%;
1218
- max-width: 250px;
1219
- height: auto;
1220
- margin-bottom: 8px;
1221
- }
1216
+ .images-section svg {
1217
+ width: 90%;
1218
+ max-width: 220px;
1219
+ height: auto;
1220
+ }
1222
1221
 
1223
- .tips-section {
1224
- width: 100%;
1225
- gap: 4px;
1226
- }
1222
+ .tips-section {
1223
+ width: 100%;
1224
+ gap: 8px;
1225
+ align-items: center;
1226
+ }
1227
1227
 
1228
- .tip-title {
1229
- font-size: 12px;
1230
- margin-bottom: 2px;
1231
- }
1228
+ form {
1229
+ align-items: center;
1230
+ width: 100%;
1231
+ }
1232
1232
 
1233
- .tip-text {
1234
- font-size: 10px;
1235
- line-height: 1.3;
1236
- }
1233
+ input {
1234
+ max-width: 100%;
1235
+ font-size: 14px;
1236
+ padding: 10px;
1237
+ }
1237
1238
 
1238
- .header-text {
1239
- font-size: 20px;
1240
- }
1239
+ label {
1240
+ text-align: center;
1241
+ font-size: 14px;
1242
+ }
1241
1243
 
1242
- .description-text {
1243
- font-size: 14px;
1244
- line-height: 1.4;
1245
- }
1244
+ .xact-button {
1245
+ max-width: 100%;
1246
+ }
1246
1247
 
1247
- .buttons {
1248
- gap: 8px;
1249
- max-width: 180px;
1250
- }
1248
+ .header-text {
1249
+ font-size: 20px;
1250
+ text-align: center;
1251
+ }
1252
+
1253
+ .description-text {
1254
+ font-size: 14px;
1255
+ text-align: center;
1256
+ }
1257
+
1258
+ .tip-title {
1259
+ font-size: 12px;
1260
+ }
1261
+
1262
+ .tip-text {
1263
+ font-size: 11px;
1264
+ }
1265
+
1266
+ .buttons {
1267
+ gap: 8px;
1268
+ width: 100%;
1269
+ max-width: 100%;
1270
+ }
1271
+ }
1272
+
1273
+ /* 📱 Extra pequeno (até 380px) */
1274
+ @media (max-width: 380px) {
1275
+ :host {
1276
+ padding: 8px;
1277
+ }
1278
+
1279
+ .component-content {
1280
+ gap: 8px;
1281
+ }
1282
+
1283
+ .header-text {
1284
+ font-size: 18px;
1285
+ }
1286
+
1287
+ .description-text {
1288
+ font-size: 13px;
1289
+ }
1290
+
1291
+ input {
1292
+ font-size: 13px;
1293
+ padding: 8px;
1294
+ }
1295
+
1296
+ .xact-button {
1297
+ font-size: 14px;
1298
+ }
1299
+
1251
1300
 
1252
1301
  }
1253
1302
  `;
@@ -2,21 +2,21 @@
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const g=globalThis,rA=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,pA=Symbol(),sA=new WeakMap;let iA=class{constructor(A,t,l){if(this._$cssResult$=!0,l!==pA)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=A,this.t=t}get styleSheet(){let A=this.o;const t=this.t;if(rA&&A===void 0){const l=t!==void 0&&t.length===1;l&&(A=sA.get(t)),A===void 0&&((this.o=A=new CSSStyleSheet).replaceSync(this.cssText),l&&sA.set(t,A))}return A}toString(){return this.cssText}};const CA=r=>new iA(typeof r=="string"?r:r+"",void 0,pA),m=(r,...A)=>{const t=r.length===1?r[0]:A.reduce((l,e,p)=>l+(V=>{if(V._$cssResult$===!0)return V.cssText;if(typeof V=="number")return V;throw Error("Value passed to 'css' function must be a 'css' function result: "+V+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+r[p+1],r[0]);return new iA(t,r,pA)},YA=(r,A)=>{if(rA)r.adoptedStyleSheets=A.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of A){const l=document.createElement("style"),e=g.litNonce;e!==void 0&&l.setAttribute("nonce",e),l.textContent=t.cssText,r.appendChild(l)}},xA=rA?r=>r:r=>r instanceof CSSStyleSheet?(A=>{let t="";for(const l of A.cssRules)t+=l.cssText;return CA(t)})(r):r;/**
5
+ */const g=globalThis,rA=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,pA=Symbol(),sA=new WeakMap;let iA=class{constructor(A,t,l){if(this._$cssResult$=!0,l!==pA)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=A,this.t=t}get styleSheet(){let A=this.o;const t=this.t;if(rA&&A===void 0){const l=t!==void 0&&t.length===1;l&&(A=sA.get(t)),A===void 0&&((this.o=A=new CSSStyleSheet).replaceSync(this.cssText),l&&sA.set(t,A))}return A}toString(){return this.cssText}};const CA=r=>new iA(typeof r=="string"?r:r+"",void 0,pA),m=(r,...A)=>{const t=r.length===1?r[0]:A.reduce((l,e,p)=>l+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+r[p+1],r[0]);return new iA(t,r,pA)},YA=(r,A)=>{if(rA)r.adoptedStyleSheets=A.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of A){const l=document.createElement("style"),e=g.litNonce;e!==void 0&&l.setAttribute("nonce",e),l.textContent=t.cssText,r.appendChild(l)}},xA=rA?r=>r:r=>r instanceof CSSStyleSheet?(A=>{let t="";for(const l of A.cssRules)t+=l.cssText;return CA(t)})(r):r;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:DA,defineProperty:QA,getOwnPropertyDescriptor:gA,getOwnPropertyNames:BA,getOwnPropertySymbols:_A,getPrototypeOf:$A}=Object,x=globalThis,KA=x.trustedTypes,At=KA?KA.emptyScript:"",VA=x.reactiveElementPolyfillSupport,z=(r,A)=>r,B={toAttribute(r,A){switch(A){case Boolean:r=r?At:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,A){let t=r;switch(A){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},nA=(r,A)=>!DA(r,A),UA={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:nA};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),x.litPropertyMetadata??(x.litPropertyMetadata=new WeakMap);let Z=class extends HTMLElement{static addInitializer(A){this._$Ei(),(this.l??(this.l=[])).push(A)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(A,t=UA){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(A)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(A,t),!t.noAccessor){const l=Symbol(),e=this.getPropertyDescriptor(A,l,t);e!==void 0&&QA(this.prototype,A,e)}}static getPropertyDescriptor(A,t,l){const{get:e,set:p}=gA(this.prototype,A)??{get(){return this[t]},set(V){this[t]=V}};return{get:e,set(V){const S=e==null?void 0:e.call(this);p==null||p.call(this,V),this.requestUpdate(A,S,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(A){return this.elementProperties.get(A)??UA}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;const A=$A(this);A.finalize(),A.l!==void 0&&(this.l=[...A.l]),this.elementProperties=new Map(A.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){const t=this.properties,l=[...BA(t),..._A(t)];for(const e of l)this.createProperty(e,t[e])}const A=this[Symbol.metadata];if(A!==null){const t=litPropertyMetadata.get(A);if(t!==void 0)for(const[l,e]of t)this.elementProperties.set(l,e)}this._$Eh=new Map;for(const[t,l]of this.elementProperties){const e=this._$Eu(t,l);e!==void 0&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(A){const t=[];if(Array.isArray(A)){const l=new Set(A.flat(1/0).reverse());for(const e of l)t.unshift(xA(e))}else A!==void 0&&t.push(xA(A));return t}static _$Eu(A,t){const l=t.attribute;return l===!1?void 0:typeof l=="string"?l:typeof A=="string"?A.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var A;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(A=this.constructor.l)==null||A.forEach(t=>t(this))}addController(A){var t;(this._$EO??(this._$EO=new Set)).add(A),this.renderRoot!==void 0&&this.isConnected&&((t=A.hostConnected)==null||t.call(A))}removeController(A){var t;(t=this._$EO)==null||t.delete(A)}_$E_(){const A=new Map,t=this.constructor.elementProperties;for(const l of t.keys())this.hasOwnProperty(l)&&(A.set(l,this[l]),delete this[l]);A.size>0&&(this._$Ep=A)}createRenderRoot(){const A=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return YA(A,this.constructor.elementStyles),A}connectedCallback(){var A;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(A=this._$EO)==null||A.forEach(t=>{var l;return(l=t.hostConnected)==null?void 0:l.call(t)})}enableUpdating(A){}disconnectedCallback(){var A;(A=this._$EO)==null||A.forEach(t=>{var l;return(l=t.hostDisconnected)==null?void 0:l.call(t)})}attributeChangedCallback(A,t,l){this._$AK(A,l)}_$ET(A,t){var p;const l=this.constructor.elementProperties.get(A),e=this.constructor._$Eu(A,l);if(e!==void 0&&l.reflect===!0){const V=(((p=l.converter)==null?void 0:p.toAttribute)!==void 0?l.converter:B).toAttribute(t,l.type);this._$Em=A,V==null?this.removeAttribute(e):this.setAttribute(e,V),this._$Em=null}}_$AK(A,t){var p,V;const l=this.constructor,e=l._$Eh.get(A);if(e!==void 0&&this._$Em!==e){const S=l.getPropertyOptions(e),q=typeof S.converter=="function"?{fromAttribute:S.converter}:((p=S.converter)==null?void 0:p.fromAttribute)!==void 0?S.converter:B;this._$Em=e,this[e]=q.fromAttribute(t,S.type)??((V=this._$Ej)==null?void 0:V.get(e))??null,this._$Em=null}}requestUpdate(A,t,l){var e;if(A!==void 0){const p=this.constructor,V=this[A];if(l??(l=p.getPropertyOptions(A)),!((l.hasChanged??nA)(V,t)||l.useDefault&&l.reflect&&V===((e=this._$Ej)==null?void 0:e.get(A))&&!this.hasAttribute(p._$Eu(A,l))))return;this.C(A,t,l)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(A,t,{useDefault:l,reflect:e,wrapped:p},V){l&&!(this._$Ej??(this._$Ej=new Map)).has(A)&&(this._$Ej.set(A,V??t??this[A]),p!==!0||V!==void 0)||(this._$AL.has(A)||(this.hasUpdated||l||(t=void 0),this._$AL.set(A,t)),e===!0&&this._$Em!==A&&(this._$Eq??(this._$Eq=new Set)).add(A))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const A=this.scheduleUpdate();return A!=null&&await A,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var l;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[p,V]of this._$Ep)this[p]=V;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[p,V]of e){const{wrapped:S}=V,q=this[p];S!==!0||this._$AL.has(p)||q===void 0||this.C(p,void 0,V,q)}}let A=!1;const t=this._$AL;try{A=this.shouldUpdate(t),A?(this.willUpdate(t),(l=this._$EO)==null||l.forEach(e=>{var p;return(p=e.hostUpdate)==null?void 0:p.call(e)}),this.update(t)):this._$EM()}catch(e){throw A=!1,this._$EM(),e}A&&this._$AE(t)}willUpdate(A){}_$AE(A){var t;(t=this._$EO)==null||t.forEach(l=>{var e;return(e=l.hostUpdated)==null?void 0:e.call(l)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(A)),this.updated(A)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(A){return!0}update(A){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(A){}firstUpdated(A){}};Z.elementStyles=[],Z.shadowRootOptions={mode:"open"},Z[z("elementProperties")]=new Map,Z[z("finalized")]=new Map,VA==null||VA({ReactiveElement:Z}),(x.reactiveElementVersions??(x.reactiveElementVersions=[])).push("2.1.0");/**
9
+ */const{is:DA,defineProperty:QA,getOwnPropertyDescriptor:gA,getOwnPropertyNames:BA,getOwnPropertySymbols:_A,getPrototypeOf:$A}=Object,x=globalThis,KA=x.trustedTypes,At=KA?KA.emptyScript:"",nA=x.reactiveElementPolyfillSupport,z=(r,A)=>r,B={toAttribute(r,A){switch(A){case Boolean:r=r?At:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,A){let t=r;switch(A){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},VA=(r,A)=>!DA(r,A),UA={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:VA};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),x.litPropertyMetadata??(x.litPropertyMetadata=new WeakMap);let Z=class extends HTMLElement{static addInitializer(A){this._$Ei(),(this.l??(this.l=[])).push(A)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(A,t=UA){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(A)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(A,t),!t.noAccessor){const l=Symbol(),e=this.getPropertyDescriptor(A,l,t);e!==void 0&&QA(this.prototype,A,e)}}static getPropertyDescriptor(A,t,l){const{get:e,set:p}=gA(this.prototype,A)??{get(){return this[t]},set(n){this[t]=n}};return{get:e,set(n){const S=e==null?void 0:e.call(this);p==null||p.call(this,n),this.requestUpdate(A,S,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(A){return this.elementProperties.get(A)??UA}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;const A=$A(this);A.finalize(),A.l!==void 0&&(this.l=[...A.l]),this.elementProperties=new Map(A.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){const t=this.properties,l=[...BA(t),..._A(t)];for(const e of l)this.createProperty(e,t[e])}const A=this[Symbol.metadata];if(A!==null){const t=litPropertyMetadata.get(A);if(t!==void 0)for(const[l,e]of t)this.elementProperties.set(l,e)}this._$Eh=new Map;for(const[t,l]of this.elementProperties){const e=this._$Eu(t,l);e!==void 0&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(A){const t=[];if(Array.isArray(A)){const l=new Set(A.flat(1/0).reverse());for(const e of l)t.unshift(xA(e))}else A!==void 0&&t.push(xA(A));return t}static _$Eu(A,t){const l=t.attribute;return l===!1?void 0:typeof l=="string"?l:typeof A=="string"?A.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var A;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(A=this.constructor.l)==null||A.forEach(t=>t(this))}addController(A){var t;(this._$EO??(this._$EO=new Set)).add(A),this.renderRoot!==void 0&&this.isConnected&&((t=A.hostConnected)==null||t.call(A))}removeController(A){var t;(t=this._$EO)==null||t.delete(A)}_$E_(){const A=new Map,t=this.constructor.elementProperties;for(const l of t.keys())this.hasOwnProperty(l)&&(A.set(l,this[l]),delete this[l]);A.size>0&&(this._$Ep=A)}createRenderRoot(){const A=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return YA(A,this.constructor.elementStyles),A}connectedCallback(){var A;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(A=this._$EO)==null||A.forEach(t=>{var l;return(l=t.hostConnected)==null?void 0:l.call(t)})}enableUpdating(A){}disconnectedCallback(){var A;(A=this._$EO)==null||A.forEach(t=>{var l;return(l=t.hostDisconnected)==null?void 0:l.call(t)})}attributeChangedCallback(A,t,l){this._$AK(A,l)}_$ET(A,t){var p;const l=this.constructor.elementProperties.get(A),e=this.constructor._$Eu(A,l);if(e!==void 0&&l.reflect===!0){const n=(((p=l.converter)==null?void 0:p.toAttribute)!==void 0?l.converter:B).toAttribute(t,l.type);this._$Em=A,n==null?this.removeAttribute(e):this.setAttribute(e,n),this._$Em=null}}_$AK(A,t){var p,n;const l=this.constructor,e=l._$Eh.get(A);if(e!==void 0&&this._$Em!==e){const S=l.getPropertyOptions(e),q=typeof S.converter=="function"?{fromAttribute:S.converter}:((p=S.converter)==null?void 0:p.fromAttribute)!==void 0?S.converter:B;this._$Em=e,this[e]=q.fromAttribute(t,S.type)??((n=this._$Ej)==null?void 0:n.get(e))??null,this._$Em=null}}requestUpdate(A,t,l){var e;if(A!==void 0){const p=this.constructor,n=this[A];if(l??(l=p.getPropertyOptions(A)),!((l.hasChanged??VA)(n,t)||l.useDefault&&l.reflect&&n===((e=this._$Ej)==null?void 0:e.get(A))&&!this.hasAttribute(p._$Eu(A,l))))return;this.C(A,t,l)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(A,t,{useDefault:l,reflect:e,wrapped:p},n){l&&!(this._$Ej??(this._$Ej=new Map)).has(A)&&(this._$Ej.set(A,n??t??this[A]),p!==!0||n!==void 0)||(this._$AL.has(A)||(this.hasUpdated||l||(t=void 0),this._$AL.set(A,t)),e===!0&&this._$Em!==A&&(this._$Eq??(this._$Eq=new Set)).add(A))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const A=this.scheduleUpdate();return A!=null&&await A,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var l;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[p,n]of this._$Ep)this[p]=n;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[p,n]of e){const{wrapped:S}=n,q=this[p];S!==!0||this._$AL.has(p)||q===void 0||this.C(p,void 0,n,q)}}let A=!1;const t=this._$AL;try{A=this.shouldUpdate(t),A?(this.willUpdate(t),(l=this._$EO)==null||l.forEach(e=>{var p;return(p=e.hostUpdate)==null?void 0:p.call(e)}),this.update(t)):this._$EM()}catch(e){throw A=!1,this._$EM(),e}A&&this._$AE(t)}willUpdate(A){}_$AE(A){var t;(t=this._$EO)==null||t.forEach(l=>{var e;return(e=l.hostUpdated)==null?void 0:e.call(l)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(A)),this.updated(A)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(A){return!0}update(A){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(A){}firstUpdated(A){}};Z.elementStyles=[],Z.shadowRootOptions={mode:"open"},Z[z("elementProperties")]=new Map,Z[z("finalized")]=new Map,nA==null||nA({ReactiveElement:Z}),(x.reactiveElementVersions??(x.reactiveElementVersions=[])).push("2.1.0");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
13
  */const G=globalThis,_=G.trustedTypes,OA=_?_.createPolicy("lit-html",{createHTML:r=>r}):void 0,vA="$lit$",K=`lit$${Math.random().toFixed(9).slice(2)}$`,WA="?"+K,tt=`<${WA}>`,O=document,F=()=>O.createComment(""),M=r=>r===null||typeof r!="object"&&typeof r!="function",qA=Array.isArray,lt=r=>qA(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",SA=`[
14
- \f\r]`,h=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bA=/-->/g,LA=/>/g,v=RegExp(`>|${SA}(?:([^\\s"'>=/]+)(${SA}*=${SA}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),oA=/'/g,fA=/"/g,PA=/^(?:script|style|textarea|title)$/i,et=r=>(A,...t)=>({_$litType$:r,strings:A,values:t}),J=et(1),W=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),mA=new WeakMap,b=O.createTreeWalker(O,129);function ZA(r,A){if(!qA(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return OA!==void 0?OA.createHTML(A):A}const rt=(r,A)=>{const t=r.length-1,l=[];let e,p=A===2?"<svg>":A===3?"<math>":"",V=h;for(let S=0;S<t;S++){const q=r[S];let y,k,d=-1,i=0;for(;i<q.length&&(V.lastIndex=i,k=V.exec(q),k!==null);)i=V.lastIndex,V===h?k[1]==="!--"?V=bA:k[1]!==void 0?V=LA:k[2]!==void 0?(PA.test(k[2])&&(e=RegExp("</"+k[2],"g")),V=v):k[3]!==void 0&&(V=v):V===v?k[0]===">"?(V=e??h,d=-1):k[1]===void 0?d=-2:(d=V.lastIndex-k[2].length,y=k[1],V=k[3]===void 0?v:k[3]==='"'?fA:oA):V===fA||V===oA?V=v:V===bA||V===LA?V=h:(V=v,e=void 0);const U=V===v&&r[S+1].startsWith("/>")?" ":"";p+=V===h?q+tt:d>=0?(l.push(y),q.slice(0,d)+vA+q.slice(d)+K+U):q+K+(d===-2?S:U)}return[ZA(r,p+(r[t]||"<?>")+(A===2?"</svg>":A===3?"</math>":"")),l]};class E{constructor({strings:A,_$litType$:t},l){let e;this.parts=[];let p=0,V=0;const S=A.length-1,q=this.parts,[y,k]=rt(A,t);if(this.el=E.createElement(y,l),b.currentNode=this.el.content,t===2||t===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(e=b.nextNode())!==null&&q.length<S;){if(e.nodeType===1){if(e.hasAttributes())for(const d of e.getAttributeNames())if(d.endsWith(vA)){const i=k[V++],U=e.getAttribute(d).split(K),eA=/([.?@])?(.*)/.exec(i);q.push({type:1,index:p,name:eA[2],strings:U,ctor:eA[1]==="."?Vt:eA[1]==="?"?nt:eA[1]==="@"?qt:$}),e.removeAttribute(d)}else d.startsWith(K)&&(q.push({type:6,index:p}),e.removeAttribute(d));if(PA.test(e.tagName)){const d=e.textContent.split(K),i=d.length-1;if(i>0){e.textContent=_?_.emptyScript:"";for(let U=0;U<i;U++)e.append(d[U],F()),b.nextNode(),q.push({type:2,index:++p});e.append(d[i],F())}}}else if(e.nodeType===8)if(e.data===WA)q.push({type:2,index:p});else{let d=-1;for(;(d=e.data.indexOf(K,d+1))!==-1;)q.push({type:7,index:p}),d+=K.length-1}p++}}static createElement(A,t){const l=O.createElement("template");return l.innerHTML=A,l}}function N(r,A,t=r,l){var V,S;if(A===W)return A;let e=l!==void 0?(V=t._$Co)==null?void 0:V[l]:t._$Cl;const p=M(A)?void 0:A._$litDirective$;return(e==null?void 0:e.constructor)!==p&&((S=e==null?void 0:e._$AO)==null||S.call(e,!1),p===void 0?e=void 0:(e=new p(r),e._$AT(r,t,l)),l!==void 0?(t._$Co??(t._$Co=[]))[l]=e:t._$Cl=e),e!==void 0&&(A=N(r,e._$AS(r,A.values),e,l)),A}class pt{constructor(A,t){this._$AV=[],this._$AN=void 0,this._$AD=A,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(A){const{el:{content:t},parts:l}=this._$AD,e=((A==null?void 0:A.creationScope)??O).importNode(t,!0);b.currentNode=e;let p=b.nextNode(),V=0,S=0,q=l[0];for(;q!==void 0;){if(V===q.index){let y;q.type===2?y=new I(p,p.nextSibling,this,A):q.type===1?y=new q.ctor(p,q.name,q.strings,this,A):q.type===6&&(y=new St(p,this,A)),this._$AV.push(y),q=l[++S]}V!==(q==null?void 0:q.index)&&(p=b.nextNode(),V++)}return b.currentNode=O,e}p(A){let t=0;for(const l of this._$AV)l!==void 0&&(l.strings!==void 0?(l._$AI(A,l,t),t+=l.strings.length-2):l._$AI(A[t])),t++}}class I{get _$AU(){var A;return((A=this._$AM)==null?void 0:A._$AU)??this._$Cv}constructor(A,t,l,e){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=A,this._$AB=t,this._$AM=l,this.options=e,this._$Cv=(e==null?void 0:e.isConnected)??!0}get parentNode(){let A=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(A==null?void 0:A.nodeType)===11&&(A=t.parentNode),A}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(A,t=this){A=N(this,A,t),M(A)?A===j||A==null||A===""?(this._$AH!==j&&this._$AR(),this._$AH=j):A!==this._$AH&&A!==W&&this._(A):A._$litType$!==void 0?this.$(A):A.nodeType!==void 0?this.T(A):lt(A)?this.k(A):this._(A)}O(A){return this._$AA.parentNode.insertBefore(A,this._$AB)}T(A){this._$AH!==A&&(this._$AR(),this._$AH=this.O(A))}_(A){this._$AH!==j&&M(this._$AH)?this._$AA.nextSibling.data=A:this.T(O.createTextNode(A)),this._$AH=A}$(A){var p;const{values:t,_$litType$:l}=A,e=typeof l=="number"?this._$AC(A):(l.el===void 0&&(l.el=E.createElement(ZA(l.h,l.h[0]),this.options)),l);if(((p=this._$AH)==null?void 0:p._$AD)===e)this._$AH.p(t);else{const V=new pt(e,this),S=V.u(this.options);V.p(t),this.T(S),this._$AH=V}}_$AC(A){let t=mA.get(A.strings);return t===void 0&&mA.set(A.strings,t=new E(A)),t}k(A){qA(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let l,e=0;for(const p of A)e===t.length?t.push(l=new I(this.O(F()),this.O(F()),this,this.options)):l=t[e],l._$AI(p),e++;e<t.length&&(this._$AR(l&&l._$AB.nextSibling,e),t.length=e)}_$AR(A=this._$AA.nextSibling,t){var l;for((l=this._$AP)==null?void 0:l.call(this,!1,!0,t);A&&A!==this._$AB;){const e=A.nextSibling;A.remove(),A=e}}setConnected(A){var t;this._$AM===void 0&&(this._$Cv=A,(t=this._$AP)==null||t.call(this,A))}}class ${get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(A,t,l,e,p){this.type=1,this._$AH=j,this._$AN=void 0,this.element=A,this.name=t,this._$AM=e,this.options=p,l.length>2||l[0]!==""||l[1]!==""?(this._$AH=Array(l.length-1).fill(new String),this.strings=l):this._$AH=j}_$AI(A,t=this,l,e){const p=this.strings;let V=!1;if(p===void 0)A=N(this,A,t,0),V=!M(A)||A!==this._$AH&&A!==W,V&&(this._$AH=A);else{const S=A;let q,y;for(A=p[0],q=0;q<p.length-1;q++)y=N(this,S[l+q],t,q),y===W&&(y=this._$AH[q]),V||(V=!M(y)||y!==this._$AH[q]),y===j?A=j:A!==j&&(A+=(y??"")+p[q+1]),this._$AH[q]=y}V&&!e&&this.j(A)}j(A){A===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,A??"")}}class Vt extends ${constructor(){super(...arguments),this.type=3}j(A){this.element[this.name]=A===j?void 0:A}}class nt extends ${constructor(){super(...arguments),this.type=4}j(A){this.element.toggleAttribute(this.name,!!A&&A!==j)}}class qt extends ${constructor(A,t,l,e,p){super(A,t,l,e,p),this.type=5}_$AI(A,t=this){if((A=N(this,A,t,0)??j)===W)return;const l=this._$AH,e=A===j&&l!==j||A.capture!==l.capture||A.once!==l.once||A.passive!==l.passive,p=A!==j&&(l===j||e);e&&this.element.removeEventListener(this.name,this,l),p&&this.element.addEventListener(this.name,this,A),this._$AH=A}handleEvent(A){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,A):this._$AH.handleEvent(A)}}class St{constructor(A,t,l){this.element=A,this.type=6,this._$AN=void 0,this._$AM=t,this.options=l}get _$AU(){return this._$AM._$AU}_$AI(A){N(this,A)}}const aA=G.litHtmlPolyfillSupport;aA==null||aA(E,I),(G.litHtmlVersions??(G.litHtmlVersions=[])).push("3.3.0");const at=(r,A,t)=>{const l=(t==null?void 0:t.renderBefore)??A;let e=l._$litPart$;if(e===void 0){const p=(t==null?void 0:t.renderBefore)??null;l._$litPart$=e=new I(A.insertBefore(F(),p),p,void 0,t??{})}return e._$AI(r),e};/**
14
+ \f\r]`,h=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bA=/-->/g,oA=/>/g,v=RegExp(`>|${SA}(?:([^\\s"'>=/]+)(${SA}*=${SA}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),LA=/'/g,fA=/"/g,PA=/^(?:script|style|textarea|title)$/i,et=r=>(A,...t)=>({_$litType$:r,strings:A,values:t}),J=et(1),W=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),mA=new WeakMap,b=O.createTreeWalker(O,129);function ZA(r,A){if(!qA(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return OA!==void 0?OA.createHTML(A):A}const rt=(r,A)=>{const t=r.length-1,l=[];let e,p=A===2?"<svg>":A===3?"<math>":"",n=h;for(let S=0;S<t;S++){const q=r[S];let y,k,d=-1,i=0;for(;i<q.length&&(n.lastIndex=i,k=n.exec(q),k!==null);)i=n.lastIndex,n===h?k[1]==="!--"?n=bA:k[1]!==void 0?n=oA:k[2]!==void 0?(PA.test(k[2])&&(e=RegExp("</"+k[2],"g")),n=v):k[3]!==void 0&&(n=v):n===v?k[0]===">"?(n=e??h,d=-1):k[1]===void 0?d=-2:(d=n.lastIndex-k[2].length,y=k[1],n=k[3]===void 0?v:k[3]==='"'?fA:LA):n===fA||n===LA?n=v:n===bA||n===oA?n=h:(n=v,e=void 0);const U=n===v&&r[S+1].startsWith("/>")?" ":"";p+=n===h?q+tt:d>=0?(l.push(y),q.slice(0,d)+vA+q.slice(d)+K+U):q+K+(d===-2?S:U)}return[ZA(r,p+(r[t]||"<?>")+(A===2?"</svg>":A===3?"</math>":"")),l]};class E{constructor({strings:A,_$litType$:t},l){let e;this.parts=[];let p=0,n=0;const S=A.length-1,q=this.parts,[y,k]=rt(A,t);if(this.el=E.createElement(y,l),b.currentNode=this.el.content,t===2||t===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(e=b.nextNode())!==null&&q.length<S;){if(e.nodeType===1){if(e.hasAttributes())for(const d of e.getAttributeNames())if(d.endsWith(vA)){const i=k[n++],U=e.getAttribute(d).split(K),eA=/([.?@])?(.*)/.exec(i);q.push({type:1,index:p,name:eA[2],strings:U,ctor:eA[1]==="."?nt:eA[1]==="?"?Vt:eA[1]==="@"?qt:$}),e.removeAttribute(d)}else d.startsWith(K)&&(q.push({type:6,index:p}),e.removeAttribute(d));if(PA.test(e.tagName)){const d=e.textContent.split(K),i=d.length-1;if(i>0){e.textContent=_?_.emptyScript:"";for(let U=0;U<i;U++)e.append(d[U],F()),b.nextNode(),q.push({type:2,index:++p});e.append(d[i],F())}}}else if(e.nodeType===8)if(e.data===WA)q.push({type:2,index:p});else{let d=-1;for(;(d=e.data.indexOf(K,d+1))!==-1;)q.push({type:7,index:p}),d+=K.length-1}p++}}static createElement(A,t){const l=O.createElement("template");return l.innerHTML=A,l}}function N(r,A,t=r,l){var n,S;if(A===W)return A;let e=l!==void 0?(n=t._$Co)==null?void 0:n[l]:t._$Cl;const p=M(A)?void 0:A._$litDirective$;return(e==null?void 0:e.constructor)!==p&&((S=e==null?void 0:e._$AO)==null||S.call(e,!1),p===void 0?e=void 0:(e=new p(r),e._$AT(r,t,l)),l!==void 0?(t._$Co??(t._$Co=[]))[l]=e:t._$Cl=e),e!==void 0&&(A=N(r,e._$AS(r,A.values),e,l)),A}class pt{constructor(A,t){this._$AV=[],this._$AN=void 0,this._$AD=A,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(A){const{el:{content:t},parts:l}=this._$AD,e=((A==null?void 0:A.creationScope)??O).importNode(t,!0);b.currentNode=e;let p=b.nextNode(),n=0,S=0,q=l[0];for(;q!==void 0;){if(n===q.index){let y;q.type===2?y=new I(p,p.nextSibling,this,A):q.type===1?y=new q.ctor(p,q.name,q.strings,this,A):q.type===6&&(y=new St(p,this,A)),this._$AV.push(y),q=l[++S]}n!==(q==null?void 0:q.index)&&(p=b.nextNode(),n++)}return b.currentNode=O,e}p(A){let t=0;for(const l of this._$AV)l!==void 0&&(l.strings!==void 0?(l._$AI(A,l,t),t+=l.strings.length-2):l._$AI(A[t])),t++}}class I{get _$AU(){var A;return((A=this._$AM)==null?void 0:A._$AU)??this._$Cv}constructor(A,t,l,e){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=A,this._$AB=t,this._$AM=l,this.options=e,this._$Cv=(e==null?void 0:e.isConnected)??!0}get parentNode(){let A=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(A==null?void 0:A.nodeType)===11&&(A=t.parentNode),A}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(A,t=this){A=N(this,A,t),M(A)?A===j||A==null||A===""?(this._$AH!==j&&this._$AR(),this._$AH=j):A!==this._$AH&&A!==W&&this._(A):A._$litType$!==void 0?this.$(A):A.nodeType!==void 0?this.T(A):lt(A)?this.k(A):this._(A)}O(A){return this._$AA.parentNode.insertBefore(A,this._$AB)}T(A){this._$AH!==A&&(this._$AR(),this._$AH=this.O(A))}_(A){this._$AH!==j&&M(this._$AH)?this._$AA.nextSibling.data=A:this.T(O.createTextNode(A)),this._$AH=A}$(A){var p;const{values:t,_$litType$:l}=A,e=typeof l=="number"?this._$AC(A):(l.el===void 0&&(l.el=E.createElement(ZA(l.h,l.h[0]),this.options)),l);if(((p=this._$AH)==null?void 0:p._$AD)===e)this._$AH.p(t);else{const n=new pt(e,this),S=n.u(this.options);n.p(t),this.T(S),this._$AH=n}}_$AC(A){let t=mA.get(A.strings);return t===void 0&&mA.set(A.strings,t=new E(A)),t}k(A){qA(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let l,e=0;for(const p of A)e===t.length?t.push(l=new I(this.O(F()),this.O(F()),this,this.options)):l=t[e],l._$AI(p),e++;e<t.length&&(this._$AR(l&&l._$AB.nextSibling,e),t.length=e)}_$AR(A=this._$AA.nextSibling,t){var l;for((l=this._$AP)==null?void 0:l.call(this,!1,!0,t);A&&A!==this._$AB;){const e=A.nextSibling;A.remove(),A=e}}setConnected(A){var t;this._$AM===void 0&&(this._$Cv=A,(t=this._$AP)==null||t.call(this,A))}}class ${get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(A,t,l,e,p){this.type=1,this._$AH=j,this._$AN=void 0,this.element=A,this.name=t,this._$AM=e,this.options=p,l.length>2||l[0]!==""||l[1]!==""?(this._$AH=Array(l.length-1).fill(new String),this.strings=l):this._$AH=j}_$AI(A,t=this,l,e){const p=this.strings;let n=!1;if(p===void 0)A=N(this,A,t,0),n=!M(A)||A!==this._$AH&&A!==W,n&&(this._$AH=A);else{const S=A;let q,y;for(A=p[0],q=0;q<p.length-1;q++)y=N(this,S[l+q],t,q),y===W&&(y=this._$AH[q]),n||(n=!M(y)||y!==this._$AH[q]),y===j?A=j:A!==j&&(A+=(y??"")+p[q+1]),this._$AH[q]=y}n&&!e&&this.j(A)}j(A){A===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,A??"")}}class nt extends ${constructor(){super(...arguments),this.type=3}j(A){this.element[this.name]=A===j?void 0:A}}class Vt extends ${constructor(){super(...arguments),this.type=4}j(A){this.element.toggleAttribute(this.name,!!A&&A!==j)}}class qt extends ${constructor(A,t,l,e,p){super(A,t,l,e,p),this.type=5}_$AI(A,t=this){if((A=N(this,A,t,0)??j)===W)return;const l=this._$AH,e=A===j&&l!==j||A.capture!==l.capture||A.once!==l.once||A.passive!==l.passive,p=A!==j&&(l===j||e);e&&this.element.removeEventListener(this.name,this,l),p&&this.element.addEventListener(this.name,this,A),this._$AH=A}handleEvent(A){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,A):this._$AH.handleEvent(A)}}class St{constructor(A,t,l){this.element=A,this.type=6,this._$AN=void 0,this._$AM=t,this.options=l}get _$AU(){return this._$AM._$AU}_$AI(A){N(this,A)}}const aA=G.litHtmlPolyfillSupport;aA==null||aA(E,I),(G.litHtmlVersions??(G.litHtmlVersions=[])).push("3.3.0");const at=(r,A,t)=>{const l=(t==null?void 0:t.renderBefore)??A;let e=l._$litPart$;if(e===void 0){const p=(t==null?void 0:t.renderBefore)??null;l._$litPart$=e=new I(A.insertBefore(F(),p),p,void 0,t??{})}return e._$AI(r),e};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const L=globalThis;let X=class extends Z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const A=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=A.firstChild),A}update(A){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(A),this._$Do=at(t,this.renderRoot,this.renderOptions)}connectedCallback(){var A;super.connectedCallback(),(A=this._$Do)==null||A.setConnected(!0)}disconnectedCallback(){var A;super.disconnectedCallback(),(A=this._$Do)==null||A.setConnected(!1)}render(){return W}};X._$litElement$=!0,X.finalized=!0,(wA=L.litElementHydrateSupport)==null||wA.call(L,{LitElement:X});const dA=L.litElementPolyfillSupport;dA==null||dA({LitElement:X}),(L.litElementVersions??(L.litElementVersions=[])).push("4.2.0");/**
19
+ */const o=globalThis;let X=class extends Z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const A=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=A.firstChild),A}update(A){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(A),this._$Do=at(t,this.renderRoot,this.renderOptions)}connectedCallback(){var A;super.connectedCallback(),(A=this._$Do)==null||A.setConnected(!0)}disconnectedCallback(){var A;super.disconnectedCallback(),(A=this._$Do)==null||A.setConnected(!1)}render(){return W}};X._$litElement$=!0,X.finalized=!0,(wA=o.litElementHydrateSupport)==null||wA.call(o,{LitElement:X});const dA=o.litElementPolyfillSupport;dA==null||dA({LitElement:X}),(o.litElementVersions??(o.litElementVersions=[])).push("4.2.0");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
@@ -24,7 +24,7 @@
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const dt={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:nA},ut=(r=dt,A,t)=>{const{kind:l,metadata:e}=t;let p=globalThis.litPropertyMetadata.get(e);if(p===void 0&&globalThis.litPropertyMetadata.set(e,p=new Map),l==="setter"&&((r=Object.create(r)).wrapped=!0),p.set(t.name,r),l==="accessor"){const{name:V}=t;return{set(S){const q=A.get.call(this);A.set.call(this,S),this.requestUpdate(V,q,r)},init(S){return S!==void 0&&this.C(V,void 0,r,S),S}}}if(l==="setter"){const{name:V}=t;return function(S){const q=this[V];A.call(this,S),this.requestUpdate(V,q,r)}}throw Error("Unsupported decorator location: "+l)};function c(r){return(A,t)=>typeof t=="object"?ut(r,A,t):((l,e,p)=>{const V=e.hasOwnProperty(p);return e.constructor.createProperty(p,l),V?Object.getOwnPropertyDescriptor(e,p):void 0})(r,A,t)}/**
27
+ */const dt={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:VA},ut=(r=dt,A,t)=>{const{kind:l,metadata:e}=t;let p=globalThis.litPropertyMetadata.get(e);if(p===void 0&&globalThis.litPropertyMetadata.set(e,p=new Map),l==="setter"&&((r=Object.create(r)).wrapped=!0),p.set(t.name,r),l==="accessor"){const{name:n}=t;return{set(S){const q=A.get.call(this);A.set.call(this,S),this.requestUpdate(n,q,r)},init(S){return S!==void 0&&this.C(n,void 0,r,S),S}}}if(l==="setter"){const{name:n}=t;return function(S){const q=this[n];A.call(this,S),this.requestUpdate(n,q,r)}}throw Error("Unsupported decorator location: "+l)};function c(r){return(A,t)=>typeof t=="object"?ut(r,A,t):((l,e,p)=>{const n=e.hasOwnProperty(p);return e.constructor.createProperty(p,l),n?Object.getOwnPropertyDescriptor(e,p):void 0})(r,A,t)}/**
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
@@ -40,7 +40,7 @@
40
40
  * @license
41
41
  * Copyright 2021 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */const RA=r=>yt(r)?NA(r.strings,r.values):r;let n=RA,HA=!1;function ct(r){if(HA)throw new Error("lit-localize can only be configured once");n=r,HA=!0}/**
43
+ */const RA=r=>yt(r)?NA(r.strings,r.values):r;let V=RA,HA=!1;function ct(r){if(HA)throw new Error("lit-localize can only be configured once");V=r,HA=!0}/**
44
44
  * @license
45
45
  * Copyright 2021 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
@@ -56,7 +56,7 @@
56
56
  * @license
57
57
  * Copyright 2014 Travis Webb
58
58
  * SPDX-License-Identifier: MIT
59
- */const s=[];for(let r=0;r<256;r++)s[r]=(r>>4&15).toString(16)+(r&15).toString(16);function Tt(r){let A=0,t=8997,l=0,e=33826,p=0,V=40164,S=0,q=52210;for(let y=0;y<r.length;y++)t^=r.charCodeAt(y),A=t*435,l=e*435,p=V*435,S=q*435,p+=t<<8,S+=e<<8,l+=A>>>16,t=A&65535,p+=l>>>16,e=l&65535,q=S+(p>>>16)&65535,V=p&65535;return s[q>>8]+s[q&255]+s[V>>8]+s[V&255]+s[e>>8]+s[e&255]+s[t>>8]+s[t&255]}/**
59
+ */const s=[];for(let r=0;r<256;r++)s[r]=(r>>4&15).toString(16)+(r&15).toString(16);function Tt(r){let A=0,t=8997,l=0,e=33826,p=0,n=40164,S=0,q=52210;for(let y=0;y<r.length;y++)t^=r.charCodeAt(y),A=t*435,l=e*435,p=n*435,S=q*435,p+=t<<8,S+=e<<8,l+=A>>>16,t=A&65535,p+=l>>>16,e=l&65535,q=S+(p>>>16)&65535,n=p&65535;return s[q>>8]+s[q&255]+s[n>>8]+s[n&255]+s[e>>8]+s[e&255]+s[t>>8]+s[t&255]}/**
60
60
  * @license
61
61
  * Copyright 2020 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
@@ -64,19 +64,19 @@
64
64
  * @license
65
65
  * Copyright 2021 Google LLC
66
66
  * SPDX-License-Identifier: BSD-3-Clause
67
- */const GA=new WeakMap,FA=new Map;function xt(r,A,t){if(r){const l=(t==null?void 0:t.id)??Kt(A),e=r[l];if(e){if(typeof e=="string")return e;if("strTag"in e)return NA(e.strings,A.values,e.values);{let p=GA.get(e);return p===void 0&&(p=e.values,GA.set(e,p)),{...e,values:p.map(V=>A.values[V])}}}}return RA(A)}function Kt(r){const A=typeof r=="string"?r:r.strings;let t=FA.get(A);return t===void 0&&(t=it(A,typeof r!="string"&&!("strTag"in r)),FA.set(A,t)),t}/**
67
+ */const GA=new WeakMap,FA=new Map;function xt(r,A,t){if(r){const l=(t==null?void 0:t.id)??Kt(A),e=r[l];if(e){if(typeof e=="string")return e;if("strTag"in e)return NA(e.strings,A.values,e.values);{let p=GA.get(e);return p===void 0&&(p=e.values,GA.set(e,p)),{...e,values:p.map(n=>A.values[n])}}}}return RA(A)}function Kt(r){const A=typeof r=="string"?r:r.strings;let t=FA.get(A);return t===void 0&&(t=it(A,typeof r!="string"&&!("strTag"in r)),FA.set(A,t)),t}/**
68
68
  * @license
69
69
  * Copyright 2021 Google LLC
70
70
  * SPDX-License-Identifier: BSD-3-Clause
71
- */function yA(r){window.dispatchEvent(new CustomEvent(uA,{detail:r}))}let AA="",cA,MA,tA,jA,hA,o=new zA;o.resolve();let lA=0;const Ut=r=>(ct((A,t)=>xt(hA,A,t)),AA=MA=r.sourceLocale,tA=new Set(r.targetLocales),tA.add(r.sourceLocale),jA=r.loadLocale,{getLocale:Ot,setLocale:vt}),Ot=()=>AA,vt=r=>{if(r===(cA??AA))return o.promise;if(!tA||!jA)throw new Error("Internal error");if(!tA.has(r))throw new Error("Invalid locale code");lA++;const A=lA;return cA=r,o.settled&&(o=new zA),yA({status:"loading",loadingLocale:r}),(r===MA?Promise.resolve({templates:void 0}):jA(r)).then(l=>{lA===A&&(AA=r,cA=void 0,hA=l.templates,yA({status:"ready",readyLocale:r}),o.resolve())},l=>{lA===A&&(yA({status:"error",errorLocale:r,errorMessage:l.toString()}),o.reject(l))}),o.promise},EA="en",Wt=["pt-BR"];/**
71
+ */function yA(r){window.dispatchEvent(new CustomEvent(uA,{detail:r}))}let AA="",cA,MA,tA,jA,hA,L=new zA;L.resolve();let lA=0;const Ut=r=>(ct((A,t)=>xt(hA,A,t)),AA=MA=r.sourceLocale,tA=new Set(r.targetLocales),tA.add(r.sourceLocale),jA=r.loadLocale,{getLocale:Ot,setLocale:vt}),Ot=()=>AA,vt=r=>{if(r===(cA??AA))return L.promise;if(!tA||!jA)throw new Error("Internal error");if(!tA.has(r))throw new Error("Invalid locale code");lA++;const A=lA;return cA=r,L.settled&&(L=new zA),yA({status:"loading",loadingLocale:r}),(r===MA?Promise.resolve({templates:void 0}):jA(r)).then(l=>{lA===A&&(AA=r,cA=void 0,hA=l.templates,yA({status:"ready",readyLocale:r}),L.resolve())},l=>{lA===A&&(yA({status:"error",errorLocale:r,errorMessage:l.toString()}),L.reject(l))}),L.promise},EA="en",Wt=["pt-BR"];/**
72
72
  * @license
73
73
  * Copyright 2017 Google LLC
74
74
  * SPDX-License-Identifier: BSD-3-Clause
75
- */const bt={ATTRIBUTE:1},Lt=r=>(...A)=>({_$litDirective$:r,values:A});class ot{constructor(A){}get _$AU(){return this._$AM._$AU}_$AT(A,t,l){this._$Ct=A,this._$AM=t,this._$Ci=l}_$AS(A,t){return this.update(A,t)}update(A,t){return this.render(...t)}}/**
75
+ */const bt={ATTRIBUTE:1},ot=r=>(...A)=>({_$litDirective$:r,values:A});class Lt{constructor(A){}get _$AU(){return this._$AM._$AU}_$AT(A,t,l){this._$Ct=A,this._$AM=t,this._$Ci=l}_$AS(A,t){return this.update(A,t)}update(A,t){return this.render(...t)}}/**
76
76
  * @license
77
77
  * Copyright 2018 Google LLC
78
78
  * SPDX-License-Identifier: BSD-3-Clause
79
- */const ft=Lt(class extends ot{constructor(r){var A;if(super(r),r.type!==bt.ATTRIBUTE||r.name!=="class"||((A=r.strings)==null?void 0:A.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(A=>r[A]).join(" ")+" "}update(r,[A]){var l,e;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(p=>p!=="")));for(const p in A)A[p]&&!((l=this.nt)!=null&&l.has(p))&&this.st.add(p);return this.render(A)}const t=r.element.classList;for(const p of this.st)p in A||(t.remove(p),this.st.delete(p));for(const p in A){const V=!!A[p];V===this.st.has(p)||(e=this.nt)!=null&&e.has(p)||(V?(t.add(p),this.st.add(p)):(t.remove(p),this.st.delete(p)))}return W}});var Pt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,C=(r,A,t,l)=>{for(var e=l>1?void 0:l?mt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&Pt(A,t,e),e};let f=class extends X{constructor(){super(...arguments),this.type="button",this.label="",this.disabled=!1,this.variant="contained"}render(){return J`
79
+ */const ft=ot(class extends Lt{constructor(r){var A;if(super(r),r.type!==bt.ATTRIBUTE||r.name!=="class"||((A=r.strings)==null?void 0:A.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(A=>r[A]).join(" ")+" "}update(r,[A]){var l,e;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(p=>p!=="")));for(const p in A)A[p]&&!((l=this.nt)!=null&&l.has(p))&&this.st.add(p);return this.render(A)}const t=r.element.classList;for(const p of this.st)p in A||(t.remove(p),this.st.delete(p));for(const p in A){const n=!!A[p];n===this.st.has(p)||(e=this.nt)!=null&&e.has(p)||(n?(t.add(p),this.st.add(p)):(t.remove(p),this.st.delete(p)))}return W}});var Pt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,C=(r,A,t,l)=>{for(var e=l>1?void 0:l?mt(A,t):A,p=r.length-1,n;p>=0;p--)(n=r[p])&&(e=(l?n(A,t,e):n(e))||e);return l&&e&&Pt(A,t,e),e};let f=class extends X{constructor(){super(...arguments),this.type="button",this.label="",this.disabled=!1,this.variant="contained"}render(){return J`
80
80
  <div class="button-wrapper">
81
81
  <button
82
82
  class=${this.variant}
@@ -158,41 +158,41 @@
158
158
  cursor: not-allowed;
159
159
  box-shadow: none;
160
160
  }
161
- `,C([c({type:String})],f.prototype,"type",2),C([c({type:String})],f.prototype,"label",2),C([c({type:Boolean})],f.prototype,"disabled",2),C([c({type:String})],f.prototype,"variant",2),f=C([R("xact-button")],f);var Zt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,kA=(r,A,t,l)=>{for(var e=l>1?void 0:l?Nt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&Zt(A,t,e),e};let Y=class extends X{constructor(){super(...arguments),this.height=0}render(){return J`
161
+ `,C([c({type:String})],f.prototype,"type",2),C([c({type:String})],f.prototype,"label",2),C([c({type:Boolean})],f.prototype,"disabled",2),C([c({type:String})],f.prototype,"variant",2),f=C([R("xact-button")],f);var Zt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,kA=(r,A,t,l)=>{for(var e=l>1?void 0:l?Nt(A,t):A,p=r.length-1,n;p>=0;p--)(n=r[p])&&(e=(l?n(A,t,e):n(e))||e);return l&&e&&Zt(A,t,e),e};let Y=class extends X{constructor(){super(...arguments),this.height=0}render(){return J`
162
162
  <div class="component-content">
163
163
  <div class="header-section">
164
- <h2 class="header-text">${n("Before you begin")}</h2>
164
+ <h2 class="header-text">${V("Before you begin")}</h2>
165
165
  <p class="description-text">
166
- ${n("Maintain an upright posture with your arms away from your body.")}
166
+ ${V("Maintain an upright posture with your arms away from your body.")}
167
167
  </p>
168
168
  </div>
169
169
 
170
170
  <div class="main-section">
171
171
  <div class="tips-section">
172
- <h3>${n("Tips")}</h3>
172
+ <h3>${V("Tips")}</h3>
173
173
  <div class="tip-item">
174
- <span class="tip-title">${n("Good Lighting")}</span>
175
- <p class="tip-text">${n("Choose a well-lit area where you can see your image clearly.")}</p>
174
+ <span class="tip-title">${V("Good Lighting")}</span>
175
+ <p class="tip-text">${V("Choose a well-lit area where you can see your image clearly.")}</p>
176
176
  </div>
177
177
  <div class="tip-item">
178
- <span class="tip-title">${n("Clean Background")}</span>
179
- <p class="tip-text">${n("Position yourself against a plain background.")}</p>
178
+ <span class="tip-title">${V("Clean Background")}</span>
179
+ <p class="tip-text">${V("Position yourself against a plain background.")}</p>
180
180
  </div>
181
181
  <div class="tip-item">
182
- <span class="tip-title">${n("Clothes")}</span>
183
- <p class="tip-text">${n("Wear clothes that you usually wear on a daily basis.")}</p>
182
+ <span class="tip-title">${V("Clothes")}</span>
183
+ <p class="tip-text">${V("Wear clothes that you usually wear on a daily basis.")}</p>
184
184
  </div>
185
185
  <div class="tip-item">
186
- <span class="tip-title">${n("Framing")}</span>
187
- <p class="tip-text">${n("Make sure your entire body is visible. The app will guide you.")}</p>
186
+ <span class="tip-title">${V("Framing")}</span>
187
+ <p class="tip-text">${V("Make sure your entire body is visible. The app will guide you.")}</p>
188
188
  </div>
189
189
 
190
190
  <form>
191
191
  <label for="height-input">
192
- ${n("To get started, please tell us your height.")}
192
+ ${V("To get started, please tell us your height.")}
193
193
  </label>
194
194
  <input id="height-input" type="number" min="50" max="300"
195
- placeholder=${n("Height (cm)")} required tabindex="1"/>
195
+ placeholder=${V("Height (cm)")} required tabindex="1"/>
196
196
  </form>
197
197
  </div>
198
198
 
@@ -263,7 +263,7 @@
263
263
 
264
264
  <xact-button class="xact-button buttons"
265
265
  @click=${()=>{var A;const r=this.shadowRoot.querySelector("#height-input");if(r!=null&&r.value){const t=parseInt(r.value);this.height=t,(A=this.onStartMeasurement)==null||A.call(this,t)}}}
266
- label="${n("Let's go!")}"
266
+ label="${V("Let's go!")}"
267
267
  ></xact-button>
268
268
 
269
269
  `}};Y.styles=m`
@@ -397,59 +397,108 @@ label="${n("Let's go!")}"
397
397
  margin: 0 auto;
398
398
  }
399
399
 
400
- @media (max-width: 754px) {
401
- .main-section {
402
- flex-direction: column;
403
- gap: 8px;
404
- }
400
+ @media (max-width: 754px) {
401
+ .main-section {
402
+ flex-direction: column;
403
+ gap: 16px;
404
+ align-items: center;
405
+ }
405
406
 
406
- .images-section {
407
- order: -1;
408
- max-width: 100%;
409
- margin-bottom: 8px;
410
- }
407
+ .images-section {
408
+ order: -1;
409
+ width: 100%;
410
+ }
411
411
 
412
- .images-section svg {
413
- width: 80%;
414
- max-width: 250px;
415
- height: auto;
416
- margin-bottom: 8px;
417
- }
412
+ .images-section svg {
413
+ width: 90%;
414
+ max-width: 220px;
415
+ height: auto;
416
+ }
418
417
 
419
- .tips-section {
420
- width: 100%;
421
- gap: 4px;
422
- }
418
+ .tips-section {
419
+ width: 100%;
420
+ gap: 8px;
421
+ align-items: center;
422
+ }
423
423
 
424
- .tip-title {
425
- font-size: 12px;
426
- margin-bottom: 2px;
427
- }
424
+ form {
425
+ align-items: center;
426
+ width: 100%;
427
+ }
428
428
 
429
- .tip-text {
430
- font-size: 10px;
431
- line-height: 1.3;
432
- }
429
+ input {
430
+ max-width: 100%;
431
+ font-size: 14px;
432
+ padding: 10px;
433
+ }
433
434
 
434
- .header-text {
435
- font-size: 20px;
436
- }
435
+ label {
436
+ text-align: center;
437
+ font-size: 14px;
438
+ }
437
439
 
438
- .description-text {
439
- font-size: 14px;
440
- line-height: 1.4;
441
- }
440
+ .xact-button {
441
+ max-width: 100%;
442
+ }
442
443
 
443
- .buttons {
444
- gap: 8px;
445
- max-width: 180px;
446
- }
444
+ .header-text {
445
+ font-size: 20px;
446
+ text-align: center;
447
+ }
448
+
449
+ .description-text {
450
+ font-size: 14px;
451
+ text-align: center;
452
+ }
453
+
454
+ .tip-title {
455
+ font-size: 12px;
456
+ }
457
+
458
+ .tip-text {
459
+ font-size: 11px;
460
+ }
461
+
462
+ .buttons {
463
+ gap: 8px;
464
+ width: 100%;
465
+ max-width: 100%;
466
+ }
467
+ }
468
+
469
+ /* 📱 Extra pequeno (até 380px) */
470
+ @media (max-width: 380px) {
471
+ :host {
472
+ padding: 8px;
473
+ }
474
+
475
+ .component-content {
476
+ gap: 8px;
477
+ }
478
+
479
+ .header-text {
480
+ font-size: 18px;
481
+ }
482
+
483
+ .description-text {
484
+ font-size: 13px;
485
+ }
486
+
487
+ input {
488
+ font-size: 13px;
489
+ padding: 8px;
490
+ }
491
+
492
+ .xact-button {
493
+ font-size: 14px;
494
+ }
495
+
447
496
 
448
497
  }
449
- `,kA([c({type:Number})],Y.prototype,"height",2),kA([c({type:Function})],Y.prototype,"onStartMeasurement",2),Y=kA([R("xact-step-one"),w()],Y);var Rt=Object.getOwnPropertyDescriptor,Ht=(r,A,t,l)=>{for(var e=l>1?void 0:l?Rt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=V(e)||e);return e};let TA=class extends X{render(){return J`
498
+ `,kA([c({type:Number})],Y.prototype,"height",2),kA([c({type:Function})],Y.prototype,"onStartMeasurement",2),Y=kA([R("xact-step-one"),w()],Y);var Rt=Object.getOwnPropertyDescriptor,Ht=(r,A,t,l)=>{for(var e=l>1?void 0:l?Rt(A,t):A,p=r.length-1,n;p>=0;p--)(n=r[p])&&(e=n(e)||e);return e};let TA=class extends X{render(){return J`
450
499
  <footer class="modal-footer">
451
500
  <span>
452
- <span class="powered-by">${n("Powered by")}</span>
501
+ <span class="powered-by">${V("Powered by")}</span>
453
502
  <a tabindex="0" class="xactsize-link" href="http://xactsize.com" target="_blank" rel="noopener">
454
503
  <svg class="xactsize-icon" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
455
504
  <path d="M5.82764 11.3511L11.5446 7.80768V11.3511H5.82764Z" fill="url(#paint0_linear_2010_6151)"/>
@@ -525,7 +574,7 @@ label="${n("Let's go!")}"
525
574
  outline: 2px solid var(--brand-primary);
526
575
  outline-offset: 2px;
527
576
  }
528
- `,TA=Ht([R("xact-footer"),w()],TA);var zt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,D=(r,A,t,l)=>{for(var e=l>1?void 0:l?Gt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&zt(A,t,e),e};let P=class extends X{constructor(){super(...arguments),this.productName="",this.recommendedSize=""}render(){return J`
577
+ `,TA=Ht([R("xact-footer"),w()],TA);var zt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,D=(r,A,t,l)=>{for(var e=l>1?void 0:l?Gt(A,t):A,p=r.length-1,n;p>=0;p--)(n=r[p])&&(e=(l?n(A,t,e):n(e))||e);return l&&e&&zt(A,t,e),e};let P=class extends X{constructor(){super(...arguments),this.productName="",this.recommendedSize=""}render(){return J`
529
578
  <div class="image-container">
530
579
  <!-- Imagem da roupa como SVG exportado -->
531
580
  <svg class="product-image" width="180" height="240" viewBox="0 0 180 240" xmlns="http://www.w3.org/2000/svg">
@@ -564,21 +613,21 @@ label="${n("Let's go!")}"
564
613
 
565
614
 
566
615
 
567
- <h2 class="title">${n("Your ideal size")}</h2>
616
+ <h2 class="title">${V("Your ideal size")}</h2>
568
617
  <p class="description">
569
- ${n("Based on your measurements and the exact dimensions of the garment, the size recommendation provided is the most accurate for an ideal fit.")}
618
+ ${V("Based on your measurements and the exact dimensions of the garment, the size recommendation provided is the most accurate for an ideal fit.")}
570
619
  </p>
571
620
 
572
621
  <div class="buttons">
573
622
  <xact-button
574
623
  variant="outlined"
575
624
  @click=${this.onRetry}
576
- label=${n("Measure Again")}>
625
+ label=${V("Measure Again")}>
577
626
  </xact-button>
578
627
 
579
628
  <xact-button
580
629
  @click=${this.onAccept}
581
- label=${n("Accept Suggestion")}>
630
+ label=${V("Accept Suggestion")}>
582
631
  </xact-button>
583
632
  </div>
584
633
  `}};P.styles=m`
@@ -655,33 +704,33 @@ label="${n("Let's go!")}"
655
704
  justify-content: center;
656
705
  }
657
706
  }
658
- `,D([c({type:String})],P.prototype,"productName",2),D([c({type:String})],P.prototype,"recommendedSize",2),D([c({type:Function})],P.prototype,"onAccept",2),D([c({type:Function})],P.prototype,"onRetry",2),P=D([R("xact-step-result"),w()],P);var Ft=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,JA=(r,A,t,l)=>{for(var e=l>1?void 0:l?Mt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&Ft(A,t,e),e};let Q=class extends X{constructor(){super(...arguments),this.height=0}render(){return J`
707
+ `,D([c({type:String})],P.prototype,"productName",2),D([c({type:String})],P.prototype,"recommendedSize",2),D([c({type:Function})],P.prototype,"onAccept",2),D([c({type:Function})],P.prototype,"onRetry",2),P=D([R("xact-step-result"),w()],P);var Ft=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,JA=(r,A,t,l)=>{for(var e=l>1?void 0:l?Mt(A,t):A,p=r.length-1,n;p>=0;p--)(n=r[p])&&(e=(l?n(A,t,e):n(e))||e);return l&&e&&Ft(A,t,e),e};let Q=class extends X{constructor(){super(...arguments),this.height=0}render(){return J`
659
708
  <div class="component-content">
660
709
  <div class="header-section">
661
- <h2 class="header-text">${n("Before you begin")}</h2>
710
+ <h2 class="header-text">${V("Before you begin")}</h2>
662
711
  <p class="description-text">
663
- ${n("To ensure accurate measurements, we'll take two scans: one from the front and one from the side. Maintain an upright posture with your arms slightly away from your body and stretched out. In the side view, stand up straight with your arms straight and aligned with your body.")}
712
+ ${V("To ensure accurate measurements, we'll take two scans: one from the front and one from the side. Maintain an upright posture with your arms slightly away from your body and stretched out. In the side view, stand up straight with your arms straight and aligned with your body.")}
664
713
  </p>
665
714
  </div>
666
715
 
667
716
  <div class="main-section">
668
717
  <div class="tips-section">
669
- <h3>${n("Tips")}</h3>
718
+ <h3>${V("Tips")}</h3>
670
719
  <div class="tip-item">
671
- <span class="tip-title">${n("Good Lighting")}</span>
672
- <p class="tip-text">${n("Choose a well-lit area where you can see your image clearly.")}</p>
720
+ <span class="tip-title">${V("Good Lighting")}</span>
721
+ <p class="tip-text">${V("Choose a well-lit area where you can see your image clearly.")}</p>
673
722
  </div>
674
723
  <div class="tip-item">
675
- <span class="tip-title">${n("Clean Background")}</span>
676
- <p class="tip-text">${n("Position yourself against a plain background.")}</p>
724
+ <span class="tip-title">${V("Clean Background")}</span>
725
+ <p class="tip-text">${V("Position yourself against a plain background.")}</p>
677
726
  </div>
678
727
  <div class="tip-item">
679
- <span class="tip-title">${n("Clothes")}</span>
680
- <p class="tip-text">${n("Wear clothes that you usually wear on a daily basis.")}</p>
728
+ <span class="tip-title">${V("Clothes")}</span>
729
+ <p class="tip-text">${V("Wear clothes that you usually wear on a daily basis.")}</p>
681
730
  </div>
682
731
  <div class="tip-item">
683
- <span class="tip-title">${n("Framing")}</span>
684
- <p class="tip-text">${n("Make sure your entire body is visible. The app will guide you.")}</p>
732
+ <span class="tip-title">${V("Framing")}</span>
733
+ <p class="tip-text">${V("Make sure your entire body is visible. The app will guide you.")}</p>
685
734
  </div>
686
735
  </div>
687
736
 
@@ -790,7 +839,7 @@ label="${n("Let's go!")}"
790
839
  </div>
791
840
  <xact-button class="buttons"
792
841
  @click=${()=>{var r;(r=this.onStep2advancement)==null||r.call(this)}}
793
- label="${n("To start")}"
842
+ label="${V("To start")}"
794
843
  ></xact-button>
795
844
  </div>
796
845
  `}};Q.styles=m`
@@ -933,8 +982,8 @@ label="${n("Let's go!")}"
933
982
  }
934
983
  }
935
984
 
936
- `,JA([c({type:Number})],Q.prototype,"height",2),JA([c({type:Function})],Q.prototype,"onStep2advancement",2),Q=JA([R("xact-step-informs"),w()],Q);const IA="data:image/svg+xml,%3csvg%20width='22'%20height='40'%20viewBox='0%200%2022%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200L0%2013.3362V0H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.339L0%2026.6724V13.3362H21.517V13.339Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.6755L0%2040.0089V26.6726H21.517V26.6755Z'%20fill='%231C28BA'/%3e%3c/svg%3e",ht="data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.00878906L0%2013.345V0.00878906H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.3478L0%2026.6812V13.345H21.517V13.3478Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2026.6843L0%2040.0176V26.6814H21.517V26.6843Z'%20fill='white'/%3e%3c/svg%3e",Et="data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.0204381L0%2013.3538V0.0175781H21.517V0.0204381Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2013.3538L0%2026.69V13.3538H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.693L0%2040.0264V26.6902H21.517V26.693Z'%20fill='white'/%3e%3c/svg%3e";var It=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,u=(r,A,t,l)=>{for(var e=l>1?void 0:l?wt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&It(A,t,e),e};const{getLocale:Ct,setLocale:XA}=Ut({sourceLocale:EA,targetLocales:Wt,loadLocale:r=>H(Object.assign({"./generated/locales/pt-BR.ts":()=>Promise.resolve().then(()=>Yt)}),`./generated/locales/${r}.ts`,4)});a.BodyMeasurer=class extends X{constructor(){super(...arguments),this.spinnerFrame=0,this.apiKey="DB8mP9gStPfvdyeYbbuCV4Zf3SH745dI",this.tenantId="1",this.productSku="123456",this.apiUrl="https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app/api/measurer/measure/body",this._culture="pt-BR",this.measurerKey="",this._isLocaleLoading=!1,this.showModal=!1,this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.errorMessage="",this.instructionMessage=n("Position yourself in front of the camera"),this.shouldStartMeasurement=!1,this.isLoading=!1,this.isFetching=!1,this.videoElement=null,this.stream=null,this.poolingTimeout=null,this.instructionMessageTimeout=null,this.cameras=[],this.currentCameraId=null}firstUpdated(){this.startSpinnerAnimation()}startSpinnerAnimation(){const A=[Et,ht,IA];this.spinnerInterval=setInterval(()=>{var l;const t=(l=this.shadowRoot)==null?void 0:l.querySelector(".spinner");t&&(t.src=A[this.spinnerFrame],this.spinnerFrame=(this.spinnerFrame+1)%A.length)},300)}get culture(){return this._culture}set culture(A){const t=this._culture;this._culture=A,this.requestUpdate("culture",t),this._applyLocale(A).catch(console.error)}async _applyLocale(A){try{this._isLocaleLoading=!0,this.requestUpdate(),await XA(A)}catch(t){console.error("Failed to load locale",A,t),await XA(EA)}finally{this._isLocaleLoading=!1,this.requestUpdate()}}get errorMap(){return{ERR_RIGHT_ARM_TOO_HIGH:n("Lower your right arm",{id:"ERR_RIGHT_ARM_TOO_HIGH"}),ERR_LEFT_ARM_TOO_HIGH:n("Lower your left arm",{id:"ERR_LEFT_ARM_TOO_HIGH"}),ERR_ARMS_NOT_RAISED:n("Raise both arms to a 45-degree angle",{id:"ERR_ARMS_NOT_RAISED"}),ERR_RIGHT_ARM_NOT_RAISED:n("Raise your right arm to a 45-degree angle",{id:"ERR_RIGHT_ARM_NOT_RAISED"}),ERR_LEFT_ARM_NOT_RAISED:n("Raise your left arm to a 45-degree angle",{id:"ERR_LEFT_ARM_NOT_RAISED"}),ERR_BODY_LANDMARKS_NOT_DETECTED:n("Ensure your full body is visible in the camera",{id:"ERR_BODY_LANDMARKS_NOT_DETECTED"}),ERR_HIPS_NOT_VISIBLE:n("Adjust your position to show your hips",{id:"ERR_HIPS_NOT_VISIBLE"}),ERR_TOO_CLOSE_TO_CAMERA:n("Step back from the camera",{id:"ERR_TOO_CLOSE_TO_CAMERA"}),ERR_NOT_SIDE_VIEW:n("Turn to show your side profile",{id:"ERR_NOT_SIDE_VIEW"}),ERR_INVALID_CLOTHING_TYPE:n("This clothing type is not supported; please contact support",{id:"ERR_INVALID_CLOTHING_TYPE"}),ERR_UPPER_BODY_NOT_VISIBLE:n("Adjust your position to show your upper body",{id:"ERR_UPPER_BODY_NOT_VISIBLE"}),ERR_HEAD_TOO_CLOSE_TO_EDGE:n("Move your head away from the edge of the frame",{id:"ERR_HEAD_TOO_CLOSE_TO_EDGE"}),ERR_LOWER_BODY_NOT_VISIBLE:n("Adjust your position to show your lower body",{id:"ERR_LOWER_BODY_NOT_VISIBLE"}),ERR_FEET_TOO_CLOSE_TO_EDGE:n("Move your feet away from the edge of the frame",{id:"ERR_FEET_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE:n("Move your body away from the edge of the frame",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT:n("Move to the left to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT"}),ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT:n("Move to the right to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT"}),ERR_SHOULDERS_NOT_VISIBLE:n("Adjust your position to show your shoulders",{id:"ERR_SHOULDERS_NOT_VISIBLE"}),ERR_HEIGHT_MEASUREMENT_FAILED:n("Stand straight and ensure your full body is visible",{id:"ERR_HEIGHT_MEASUREMENT_FAILED"}),ERR_HEAD_POINT_NOT_DETECTED:n("Ensure your head is fully visible in the frame",{id:"ERR_HEAD_POINT_NOT_DETECTED"}),ERR_INCORRECT_POSTURE:n("Stand straight with your shoulders back",{id:"ERR_INCORRECT_POSTURE"}),ERR_HEM_MEASUREMENT_FAILED:n("Ensure your clothing hem is visible and clear",{id:"ERR_HEM_MEASUREMENT_FAILED"}),ERR_SHOULDER_MEASUREMENT_FAILED:n("Keep your shoulders relaxed and visible",{id:"ERR_SHOULDER_MEASUREMENT_FAILED"}),ERR_ARM_NOT_STRETCHED:n("Stretch your arms fully",{id:"ERR_ARM_NOT_STRETCHED"}),ERR_LEGS_NOT_DETECTED:n("Ensure your legs are fully visible in the frame",{id:"ERR_LEGS_NOT_DETECTED"}),ERR_HIPS_MEASUREMENT_FAILED:n("Stand straight and ensure your hips are visible",{id:"ERR_HIPS_MEASUREMENT_FAILED"}),ERR_WAIST_MEASUREMENT_FAILED:n("Stand straight and ensure your waist is visible",{id:"ERR_WAIST_MEASUREMENT_FAILED"}),ERR_INVALID_MEASURE_SIDE_VIEW:n("Turn to show a clear side profile",{id:"ERR_INVALID_MEASURE_SIDE_VIEW"}),ERR_INVALID_BODY_HEIGHT_TYPE:n("Ensure your full body is visible for height measurement",{id:"ERR_INVALID_BODY_HEIGHT_TYPE"}),ERR_IMAGE_LOAD_FAILED:n("Try again later; the image could not be processed",{id:"ERR_IMAGE_LOAD_FAILED"}),ERR_HEIGHT_INVALID:n("Height must be between 50 and 300 cm",{id:"ERR_HEIGHT_INVALID"})}}getTranslatedMessage(A){const t=this.errorMap[A];return t||(console.info("Error code is missing",A),n("An unexpected error occurred"))}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleEscKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleEscKey.bind(this)),this.stopPolling(),clearInterval(this.spinnerInterval)}handleEscKey(A){A.key==="Escape"&&this.showModal&&this.closeModal()}openModal(){this.showModal=!0,this.step=1,this.height=0,this.instructionMessage=n("Position yourself in front of the camera")}closeModal(){this.showModal=!1,this.onMeasurementCanceled&&typeof this.onMeasurementCanceled=="function"&&this.onMeasurementCanceled(),this.stopPolling(),this.dispatchEvent(new CustomEvent("measurementCanceled",{detail:{}}))}async step2advancement(){if(this.height<50||this.height>300){this.errorMessage=this.getTranslatedMessage("ERR_HEIGHT_INVALID");return}this.step=3,this.errorMessage=""}async startMeasurement(){this.step=3,this.errorMessage="",this.shouldStartMeasurement=!0}updated(A){super.updated(A),A.has("step")&&this.step===3&&this.shouldStartMeasurement&&(this.initializeMeasurement(),this.shouldStartMeasurement=!1)}async initializeMeasurement(){this.videoElement=this.shadowRoot.querySelector("video");try{this.stream=await navigator.mediaDevices.getUserMedia({video:!0}),this.videoElement&&(this.videoElement.srcObject=this.stream,await this.videoElement.play(),await this.loadCameras(),this.startPolling())}catch{this.errorMessage=n("Error accessing webcam")}}async loadCameras(){try{const A=await navigator.mediaDevices.enumerateDevices();this.cameras=A.filter(t=>t.kind==="videoinput"),this.cameras.length>0&&(this.currentCameraId=this.cameras[0].deviceId)}catch(A){console.error("Error enumerating devices:",A)}}async flipCamera(){if(this.cameras.length<2)return;this.isLoading=!0,this.stopPolling();const t=(this.cameras.findIndex(l=>l.deviceId===this.currentCameraId)+1)%this.cameras.length;this.currentCameraId=this.cameras[t].deviceId;try{this.stream&&this.stream.getTracks().forEach(l=>l.stop()),this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:{exact:this.currentCameraId}}}),this.videoElement&&(this.videoElement.srcObject=this.stream,await this.videoElement.play(),this.startPolling())}catch{this.errorMessage=n("Error switching camera")}finally{this.isLoading=!1}}async startPolling(){const A=async()=>{if(!this.videoElement||!this.stream||this.isFetching)return;const t=document.createElement("canvas");t.width=this.videoElement.videoWidth,t.height=this.videoElement.videoHeight;const l=t.getContext("2d");l==null||l.drawImage(this.videoElement,0,0,t.width,t.height);const e=await new Promise(S=>t.toBlob(q=>S(q),"image/jpeg")),p=new File([e],"frame.jpg",{type:"image/jpeg"}),V=new FormData;V.append("image",p),V.append("height",this.height.toString()),V.append("productSku",this.productSku),this.measurerKey&&V.append("measurerKey",this.measurerKey);try{this.isFetching=!0,this.isLoading=!0,this.poolingTimeout!==null&&(clearTimeout(this.poolingTimeout),this.poolingTimeout=null),this.instructionMessageTimeout!==null&&(clearTimeout(this.instructionMessageTimeout),this.instructionMessageTimeout=null);const q=await(await fetch(this.apiUrl,{method:"POST",body:V,headers:{Accept:"application/json","Cache-Control":"no-store",Pragma:"no-cache","X-Api-Key":this.apiKey}})).json();this.isFetching=!1,this.isLoading=!1,this.errorMessage=JSON.stringify(q),q.success?(this.measurements=q.measurements,this.recommendedSize=q.chosenSize,this.instructionMessage=n("Measurement successful!"),this.stopPolling(),this.step=4):(this.instructionMessage=this.getTranslatedMessage(q.message||"UNKNOWN_ERROR"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=n("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(A,0))},2e3))}catch{this.isFetching=!1,this.isLoading=!1,this.instructionMessage=n("Error processing measurement"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=n("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(A,0))},2e3)}};A()}stopPolling(){this.poolingTimeout!==null&&(clearTimeout(this.poolingTimeout),this.poolingTimeout=null),this.instructionMessageTimeout!==null&&(clearTimeout(this.instructionMessageTimeout),this.instructionMessageTimeout=null),this.stream&&(this.stream.getTracks().forEach(A=>A.stop()),this.stream=null)}acceptMeasurement(){this.dispatchEvent(new CustomEvent("measurementAccepted",{detail:{size:this.recommendedSize}})),this.onMeasurementAccepted&&typeof this.onMeasurementAccepted=="function"&&this.onMeasurementAccepted(),this.showModal=!1,this.stopPolling()}resetMeasurement(){this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.stopPolling()}stopMeasurement(){this.resetMeasurement(),this.showModal=!1}render(){return this._isLocaleLoading?J`<div hidden></div>`:J`
937
- <xact-button @click=${this.openModal} label="${n("Find your Xactsize")}"></xact-button>
985
+ `,JA([c({type:Number})],Q.prototype,"height",2),JA([c({type:Function})],Q.prototype,"onStep2advancement",2),Q=JA([R("xact-step-informs"),w()],Q);const IA="data:image/svg+xml,%3csvg%20width='22'%20height='40'%20viewBox='0%200%2022%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200L0%2013.3362V0H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.339L0%2026.6724V13.3362H21.517V13.339Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.6755L0%2040.0089V26.6726H21.517V26.6755Z'%20fill='%231C28BA'/%3e%3c/svg%3e",ht="data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.00878906L0%2013.345V0.00878906H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.3478L0%2026.6812V13.345H21.517V13.3478Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2026.6843L0%2040.0176V26.6814H21.517V26.6843Z'%20fill='white'/%3e%3c/svg%3e",Et="data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.0204381L0%2013.3538V0.0175781H21.517V0.0204381Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2013.3538L0%2026.69V13.3538H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.693L0%2040.0264V26.6902H21.517V26.693Z'%20fill='white'/%3e%3c/svg%3e";var It=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,u=(r,A,t,l)=>{for(var e=l>1?void 0:l?wt(A,t):A,p=r.length-1,n;p>=0;p--)(n=r[p])&&(e=(l?n(A,t,e):n(e))||e);return l&&e&&It(A,t,e),e};const{getLocale:Ct,setLocale:XA}=Ut({sourceLocale:EA,targetLocales:Wt,loadLocale:r=>H(Object.assign({"./generated/locales/pt-BR.ts":()=>Promise.resolve().then(()=>Yt)}),`./generated/locales/${r}.ts`,4)});a.BodyMeasurer=class extends X{constructor(){super(...arguments),this.spinnerFrame=0,this.apiKey="DB8mP9gStPfvdyeYbbuCV4Zf3SH745dI",this.tenantId="1",this.productSku="123456",this.apiUrl="https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app/api/measurer/measure/body",this._culture="pt-BR",this.measurerKey="",this._isLocaleLoading=!1,this.showModal=!1,this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.errorMessage="",this.instructionMessage=V("Position yourself in front of the camera"),this.shouldStartMeasurement=!1,this.isLoading=!1,this.isFetching=!1,this.videoElement=null,this.stream=null,this.poolingTimeout=null,this.instructionMessageTimeout=null,this.cameras=[],this.currentCameraId=null}firstUpdated(){this.startSpinnerAnimation()}startSpinnerAnimation(){const A=[Et,ht,IA];this.spinnerInterval=setInterval(()=>{var l;const t=(l=this.shadowRoot)==null?void 0:l.querySelector(".spinner");t&&(t.src=A[this.spinnerFrame],this.spinnerFrame=(this.spinnerFrame+1)%A.length)},300)}get culture(){return this._culture}set culture(A){const t=this._culture;this._culture=A,this.requestUpdate("culture",t),this._applyLocale(A).catch(console.error)}async _applyLocale(A){try{this._isLocaleLoading=!0,this.requestUpdate(),await XA(A)}catch(t){console.error("Failed to load locale",A,t),await XA(EA)}finally{this._isLocaleLoading=!1,this.requestUpdate()}}get errorMap(){return{ERR_RIGHT_ARM_TOO_HIGH:V("Lower your right arm",{id:"ERR_RIGHT_ARM_TOO_HIGH"}),ERR_LEFT_ARM_TOO_HIGH:V("Lower your left arm",{id:"ERR_LEFT_ARM_TOO_HIGH"}),ERR_ARMS_NOT_RAISED:V("Raise both arms to a 45-degree angle",{id:"ERR_ARMS_NOT_RAISED"}),ERR_RIGHT_ARM_NOT_RAISED:V("Raise your right arm to a 45-degree angle",{id:"ERR_RIGHT_ARM_NOT_RAISED"}),ERR_LEFT_ARM_NOT_RAISED:V("Raise your left arm to a 45-degree angle",{id:"ERR_LEFT_ARM_NOT_RAISED"}),ERR_BODY_LANDMARKS_NOT_DETECTED:V("Ensure your full body is visible in the camera",{id:"ERR_BODY_LANDMARKS_NOT_DETECTED"}),ERR_HIPS_NOT_VISIBLE:V("Adjust your position to show your hips",{id:"ERR_HIPS_NOT_VISIBLE"}),ERR_TOO_CLOSE_TO_CAMERA:V("Step back from the camera",{id:"ERR_TOO_CLOSE_TO_CAMERA"}),ERR_NOT_SIDE_VIEW:V("Turn to show your side profile",{id:"ERR_NOT_SIDE_VIEW"}),ERR_INVALID_CLOTHING_TYPE:V("This clothing type is not supported; please contact support",{id:"ERR_INVALID_CLOTHING_TYPE"}),ERR_UPPER_BODY_NOT_VISIBLE:V("Adjust your position to show your upper body",{id:"ERR_UPPER_BODY_NOT_VISIBLE"}),ERR_HEAD_TOO_CLOSE_TO_EDGE:V("Move your head away from the edge of the frame",{id:"ERR_HEAD_TOO_CLOSE_TO_EDGE"}),ERR_LOWER_BODY_NOT_VISIBLE:V("Adjust your position to show your lower body",{id:"ERR_LOWER_BODY_NOT_VISIBLE"}),ERR_FEET_TOO_CLOSE_TO_EDGE:V("Move your feet away from the edge of the frame",{id:"ERR_FEET_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE:V("Move your body away from the edge of the frame",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT:V("Move to the left to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT"}),ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT:V("Move to the right to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT"}),ERR_SHOULDERS_NOT_VISIBLE:V("Adjust your position to show your shoulders",{id:"ERR_SHOULDERS_NOT_VISIBLE"}),ERR_HEIGHT_MEASUREMENT_FAILED:V("Stand straight and ensure your full body is visible",{id:"ERR_HEIGHT_MEASUREMENT_FAILED"}),ERR_HEAD_POINT_NOT_DETECTED:V("Ensure your head is fully visible in the frame",{id:"ERR_HEAD_POINT_NOT_DETECTED"}),ERR_INCORRECT_POSTURE:V("Stand straight with your shoulders back",{id:"ERR_INCORRECT_POSTURE"}),ERR_HEM_MEASUREMENT_FAILED:V("Ensure your clothing hem is visible and clear",{id:"ERR_HEM_MEASUREMENT_FAILED"}),ERR_SHOULDER_MEASUREMENT_FAILED:V("Keep your shoulders relaxed and visible",{id:"ERR_SHOULDER_MEASUREMENT_FAILED"}),ERR_ARM_NOT_STRETCHED:V("Stretch your arms fully",{id:"ERR_ARM_NOT_STRETCHED"}),ERR_LEGS_NOT_DETECTED:V("Ensure your legs are fully visible in the frame",{id:"ERR_LEGS_NOT_DETECTED"}),ERR_HIPS_MEASUREMENT_FAILED:V("Stand straight and ensure your hips are visible",{id:"ERR_HIPS_MEASUREMENT_FAILED"}),ERR_WAIST_MEASUREMENT_FAILED:V("Stand straight and ensure your waist is visible",{id:"ERR_WAIST_MEASUREMENT_FAILED"}),ERR_INVALID_MEASURE_SIDE_VIEW:V("Turn to show a clear side profile",{id:"ERR_INVALID_MEASURE_SIDE_VIEW"}),ERR_INVALID_BODY_HEIGHT_TYPE:V("Ensure your full body is visible for height measurement",{id:"ERR_INVALID_BODY_HEIGHT_TYPE"}),ERR_IMAGE_LOAD_FAILED:V("Try again later; the image could not be processed",{id:"ERR_IMAGE_LOAD_FAILED"}),ERR_HEIGHT_INVALID:V("Height must be between 50 and 300 cm",{id:"ERR_HEIGHT_INVALID"})}}getTranslatedMessage(A){const t=this.errorMap[A];return t||(console.info("Error code is missing",A),V("An unexpected error occurred"))}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleEscKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleEscKey.bind(this)),this.stopPolling(),clearInterval(this.spinnerInterval)}handleEscKey(A){A.key==="Escape"&&this.showModal&&this.closeModal()}openModal(){this.showModal=!0,this.step=1,this.height=0,this.instructionMessage=V("Position yourself in front of the camera")}closeModal(){this.showModal=!1,this.onMeasurementCanceled&&typeof this.onMeasurementCanceled=="function"&&this.onMeasurementCanceled(),this.stopPolling(),this.dispatchEvent(new CustomEvent("measurementCanceled",{detail:{}}))}async step2advancement(){if(this.height<50||this.height>300){this.errorMessage=this.getTranslatedMessage("ERR_HEIGHT_INVALID");return}this.step=3,this.errorMessage=""}async startMeasurement(){this.step=3,this.errorMessage="",this.shouldStartMeasurement=!0}updated(A){super.updated(A),A.has("step")&&this.step===3&&this.shouldStartMeasurement&&(this.initializeMeasurement(),this.shouldStartMeasurement=!1)}async initializeMeasurement(){this.videoElement=this.shadowRoot.querySelector("video");try{this.stream=await navigator.mediaDevices.getUserMedia({video:!0}),this.videoElement&&(this.videoElement.srcObject=this.stream,await this.videoElement.play(),await this.loadCameras(),this.startPolling())}catch{this.errorMessage=V("Error accessing webcam")}}async loadCameras(){try{const A=await navigator.mediaDevices.enumerateDevices();this.cameras=A.filter(t=>t.kind==="videoinput"),this.cameras.length>0&&(this.currentCameraId=this.cameras[0].deviceId)}catch(A){console.error("Error enumerating devices:",A)}}async flipCamera(){if(this.cameras.length<2)return;this.isLoading=!0,this.stopPolling();const t=(this.cameras.findIndex(l=>l.deviceId===this.currentCameraId)+1)%this.cameras.length;this.currentCameraId=this.cameras[t].deviceId;try{this.stream&&this.stream.getTracks().forEach(l=>l.stop()),this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:{exact:this.currentCameraId}}}),this.videoElement&&(this.videoElement.srcObject=this.stream,await this.videoElement.play(),this.startPolling())}catch{this.errorMessage=V("Error switching camera")}finally{this.isLoading=!1}}async startPolling(){const A=async()=>{if(!this.videoElement||!this.stream||this.isFetching)return;const t=document.createElement("canvas");t.width=this.videoElement.videoWidth,t.height=this.videoElement.videoHeight;const l=t.getContext("2d");l==null||l.drawImage(this.videoElement,0,0,t.width,t.height);const e=await new Promise(S=>t.toBlob(q=>S(q),"image/jpeg")),p=new File([e],"frame.jpg",{type:"image/jpeg"}),n=new FormData;n.append("image",p),n.append("height",this.height.toString()),n.append("productSku",this.productSku),this.measurerKey&&n.append("measurerKey",this.measurerKey);try{this.isFetching=!0,this.isLoading=!0,this.poolingTimeout!==null&&(clearTimeout(this.poolingTimeout),this.poolingTimeout=null),this.instructionMessageTimeout!==null&&(clearTimeout(this.instructionMessageTimeout),this.instructionMessageTimeout=null);const q=await(await fetch(this.apiUrl,{method:"POST",body:n,headers:{Accept:"application/json","Cache-Control":"no-store",Pragma:"no-cache","X-Api-Key":this.apiKey}})).json();this.isFetching=!1,this.isLoading=!1,this.errorMessage=JSON.stringify(q),q.success?(this.measurements=q.measurements,this.recommendedSize=q.chosenSize,this.instructionMessage=V("Measurement successful!"),this.stopPolling(),this.step=4):(this.instructionMessage=this.getTranslatedMessage(q.message||"UNKNOWN_ERROR"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=V("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(A,0))},2e3))}catch{this.isFetching=!1,this.isLoading=!1,this.instructionMessage=V("Error processing measurement"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=V("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(A,0))},2e3)}};A()}stopPolling(){this.poolingTimeout!==null&&(clearTimeout(this.poolingTimeout),this.poolingTimeout=null),this.instructionMessageTimeout!==null&&(clearTimeout(this.instructionMessageTimeout),this.instructionMessageTimeout=null),this.stream&&(this.stream.getTracks().forEach(A=>A.stop()),this.stream=null)}acceptMeasurement(){this.dispatchEvent(new CustomEvent("measurementAccepted",{detail:{size:this.recommendedSize}})),this.onMeasurementAccepted&&typeof this.onMeasurementAccepted=="function"&&this.onMeasurementAccepted(),this.showModal=!1,this.stopPolling()}resetMeasurement(){this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.stopPolling()}stopMeasurement(){this.resetMeasurement(),this.showModal=!1}render(){return this._isLocaleLoading?J`<div hidden></div>`:J`
986
+ <xact-button @click=${this.openModal} label="${V("Find your Xactsize")}"></xact-button>
938
987
 
939
988
  ${this.showModal?J`
940
989
  <div class="modal">
@@ -957,7 +1006,7 @@ label="${n("Let's go!")}"
957
1006
  ${this.step===3?J`
958
1007
  <div class="step-3">
959
1008
 
960
- <p>${n("Ensure your full body is visible in the camera")}</p>
1009
+ <p>${V("Ensure your full body is visible in the camera")}</p>
961
1010
  <div class='video-container'>
962
1011
  <div class="video-overlay">
963
1012
  <h2>${this.instructionMessage}</h2>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xactsize-webcomponents",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "A web component for body measurements and size recommendations",
5
5
  "main": "dist/body-measurer.umd.js",
6
6
  "module": "dist/body-measurer.es.js",