@wodira/browser 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +111 -1
- package/dist/index.cjs +36 -0
- package/dist/index.d.ts +90 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/boxes/cdn.js +15 -15
- package/dist/ui/boxes/index.js +4 -4
- package/dist/ui/components.d.ts +33 -1
- package/dist/ui/components.d.ts.map +1 -1
- package/dist/ui/events.d.ts +1 -1
- package/dist/ui/events.d.ts.map +1 -1
- package/dist/ui/i18n.d.ts +1 -1
- package/dist/ui/i18n.d.ts.map +1 -1
- package/dist/ui/index-dqnha6dj.js +1625 -0
- package/dist/ui/index-h2b598n9.js +1624 -0
- package/dist/ui/{index-tfej862z.js → index-k8s7q1sf.js} +50 -1568
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +352 -125
- package/dist/ui/map-view-8tyrehav.js +28737 -0
- package/dist/ui/maplibre-gl-worker.mjs +10 -0
- package/dist/ui/route-3d/cdn.d.ts +2 -0
- package/dist/ui/route-3d/cdn.d.ts.map +1 -0
- package/dist/ui/route-3d/cdn.js +1527 -0
- package/dist/ui/route-3d/gpx.d.ts +14 -0
- package/dist/ui/route-3d/gpx.d.ts.map +1 -0
- package/dist/ui/route-3d/index.d.ts +12 -0
- package/dist/ui/route-3d/index.d.ts.map +1 -0
- package/dist/ui/route-3d/index.js +16 -0
- package/dist/ui/route-3d/map-view.d.ts +73 -0
- package/dist/ui/route-3d/map-view.d.ts.map +1 -0
- package/dist/ui/route-3d/maplibre-gl-worker.mjs +10 -0
- package/dist/ui/route-3d/route-3d.d.ts +168 -0
- package/dist/ui/route-3d/route-3d.d.ts.map +1 -0
- package/dist/ui/route-3d/route-geo.d.ts +77 -0
- package/dist/ui/route-3d/route-geo.d.ts.map +1 -0
- package/dist/ui/shirt-sponsors/cdn.js +29 -27
- package/dist/ui/shirt-sponsors/index.js +5 -3
- package/dist/ui/shirt-sponsors/shirt-auction.d.ts +19 -0
- package/dist/ui/shirt-sponsors/shirt-auction.d.ts.map +1 -1
- package/package.json +15 -6
package/dist/ui/boxes/cdn.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var H=globalThis,te=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,re=Symbol(),Se=new WeakMap;class ie{constructor(e,t,r){if(this._$cssResult$=!0,r!==re)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet,t=this._strings;if(te&&e===void 0){let r=t!==void 0&&t.length===1;if(r)e=Se.get(t);if(e===void 0){if((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),r)Se.set(t,e)}}return e}toString(){return this.cssText}}var et=(e)=>{if(e._$cssResult$===!0)return e.cssText;else if(typeof e==="number")return e;else throw Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)},tt=(e)=>new ie(typeof e==="string"?e:String(e),void 0,re),j=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((i,a,o)=>i+et(a)+e[o+1],e[0]);return new ie(r,e,re)},Ee=(e,t)=>{if(te)e.adoptedStyleSheets=t.map((r)=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),a=H.litNonce;if(a!==void 0)i.setAttribute("nonce",a);i.textContent=r.cssText,e.appendChild(i)}},rt=(e)=>{let t="";for(let r of e.cssRules)t+=r.cssText;return tt(t)},ae=te?(e)=>e:(e)=>e instanceof CSSStyleSheet?rt(e):e;var{is:it,defineProperty:at,getOwnPropertyDescriptor:$e,getOwnPropertyNames:ot,getOwnPropertySymbols:st,getPrototypeOf:Te}=Object,nt=!1,f=globalThis;if(nt)f.customElements??=customElements;var b=!0,x,Ce=f.trustedTypes,lt=Ce?Ce.emptyScript:"",Pe=b?f.reactiveElementPolyfillSupportDevMode:f.reactiveElementPolyfillSupport;if(b)f.litIssuedWarnings??=new Set,x=(e,t)=>{if(t+=` See https://lit.dev/msg/${e} for more information.`,!f.litIssuedWarnings.has(t)&&!f.litIssuedWarnings.has(e))console.warn(t),f.litIssuedWarnings.add(t)},queueMicrotask(()=>{if(x("dev-mode","Lit is in dev mode. Not recommended for production!"),f.ShadyDOM?.inUse&&Pe===void 0)x("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});var dt=b?(e)=>{if(!f.emitLitDebugLogEvents)return;f.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))}:void 0,O=(e,t)=>e,oe={toAttribute(e,t){switch(t){case Boolean:e=e?lt:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e);break}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(i){r=null}break}return r}},Ae=(e,t)=>!it(e,t),We={attribute:!0,type:String,converter:oe,reflect:!1,useDefault:!1,hasChanged:Ae};Symbol.metadata??=Symbol("metadata");f.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=We){if(t.state)t.attribute=!1;if(this.__prepare(),this.prototype.hasOwnProperty(e))t=Object.create(t),t.wrapped=!0;if(this.elementProperties.set(e,t),!t.noAccessor){let r=b?Symbol.for(`${String(e)} (@property() cache)`):Symbol(),i=this.getPropertyDescriptor(e,r,t);if(i!==void 0)at(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:a}=$e(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};if(b&&i==null){if("value"in($e(this.prototype,e)??{}))throw Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);x("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(o){let s=i?.call(this);a?.call(this,o),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??We}static __prepare(){if(this.hasOwnProperty(O("elementProperties",this)))return;let e=Te(this);if(e.finalize(),e._initializers!==void 0)this._initializers=[...e._initializers];this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized",this)))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(O("properties",this))){let t=this.properties,r=[...ot(t),...st(t)];for(let i of r)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,i]of t)this.elementProperties.set(r,i)}this.__attributeToPropertyMap=new Map;for(let[t,r]of this.elementProperties){let i=this.__attributeNameForProperty(t,r);if(i!==void 0)this.__attributeToPropertyMap.set(i,t)}if(this.elementStyles=this.finalizeStyles(this.styles),b){if(this.hasOwnProperty("createProperty"))x("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators");if(this.hasOwnProperty("getPropertyDescriptor"))x("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let i of r)t.unshift(ae(i))}else if(e!==void 0)t.push(ae(e));return t}static __attributeNameForProperty(e,t){let r=t.attribute;return r===!1?void 0:typeof r==="string"?r:typeof e==="string"?e.toLowerCase():void 0}constructor(){super();this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise((e)=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((e)=>e(this))}addController(e){if((this.__controllers??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected)e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())if(this.hasOwnProperty(r))e.set(r,this[r]),delete this[r];if(e.size>0)this.__instanceProperties=e}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ee(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((e)=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach((e)=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$attributeToProperty(e,r)}__propertyToAttribute(e,t){let i=this.constructor.elementProperties.get(e),a=this.constructor.__attributeNameForProperty(e,i);if(a!==void 0&&i.reflect===!0){let s=(i.converter?.toAttribute!==void 0?i.converter:oe).toAttribute(t,i.type);if(b&&this.constructor.enabledWarnings.includes("migration")&&s===void 0)x("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`);if(this.__reflectingProperty=e,s==null)this.removeAttribute(a);else this.setAttribute(a,s);this.__reflectingProperty=null}}_$attributeToProperty(e,t){let r=this.constructor,i=r.__attributeToPropertyMap.get(e);if(i!==void 0&&this.__reflectingProperty!==i){let a=r.getPropertyOptions(i),o=typeof a.converter==="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:oe;this.__reflectingProperty=i;let s=o.fromAttribute(t,a.type);this[i]=s??this.__defaultValues?.get(i)??s,this.__reflectingProperty=null}}requestUpdate(e,t,r,i=!1,a){if(e!==void 0){if(b&&e instanceof Event)x("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");let o=this.constructor;if(i===!1)a=this[e];if(r??=o.getPropertyOptions(e),(r.hasChanged??Ae)(a,t)||r.useDefault&&r.reflect&&a===this.__defaultValues?.get(e)&&!this.hasAttribute(o.__attributeNameForProperty(e,r)))this._$changeProperty(e,t,r);else return}if(this.isUpdatePending===!1)this.__updatePromise=this.__enqueueUpdate()}_$changeProperty(e,t,{useDefault:r,reflect:i,wrapped:a},o){if(r&&!(this.__defaultValues??=new Map).has(e)){if(this.__defaultValues.set(e,o??t??this[e]),a!==!0||o!==void 0)return}if(!this._$changedProperties.has(e)){if(!this.hasUpdated&&!r)t=void 0;this._$changedProperties.set(e,t)}if(i===!0&&this.__reflectingProperty!==e)(this.__reflectingProperties??=new Set).add(e)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();if(e!=null)await e;return!this.isUpdatePending}scheduleUpdate(){let e=this.performUpdate();if(b&&this.constructor.enabledWarnings.includes("async-perform-update")&&typeof e?.then==="function")x("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`);return e}performUpdate(){if(!this.isUpdatePending)return;if(dt?.({kind:"update"}),!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),b){let a=[...this.constructor.elementProperties.keys()].filter((o)=>this.hasOwnProperty(o)&&(o in Te(this)));if(a.length)throw Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${a.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(let[i,a]of this.__instanceProperties)this[i]=a;this.__instanceProperties=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,a]of r){let{wrapped:o}=a,s=this[i];if(o===!0&&!this._$changedProperties.has(i)&&s!==void 0)this._$changeProperty(i,void 0,a,s)}}let e=!1,t=this._$changedProperties;try{if(e=this.shouldUpdate(t),e)this.willUpdate(t),this.__controllers?.forEach((r)=>r.hostUpdate?.()),this.update(t);else this.__markUpdated()}catch(r){throw e=!1,this.__markUpdated(),r}if(e)this._$didUpdate(t)}willUpdate(e){}_$didUpdate(e){if(this.__controllers?.forEach((t)=>t.hostUpdated?.()),!this.hasUpdated)this.hasUpdated=!0,this.firstUpdated(e);if(this.updated(e),b&&this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update"))x("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach((t)=>this.__propertyToAttribute(t,this[t])),this.__markUpdated()}updated(e){}firstUpdated(e){}}y.elementStyles=[];y.shadowRootOptions={mode:"open"};y[O("elementProperties",y)]=new Map;y[O("finalized",y)]=new Map;Pe?.({ReactiveElement:y});if(b){y.enabledWarnings=["change-in-update","async-perform-update"];let e=function(t){if(!t.hasOwnProperty(O("enabledWarnings",t)))t.enabledWarnings=t.enabledWarnings.slice()};y.enableWarning=function(t){if(e(this),!this.enabledWarnings.includes(t))this.enabledWarnings.push(t)},y.disableWarning=function(t){e(this);let r=this.enabledWarnings.indexOf(t);if(r>=0)this.enabledWarnings.splice(r,1)}}(f.reactiveElementVersions??=[]).push("2.1.2");if(b&&f.reactiveElementVersions.length>1)queueMicrotask(()=>{x("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var w=globalThis,p=(e)=>{if(!w.emitLitDebugLogEvents)return;w.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))},ct=0,B;w.litIssuedWarnings??=new Set,B=(e,t)=>{if(t+=e?` See https://lit.dev/msg/${e} for more information.`:"",!w.litIssuedWarnings.has(t)&&!w.litIssuedWarnings.has(e))console.warn(t),w.litIssuedWarnings.add(t)},queueMicrotask(()=>{B("dev-mode","Lit is in dev mode. Not recommended for production!")});var _=w.ShadyDOM?.inUse&&w.ShadyDOM?.noPatch===!0?w.ShadyDOM.wrap:(e)=>e,Y=w.trustedTypes,Re=Y?Y.createPolicy("lit-html",{createHTML:(e)=>e}):void 0,pt=(e)=>e,Q=(e,t,r)=>pt,ut=(e)=>{if(I!==Q)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");I=e},ht=()=>{I=Q},ce=(e,t,r)=>I(e,t,r),Le="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,Be="?"+S,mt=`<${Be}>`,R=document,M=()=>R.createComment(""),V=(e)=>e===null||typeof e!="object"&&typeof e!="function",pe=Array.isArray,gt=(e)=>pe(e)||typeof e?.[Symbol.iterator]==="function",se=`[
|
|
1
|
+
var H=globalThis,te=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,re=Symbol(),Se=new WeakMap;class ie{constructor(e,t,r){if(this._$cssResult$=!0,r!==re)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet,t=this._strings;if(te&&e===void 0){let r=t!==void 0&&t.length===1;if(r)e=Se.get(t);if(e===void 0){if((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),r)Se.set(t,e)}}return e}toString(){return this.cssText}}var et=(e)=>{if(e._$cssResult$===!0)return e.cssText;else if(typeof e==="number")return e;else throw Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)},tt=(e)=>new ie(typeof e==="string"?e:String(e),void 0,re),G=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((i,o,a)=>i+et(o)+e[a+1],e[0]);return new ie(r,e,re)},Ee=(e,t)=>{if(te)e.adoptedStyleSheets=t.map((r)=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),o=H.litNonce;if(o!==void 0)i.setAttribute("nonce",o);i.textContent=r.cssText,e.appendChild(i)}},rt=(e)=>{let t="";for(let r of e.cssRules)t+=r.cssText;return tt(t)},oe=te?(e)=>e:(e)=>e instanceof CSSStyleSheet?rt(e):e;var{is:it,defineProperty:ot,getOwnPropertyDescriptor:$e,getOwnPropertyNames:at,getOwnPropertySymbols:st,getPrototypeOf:Te}=Object,nt=!1,f=globalThis;if(nt)f.customElements??=customElements;var b=!0,w,Ce=f.trustedTypes,lt=Ce?Ce.emptyScript:"",Ae=b?f.reactiveElementPolyfillSupportDevMode:f.reactiveElementPolyfillSupport;if(b)f.litIssuedWarnings??=new Set,w=(e,t)=>{if(t+=` See https://lit.dev/msg/${e} for more information.`,!f.litIssuedWarnings.has(t)&&!f.litIssuedWarnings.has(e))console.warn(t),f.litIssuedWarnings.add(t)},queueMicrotask(()=>{if(w("dev-mode","Lit is in dev mode. Not recommended for production!"),f.ShadyDOM?.inUse&&Ae===void 0)w("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});var dt=b?(e)=>{if(!f.emitLitDebugLogEvents)return;f.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))}:void 0,O=(e,t)=>e,ae={toAttribute(e,t){switch(t){case Boolean:e=e?lt:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e);break}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(i){r=null}break}return r}},Pe=(e,t)=>!it(e,t),We={attribute:!0,type:String,converter:ae,reflect:!1,useDefault:!1,hasChanged:Pe};Symbol.metadata??=Symbol("metadata");f.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=We){if(t.state)t.attribute=!1;if(this.__prepare(),this.prototype.hasOwnProperty(e))t=Object.create(t),t.wrapped=!0;if(this.elementProperties.set(e,t),!t.noAccessor){let r=b?Symbol.for(`${String(e)} (@property() cache)`):Symbol(),i=this.getPropertyDescriptor(e,r,t);if(i!==void 0)ot(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:o}=$e(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};if(b&&i==null){if("value"in($e(this.prototype,e)??{}))throw Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);w("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(a){let s=i?.call(this);o?.call(this,a),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??We}static __prepare(){if(this.hasOwnProperty(O("elementProperties",this)))return;let e=Te(this);if(e.finalize(),e._initializers!==void 0)this._initializers=[...e._initializers];this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized",this)))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(O("properties",this))){let t=this.properties,r=[...at(t),...st(t)];for(let i of r)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,i]of t)this.elementProperties.set(r,i)}this.__attributeToPropertyMap=new Map;for(let[t,r]of this.elementProperties){let i=this.__attributeNameForProperty(t,r);if(i!==void 0)this.__attributeToPropertyMap.set(i,t)}if(this.elementStyles=this.finalizeStyles(this.styles),b){if(this.hasOwnProperty("createProperty"))w("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators");if(this.hasOwnProperty("getPropertyDescriptor"))w("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let i of r)t.unshift(oe(i))}else if(e!==void 0)t.push(oe(e));return t}static __attributeNameForProperty(e,t){let r=t.attribute;return r===!1?void 0:typeof r==="string"?r:typeof e==="string"?e.toLowerCase():void 0}constructor(){super();this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise((e)=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((e)=>e(this))}addController(e){if((this.__controllers??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected)e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())if(this.hasOwnProperty(r))e.set(r,this[r]),delete this[r];if(e.size>0)this.__instanceProperties=e}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ee(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((e)=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach((e)=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$attributeToProperty(e,r)}__propertyToAttribute(e,t){let i=this.constructor.elementProperties.get(e),o=this.constructor.__attributeNameForProperty(e,i);if(o!==void 0&&i.reflect===!0){let s=(i.converter?.toAttribute!==void 0?i.converter:ae).toAttribute(t,i.type);if(b&&this.constructor.enabledWarnings.includes("migration")&&s===void 0)w("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`);if(this.__reflectingProperty=e,s==null)this.removeAttribute(o);else this.setAttribute(o,s);this.__reflectingProperty=null}}_$attributeToProperty(e,t){let r=this.constructor,i=r.__attributeToPropertyMap.get(e);if(i!==void 0&&this.__reflectingProperty!==i){let o=r.getPropertyOptions(i),a=typeof o.converter==="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:ae;this.__reflectingProperty=i;let s=a.fromAttribute(t,o.type);this[i]=s??this.__defaultValues?.get(i)??s,this.__reflectingProperty=null}}requestUpdate(e,t,r,i=!1,o){if(e!==void 0){if(b&&e instanceof Event)w("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");let a=this.constructor;if(i===!1)o=this[e];if(r??=a.getPropertyOptions(e),(r.hasChanged??Pe)(o,t)||r.useDefault&&r.reflect&&o===this.__defaultValues?.get(e)&&!this.hasAttribute(a.__attributeNameForProperty(e,r)))this._$changeProperty(e,t,r);else return}if(this.isUpdatePending===!1)this.__updatePromise=this.__enqueueUpdate()}_$changeProperty(e,t,{useDefault:r,reflect:i,wrapped:o},a){if(r&&!(this.__defaultValues??=new Map).has(e)){if(this.__defaultValues.set(e,a??t??this[e]),o!==!0||a!==void 0)return}if(!this._$changedProperties.has(e)){if(!this.hasUpdated&&!r)t=void 0;this._$changedProperties.set(e,t)}if(i===!0&&this.__reflectingProperty!==e)(this.__reflectingProperties??=new Set).add(e)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();if(e!=null)await e;return!this.isUpdatePending}scheduleUpdate(){let e=this.performUpdate();if(b&&this.constructor.enabledWarnings.includes("async-perform-update")&&typeof e?.then==="function")w("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`);return e}performUpdate(){if(!this.isUpdatePending)return;if(dt?.({kind:"update"}),!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),b){let o=[...this.constructor.elementProperties.keys()].filter((a)=>this.hasOwnProperty(a)&&(a in Te(this)));if(o.length)throw Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${o.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(let[i,o]of this.__instanceProperties)this[i]=o;this.__instanceProperties=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,o]of r){let{wrapped:a}=o,s=this[i];if(a===!0&&!this._$changedProperties.has(i)&&s!==void 0)this._$changeProperty(i,void 0,o,s)}}let e=!1,t=this._$changedProperties;try{if(e=this.shouldUpdate(t),e)this.willUpdate(t),this.__controllers?.forEach((r)=>r.hostUpdate?.()),this.update(t);else this.__markUpdated()}catch(r){throw e=!1,this.__markUpdated(),r}if(e)this._$didUpdate(t)}willUpdate(e){}_$didUpdate(e){if(this.__controllers?.forEach((t)=>t.hostUpdated?.()),!this.hasUpdated)this.hasUpdated=!0,this.firstUpdated(e);if(this.updated(e),b&&this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update"))w("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach((t)=>this.__propertyToAttribute(t,this[t])),this.__markUpdated()}updated(e){}firstUpdated(e){}}y.elementStyles=[];y.shadowRootOptions={mode:"open"};y[O("elementProperties",y)]=new Map;y[O("finalized",y)]=new Map;Ae?.({ReactiveElement:y});if(b){y.enabledWarnings=["change-in-update","async-perform-update"];let e=function(t){if(!t.hasOwnProperty(O("enabledWarnings",t)))t.enabledWarnings=t.enabledWarnings.slice()};y.enableWarning=function(t){if(e(this),!this.enabledWarnings.includes(t))this.enabledWarnings.push(t)},y.disableWarning=function(t){e(this);let r=this.enabledWarnings.indexOf(t);if(r>=0)this.enabledWarnings.splice(r,1)}}(f.reactiveElementVersions??=[]).push("2.1.2");if(b&&f.reactiveElementVersions.length>1)queueMicrotask(()=>{w("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var x=globalThis,p=(e)=>{if(!x.emitLitDebugLogEvents)return;x.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))},ct=0,L;x.litIssuedWarnings??=new Set,L=(e,t)=>{if(t+=e?` See https://lit.dev/msg/${e} for more information.`:"",!x.litIssuedWarnings.has(t)&&!x.litIssuedWarnings.has(e))console.warn(t),x.litIssuedWarnings.add(t)},queueMicrotask(()=>{L("dev-mode","Lit is in dev mode. Not recommended for production!")});var _=x.ShadyDOM?.inUse&&x.ShadyDOM?.noPatch===!0?x.ShadyDOM.wrap:(e)=>e,j=x.trustedTypes,Ie=j?j.createPolicy("lit-html",{createHTML:(e)=>e}):void 0,pt=(e)=>e,Q=(e,t,r)=>pt,ut=(e)=>{if(k!==Q)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");k=e},ht=()=>{k=Q},ce=(e,t,r)=>k(e,t,r),Me="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,Le="?"+S,mt=`<${Le}>`,I=document,B=()=>I.createComment(""),V=(e)=>e===null||typeof e!="object"&&typeof e!="function",pe=Array.isArray,gt=(e)=>pe(e)||typeof e?.[Symbol.iterator]==="function",se=`[
|
|
2
2
|
\f\r]`,ft=`[^
|
|
3
|
-
\f\r"'\`<>=]`,bt=`[^\\s"'>=/]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
4
|
-
This is probably caused by illegal octal escape sequences.`);if(r.some((i)=>i?._$litStatic$))
|
|
5
|
-
Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:e,strings:t,values:r}},c=me(_t),
|
|
3
|
+
\f\r"'\`<>=]`,bt=`[^\\s"'>=/]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Re=1,ne=2,yt=3,ke=/-->/g,De=/>/g,W=new RegExp(`>|${se}(?:(${bt}+)(${se}*=${se}*(?:${ft}|("|')|))|$)`,"g"),xt=0,Oe=1,wt=2,Ne=3,le=/'/g,de=/"/g,Be=/^(?:script|style|textarea|title)$/i,_t=1,Y=2,J=3,ue=1,X=2,vt=3,St=4,Et=5,he=6,$t=7,me=(e)=>(t,...r)=>{if(t.some((i)=>i===void 0))console.warn(`Some template strings are undefined.
|
|
4
|
+
This is probably caused by illegal octal escape sequences.`);if(r.some((i)=>i?._$litStatic$))L("",`Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.
|
|
5
|
+
Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:e,strings:t,values:r}},c=me(_t),Mt=me(Y),Lt=me(J),R=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ue=new WeakMap,P=I.createTreeWalker(I,129),k=Q;function Ve(e,t){if(!pe(e)||!e.hasOwnProperty("raw")){let r="invalid template strings array";throw r=`
|
|
6
6
|
Internal Error: expected template strings to be an array
|
|
7
7
|
with a 'raw' field. Faking a template strings array by
|
|
8
8
|
calling html or svg like an ordinary function is effectively
|
|
@@ -13,7 +13,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
13
13
|
https://github.com/lit/lit/issues/new?template=bug_report.md
|
|
14
14
|
and include information about your build tooling, if any.
|
|
15
15
|
`.trim().replace(/\n */g,`
|
|
16
|
-
`),Error(r)}return Re!==void 0?Re.createHTML(t):t}var Tt=(e,t)=>{let r=e.length-1,i=[],a=t===G?"<svg>":t===J?"<math>":"",o,s=U;for(let h=0;h<r;h++){let v=e[h],u=-1,g,C=0,m;while(C<v.length){if(s.lastIndex=C,m=s.exec(v),m===null)break;if(C=s.lastIndex,s===U){if(m[ke]==="!--")s=Ie;else if(m[ke]!==void 0)s=De;else if(m[ne]!==void 0){if(Me.test(m[ne]))o=new RegExp(`</${m[ne]}`,"g");s=W}else if(m[yt]!==void 0)throw Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(s===W)if(m[wt]===">")s=o??U,u=-1;else if(m[Oe]===void 0)u=-2;else u=s.lastIndex-m[xt].length,g=m[Oe],s=m[Ne]===void 0?W:m[Ne]==='"'?de:le;else if(s===de||s===le)s=W;else if(s===Ie||s===De)s=U;else s=W,o=void 0}console.assert(u===-1||s===W||s===le||s===de,"unexpected parse state B");let P=s===W&&e[h+1].startsWith("/>")?" ":"";a+=s===U?v+mt:u>=0?(i.push(g),v.slice(0,u)+Le+v.slice(u))+S+P:v+S+(u===-2?h:P)}let n=a+(e[r]||"<?>")+(t===G?"</svg>":t===J?"</math>":"");return[Ve(e,n),i]};class z{constructor({strings:e,["_$litType$"]:t},r){this.parts=[];let i,a=0,o=0,s=e.length-1,n=this.parts,[h,v]=Tt(e,t);if(this.el=z.createElement(h,r),A.currentNode=this.el.content,t===G||t===J){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}while((i=A.nextNode())!==null&&n.length<s){if(i.nodeType===1){{let u=i.localName;if(/^(?:textarea|template)$/i.test(u)&&i.innerHTML.includes(S)){let g=`Expressions are not supported inside \`${u}\` elements. See https://lit.dev/msg/expression-in-${u} for more information.`;if(u==="template")throw Error(g);else B("",g)}}if(i.hasAttributes()){for(let u of i.getAttributeNames())if(u.endsWith(Le)){let g=v[o++],m=i.getAttribute(u).split(S),P=/([.?@])?(.*)/.exec(g);n.push({type:ue,index:a,name:P[2],strings:m,ctor:P[1]==="."?Fe:P[1]==="?"?Ke:P[1]==="@"?qe:K}),i.removeAttribute(u)}else if(u.startsWith(S))n.push({type:he,index:a}),i.removeAttribute(u)}if(Me.test(i.tagName)){let u=i.textContent.split(S),g=u.length-1;if(g>0){i.textContent=Y?Y.emptyScript:"";for(let C=0;C<g;C++)i.append(u[C],M()),A.nextNode(),n.push({type:X,index:++a});i.append(u[g],M())}}}else if(i.nodeType===8)if(i.data===Be)n.push({type:X,index:a});else{let g=-1;while((g=i.data.indexOf(S,g+1))!==-1)n.push({type:$t,index:a}),g+=S.length-1}a++}if(v.length!==o)throw Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");p&&p({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){let r=R.createElement("template");return r.innerHTML=e,r}}function N(e,t,r=e,i){if(t===k)return t;let a=i!==void 0?r.__directives?.[i]:r.__directive,o=V(t)?void 0:t._$litDirective$;if(a?.constructor!==o){if(a?._$notifyDirectiveConnectionChanged?.(!1),o===void 0)a=void 0;else a=new o(e),a._$initialize(e,r,i);if(i!==void 0)(r.__directives??=[])[i]=a;else r.__directive=a}if(a!==void 0)t=N(e,a._$resolve(e,t.values),a,i);return t}class ze{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){let{el:{content:t},parts:r}=this._$template,i=(e?.creationScope??R).importNode(t,!0);A.currentNode=i;let a=A.nextNode(),o=0,s=0,n=r[0];while(n!==void 0){if(o===n.index){let h;if(n.type===X)h=new F(a,a.nextSibling,this,e);else if(n.type===ue)h=new n.ctor(a,n.name,n.strings,this,e);else if(n.type===he)h=new He(a,this,e);this._$parts.push(h),n=r[++s]}if(o!==n?.index)a=A.nextNode(),o++}return A.currentNode=R,i}_update(e){let t=0;for(let r of this._$parts){if(r!==void 0)if(p&&p({kind:"set part",part:r,value:e[t],valueIndex:t,values:e,templateInstance:this}),r.strings!==void 0)r._$setValue(e,r,t),t+=r.strings.length-2;else r._$setValue(e[t]);t++}}}class F{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,r,i){this.type=X,this._$committedValue=l,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=r,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=_(this._$startNode).parentNode,t=this._$parent;if(t!==void 0&&e?.nodeType===11)e=t.parentNode;return e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=N(this,e,t),V(e)){if(e===l||e==null||e===""){if(this._$committedValue!==l)p&&p({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=l}else if(e!==this._$committedValue&&e!==k)this._commitText(e)}else if(e._$litType$!==void 0)this._commitTemplateResult(e);else if(e.nodeType!==void 0){if(this.options?.host===e){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(e)}else if(gt(e))this._commitIterable(e);else this._commitText(e)}_insert(e){return _(_(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),I!==Q){let t=this._$startNode.parentNode?.nodeName;if(t==="STYLE"||t==="SCRIPT"){let r="Forbidden";if(t==="STYLE")r="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else r="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(r)}}p&&p({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==l&&V(this._$committedValue)){let t=_(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=ce(t,"data","property");e=this._textSanitizer(e),p&&p({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{let t=R.createTextNode("");if(this._commitNode(t),this._textSanitizer===void 0)this._textSanitizer=ce(t,"data","property");e=this._textSanitizer(e),p&&p({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){let{values:t,["_$litType$"]:r}=e,i=typeof r==="number"?this._$getTemplate(e):(r.el===void 0&&(r.el=z.createElement(Ve(r.h,r.h[0]),this.options)),r);if(this._$committedValue?._$template===i)p&&p({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{let a=new ze(i,this),o=a._clone(this.options);p&&p({kind:"template instantiated",template:i,instance:a,parts:a._$parts,options:this.options,fragment:o,values:t}),a._update(t),p&&p({kind:"template instantiated and updated",template:i,instance:a,parts:a._$parts,options:this.options,fragment:o,values:t}),this._commitNode(o),this._$committedValue=a}}_$getTemplate(e){let t=Ue.get(e.strings);if(t===void 0)Ue.set(e.strings,t=new z(e));return t}_commitIterable(e){if(!pe(this._$committedValue))this._$committedValue=[],this._$clear();let t=this._$committedValue,r=0,i;for(let a of e){if(r===t.length)t.push(i=new F(this._insert(M()),this._insert(M()),this,this.options));else i=t[r];i._$setValue(a),r++}if(r<t.length)this._$clear(i&&_(i._$endNode).nextSibling,r),t.length=r}_$clear(e=_(this._$startNode).nextSibling,t){this._$notifyConnectionChanged?.(!1,!0,t);while(e!==this._$endNode){let r=_(e).nextSibling;_(e).remove(),e=r}}setConnected(e){if(this._$parent===void 0)this.__isConnected=e,this._$notifyConnectionChanged?.(e);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class K{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,r,i,a){if(this.type=ue,this._$committedValue=l,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,r.length>2||r[0]!==""||r[1]!=="")this._$committedValue=Array(r.length-1).fill(new String),this.strings=r;else this._$committedValue=l;this._sanitizer=void 0}_$setValue(e,t=this,r,i){let a=this.strings,o=!1;if(a===void 0){if(e=N(this,e,t,0),o=!V(e)||e!==this._$committedValue&&e!==k,o)this._$committedValue=e}else{let s=e;e=a[0];let n,h;for(n=0;n<a.length-1;n++){if(h=N(this,s[r+n],t,n),h===k)h=this._$committedValue[n];if(o||=!V(h)||h!==this._$committedValue[n],h===l)e=l;else if(e!==l)e+=(h??"")+a[n+1];this._$committedValue[n]=h}}if(o&&!i)this._commitValue(e)}_commitValue(e){if(e===l)_(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=I(this.element,this.name,"attribute");e=this._sanitizer(e??""),p&&p({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),_(this.element).setAttribute(this.name,e??"")}}}class Fe extends K{constructor(){super(...arguments);this.type=vt}_commitValue(e){if(this._sanitizer===void 0)this._sanitizer=I(this.element,this.name,"property");e=this._sanitizer(e),p&&p({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===l?void 0:e}}class Ke extends K{constructor(){super(...arguments);this.type=St}_commitValue(e){p&&p({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(e&&e!==l),options:this.options}),_(this.element).toggleAttribute(this.name,!!e&&e!==l)}}class qe extends K{constructor(e,t,r,i,a){super(e,t,r,i,a);if(this.type=Et,this.strings!==void 0)throw Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if(e=N(this,e,t,0)??l,e===k)return;let r=this._$committedValue,i=e===l&&r!==l||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,a=e!==l&&(r===l||i);if(p&&p({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:r}),i)this.element.removeEventListener(this.name,this,r);if(a)this.element.addEventListener(this.name,this,e);this._$committedValue=e}handleEvent(e){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,e);else this._$committedValue.handleEvent(e)}}class He{constructor(e,t,r){this.element=e,this.type=he,this._$disconnectableChildren=void 0,this._$parent=t,this.options=r}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){p&&p({kind:"commit to element binding",element:this.element,value:e,options:this.options}),N(this,e)}}var Ct=w.litHtmlPolyfillSupportDevMode;Ct?.(z,F);(w.litHtmlVersions??=[]).push("3.3.3");if(w.litHtmlVersions.length>1)queueMicrotask(()=>{B("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var L=(e,t,r)=>{if(t==null)throw TypeError(`The container to render into may not be ${t}`);let i=ct++,a=r?.renderBefore??t,o=a._$litPart$;if(p&&p({kind:"begin render",id:i,value:e,container:t,options:r,part:o}),o===void 0){let s=r?.renderBefore??null;a._$litPart$=o=new F(t.insertBefore(M(),s),s,void 0,r??{})}return o._$setValue(e),p&&p({kind:"end render",id:i,value:e,container:t,options:r,part:o}),o};L.setSanitizer=ut,L.createSanitizer=ce,L._testOnlyClearSanitizerFactoryDoNotCallOrElse=ht;var Wt=(e,t)=>e,ge=!0,E=globalThis,je;if(ge)E.litIssuedWarnings??=new Set,je=(e,t)=>{if(t+=` See https://lit.dev/msg/${e} for more information.`,!E.litIssuedWarnings.has(t)&&!E.litIssuedWarnings.has(e))console.warn(t),E.litIssuedWarnings.add(t)};class T extends y{constructor(){super(...arguments);this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();if(!this.hasUpdated)this.renderOptions.isConnected=this.isConnected;super.update(e),this.__childPart=L(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return k}}T._$litElement$=!0;T[Wt("finalized",T)]=!0;E.litElementHydrateSupport?.({LitElement:T});var Pt=ge?E.litElementPolyfillSupportDevMode:E.litElementPolyfillSupport;Pt?.({LitElement:T});(E.litElementVersions??=[]).push("4.2.2");if(ge&&E.litElementVersions.length>1)queueMicrotask(()=>{je("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});class fe extends Error{status;statusText;payload;constructor(e){super(e.message);this.name="WodiraBrowserApiError",this.status=e.status,this.statusText=e.statusText,this.payload=e.payload}}class Ye{options;baseUrl;prefix;fetcher;constructor(e){this.options=e;if(!e.publishableKey?.startsWith("wpk_live_"))throw Error("WODira Boxes widgets require a wpk_live_ publishable key.");if(!e.installationId?.trim())throw Error("WODira Boxes widgets require an installation-id.");this.baseUrl=(e.baseUrl??"https://api.wodira.app").replace(/\/+$/,""),this.prefix=`/external/v1/browser/box-widgets/${encodeURIComponent(e.installationId)}`,this.fetcher=e.fetch??globalThis.fetch.bind(globalThis)}getContext(e){return this.request("/context",e?{signal:e}:{})}getCalendar(e,t=1,r){let i=new URLSearchParams({from:e.toISOString(),weeks:String(t)});return this.request(`/calendar?${i}`,r?{signal:r}:{})}getPlans(e){return this.request("/plans",e?{signal:e}:{})}getTrialClasses(e){return this.request("/trial-classes",e?{signal:e}:{})}createFlow(e,t){return this.request("/flows",{method:"POST",body:e,...t?{signal:t}:{}})}recordTelemetry(e,t){return this.request("/telemetry",{method:"POST",body:{events:e},...t?{signal:t}:{}})}verifyResult(e,t){return this.request(`/results/${encodeURIComponent(e)}`,t?{signal:t}:{})}async request(e,t){let r=new Headers({accept:"application/json","x-publishable-key":this.options.publishableKey}),i={method:t.method??"GET",headers:r};if(t.signal)i.signal=t.signal;if(t.body!==void 0)r.set("content-type","application/json"),i.body=JSON.stringify(t.body);let a=await this.fetcher(`${this.baseUrl}${this.prefix}${e}`,i);if(!a.ok){let s=await a.text(),n=s||null;try{n=s?JSON.parse(s):null}catch{}throw new fe({status:a.status,statusText:a.statusText,message:typeof n==="object"&&typeof n?.message==="string"?n.message:"WODira Boxes widget request failed.",payload:n})}let o=await a.text();return o?JSON.parse(o):void 0}}function Ge(e){return new Ye(e)}var At={es:{calendar:"Horario de clases",trial:"Prueba una clase",plans:"Planes",previous:"Semana anterior",next:"Semana siguiente",reserve:"Continuar",loading:"Cargando…",empty:"No hay opciones disponibles en estas fechas.",error:"No pudimos cargar este contenido. Inténtalo de nuevo.",available:"Disponible",last:"Últimas plazas",waitlist:"Lista de espera",full:"Completa",coach:"Coach",duration:"min",free:"Gratis",unlimited:"Ilimitado",email:"Tu email",privacy:"Acepto la política de privacidad de WODira y del box.",trialCta:"Continuar",chooseClass:"Elige una clase",result:"¡Todo listo! Tu solicitud se ha completado.",powered:"Tecnología de WODira",retry:"Reintentar",per:"por",credits:"créditos",once:"pago único",daily:"diario",weekly:"semanal",monthly:"mensual",yearly:"anual"},en:{calendar:"Class schedule",trial:"Try a class",plans:"Plans",previous:"Previous week",next:"Next week",reserve:"Continue",loading:"Loading…",empty:"No options are available for these dates.",error:"We could not load this content. Try again.",available:"Available",last:"Last spots",waitlist:"Waitlist",full:"Full",coach:"Coach",duration:"min",free:"Free",unlimited:"Unlimited",email:"Your email",privacy:"I accept WODira and the gym privacy policies.",trialCta:"Continue",chooseClass:"Choose a class",result:"All set! Your request is complete.",powered:"Powered by WODira",retry:"Retry",per:"per",credits:"credits",once:"one-time",daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"},pt:{calendar:"Horário de aulas",trial:"Experimente uma aula",plans:"Planos",previous:"Semana anterior",next:"Semana seguinte",reserve:"Continuar",loading:"A carregar…",empty:"Não há opções disponíveis nestas datas.",error:"Não foi possível carregar. Tente novamente.",available:"Disponível",last:"Últimas vagas",waitlist:"Lista de espera",full:"Lotada",coach:"Coach",duration:"min",free:"Grátis",unlimited:"Ilimitado",email:"O seu email",privacy:"Aceito as políticas de privacidade da WODira e do box.",trialCta:"Continuar",chooseClass:"Escolha uma aula",result:"Tudo pronto! O seu pedido foi concluído.",powered:"Tecnologia WODira",retry:"Tentar novamente",per:"por",credits:"créditos",once:"pagamento único",daily:"diário",weekly:"semanal",monthly:"mensal",yearly:"anual"}};function q(e){let r=(e==="auto"||!e?document.documentElement.lang||navigator.language:e).toLowerCase().split("-")[0];return r==="en"||r==="pt"?r:"es"}function d(e,t){return At[q(e)][t]}var be=j`
|
|
16
|
+
`),Error(r)}return Ie!==void 0?Ie.createHTML(t):t}var Tt=(e,t)=>{let r=e.length-1,i=[],o=t===Y?"<svg>":t===J?"<math>":"",a,s=U;for(let h=0;h<r;h++){let v=e[h],u=-1,g,C=0,m;while(C<v.length){if(s.lastIndex=C,m=s.exec(v),m===null)break;if(C=s.lastIndex,s===U){if(m[Re]==="!--")s=ke;else if(m[Re]!==void 0)s=De;else if(m[ne]!==void 0){if(Be.test(m[ne]))a=new RegExp(`</${m[ne]}`,"g");s=W}else if(m[yt]!==void 0)throw Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(s===W)if(m[xt]===">")s=a??U,u=-1;else if(m[Oe]===void 0)u=-2;else u=s.lastIndex-m[wt].length,g=m[Oe],s=m[Ne]===void 0?W:m[Ne]==='"'?de:le;else if(s===de||s===le)s=W;else if(s===ke||s===De)s=U;else s=W,a=void 0}console.assert(u===-1||s===W||s===le||s===de,"unexpected parse state B");let A=s===W&&e[h+1].startsWith("/>")?" ":"";o+=s===U?v+mt:u>=0?(i.push(g),v.slice(0,u)+Me+v.slice(u))+S+A:v+S+(u===-2?h:A)}let n=o+(e[r]||"<?>")+(t===Y?"</svg>":t===J?"</math>":"");return[Ve(e,n),i]};class z{constructor({strings:e,["_$litType$"]:t},r){this.parts=[];let i,o=0,a=0,s=e.length-1,n=this.parts,[h,v]=Tt(e,t);if(this.el=z.createElement(h,r),P.currentNode=this.el.content,t===Y||t===J){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}while((i=P.nextNode())!==null&&n.length<s){if(i.nodeType===1){{let u=i.localName;if(/^(?:textarea|template)$/i.test(u)&&i.innerHTML.includes(S)){let g=`Expressions are not supported inside \`${u}\` elements. See https://lit.dev/msg/expression-in-${u} for more information.`;if(u==="template")throw Error(g);else L("",g)}}if(i.hasAttributes()){for(let u of i.getAttributeNames())if(u.endsWith(Me)){let g=v[a++],m=i.getAttribute(u).split(S),A=/([.?@])?(.*)/.exec(g);n.push({type:ue,index:o,name:A[2],strings:m,ctor:A[1]==="."?Fe:A[1]==="?"?qe:A[1]==="@"?Ke:q}),i.removeAttribute(u)}else if(u.startsWith(S))n.push({type:he,index:o}),i.removeAttribute(u)}if(Be.test(i.tagName)){let u=i.textContent.split(S),g=u.length-1;if(g>0){i.textContent=j?j.emptyScript:"";for(let C=0;C<g;C++)i.append(u[C],B()),P.nextNode(),n.push({type:X,index:++o});i.append(u[g],B())}}}else if(i.nodeType===8)if(i.data===Le)n.push({type:X,index:o});else{let g=-1;while((g=i.data.indexOf(S,g+1))!==-1)n.push({type:$t,index:o}),g+=S.length-1}o++}if(v.length!==a)throw Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");p&&p({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){let r=I.createElement("template");return r.innerHTML=e,r}}function N(e,t,r=e,i){if(t===R)return t;let o=i!==void 0?r.__directives?.[i]:r.__directive,a=V(t)?void 0:t._$litDirective$;if(o?.constructor!==a){if(o?._$notifyDirectiveConnectionChanged?.(!1),a===void 0)o=void 0;else o=new a(e),o._$initialize(e,r,i);if(i!==void 0)(r.__directives??=[])[i]=o;else r.__directive=o}if(o!==void 0)t=N(e,o._$resolve(e,t.values),o,i);return t}class ze{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){let{el:{content:t},parts:r}=this._$template,i=(e?.creationScope??I).importNode(t,!0);P.currentNode=i;let o=P.nextNode(),a=0,s=0,n=r[0];while(n!==void 0){if(a===n.index){let h;if(n.type===X)h=new F(o,o.nextSibling,this,e);else if(n.type===ue)h=new n.ctor(o,n.name,n.strings,this,e);else if(n.type===he)h=new He(o,this,e);this._$parts.push(h),n=r[++s]}if(a!==n?.index)o=P.nextNode(),a++}return P.currentNode=I,i}_update(e){let t=0;for(let r of this._$parts){if(r!==void 0)if(p&&p({kind:"set part",part:r,value:e[t],valueIndex:t,values:e,templateInstance:this}),r.strings!==void 0)r._$setValue(e,r,t),t+=r.strings.length-2;else r._$setValue(e[t]);t++}}}class F{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,r,i){this.type=X,this._$committedValue=l,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=r,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=_(this._$startNode).parentNode,t=this._$parent;if(t!==void 0&&e?.nodeType===11)e=t.parentNode;return e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=N(this,e,t),V(e)){if(e===l||e==null||e===""){if(this._$committedValue!==l)p&&p({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=l}else if(e!==this._$committedValue&&e!==R)this._commitText(e)}else if(e._$litType$!==void 0)this._commitTemplateResult(e);else if(e.nodeType!==void 0){if(this.options?.host===e){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(e)}else if(gt(e))this._commitIterable(e);else this._commitText(e)}_insert(e){return _(_(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),k!==Q){let t=this._$startNode.parentNode?.nodeName;if(t==="STYLE"||t==="SCRIPT"){let r="Forbidden";if(t==="STYLE")r="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else r="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(r)}}p&&p({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==l&&V(this._$committedValue)){let t=_(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=ce(t,"data","property");e=this._textSanitizer(e),p&&p({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{let t=I.createTextNode("");if(this._commitNode(t),this._textSanitizer===void 0)this._textSanitizer=ce(t,"data","property");e=this._textSanitizer(e),p&&p({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){let{values:t,["_$litType$"]:r}=e,i=typeof r==="number"?this._$getTemplate(e):(r.el===void 0&&(r.el=z.createElement(Ve(r.h,r.h[0]),this.options)),r);if(this._$committedValue?._$template===i)p&&p({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{let o=new ze(i,this),a=o._clone(this.options);p&&p({kind:"template instantiated",template:i,instance:o,parts:o._$parts,options:this.options,fragment:a,values:t}),o._update(t),p&&p({kind:"template instantiated and updated",template:i,instance:o,parts:o._$parts,options:this.options,fragment:a,values:t}),this._commitNode(a),this._$committedValue=o}}_$getTemplate(e){let t=Ue.get(e.strings);if(t===void 0)Ue.set(e.strings,t=new z(e));return t}_commitIterable(e){if(!pe(this._$committedValue))this._$committedValue=[],this._$clear();let t=this._$committedValue,r=0,i;for(let o of e){if(r===t.length)t.push(i=new F(this._insert(B()),this._insert(B()),this,this.options));else i=t[r];i._$setValue(o),r++}if(r<t.length)this._$clear(i&&_(i._$endNode).nextSibling,r),t.length=r}_$clear(e=_(this._$startNode).nextSibling,t){this._$notifyConnectionChanged?.(!1,!0,t);while(e!==this._$endNode){let r=_(e).nextSibling;_(e).remove(),e=r}}setConnected(e){if(this._$parent===void 0)this.__isConnected=e,this._$notifyConnectionChanged?.(e);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class q{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,r,i,o){if(this.type=ue,this._$committedValue=l,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=o,r.length>2||r[0]!==""||r[1]!=="")this._$committedValue=Array(r.length-1).fill(new String),this.strings=r;else this._$committedValue=l;this._sanitizer=void 0}_$setValue(e,t=this,r,i){let o=this.strings,a=!1;if(o===void 0){if(e=N(this,e,t,0),a=!V(e)||e!==this._$committedValue&&e!==R,a)this._$committedValue=e}else{let s=e;e=o[0];let n,h;for(n=0;n<o.length-1;n++){if(h=N(this,s[r+n],t,n),h===R)h=this._$committedValue[n];if(a||=!V(h)||h!==this._$committedValue[n],h===l)e=l;else if(e!==l)e+=(h??"")+o[n+1];this._$committedValue[n]=h}}if(a&&!i)this._commitValue(e)}_commitValue(e){if(e===l)_(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=k(this.element,this.name,"attribute");e=this._sanitizer(e??""),p&&p({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),_(this.element).setAttribute(this.name,e??"")}}}class Fe extends q{constructor(){super(...arguments);this.type=vt}_commitValue(e){if(this._sanitizer===void 0)this._sanitizer=k(this.element,this.name,"property");e=this._sanitizer(e),p&&p({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===l?void 0:e}}class qe extends q{constructor(){super(...arguments);this.type=St}_commitValue(e){p&&p({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(e&&e!==l),options:this.options}),_(this.element).toggleAttribute(this.name,!!e&&e!==l)}}class Ke extends q{constructor(e,t,r,i,o){super(e,t,r,i,o);if(this.type=Et,this.strings!==void 0)throw Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if(e=N(this,e,t,0)??l,e===R)return;let r=this._$committedValue,i=e===l&&r!==l||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==l&&(r===l||i);if(p&&p({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:o,oldListener:r}),i)this.element.removeEventListener(this.name,this,r);if(o)this.element.addEventListener(this.name,this,e);this._$committedValue=e}handleEvent(e){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,e);else this._$committedValue.handleEvent(e)}}class He{constructor(e,t,r){this.element=e,this.type=he,this._$disconnectableChildren=void 0,this._$parent=t,this.options=r}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){p&&p({kind:"commit to element binding",element:this.element,value:e,options:this.options}),N(this,e)}}var Ct=x.litHtmlPolyfillSupportDevMode;Ct?.(z,F);(x.litHtmlVersions??=[]).push("3.3.3");if(x.litHtmlVersions.length>1)queueMicrotask(()=>{L("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var M=(e,t,r)=>{if(t==null)throw TypeError(`The container to render into may not be ${t}`);let i=ct++,o=r?.renderBefore??t,a=o._$litPart$;if(p&&p({kind:"begin render",id:i,value:e,container:t,options:r,part:a}),a===void 0){let s=r?.renderBefore??null;o._$litPart$=a=new F(t.insertBefore(B(),s),s,void 0,r??{})}return a._$setValue(e),p&&p({kind:"end render",id:i,value:e,container:t,options:r,part:a}),a};M.setSanitizer=ut,M.createSanitizer=ce,M._testOnlyClearSanitizerFactoryDoNotCallOrElse=ht;var Wt=(e,t)=>e,ge=!0,E=globalThis,Ge;if(ge)E.litIssuedWarnings??=new Set,Ge=(e,t)=>{if(t+=` See https://lit.dev/msg/${e} for more information.`,!E.litIssuedWarnings.has(t)&&!E.litIssuedWarnings.has(e))console.warn(t),E.litIssuedWarnings.add(t)};class T extends y{constructor(){super(...arguments);this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();if(!this.hasUpdated)this.renderOptions.isConnected=this.isConnected;super.update(e),this.__childPart=M(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return R}}T._$litElement$=!0;T[Wt("finalized",T)]=!0;E.litElementHydrateSupport?.({LitElement:T});var At=ge?E.litElementPolyfillSupportDevMode:E.litElementPolyfillSupport;At?.({LitElement:T});(E.litElementVersions??=[]).push("4.2.2");if(ge&&E.litElementVersions.length>1)queueMicrotask(()=>{Ge("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});class fe extends Error{status;statusText;payload;constructor(e){super(e.message);this.name="WodiraBrowserApiError",this.status=e.status,this.statusText=e.statusText,this.payload=e.payload}}class je{options;baseUrl;prefix;fetcher;constructor(e){this.options=e;if(!e.publishableKey?.startsWith("wpk_live_"))throw Error("WODira Boxes widgets require a wpk_live_ publishable key.");if(!e.installationId?.trim())throw Error("WODira Boxes widgets require an installation-id.");this.baseUrl=(e.baseUrl??"https://api.wodira.app").replace(/\/+$/,""),this.prefix=`/external/v1/browser/box-widgets/${encodeURIComponent(e.installationId)}`,this.fetcher=e.fetch??globalThis.fetch.bind(globalThis)}getContext(e){return this.request("/context",e?{signal:e}:{})}getCalendar(e,t=1,r){let i=new URLSearchParams({from:e.toISOString(),weeks:String(t)});return this.request(`/calendar?${i}`,r?{signal:r}:{})}getPlans(e){return this.request("/plans",e?{signal:e}:{})}getTrialClasses(e){return this.request("/trial-classes",e?{signal:e}:{})}createFlow(e,t){return this.request("/flows",{method:"POST",body:e,...t?{signal:t}:{}})}recordTelemetry(e,t){return this.request("/telemetry",{method:"POST",body:{events:e},...t?{signal:t}:{}})}verifyResult(e,t){return this.request(`/results/${encodeURIComponent(e)}`,t?{signal:t}:{})}async request(e,t){let r=new Headers({accept:"application/json","x-publishable-key":this.options.publishableKey}),i={method:t.method??"GET",headers:r};if(t.signal)i.signal=t.signal;if(t.body!==void 0)r.set("content-type","application/json"),i.body=JSON.stringify(t.body);let o=await this.fetcher(`${this.baseUrl}${this.prefix}${e}`,i);if(!o.ok){let s=await o.text(),n=s||null;try{n=s?JSON.parse(s):null}catch{}throw new fe({status:o.status,statusText:o.statusText,message:typeof n==="object"&&typeof n?.message==="string"?n.message:"WODira Boxes widget request failed.",payload:n})}let a=await o.text();return a?JSON.parse(a):void 0}}function Ye(e){return new je(e)}var Pt={es:{calendar:"Horario de clases",trial:"Prueba una clase",plans:"Planes",previous:"Semana anterior",next:"Semana siguiente",reserve:"Continuar",loading:"Cargando…",empty:"No hay opciones disponibles en estas fechas.",error:"No pudimos cargar este contenido. Inténtalo de nuevo.",available:"Disponible",last:"Últimas plazas",waitlist:"Lista de espera",full:"Completa",coach:"Coach",duration:"min",free:"Gratis",unlimited:"Ilimitado",email:"Tu email",privacy:"Acepto la política de privacidad de WODira y del box.",trialCta:"Continuar",chooseClass:"Elige una clase",result:"¡Todo listo! Tu solicitud se ha completado.",powered:"Tecnología de WODira",retry:"Reintentar",per:"por",credits:"créditos",once:"pago único",daily:"diario",weekly:"semanal",monthly:"mensual",yearly:"anual"},en:{calendar:"Class schedule",trial:"Try a class",plans:"Plans",previous:"Previous week",next:"Next week",reserve:"Continue",loading:"Loading…",empty:"No options are available for these dates.",error:"We could not load this content. Try again.",available:"Available",last:"Last spots",waitlist:"Waitlist",full:"Full",coach:"Coach",duration:"min",free:"Free",unlimited:"Unlimited",email:"Your email",privacy:"I accept WODira and the gym privacy policies.",trialCta:"Continue",chooseClass:"Choose a class",result:"All set! Your request is complete.",powered:"Powered by WODira",retry:"Retry",per:"per",credits:"credits",once:"one-time",daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"},pt:{calendar:"Horário de aulas",trial:"Experimente uma aula",plans:"Planos",previous:"Semana anterior",next:"Semana seguinte",reserve:"Continuar",loading:"A carregar…",empty:"Não há opções disponíveis nestas datas.",error:"Não foi possível carregar. Tente novamente.",available:"Disponível",last:"Últimas vagas",waitlist:"Lista de espera",full:"Lotada",coach:"Coach",duration:"min",free:"Grátis",unlimited:"Ilimitado",email:"O seu email",privacy:"Aceito as políticas de privacidade da WODira e do box.",trialCta:"Continuar",chooseClass:"Escolha uma aula",result:"Tudo pronto! O seu pedido foi concluído.",powered:"Tecnologia WODira",retry:"Tentar novamente",per:"por",credits:"créditos",once:"pagamento único",daily:"diário",weekly:"semanal",monthly:"mensal",yearly:"anual"}};function K(e){let r=(e==="auto"||!e?document.documentElement.lang||navigator.language:e).toLowerCase().split("-")[0];return r==="en"||r==="pt"?r:"es"}function d(e,t){return Pt[K(e)][t]}var be=G`
|
|
17
17
|
:host {
|
|
18
18
|
color: var(--wodira-box-text, var(--wodira-color-text, #17132e));
|
|
19
19
|
display: block;
|
|
@@ -351,7 +351,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
351
351
|
transform 0.18s ease;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
`;var ye=
|
|
354
|
+
`;var ye=G`
|
|
355
355
|
:host {
|
|
356
356
|
min-width: 0;
|
|
357
357
|
color-scheme: var(--wodira-color-scheme, light);
|
|
@@ -563,7 +563,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
563
563
|
outline: 2px solid Highlight;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
`;var sr=["stack","grid","card","event-card","event-list","pricing-cards","pricing-card","registration-form","registration-layout","registration-fields","registration-title","availability","legal-signature","checkout-sidebar","summary","summary-row","summary-total","button","submit","secondary","text-button","input","select","textarea","checkbox","label","title","price","meta","hint","description","description-heading","description-list","image","error","field-error","loader","empty","success","waiver","supplement","eligibility-summary","participant-mode","participant-mode-button","deferred-participant-hint","gender-composition","composition-options","composition-option","tier-list","tier-row","tier-heading","tier-name","tier-price","badge","current-tier","read-more","event-card-description","event-card-description-full","purchaser-grid","participant","guest-registration","terms","selected","active","current","retry","inline-code","tier-meta","field","athlete","deferred","athlete-grid","custom-fields","custom-fields-grid","custom-field","supplements","guest-registrations","add-guest","guest-grid","remove-guest","guest-athlete","guest-supplements","waivers","guest-summary-row"].join(","),Z=["shell","widget-shell","hero","widget-hero","cover","box-cover","logo","box-logo","brand","brand-name","title","body","widget-body","toolbar","nav-button","button","grid","card","card-heading","card-title","meta","badge","price","features","field","input","choice","legal","state","loader","error","success","footer","retry","class-cta","trial-cta","plan-cta","class-card","class-meta","availability","calendar-toolbar","previous","next","empty","class-grid","plans-grid","plan-card","trial-form","choices","trial-class-grid","trial-choice","email","legal-choice"].join(",");var
|
|
566
|
+
`;var sr=["stack","grid","card","event-card","event-list","pricing-cards","pricing-card","registration-form","registration-layout","registration-fields","registration-title","availability","legal-signature","checkout-sidebar","summary","summary-row","summary-total","button","submit","secondary","text-button","input","select","textarea","checkbox","label","title","price","meta","hint","description","description-heading","description-list","image","error","field-error","loader","empty","success","waiver","supplement","eligibility-summary","participant-mode","participant-mode-button","deferred-participant-hint","gender-composition","composition-options","composition-option","tier-list","tier-row","tier-heading","tier-name","tier-price","badge","current-tier","read-more","event-card-description","event-card-description-full","purchaser-grid","participant","guest-registration","terms","selected","active","current","retry","inline-code","tier-meta","field","athlete","deferred","athlete-grid","custom-fields","custom-fields-grid","custom-field","supplements","guest-registrations","add-guest","guest-grid","remove-guest","guest-athlete","guest-supplements","waivers","guest-summary-row"].join(","),Z=["shell","widget-shell","hero","widget-hero","cover","box-cover","logo","box-logo","brand","brand-name","title","body","widget-body","toolbar","nav-button","button","grid","card","card-heading","card-title","meta","badge","price","features","field","input","choice","legal","state","loader","error","success","footer","retry","class-cta","trial-cta","plan-cta","class-card","class-meta","availability","calendar-toolbar","previous","next","empty","class-grid","plans-grid","plan-card","trial-form","choices","trial-class-grid","trial-choice","email","legal-choice"].join(",");var It={AVAILABLE:"available",LAST_SPOTS:"last",WAITLIST:"waitlist",FULL:"full"};class D extends T{static properties={publishableKey:{type:String,attribute:"publishable-key"},installationId:{type:String,attribute:"installation-id"},baseUrl:{type:String,attribute:"base-url"},locale:{type:String},context:{state:!0},loading:{state:!0},error:{state:!0},resultMessage:{state:!0}};static styles=[be,ye];client=null;abortController=null;didInitialLoad=!1;pendingResultToken="";constructor(){super();this.publishableKey="",this.installationId="",this.baseUrl="",this.locale="auto",this.context=null,this.loading=!0,this.error="",this.resultMessage=""}firstUpdated(){this.pendingResultToken=this.consumeResult(),this.refresh()}disconnectedCallback(){this.abortController?.abort(),super.disconnectedCallback()}updated(e){if(!this.didInitialLoad){this.didInitialLoad=!0;return}if((e.has("publishableKey")||e.has("installationId")||e.has("baseUrl"))&&this.didInitialLoad)this.refresh();if(this.context)this.style.setProperty("--_wodira-box-brand-primary",this.context.box.theme.primary),this.style.setProperty("--_wodira-box-brand-accent",this.context.box.theme.secondary)}async refresh(){if(!this.publishableKey||!this.installationId){this.loading=!1,this.error="publishable-key and installation-id are required.";return}this.abortController?.abort(),this.abortController=new AbortController,this.loading=!0,this.error="";try{if(this.client=Ye({publishableKey:this.publishableKey,installationId:this.installationId,...this.baseUrl?{baseUrl:this.baseUrl}:{}}),this.context=await this.client.getContext(this.abortController.signal),this.pendingResultToken)await this.verifyResultWithRetry(this.pendingResultToken,this.abortController.signal),this.pendingResultToken="",this.resultMessage=d(this.locale,"result");if(this.locale==="auto")this.locale=this.context.locale;await this.loadData(this.abortController.signal),this.telemetry("IMPRESSION")}catch(e){if(e instanceof Error&&e.name==="AbortError")return;this.error=e instanceof Error?e.message:d(this.locale,"error")}finally{this.loading=!1}}frame(e,t){let r=this.context;return c`
|
|
567
567
|
<section part="shell widget-shell" aria-busy=${this.loading?"true":"false"}>
|
|
568
568
|
<slot name="header"></slot>
|
|
569
569
|
${r?c`<header part="hero widget-hero" ?data-cover=${Boolean(r.box.coverUrl)}>
|
|
@@ -589,14 +589,14 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
589
589
|
<slot name="footer"></slot>
|
|
590
590
|
<footer part="footer"><span>${d(this.locale,"powered")}</span></footer>
|
|
591
591
|
</section>
|
|
592
|
-
`}classCard(e,t){let r=
|
|
592
|
+
`}classCard(e,t){let r=K(this.locale),i=new Intl.DateTimeFormat(r,{weekday:"short",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit",timeZone:e.timezone||this.context?.box.timezone}).format(new Date(e.startsAt)),o=e.availability==="FULL";return c`<article part="card class-card">
|
|
593
593
|
<div part="card-heading">
|
|
594
594
|
<div>
|
|
595
595
|
<h3 part="card-title">${e.name}</h3>
|
|
596
596
|
<div part="meta class-meta"><time datetime=${e.startsAt}>${i}</time></div>
|
|
597
597
|
</div>
|
|
598
598
|
<span part="badge availability" data-status=${e.availability}>
|
|
599
|
-
${d(this.locale,
|
|
599
|
+
${d(this.locale,It[e.availability])}
|
|
600
600
|
</span>
|
|
601
601
|
</div>
|
|
602
602
|
<div part="meta">
|
|
@@ -607,10 +607,10 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
607
607
|
>${Qe(e.directPurchase.amount,e.directPurchase.currency,r)}</span
|
|
608
608
|
>`:l}
|
|
609
609
|
</div>
|
|
610
|
-
<button part="button class-cta" type="button" ?disabled=${
|
|
610
|
+
<button part="button class-cta" type="button" ?disabled=${o} @click=${t}>
|
|
611
611
|
${d(this.locale,"reserve")}
|
|
612
612
|
</button>
|
|
613
|
-
</article>`}emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}async startFlow(e,t,r={}){if(!this.client)return;let i=await this.client.createFlow({intent:e,targetId:t,idempotencyKey:[this.installationId,e,t,r.privacyVersion??"none",Je()].join(":"),...r,...Xe()});if(i.continuationUrl)globalThis.location.assign(i.continuationUrl)}telemetry(e,t){if(!this.client)return Promise.resolve();return this.client.recordTelemetry([{id:ee(),kind:e,widgetKind:this.widgetKind(),...t?{entityId:t}:{},sessionId:Je(),occurredAt:new Date().toISOString(),...Xe()}]).then(()=>{return}).catch(()=>{return})}syncStructuredData(e){let t=this.querySelector("script[data-wodira-widget-jsonld]");if(!t)t=document.createElement("script"),t.type="application/ld+json",t.dataset.wodiraWidgetJsonld="",this.append(t);t.textContent=JSON.stringify(e).replaceAll("<","\\u003c")}consumeResult(){try{let e=new URL(globalThis.location.href),t=e.searchParams.get("wodira_widget_result")??"";if(!t)return"";return e.searchParams.delete("wodira_widget_result"),globalThis.history?.replaceState({},"",e),t}catch{return""}}async verifyResultWithRetry(e,t){if(!this.client)return;let r;for(let i=0;i<10;i+=1)try{await this.client.verifyResult(e,t);return}catch(
|
|
613
|
+
</article>`}emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}async startFlow(e,t,r={}){if(!this.client)return;let i=await this.client.createFlow({intent:e,targetId:t,idempotencyKey:[this.installationId,e,t,r.privacyVersion??"none",Je()].join(":"),...r,...Xe()});if(i.continuationUrl)globalThis.location.assign(i.continuationUrl)}telemetry(e,t){if(!this.client)return Promise.resolve();return this.client.recordTelemetry([{id:ee(),kind:e,widgetKind:this.widgetKind(),...t?{entityId:t}:{},sessionId:Je(),occurredAt:new Date().toISOString(),...Xe()}]).then(()=>{return}).catch(()=>{return})}syncStructuredData(e){let t=this.querySelector("script[data-wodira-widget-jsonld]");if(!t)t=document.createElement("script"),t.type="application/ld+json",t.dataset.wodiraWidgetJsonld="",this.append(t);t.textContent=JSON.stringify(e).replaceAll("<","\\u003c")}consumeResult(){try{let e=new URL(globalThis.location.href),t=e.searchParams.get("wodira_widget_result")??"";if(!t)return"";return e.searchParams.delete("wodira_widget_result"),globalThis.history?.replaceState({},"",e),t}catch{return""}}async verifyResultWithRetry(e,t){if(!this.client)return;let r;for(let i=0;i<10;i+=1)try{await this.client.verifyResult(e,t);return}catch(o){if(r=o,t.aborted||i===9)break;await new Promise((a,s)=>{let n=globalThis.setTimeout(a,1000);t.addEventListener("abort",()=>{globalThis.clearTimeout(n),s(new DOMException("Aborted","AbortError"))},{once:!0})})}throw r}}class xe extends D{static properties={...D.properties,calendar:{state:!0},week:{state:!0}};constructor(){super();this.calendar=null,this.week=0}widgetKind(){return"CALENDAR"}async loadData(e){let t=new Date;t.setDate(t.getDate()+this.week*7),this.calendar=await this.client?.getCalendar(t,1,e)??null,this.syncStructuredData({"@context":"https://schema.org","@type":"SportsActivityLocation",name:this.context?.box.name,event:this.calendar?.classes.map((r)=>({"@type":"SportsEvent",name:r.name,startDate:r.startsAt,location:r.location?{"@type":"Place",name:r.location}:void 0}))})}changeWeek(e){this.week=Math.min(3,Math.max(0,this.week+e)),this.refresh()}choose(e){this.emit("wodira:box-class-selected",{installationId:this.installationId,classId:e.id}),this.telemetry("CLASS_SELECTED",e.id),this.startFlow("RESERVE_CLASS",e.id)}render(){return this.frame(d(this.locale,"calendar"),c`
|
|
614
614
|
<div part="toolbar calendar-toolbar">
|
|
615
615
|
<button
|
|
616
616
|
part="nav-button previous"
|
|
@@ -632,7 +632,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
632
632
|
${this.calendar?.classes.length?c`<div part="grid class-grid">
|
|
633
633
|
${this.calendar.classes.map((e)=>this.classCard(e,()=>this.choose(e)))}
|
|
634
634
|
</div>`:c`<div part="state empty">${d(this.locale,"empty")}</div>`}
|
|
635
|
-
`)}}class
|
|
635
|
+
`)}}class we extends D{static properties={...D.properties,plans:{state:!0}};constructor(){super();this.plans=null}widgetKind(){return"PLANS"}async loadData(e){this.plans=await this.client?.getPlans(e)??null,this.syncStructuredData({"@context":"https://schema.org","@type":"ItemList",itemListElement:this.plans?.plans.map((t,r)=>({"@type":"Offer",position:r+1,name:t.name,price:t.price,priceCurrency:t.currency}))})}choose(e){this.emit("wodira:box-plan-selected",{installationId:this.installationId,planId:e.id}),this.telemetry("PLAN_SELECTED",e.id),this.startFlow("BUY_PLAN",e.id)}render(){let e=K(this.locale);return this.frame(d(this.locale,"plans"),c`
|
|
636
636
|
${this.plans?.plans.length?c`<div part="grid plans-grid">
|
|
637
637
|
${this.plans.plans.map((t)=>c` <article part="card plan-card">
|
|
638
638
|
<div>
|
|
@@ -642,7 +642,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
642
642
|
<div part="price">${Qe(t.price,t.currency,e)}</div>
|
|
643
643
|
<div part="meta">
|
|
644
644
|
${t.credits===null?d(this.locale,"unlimited"):`${t.credits} ${d(this.locale,"credits")}`}
|
|
645
|
-
· ${
|
|
645
|
+
· ${Rt(t.interval,this.locale)}
|
|
646
646
|
</div>
|
|
647
647
|
${t.features.length?c`<ul part="features">
|
|
648
648
|
${t.features.map((r)=>c`<li>${r}</li>`)}
|
|
@@ -672,7 +672,7 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
672
672
|
/>
|
|
673
673
|
<span
|
|
674
674
|
><strong>${e.name}</strong><br /><small
|
|
675
|
-
>${new Intl.DateTimeFormat(
|
|
675
|
+
>${new Intl.DateTimeFormat(K(this.locale),{dateStyle:"medium",timeStyle:"short",timeZone:e.timezone||this.context?.box.timezone}).format(new Date(e.startsAt))}</small
|
|
676
676
|
></span
|
|
677
677
|
>
|
|
678
678
|
</label>`)}
|
|
@@ -740,4 +740,4 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
|
|
|
740
740
|
${this.active==="plans"?c`<wodira-box-plans exportparts=${Z} .publishableKey=${e.publishableKey} .installationId=${e.installationId} .baseUrl=${e.baseUrl} .locale=${e.locale}><slot name="plans-intro" slot="intro"></slot></wodira-box-plans>`:l}
|
|
741
741
|
</div>
|
|
742
742
|
<slot name="footer"></slot>
|
|
743
|
-
</section>`}navigateTabs(e,t){let r=["calendar","trial","plans"],i=r.indexOf(t),
|
|
743
|
+
</section>`}navigateTabs(e,t){let r=["calendar","trial","plans"],i=r.indexOf(t),o=e.key==="Home"?0:e.key==="End"?r.length-1:e.key==="ArrowRight"?(i+1)%r.length:e.key==="ArrowLeft"?(i-1+r.length)%r.length:-1;if(o<0)return;let a=r[o];if(!a)return;e.preventDefault(),this.active=a,this.updateComplete.then(()=>{this.renderRoot.querySelectorAll('[role="tab"]')[o]?.focus()})}}function Rt(e,t){let r=e.trim().toLowerCase();if(r==="once"||r==="one_time")return d(t,"once");if(r==="daily"||r==="day")return d(t,"daily");if(r==="weekly"||r==="week")return d(t,"weekly");if(r==="monthly"||r==="month")return d(t,"monthly");if(r==="yearly"||r==="annual"||r==="year")return d(t,"yearly");return e}function Qe(e,t,r){return new Intl.NumberFormat(r,{style:"currency",currency:t,maximumFractionDigits:2}).format(e)}function ee(){return globalThis.crypto?.randomUUID?.()??`widget-${Date.now()}-${Math.random().toString(36).slice(2)}`}function Je(){try{let t=globalThis.sessionStorage?.getItem("wodira:box-widget-session");if(t)return t;let r=ee();return globalThis.sessionStorage?.setItem("wodira:box-widget-session",r),r}catch{return ee()}}function Xe(){try{let e=new URL(globalThis.location.href).searchParams,t=e.get("utm_source")??void 0,r=e.get("utm_medium")??void 0,i=e.get("utm_campaign")??void 0;return{...t?{utmSource:t}:{},...r?{utmMedium:r}:{},...i?{utmCampaign:i}:{}}}catch{return{}}}var kt=[["wodira-box-calendar",xe],["wodira-box-trial",_e],["wodira-box-plans",we],["wodira-box-widget",ve]];function Ze(){if(!globalThis.customElements)throw Error("@wodira/browser/ui/boxes requires a Custom Elements environment.");for(let[e,t]of kt)if(!customElements.get(e))customElements.define(e,t)}Ze();
|
package/dist/ui/boxes/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// ../../../wodira-worktrees/registration-consent-widget/node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/css-tag.js
|
|
2
2
|
var NODE_MODE = false;
|
|
3
3
|
var global = globalThis;
|
|
4
4
|
var supportsAdoptingStyleSheets = global.ShadowRoot && (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
|
|
@@ -73,7 +73,7 @@ var cssResultFromStyleSheet = (sheet) => {
|
|
|
73
73
|
};
|
|
74
74
|
var getCompatibleStyle = supportsAdoptingStyleSheets || NODE_MODE && global.CSSStyleSheet === undefined ? (s) => s : (s) => s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;
|
|
75
75
|
|
|
76
|
-
//
|
|
76
|
+
// ../../../wodira-worktrees/registration-consent-widget/node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.js
|
|
77
77
|
var { is, defineProperty, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf } = Object;
|
|
78
78
|
var NODE_MODE2 = false;
|
|
79
79
|
var global2 = globalThis;
|
|
@@ -544,7 +544,7 @@ if (DEV_MODE && global2.reactiveElementVersions.length > 1) {
|
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
-
//
|
|
547
|
+
// ../../../wodira-worktrees/registration-consent-widget/node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/development/lit-html.js
|
|
548
548
|
var DEV_MODE2 = true;
|
|
549
549
|
var ENABLE_EXTRA_SECURITY_HOOKS = true;
|
|
550
550
|
var ENABLE_SHADYDOM_NOPATCH = true;
|
|
@@ -1393,7 +1393,7 @@ if (ENABLE_EXTRA_SECURITY_HOOKS) {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
|
|
1396
|
-
//
|
|
1396
|
+
// ../../../wodira-worktrees/registration-consent-widget/node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/development/lit-element.js
|
|
1397
1397
|
var JSCompiler_renameProperty2 = (prop, _obj) => prop;
|
|
1398
1398
|
var DEV_MODE3 = true;
|
|
1399
1399
|
var global4 = globalThis;
|
package/dist/ui/components.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { LitElement, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
2
2
|
import { type WodiraRegistrationCheckoutSession, type WodiraRegistrationSummary, type WodiraLegalSignatureInput } from '../index.js';
|
|
3
3
|
import type { WodiraEvent, WodiraGender, WodiraPricingCardsResponse, WodiraRegistrationReceiptLookup, WodiraSupplementSelection } from '../types.js';
|
|
4
4
|
interface AthleteDraft {
|
|
5
|
+
conditionalFieldValues?: Record<string, unknown>;
|
|
5
6
|
fullname: string;
|
|
6
7
|
email: string;
|
|
7
8
|
phone: string;
|
|
@@ -10,6 +11,7 @@ interface AthleteDraft {
|
|
|
10
11
|
birthDate: string;
|
|
11
12
|
}
|
|
12
13
|
interface GuestRegistrationDraft {
|
|
14
|
+
draftId?: number;
|
|
13
15
|
guestName: string;
|
|
14
16
|
guestEmail: string;
|
|
15
17
|
categoryId: string;
|
|
@@ -152,10 +154,11 @@ export declare class WodiraPricingCards extends RegistrationWindowElement {
|
|
|
152
154
|
eventId: string;
|
|
153
155
|
selectedCategoryId: string;
|
|
154
156
|
locale: string;
|
|
155
|
-
pricing
|
|
157
|
+
pricing: WodiraPricingCardsResponse | undefined;
|
|
156
158
|
loading: boolean;
|
|
157
159
|
error: string;
|
|
158
160
|
private didInitialLoad;
|
|
161
|
+
private pricingRequest;
|
|
159
162
|
constructor();
|
|
160
163
|
firstUpdated(): void;
|
|
161
164
|
updated(changed: PropertyValues<this>): void;
|
|
@@ -202,6 +205,10 @@ export declare class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
202
205
|
type: BooleanConstructor;
|
|
203
206
|
attribute: string;
|
|
204
207
|
};
|
|
208
|
+
checkoutStep: {
|
|
209
|
+
type: StringConstructor;
|
|
210
|
+
attribute: string;
|
|
211
|
+
};
|
|
205
212
|
event: {
|
|
206
213
|
attribute: boolean;
|
|
207
214
|
};
|
|
@@ -289,6 +296,8 @@ export declare class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
289
296
|
cancelUrl: string;
|
|
290
297
|
locale: string;
|
|
291
298
|
autoRedirect: boolean;
|
|
299
|
+
/** Direct checkout by default; hosts may opt into a details → review flow. */
|
|
300
|
+
checkoutStep: 'direct' | 'details' | 'review';
|
|
292
301
|
event?: WodiraEvent;
|
|
293
302
|
loading: boolean;
|
|
294
303
|
error: string;
|
|
@@ -305,7 +314,9 @@ export declare class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
305
314
|
waiversAccepted: Record<string, boolean>;
|
|
306
315
|
signatureDraft: SignatureDraft;
|
|
307
316
|
private signatureDocumentKey;
|
|
317
|
+
private nextGuestDraftId;
|
|
308
318
|
private checkoutAttempt?;
|
|
319
|
+
private reviewedFingerprint;
|
|
309
320
|
selectedSupplementIds: string[];
|
|
310
321
|
supplementSelections: WodiraSupplementSelection[];
|
|
311
322
|
guestRegistrations: GuestRegistrationDraft[];
|
|
@@ -327,6 +338,16 @@ export declare class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
327
338
|
private isParticipantDeferred;
|
|
328
339
|
private get activeSupplements();
|
|
329
340
|
private getSupplementsForCategory;
|
|
341
|
+
private fieldAnswers;
|
|
342
|
+
private conditionAnswers;
|
|
343
|
+
private conditionFieldIds;
|
|
344
|
+
private checkoutWaivers;
|
|
345
|
+
private get waiverEntries();
|
|
346
|
+
private get visibleWaivers();
|
|
347
|
+
private isEntryWaiver;
|
|
348
|
+
private waiverEntryId;
|
|
349
|
+
private waiverAcceptanceKey;
|
|
350
|
+
private checkoutWaiverAcceptances;
|
|
330
351
|
private renderEligibilitySummary;
|
|
331
352
|
private renderGenderCompositionSelector;
|
|
332
353
|
private describeEligibility;
|
|
@@ -385,6 +406,7 @@ export declare class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
385
406
|
private updateTextField;
|
|
386
407
|
private updateAthlete;
|
|
387
408
|
private selectGenderComposition;
|
|
409
|
+
private customFieldErrorKey;
|
|
388
410
|
private updateCustomField;
|
|
389
411
|
private updateWaiver;
|
|
390
412
|
private updateSupplement;
|
|
@@ -392,13 +414,23 @@ export declare class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
392
414
|
private clearFieldError;
|
|
393
415
|
private getDeferredTeamCompletionError;
|
|
394
416
|
private validateSupplements;
|
|
417
|
+
private validateRegistrationFields;
|
|
395
418
|
private validate;
|
|
396
419
|
private getConfigurationError;
|
|
397
420
|
private scheduleSummaryLoad;
|
|
398
421
|
private buildGuestRegistrationsSummaryInput;
|
|
422
|
+
private checkoutAthlete;
|
|
399
423
|
private buildGuestRegistrationsCheckoutInput;
|
|
400
424
|
private buildDeferredTeamCompletion;
|
|
401
425
|
private loadSummary;
|
|
426
|
+
/**
|
|
427
|
+
* Validate the current draft and refresh its quote for a host-owned review step.
|
|
428
|
+
* Never creates a registration, checkout session or payment. A false result keeps
|
|
429
|
+
* the visitor in the form, with the same inline errors as the normal submit path.
|
|
430
|
+
*/
|
|
431
|
+
prepareReview(): Promise<boolean>;
|
|
432
|
+
private reviewFingerprint;
|
|
433
|
+
private focusRegistrationError;
|
|
402
434
|
private submit;
|
|
403
435
|
private handleCheckoutSession;
|
|
404
436
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/ui/components.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/ui/components.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1F,OAAO,EAML,KAAK,iCAAiC,EAEtC,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC/B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAEV,WAAW,EAIX,YAAY,EAEZ,0BAA0B,EAC1B,+BAA+B,EAE/B,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AA2CrB,UAAU,YAAY;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,8BAA8B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,oBAAoB,CAAC,EAAE,yBAAyB,EAAE,CAAC;CACpD;AAED,UAAU,cAAc;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MA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AC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,cAAc,CAAS;IAE/B,cAWC;IAEQ,YAAY,IAAI,IAAI,CAE5B;IAEQ,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,CAYpD;IAEQ,MAAM,IAAI,cAAc,CAyBhC;IAED,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,oBAAoB;IA4C5B,OAAO,CAAC,oBAAoB;YAMd,SAAS;IAoBvB,OAAO,CAAC,aAAa,CAInB;IAEF,OAAO,CAAC,gBAAgB,CAwBtB;CACH"}
|
package/dist/ui/events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type WodiraUiEventName = 'wodira:event-select' | 'wodira:category-select' | 'wodira:checkout-start' | 'wodira:checkout-created' | 'wodira:registration-receipts-lookup' | 'wodira:registration-receipts-sent' | 'wodira:redirect' | 'wodira:error';
|
|
1
|
+
export type WodiraUiEventName = 'wodira:event-select' | 'wodira:category-select' | 'wodira:pricing-ready' | 'wodira:review-requested' | 'wodira:checkout-start' | 'wodira:checkout-created' | 'wodira:registration-receipts-lookup' | 'wodira:registration-receipts-sent' | 'wodira:redirect' | 'wodira:shirt:bid-requested' | 'wodira:error';
|
|
2
2
|
export declare function emitWodiraEvent<TDetail>(target: HTMLElement, name: WodiraUiEventName, detail: TDetail): void;
|
|
3
3
|
export declare function getErrorMessage(error: unknown): string;
|
|
4
4
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/ui/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/ui/events.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GACzB,qBAAqB,GACrB,wBAAwB,GACxB,uBAAuB,GACvB,yBAAyB,GACzB,qCAAqC,GACrC,mCAAmC,GACnC,iBAAiB,GACjB,cAAc,CAAC;AAEnB,wBAAgB,eAAe,CAAC,OAAO,EACrC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,OAAO,GACd,IAAI,CAQN;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAItD"}
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/ui/events.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GACzB,qBAAqB,GACrB,wBAAwB,GACxB,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,yBAAyB,GACzB,qCAAqC,GACrC,mCAAmC,GACnC,iBAAiB,GACjB,4BAA4B,GAC5B,cAAc,CAAC;AAEnB,wBAAgB,eAAe,CAAC,OAAO,EACrC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,OAAO,GACd,IAAI,CAQN;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAItD"}
|
package/dist/ui/i18n.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type WodiraUiTextKey = 'couponNotFound' | 'couponInactive' | 'couponExpired' | 'couponDepleted' | 'couponEmail' | 'couponScope' | 'couponUsed' | 'couponUnavailable' | 'couponMinimum' | 'registrationConfirmed' | 'registrationRecorded' | 'pendingParticipants' | 'signatureTitle' | 'signatureHelp' | 'signerName' | 'signerId' | 'signatureAuthority' | 'minorRelationship' | 'parent' | 'legalGuardian' | 'authorizedRepresentative' | 'guardianAuthority' | 'signatureArea' | 'clearSignature' | 'signatureRequired' | 'quantity' | 'perUnit' | 'perParticipant' | 'categoryClosed' | 'categoryFull' | 'registrationOpens' | 'registrationClosed' | 'emailSuggestion' | 'emailDeliveryHint' | 'summaryFailed' | 'retry' | 'discount' | 'registrationProgress' | 'chooseCategoryStep' | 'registrationDetailsStep' | 'paymentStep' | 'summaryAwaitingBuyer' | 'availableSlots' | 'athlete' | 'birthDate' | 'buyerEmail' | 'buyerName' | 'captain' | 'categorySelected' | 'checkoutCreating' | 'checkoutSubmit' | 'club' | 'completeNow' | 'customFieldsTitle' | 'documentId' | 'deferredParticipantHelp' | 'emptyCategories' | 'emptyEvent' | 'emptyEvents' | 'eventUnavailable' | 'female' | 'fullName' | 'invalidDate' | 'invalidEmail' | 'invalidNumber' | 'invalidSelection' | 'invalidUrl' | 'inviteLater' | 'inviteLaterUnavailable' | 'guestAthlete' | 'guestCategory' | 'guestEmail' | 'guestName' | 'guestRegistrations' | 'guestRegistrationsHelp' | 'addGuestRegistration' | 'remove' | 'gender' | 'genderAssigned' | 'genderCompositionHelp' | 'genderCompositionRequired' | 'genderCompositionTitle' | 'loadingEvent' | 'loadingEvents' | 'loadingPricing' | 'loadingSummary' | 'male' | 'phone' | 'participantSlot' | 'noPublishableKey' | 'processingFee' | 'promocode' | 'currentTier' | 'priceTier' | 'priceTiers' | 'readLess' | 'readMore' | 'registerData' | 'registrationReceiptEmail' | 'registrationReceiptFound' | 'registrationReceiptHelp' | 'registrationReceiptLookup' | 'registrationReceiptLookupLoading' | 'registrationReceiptNotFound' | 'registrationReceiptSend' | 'registrationReceiptSendLoading' | 'registrationReceiptSent' | 'registrationReceiptTitle' | 'requiredField' | 'requiredWaiver' | 'select' | 'selectCategory' | 'selectEvent' | 'selectOption' | 'summary' | 'teamName' | 'teamSize' | 'tierTicketsFrom' | 'tierTicketsRange' | 'tierValidFrom' | 'tierValidUntil' | 'terms' | 'total' | 'wodiraCommission' | 'waiversTitle';
|
|
1
|
+
export type WodiraUiTextKey = 'couponNotFound' | 'couponInactive' | 'couponExpired' | 'couponDepleted' | 'couponEmail' | 'couponScope' | 'couponUsed' | 'couponUnavailable' | 'couponMinimum' | 'registrationConfirmed' | 'registrationRecorded' | 'pendingParticipants' | 'signatureTitle' | 'signatureHelp' | 'signerName' | 'signerId' | 'signatureAuthority' | 'minorRelationship' | 'parent' | 'legalGuardian' | 'authorizedRepresentative' | 'guardianAuthority' | 'signatureArea' | 'clearSignature' | 'signatureRequired' | 'quantity' | 'perUnit' | 'perParticipant' | 'categoryClosed' | 'categoryFull' | 'registrationOpens' | 'registrationClosed' | 'emailSuggestion' | 'emailDeliveryHint' | 'summaryFailed' | 'retry' | 'discount' | 'registrationProgress' | 'chooseCategoryStep' | 'registrationDetailsStep' | 'paymentStep' | 'summaryAwaitingBuyer' | 'availableSlots' | 'athlete' | 'birthDate' | 'buyerEmail' | 'buyerName' | 'captain' | 'categorySelected' | 'checkoutCreating' | 'checkoutSubmit' | 'club' | 'completeNow' | 'customFieldsTitle' | 'documentId' | 'deferredParticipantHelp' | 'emptyCategories' | 'emptyEvent' | 'emptyEvents' | 'eventUnavailable' | 'female' | 'fullName' | 'invalidDate' | 'invalidEmail' | 'invalidNumber' | 'invalidSelection' | 'invalidUrl' | 'inviteLater' | 'inviteLaterUnavailable' | 'guestAthlete' | 'guestCategory' | 'guestEmail' | 'guestName' | 'guestRegistrations' | 'guestRegistrationsHelp' | 'addGuestRegistration' | 'remove' | 'gender' | 'genderAssigned' | 'genderCompositionHelp' | 'genderCompositionRequired' | 'genderCompositionTitle' | 'loadingEvent' | 'loadingEvents' | 'loadingPricing' | 'loadingSummary' | 'male' | 'phone' | 'participantSlot' | 'participant' | 'noPublishableKey' | 'processingFee' | 'promocode' | 'currentTier' | 'priceTier' | 'priceTiers' | 'readLess' | 'readMore' | 'registerData' | 'registrationReceiptEmail' | 'registrationReceiptFound' | 'registrationReceiptHelp' | 'registrationReceiptLookup' | 'registrationReceiptLookupLoading' | 'registrationReceiptNotFound' | 'registrationReceiptSend' | 'registrationReceiptSendLoading' | 'registrationReceiptSent' | 'registrationReceiptTitle' | 'requiredField' | 'requiredWaiver' | 'select' | 'selectCategory' | 'selectEvent' | 'selectOption' | 'yesAnswer' | 'noAnswer' | 'summary' | 'teamName' | 'bibName' | 'teamSize' | 'tierTicketsFrom' | 'tierTicketsRange' | 'tierValidFrom' | 'tierValidUntil' | 'terms' | 'total' | 'wodiraCommission' | 'waiversTitle';
|
|
2
2
|
export declare function resolveUiLocale(locale: string | undefined): 'es' | 'en';
|
|
3
3
|
export declare function t(locale: string | undefined, key: WodiraUiTextKey): string;
|
|
4
4
|
/** Preserve actionable server details, translating the established coupon API messages. */
|
package/dist/ui/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/ui/i18n.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,YAAY,GACZ,mBAAmB,GACnB,eAAe,GACf,uBAAuB,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,gBAAgB,GAChB,eAAe,GACf,YAAY,GACZ,UAAU,GACV,oBAAoB,GACpB,mBAAmB,GACnB,QAAQ,GACR,eAAe,GACf,0BAA0B,GAC1B,mBAAmB,GACnB,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,UAAU,GACV,SAAS,GACT,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,mBAAmB,GACnB,oBAAoB,GACpB,iBAAiB,GACjB,mBAAmB,GACnB,eAAe,GACf,OAAO,GACP,UAAU,GACV,sBAAsB,GACtB,oBAAoB,GACpB,yBAAyB,GACzB,aAAa,GACb,sBAAsB,GACtB,gBAAgB,GAChB,SAAS,GACT,WAAW,GACX,YAAY,GACZ,WAAW,GACX,SAAS,GACT,kBAAkB,GAClB,kBAAkB,GAClB,gBAAgB,GAChB,MAAM,GACN,aAAa,GACb,mBAAmB,GACnB,YAAY,GACZ,yBAAyB,GACzB,iBAAiB,GACjB,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,QAAQ,GACR,UAAU,GACV,aAAa,GACb,cAAc,GACd,eAAe,GACf,kBAAkB,GAClB,YAAY,GACZ,aAAa,GACb,wBAAwB,GACxB,cAAc,GACd,eAAe,GACf,YAAY,GACZ,WAAW,GACX,oBAAoB,GACpB,wBAAwB,GACxB,sBAAsB,GACtB,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,uBAAuB,GACvB,2BAA2B,GAC3B,wBAAwB,GACxB,cAAc,GACd,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,MAAM,GACN,OAAO,GACP,iBAAiB,GACjB,kBAAkB,GAClB,eAAe,GACf,WAAW,GACX,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,cAAc,GACd,0BAA0B,GAC1B,0BAA0B,GAC1B,yBAAyB,GACzB,2BAA2B,GAC3B,kCAAkC,GAClC,6BAA6B,GAC7B,yBAAyB,GACzB,gCAAgC,GAChC,yBAAyB,GACzB,0BAA0B,GAC1B,eAAe,GACf,gBAAgB,GAChB,QAAQ,GACR,gBAAgB,GAChB,aAAa,GACb,cAAc,GACd,SAAS,GACT,UAAU,GACV,UAAU,GACV,iBAAiB,GACjB,kBAAkB,GAClB,eAAe,GACf,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,kBAAkB,GAClB,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/ui/i18n.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,YAAY,GACZ,mBAAmB,GACnB,eAAe,GACf,uBAAuB,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,gBAAgB,GAChB,eAAe,GACf,YAAY,GACZ,UAAU,GACV,oBAAoB,GACpB,mBAAmB,GACnB,QAAQ,G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