@benbraide/inlinejs-stripe 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/inlinejs-stripe.js +2908 -993
- package/dist/inlinejs-stripe.min.js +2 -1
- package/dist/inlinejs-stripe.min.js.LICENSE.txt +1 -0
- package/lib/common/components/detail.d.ts +1 -2
- package/lib/common/components/detail.js +11 -7
- package/lib/common/components/field.d.ts +3 -3
- package/lib/common/components/field.js +43 -41
- package/lib/common/components/stripe.d.ts +3 -3
- package/lib/common/components/stripe.js +18 -18
- package/lib/common/index.d.ts +0 -1
- package/lib/common/index.js +0 -1
- package/lib/esm/components/detail.d.ts +1 -2
- package/lib/esm/components/detail.js +11 -7
- package/lib/esm/components/field.d.ts +3 -3
- package/lib/esm/components/field.js +44 -42
- package/lib/esm/components/stripe.d.ts +3 -3
- package/lib/esm/components/stripe.js +18 -18
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.js +0 -1
- package/package.json +3 -3
- package/lib/common/directive/stripe.d.ts +0 -24
- package/lib/common/directive/stripe.js +0 -453
- package/lib/esm/directive/stripe.d.ts +0 -24
- package/lib/esm/directive/stripe.js +0 -449
@@ -1 +1,2 @@
|
|
1
|
-
(()=>{"use strict";var e={16:(e,t,n)=>{n.r(t),n.d(t,{CustomElement:()=>CustomElement,GetGlobalPropertyScope:()=>o,GetProperties:()=>l,GetPropertyScope:()=>a,InlineJSElement:()=>b,NativeElement:()=>NativeElement,NativeElementCompact:()=>d,Property:()=>c,Register:()=>f,RegisterCustomElement:()=>s,ResourceElement:()=>ResourceElement,ResourceElementCompact:()=>p,ResourceTargetElement:()=>ResourceTargetElement,ResourceTargetElementCompact:()=>_});var i=n(988);function s(e,t){let n=(0,i.ToSnakeCase)(t||e.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,e)}const r=(0,i.RandomString)();function o(){return r}function l(){return(0,i.GetGlobalScope)(`customProperties.${r}`)}function a(e,t){return t||("constructor"in e?t=e.constructor.name:("function"==typeof e||"object"==typeof e&&"name"in e)&&(t=e.name)),t||""}function c(e){return function(t,n,s){let r="",o=null;(void 0!==(null==e?void 0:e.initial)||!s&&(null==e?void 0:e.update))&&(e.initial=e.initial||t[n],o="boolean"===e.type?(e,t)=>{e&&"false"!==e?t.setAttribute(r,r):t.hasAttribute(r)&&t.removeAttribute(r)}:(e,t)=>{t.setAttribute(r,e)});let c=null,u={name:"",type:(null==e?void 0:e.type)||"string",spread:(null==e?void 0:e.spread)||"",update:(null==e?void 0:e.update)||!1,initial:(null==e?void 0:e.initial)||void 0,checkStoredObject:(null==e?void 0:e.checkStoredObject)||!1,delimiter:(null==e?void 0:e.delimiter)||",",handler:null,setInitial:o};if(s){if("function"==typeof s.value&&!s.get&&!s.set&&((null==e?void 0:e.name)||/^Update.+Property/.test(s.value.name))){const t=s.value;r=(0,i.ToSnakeCase)((null==e?void 0:e.name)||s.value.name.replace(/^Update(.+)Property/,"$1")),c=(e,n)=>t.call(n,e)}}else r=(0,i.ToSnakeCase)((null==e?void 0:e.name)||n),c=(e,t)=>t[n]=e;if(r&&c){u.name=r,u.handler=c;const e=a(t);let n=l();n[e]=n[e]||new Array,n[e].push(u)}}}var u=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class CustomElement extends HTMLElement{constructor(e={}){if(super(),this.options_=e,this.componentId_="",this.storedProxyAccessHandler_=null,this.resources_=new Array,this.loadedResources_=null,this.loadingResources_=!1,this.queuedResourceHandlers_=new Array,this.nativeElement_=null,this.nativeElements_=new Array,this.nativeAttributesBlacklist_=new Array,this.nativeAttributesWhitelist_=new Array,this.propertyScopes_=new Array,this.instanceProperties_=new Array,this.instancePropertyNames_=new Array,this.attributeChangeHandlers_={},this.spreads_={},this.storedObjects_={},this.booleanAttributes_=new Array,this.nonBooleanAttributes_=new Array,(this.options_.isTemplate||this.options_.isHidden)&&(this.style.display="none"),!(this.options_.disableImplicitData||"InlineJS"in globalThis&&(0,i.IsObject)(globalThis.InlineJS)&&globalThis.InlineJS.disableImplicitData)){const e=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!1),t=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!0);let n=null;for(let i=this;i;i=i.parentNode)if(i instanceof Element&&(i.hasAttribute(e)||i.hasAttribute(t))){n=i;break}!n&&this.setAttribute(e,"")}}UpdateComponentProperty(e){var t,n;null===(n=null===(t=(0,i.FindComponentById)(this.componentId_))||void 0===t?void 0:t.FindScopeByRoot(this))||void 0===n||n.SetName(e.trim())}AddResource(e){this.resources_.push(e)}RemoveResource(e){this.resources_=this.resources_.filter((t=>t!==e))}LoadResources(){return this.loadingResources_?new Promise(((e,t)=>{this.queuedResourceHandlers_.push((()=>{this.loadedResources_?e(this.loadedResources_):t()}))})):this.loadedResources_?Promise.resolve(this.loadedResources_):(this.loadingResources_=!0,new Promise(((e,t)=>{const n=new Array,s=new Array,r=t=>{this.loadingResources_=!1,this.loadedResources_=t,this.queuedResourceHandlers_.forEach((e=>e())),this.queuedResourceHandlers_=[],e(t)};if(this.resources_.forEach((e=>{"string"==typeof e?s.push(e):"LoadTargetResources"in e?n.push(e.LoadTargetResources()):"GetResource"in e?s.push(e.GetResource()):s.push(e)})),s.length>0){const e=(0,i.GetGlobal)().GetConcept("resource");if(e){const t=e.Get({items:s,attributes:this.GetResourceLoadAttributes_(),concurrent:this.IsConcurrentResourceLoad_()});n.push(t)}}0==n.length?r([]):Promise.all(n).then(r).catch(t)})))}AddNativeElement(e){this.nativeElements_.push(e),this.CopyNativeElements_(e)}RemoveNativeElement(e){this.nativeElements_=this.nativeElements_.filter((t=>t!==e))}AddBooleanAttribute(e){Array.isArray(e)?this.booleanAttributes_.push(...e):this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=Array.isArray(e)?this.booleanAttributes_.filter((t=>!e.includes(t))):this.booleanAttributes_.filter((t=>t!==e))}AddNonBooleanAttribute(e){Array.isArray(e)?this.nonBooleanAttributes_.push(...e):this.nonBooleanAttributes_.push(e)}RemoveNonBooleanAttribute(e){this.nonBooleanAttributes_=Array.isArray(e)?this.nonBooleanAttributes_.filter((t=>!e.includes(t))):this.nonBooleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return!this.nonBooleanAttributes_.includes(e)&&(!!this.booleanAttributes_.includes(e)||null)}IsTemplate(){return this.options_.isTemplate}OnElementScopeCreated(e){this.HandleElementScopeCreated_(e)}EvaluateExpression(e,t){return this.EvaluateWithStoredProxyAccessHandler((0,i.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:e,disableFunctionCall:null==t?void 0:t.disableFunctionCall,waitPromise:null==t?void 0:t.waitPromise,voidOnly:null==t?void 0:t.voidOnly}),null==t?void 0:t.callback,null==t?void 0:t.params,null==t?void 0:t.contexts)}EvaluateWithStoredProxyAccessHandler(e,t,n,i){if(!this.storedProxyAccessHandler_)return e(t,n,i);let s;return this.storedProxyAccessHandler_((()=>s=e(t,n,i))),s}AddPropertyScope_(e){this.propertyScopes_.push(a(CustomElement,e))}FindProperty_(e){return this.instanceProperties_.find((t=>t.name===e))}GetAllProperties_(){let e=new Array,t=l();for(let n of this.propertyScopes_)t.hasOwnProperty(n)&&e.push(...Object.values(t[n]));return e}HandleElementScopeCreated_({scope:e,componentId:t},n){this.componentId_=t,this.propertyScopes_=this.ComputePropertyScopes_(),this.storedProxyAccessHandler_=(0,i.StoreProxyHandler)(t),(this.instanceProperties_=this.GetAllProperties_()).forEach((e=>{"boolean"===e.type&&this.booleanAttributes_.push(e.name);const t=e.spread&&(0,i.ToSnakeCase)(e.spread);t&&this.spreads_.hasOwnProperty(t)?this.spreads_[t].push(e.name):t&&(this.spreads_[t]=[e.name])})),this.instancePropertyNames_=this.instanceProperties_.map((e=>e.name)),e.AddPostAttributesProcessCallback((()=>{this.instanceProperties_.forEach((e=>{e.initial&&e.setInitial&&e.setInitial(this.EncodeValue_(e.initial,e.type),this)})),this.InitializeStateFromAttributes_(),n&&n()})),e.AddPostProcessCallback((()=>this.ShouldLoadResources_()&&this.LoadResources())),e.AddAttributeChangeCallback((e=>e&&this.AttributeChanged_(e))),e.AddUninitCallback((()=>{this.nativeElement_=null,this.storedProxyAccessHandler_=null}))}InitializeStateFromAttributes_(e){let t=Array.from(this.attributes);e&&(t=t.filter((({name:t})=>e.includes(t)))),t.forEach((({name:e})=>this.AttributeChanged_(e)))}EncodeValue_(e,t){return"boolean"===t?e?"true":"false":"json"===t?JSON.stringify(e):"array"===t?(e||[]).join(","):t.startsWith("array:")?(e||[]).map((e=>this.EncodeValue_(e,t.substring(6)))).join(","):"date"===t?(e||new Date).toString():(0,i.ToString)(e)}DecodeValue_(e,t,n){if("string"===t)return e||"";if("boolean"===t)return null!=e&&"0"!==e&&"false"!==e;if("number"===t)return null===e?NaN:parseFloat(e||"0")||0;if("json"===t){try{return JSON.parse(e||"")}catch(e){}return null}return"array"===t?(e||"").split(n||",").map((e=>e.trim()))||[]:t.startsWith("array:")?(e||"").split(n||",").map((e=>this.DecodeValue_(e,t.substring(6),n)))||[]:"date"===t?new Date(e||""):e}SpreadValue_(e,t){let n=e.split(" ");t.forEach(((e,t)=>{if(t>=n.length){let i=t%4-2;this.DispatchAttributeChange_(e,i<0||i>=n.length?n[0]:n[i])}else this.DispatchAttributeChange_(e,n[t])}))}DispatchAttributeChange_(e,t){let n=!1;this.spreads_.hasOwnProperty(e)&&(this.SpreadValue_(t||"",this.spreads_[e]),n=!0);const s=this.FindProperty_(e),r=this.storedObjects_.hasOwnProperty(e)&&this.storedObjects_[e];if(s){let o=null;if(s.checkStoredObject&&t){if(t===r)return;const n=(0,i.RetrieveStoredObject)({key:t,componentId:this.componentId_,contextElement:this});n!==t&&(this.storedObjects_[e]=t,o=e=>(0,i.JournalTry)((()=>e(n,this))))}o?o(s.handler):(0,i.JournalTry)((()=>s.handler(this.DecodeValue_(t,s.type||"string",s.delimiter),this))),n=!0}return n}AttributeChanged_(e){let t="";if(this.nativeElement_&&(e.startsWith("data-native-")?t=e.substring(12):e.startsWith("native-")?t=e.substring(7):e.startsWith("-")&&(t=e.substring(1))),t)this.hasAttribute(e)?this.nativeElement_.setAttribute(t,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(t)&&this.nativeElement_.removeAttribute(t);else{this.DispatchAttributeChange_(e,this.getAttribute(e))||!this.nativeAttributesWhitelist_.includes(e)&&this.nativeAttributesBlacklist_.includes(e)||!this.nativeElement_||e.startsWith("data-")||CustomElement.GlobalAttributes.includes(e)||(this.hasAttribute(e)?this.nativeElement_.setAttribute(e,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(e)&&this.nativeElement_.removeAttribute(e))}}ComputePropertyScopes_(){let e=new Array;for(let t=Object.getPrototypeOf(this);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(t.constructor.name);return e}SetNativeElement_(e){e!==this.nativeElement_&&(this.nativeElement_=e,this.CopyNativeElements_())}CopyNativeElements_(e){this.nativeElement_&&0!=this.nativeElements_.length&&((e?[e]:this.nativeElements_).forEach((e=>{e.GetAttributes().forEach((({name:e,value:t})=>this.nativeElement_.setAttribute(e,t)));for(let t=e.firstChild;t;t=e.firstChild)t.remove(),this.nativeElement_.appendChild(t)})),(0,i.ProcessDirectives)({component:this.componentId_,element:this.nativeElement_}))}GetResourceLoadAttributes_(){}IsConcurrentResourceLoad_(){return!0}ShouldLoadResources_(){return!0}}CustomElement.GlobalAttributes=["id","class","style","title","lang","dir","tabindex","accesskey","hidden","draggable","spellcheck","translate","contenteditable"],u([c({type:"string"})],CustomElement.prototype,"UpdateComponentProperty",null);class NativeElement extends CustomElement{constructor(){super(),this.attributes_=new Array,Array.from(this.attributes).forEach((({name:e,value:t})=>{this.attributes_.push({name:e,value:t}),this.removeAttribute(e)})),this.options_.isTemplate=!0,this.options_.isHidden=!0,this.style.display="none"}GetAttributes(){return this.attributes_}HandleElementScopeCreated_(e,t){var n;null===(n=(0,i.FindAncestor)(this,(e=>"AddNativeElement"in e)))||void 0===n||n.AddNativeElement(this),super.HandleElementScopeCreated_(e,t)}}function d(){s(NativeElement)}var h=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class ResourceElement extends CustomElement{constructor(){super({isTemplate:!0,isHidden:!0}),this.src="",this.type=""}GetResource(){return"link"===this.type||"script"===this.type||"data"===this.type?{type:this.type,path:this.src}:this.src}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}ShouldLoadResources_(){return!1}}function p(){s(ResourceElement,"resource")}h([c({type:"string"})],ResourceElement.prototype,"src",void 0),h([c({type:"string"})],ResourceElement.prototype,"type",void 0);var m=function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};class ResourceTargetElement extends CustomElement{constructor(){super({isHidden:!0}),this.attributes_=null,this.sequential=!1,this.defer=!1,this.onloaded=""}UpdateAttributesProperty(e){this.attributes_=e}LoadResources(){const e=this.loadedResources_;return new Promise(((t,n)=>{super.LoadResources().then((n=>{!e&&this.onloaded&&this.EvaluateExpression(this.onloaded,{disableFunctionCall:!1}),t(n)})).catch(n)}))}LoadTargetResources(){return this.LoadResources()}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}GetResourceLoadAttributes_(){return this.attributes_||void 0}IsConcurrentResourceLoad_(){return!this.sequential}ShouldLoadResources_(){return!this.defer}}function _(){s(ResourceTargetElement,"resource-target")}function f(e){return function(t){let n=(0,i.ToSnakeCase)(e||t.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,t)}}function b(){(0,i.WaitForGlobal)().then((()=>{d(),p(),_()}))}m([c({type:"object",checkStoredObject:!0})],ResourceTargetElement.prototype,"UpdateAttributesProperty",null),m([c({type:"boolean"})],ResourceTargetElement.prototype,"sequential",void 0),m([c({type:"boolean"})],ResourceTargetElement.prototype,"defer",void 0),m([c({type:"string"})],ResourceTargetElement.prototype,"onloaded",void 0)},988:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Ee,AddDirectiveExpansionRule:()=>nt,AddDirectiveHandler:()=>Ut,AddMagicHandler:()=>on,AddOutsideEventExcept:()=>vt,AddOutsideEventListener:()=>bt,ApplyDirectiveExpansionRules:()=>st,AreObjects:()=>d,AttributeInterpolator:()=>Jt,AutoBootstrap:()=>qt,BaseComponent:()=>BaseComponent,BaseGlobal:()=>BaseGlobal,BeginsWith:()=>r,BindDirectiveExpansionRule:()=>an,BindEvent:()=>Zt,BootstrapAndAttach:()=>zt,BuildGetterProxyOptions:()=>we,BuildIntersectionOptions:()=>tn,BuildProxyOptions:()=>Ne,CallIfFunction:()=>ze,Changes:()=>Changes,ChildProxy:()=>ChildProxy,ClassDirectiveExpansionRule:()=>cn,ComponentCacheKey:()=>O,Config:()=>Config,Context:()=>Context,ContextKeys:()=>g,CreateAnimationLoop:()=>oe,CreateChildProxy:()=>xe,CreateDirective:()=>ot,CreateDirectiveExpansionRule:()=>tt,CreateDirectiveHandlerCallback:()=>Kt,CreateGlobal:()=>Ft,CreateInplaceProxy:()=>Ge,CreateLoop:()=>re,CreateMagicHandlerCallback:()=>ln,CreateReadonlyProxy:()=>ke,DecodeAttribute:()=>$,DecodeValue:()=>T,DeepCopy:()=>B,DefaultTransitionDelay:()=>Ot,DefaultTransitionDuration:()=>It,DefaultTransitionRepeats:()=>Gt,DeleteProxyProp:()=>Ae,DirectiveManager:()=>DirectiveManager,DisableProxyAction:()=>Re,DispatchDirective:()=>ct,ElementScope:()=>ElementScope,ElementScopeKey:()=>C,EncodeAttribute:()=>W,EncodeValue:()=>J,EndsWith:()=>z,EvaluateLater:()=>Ue,EvaluateMagicProperty:()=>Se,ExtractDuration:()=>nn,FindAncestor:()=>q,FindAncestorByAttribute:()=>K,FindAncestorByAttributeValue:()=>V,FindAncestorByClass:()=>U,FindAncestorByTagName:()=>Y,FindCacheValue:()=>b,FindComponentById:()=>R,FindComponentByName:()=>N,FindComponentByRoot:()=>w,FindFirstAttribute:()=>X,FindFirstAttributeValue:()=>ee,FlattenDirective:()=>at,ForwardEvent:()=>Vt,Future:()=>Future,GenerateFunctionFromString:()=>qe,GenerateUniqueId:()=>Ce,GenerateValueReturningFunction:()=>Je,GenerateVoidFunction:()=>We,GenericProxy:()=>GenericProxy,GetAttribute:()=>Q,GetCache:()=>_,GetConfig:()=>et,GetDefaultCacheValue:()=>G,GetDefaultUniqueMarkers:()=>ye,GetDirectiveValue:()=>Qt,GetElementContent:()=>Mt,GetElementScopeId:()=>S,GetElementScopeIdWithElement:()=>E,GetGlobal:()=>P,GetGlobalScope:()=>h,GetLocal:()=>At,GetOrCreateGlobal:()=>jt,GetProxyProp:()=>Pe,GetTarget:()=>l,GetTargets:()=>a,GlobalCreatedEvent:()=>x,IncrementUniqueMarkers:()=>ve,InferComponent:()=>F,InitCache:()=>m,InitComponentCache:()=>k,InitJITProxy:()=>je,InitializeDev:()=>hn,InitializeGlobal:()=>pn,InitializeGlobalScope:()=>p,InitializeUtilities:()=>mn,InitializeValues:()=>_n,InitializeVersion:()=>fn,InlineJS:()=>bn,InlineJSGlobalKey:()=>A,InsertHtml:()=>Nt,Interpolate:()=>Bt,InterpolateText:()=>$t,IntersectionObserver:()=>IntersectionObserver,IsBooleanAttribute:()=>te,IsEqual:()=>ne,IsInsideTemplate:()=>be,IsObject:()=>u,IsTemplate:()=>fe,JoinPath:()=>he,JoinUniqueMarkers:()=>ge,JournalError:()=>i,JournalLog:()=>dn,JournalTry:()=>s,JournalWarn:()=>lt,LazyCheck:()=>rn,Loop:()=>Loop,MagicManager:()=>MagicManager,MeasureCallback:()=>le,MergeObjects:()=>ae,MutationObserver:()=>MutationObserver,NativeFetchConcept:()=>NativeFetchConcept,NextIdle:()=>NextIdle,NextNonIdle:()=>NextNonIdle,NextTick:()=>NextTick,Nothing:()=>Nothing,OnDirectiveExpansionRule:()=>un,PathToRelative:()=>ue,PeekCurrentComponent:()=>Te,PeekCurrentScope:()=>St,PeekStoredObject:()=>D,PopCurrentComponent:()=>De,PopCurrentScope:()=>Et,ProcessDirectives:()=>dt,ProxyKeys:()=>o,PushCurrentComponent:()=>Le,PushCurrentScope:()=>Ct,QueryGlobalComponent:()=>Pt,RandomString:()=>pe,RemoveDirectiveExpansionRule:()=>it,RemoveOutsideEventListener:()=>yt,ReplaceText:()=>Ht,ResizeObserver:()=>ResizeObserver,ResolveKeyValue:()=>Xt,ResolveOptions:()=>sn,ResolveTransition:()=>kt,RetrieveStoredObject:()=>L,RootProxy:()=>RootProxy,Scope:()=>Scope,SetAttributeUtil:()=>me,SetCacheValue:()=>f,SetProxyAccessHandler:()=>Ye,SetProxyProp:()=>Ie,SplitPath:()=>de,Stack:()=>Stack,StoreProxyHandler:()=>Ze,StreamData:()=>Ke,SubscribeToChanges:()=>Qe,SupportsAttributes:()=>M,TextContentInterpolator:()=>Wt,TidyPath:()=>ce,ToCamelCase:()=>v,ToSnakeCase:()=>_e,ToString:()=>H,TraverseDirectives:()=>ut,UnbindOutsideEvent:()=>gt,UseCache:()=>y,UseEffect:()=>Xe,WaitForGlobal:()=>I,WaitPromise:()=>Me,WaitTransition:()=>Rt,WaitWhile:()=>Ve});class Stack{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}Pop(){return 0==this.list_.length?null:this.list_.pop()}Peek(){return 0==this.list_.length?null:this.list_[this.list_.length-1]}IsEmpty(){return 0==this.list_.length}GetHistory(){return this.list_.map((e=>e))}}class Future{constructor(e){this.callback_=e}Get(){return this.callback_()}}function i(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function s(e,t,n){try{return e()}catch(e){i(e,t,n)}}class Loop{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===s((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>s((()=>t(e)),"InlineJS.Loop.Final")))}),(()=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0)}))}While(e){return this.whileCallbacks_.push(e),this}Final(e){return this.finalCallbacks_.push(e),this}}class Nothing{}function r(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}const o={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function l(e){return(Array.isArray(e)||e&&"object"==typeof e)&&o.target in e?l(e[o.target]):e}function a(e){return e.map((e=>l(e)))}function c(e){return(e=l(e))&&"object"==typeof e&&(o.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function u(e){return!!c(e)}function d(e){return-1==e.findIndex((e=>!c(e)))}function h(e=null,t=!1){let n=globalThis.InlineJS=globalThis.InlineJS||{};return e&&(e=e.trim()),e&&e.split(".").forEach((e=>{n=n[e]=n[e]||{}})),!t||u(n)?n:{}}function p(e,t){const n=h(e);Object.entries(t).forEach((([e,t])=>n[e]=t))}function m(e,t){return h("cache")[e]="function"==typeof t?t():t}function _(e,t){const n=h("cache");return n.hasOwnProperty(e)?n[e]:m(e,t)}function f(e,t,n,i){const s=_(e,i);s&&"object"==typeof s&&(s[t]=n)}function b(e,t){const n=e in globalThis&&globalThis[e]||null;return n&&"object"==typeof n&&t in n?n[t]:void 0}function y(e,t,n,i,s){let r=_(t,i);if(r){const[e,t]=s?s(r):[r,r];if(e===n)return t}return m(t,r=e()),s?s(r)[1]:r}function v(e,t,n){const[i="",...s]=e.trim().split(n||"-"),r=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?r(i):i)+(s||[]).map((e=>r(e))).join("")}const g={self:"self",event:"event",scope:"scope"},C="__InlineJS_ELSCOPE_KEY__";function E(e){for(;e;){const n=C in(t=e)&&"string"==typeof t[C]?t[C]:"";if(n)return[n,e];if(e===document.body)return[null,null];e=e.parentElement}var t;return[null,null]}function S(e){const[t]=E(e);return t||""}const A="__InlineJS_GLOBAL_KEY__",x="inlinejs.global.created";function P(){return h("global").base||null}function I(){return P()?Promise.resolve():new Promise((e=>window.addEventListener(x,e)))}const O="component";function G(){return{id:"",component:null}}function k(){m(O,{id:"",component:null})}function R(e){return y((()=>{const t=P().FindComponentById(e);return{id:t?e:"",component:t}}),O,e,G,(e=>[e.id,e.component]))}function N(e){return P().FindComponentByName(e)}function w(e){return P().FindComponentByRoot(e)}function F(e){const t=S(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?R(t[1]):null}var j=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function L(e){var{key:t}=e,n=j(e,["key"]);const i=P().RetrieveObject(Object.assign({key:t},n));return P().IsNothing(i)?t:i}function D(e){var{key:t}=e,n=j(e,["key"]);const i=P().PeekObject(Object.assign({key:t},n));return P().IsNothing(i)?t:i}function T(e,t,n){var i;return L({key:e,componentId:t||(n?null===(i=F(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function M(e){return(e=l(e))&&"getAttribute"in e&&"setAttribute"in e}function H(e){return e=l(e),P().IsFuture(e)?H(e.Get()):!e&&!1!==e&&0!==e||P().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function $(e,t,n){const i=t&&M(e)?e.getAttribute(t):null;return i?T(i,n,e):H(i)}function B(e){if(e=l(e),!Array.isArray(e)&&!u(e))return e;if(Array.isArray(e))return e.map((e=>B(e)));const t={};return Object.entries(e).forEach((([e,n])=>t[e]=B(n))),t}function J(e,t,n){var i;return null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e?H(e):P().StoreObject({object:e,componentId:t||(n?null===(i=F(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function W(e,t,n,i){(!t||!M(e))&&e.setAttribute(t,J(n,i,e))}function z(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function q(e,t){for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n}catch(e){break}return null}function U(e,t){return q(e,(e=>e.classList.contains(t)))}function K(e,t){return q(e,(e=>e.hasAttribute(t)))}function V(e,t,n){return q(e,(e=>e.getAttribute(t)===n))}function Y(e,t){return q(e,(e=>e.tagName.toLowerCase()===t.toLowerCase()))}function Z(e,t){return t&&M(e)?e.getAttribute(t):null}function Q(e,t){for(const n of Array.isArray(t)?t:[t]){const t=Z(e,n);if(t)return t}return null}function X(e,t){if(!M(e))return null;for(const n of t)if(e.hasAttribute(n))return{name:n,value:e.getAttribute(n)};return null}function ee(e,t){const n=X(e,t);return n?n.value:null}function te(e,t){if(e.hasOwnProperty("IsBooleanAttribute")&&"function"==typeof e.IsBooleanAttribute){const n=e.IsBooleanAttribute(t);if(!1===n||!0===n)return n}return P().GetConfig().IsBooleanAttribute(t)}function ne(e,t,n=!0){const[i,s]=n?a([e,t]):[e,t];if(i===s)return!0;if(Array.isArray(i)&&Array.isArray(s))return i.length==s.length&&-1==i.findIndex(((e,t)=>!ne(e,s[t],n)));if(d([i,s])){const e=Object.keys(i),t=Object.keys(s);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!ne(i[e],s[e],n)))}return i==s}function ie(e,t,n,i,r){let o=!1,l=()=>o=!0,a=0,c=e=>t?Math.floor(e/t):e,u=performance.now(),d=u,h=(p,m,_)=>{if(o)return;const f=_-u;if(r&&f>=r)if(n&&(n<0||a<n)){const t=f-r;i>0&&t<i?setTimeout((()=>{u=performance.now(),e(h.bind(null,p,m))}),i-t):e(h.bind(null,p,m)),a+=1,u=_,d=_}else s((()=>m({repeats:a,steps:r?c(r):-1,elapsed:f,duration:r})));else{e(h.bind(null,p,m));const n=_-d;n>=t&&(d=_+(t?n%t:n),s((()=>p({repeats:a,steps:c(f),elapsed:f,duration:r,abort:l}))))}};return new Loop(((t,n)=>{e(h.bind(null,t,n))}))}const se=[50,40,30,25,20,15,10,5,4,3,2,1,0];function re(e,t=1e3,n=0,i=0,s=!0){let r=0,o=Math.floor(t/2.2);for(const e of se)if(e<=o){r=e;break}return ie((e=>setTimeout((()=>{s?requestAnimationFrame(e):e(performance.now())}),r)),t,n,i,e)}function oe(e,t=1e3,n=0,i=0){return ie(requestAnimationFrame,t,n,i,e)}function le(e){const t=performance.now();return e(),performance.now()-t}function ae(e,t){return Object.entries(t).forEach((([t,n])=>!(t in e)&&(e[t]=n))),e}function ce(e){return(e=e?e.trim():"")?(!(e=e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"")).startsWith("/?")&&(e=e.replace(/^[\/?&=]+/,"")),e.split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),"")):""}function ue(e,t,n){return(e=ce(e))===t?(e=n&&n||"/").startsWith("/")?e:`/${e}`:(e.startsWith(`${t}/`)&&(e=e.substring(t.length)),/^[a-zA-Z0-9_]+:\/\//.test(e)?e:(n&&(e=e.startsWith("/")?`${n}${e}`:`${n}/${e}`),e.startsWith("/")?e:`/${e}`))}function de(e,t,n){const i=(e=t?ue(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function he({base:e,query:t},n,i,s){let r=`${ce(e)}?${t}`;return r=n?ue(r,n,i):ce(r),r=s?ce(`${n}/${r}`):r.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(r)?r:`/${r}`,r}function pe(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e||11},(()=>(t||n).charAt(Math.floor(Math.random()*(t||n).length)))).join("")}function me(e,t,n){t&&M(e)&&e.setAttribute(t,n)}function _e(e,t="-"){t=t||"-";const n=e.replace(/([A-Z]+)/g,(e=>`${t}${e.toLowerCase()}`));return n.startsWith(t)?n.substring(1):n}function fe(e){return e instanceof HTMLTemplateElement||"IsTemplate"in e&&"function"==typeof e.IsTemplate&&!!e.IsTemplate()}function be(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Element&&fe(t))return!0;return!1}function ye(){return{level0:0,level1:0,level2:0}}function ve(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?ve(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function ge(e){return`${e.level2}_${e.level1}_${e.level0}`}function Ce(e,t,n,i){return ve(e),`${t||""}${n||""}${ge(e)}${i||""}`}function Ee(e,t,n,i,s=!0){if(!i)return;const r={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(r),!s)return;const o=t.split(".");for(;o.length>2;)o.pop(),i.Add({original:r,path:o.join(".")})}function Se(e,t,n,r="",o=!0){const l="string"==typeof e?R(e):e;if(!l)return i(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),P().CreateNothing();let a=r&&n.startsWith(r)?n.substring(r.length):n;const c=P().GetMagicManager().FindHandler(a,{contextElement:t,componentId:l.GetId(),component:l});if(!c){if(!o)return P().CreateNothing();const e=r&&n.startsWith(`${r}${r}`)||!1;a=e?a.substring(r.length):a;const t=l.FindScopeByName(a);if(t)return e?t.GetRoot():t.GetProxy().GetNative();const i=N(a);if(i)return e?i.GetRoot():i.GetRootProxy().GetNative();if(e){const e=l.GetId();return t=>{const i=F(t)||R(e);if(!i)return null;const s=i.FindElementScope(t),o=s&&s.GetLocal(n.substring(r.length));return s&&!P().IsNothing(o)?o:Se(i.GetId(),t,n,`${r}${r}`,!1)}}return P().CreateNothing()}return s((()=>c({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Ae(e,t,n,i){var s;if(!(i in t))return!1;const r=R(e);return null===(s=null==r?void 0:r.FindProxy(n))||void 0===s||s.RemoveChild(i),delete t[i],null==r||r.RemoveProxy(`${n}.${i}`),Ee("delete",n,i,null==r?void 0:r.GetBackend().changes),!0}function xe(e,t,n,i){if(!e)return null;const s=e.FindChild(t);if(s)return s;if(!Array.isArray(n)&&!u(n))return null;const r=P().CreateChildProxy(e,t,n);return i&&i.AddProxy(r),r}function Pe(e,t,n,i,s){var r;switch(i){case o.target:return t;case o.componentId:return e;case o.name:return n.split(".").at(-1);case o.path:return n;case o.parentPath:return n.split(".").slice(0,-1).join(".")||""}const l=i in t;if(!l&&s){const t=s(R(e)||void 0,i);if(!P().IsNothing(t))return P().IsFuture(t)?t.Get():t}if(l&&!t.hasOwnProperty(i))return t[i];const a=l?t[i]:null;if(P().IsFuture(a))return a.Get();const c=R(e);return null==c||c.GetBackend().changes.AddGetAccess(`${n}.${i}`),(null===(r=xe((null==c?void 0:c.FindProxy(n))||null,i,a,c||void 0))||void 0===r?void 0:r.GetNative())||a}function Ie(e,t,n,i,s){var r;if(i in t&&s===t[i])return!0;const o=R(e);return null===(r=null==o?void 0:o.FindProxy(n))||void 0===r||r.RemoveChild(i),t[i]=s,null==o||o.RemoveProxy(`${n}.${i}`),Ee("set",`${n}.${i}`,i,null==o?void 0:o.GetBackend().changes),!0}class GenericProxy{constructor(e,t,n,i,r=null){this.componentId_=e,this.target_=t,this.name_=n,this.native_=null,this.children_={},this.parentPath_=(null==i?void 0:i.GetPath())||"",null==i||i.AddChild(this);const o=this.componentId_,l=!!r,a=this.GetPath(),c=(e,t)=>{const{context:n}=null==e?void 0:e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){const e=n.Peek(t.substring(1),P().CreateNothing());if(!P().IsNothing(e))return e}const s=n.Peek(g.self),r=null==e?void 0:e.FindElementLocalValue(s||e.GetRoot(),t,!0);if(!P().IsNothing(r))return r;const o=i?Se(e,s,t,"$"):P().CreateNothing();return t&&P().IsNothing(o)&&P().GetConfig().GetUseGlobalWindow()&&t in globalThis?globalThis[t]:o},u=!l&&!this.parentPath_,d={get(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Get?i.Get(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}if((u||l)&&e.hasOwnProperty(t)&&"function"==typeof e[t]&&P().GetConfig().GetWrapScopedFunctions()){const n=P().FindComponentById(o),i=null==n?void 0:n.FindScopeById(r||""),l=e[t];i&&P().PushScopeContext(i);const a=s((()=>(...e)=>l(...e)));return i&&P().PopScopeContext(),a}return Pe(o,e,a,t.toString(),u?c:void 0)},set(e,t,n){var i;if("symbol"==typeof t||"prototype"===t)return Reflect.set(e,t,n);if(u){const s=null===(i=P().FindComponentById(o))||void 0===i?void 0:i.GetProxyAccessHandler(),r=s&&s.Set?s.Set(t,n,e):P().CreateNothing();if(!P().IsNothing(r))return r}return Ie(o,e,a,t.toString(),n)},deleteProperty(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Delete?i.Delete(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}return Ae(o,e,a,t.toString())},has(e,t){var n;if(u&&"symbol"!=typeof t){const i=null===(n=P().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),s=i&&i.Has?i.Has(t,e):P().CreateNothing();if(!P().IsNothing(s))return s}return"symbol"!=typeof t||Reflect.has(e,t)}};this.native_=new window.Proxy(this.target_,d)}IsRoot(){return!this.parentPath_}GetComponentId(){return this.componentId_}GetTarget(){return this.target_}GetNative(){return this.native_}GetName(){return this.name_}GetPath(){return this.parentPath_?`${this.parentPath_}.${this.name_}`:this.name_}GetParentPath(){return this.parentPath_}AddChild(e){this.children_[e.GetName()]=e}RemoveChild(e){delete this.children_["string"==typeof e?e:e.GetName()]}FindChild(e){return this.children_.hasOwnProperty(e)?this.children_[e]:null}}class ChildProxy extends GenericProxy{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}var Oe=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function Ge({target:e,getter:t,setter:n,deleter:i,lookup:s,alert:r}){const o={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);const s=t?t(n.toString(),e):e[n];return P().IsNothing(s)?Reflect.get(e,n):(!r||r.list&&!(n in r.list)||null===(i=R(r.componentId))||void 0===i||i.GetBackend().changes.AddGetAccess(`${r.id}.${n}`),s)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?!1!==n(t.toString(),i,e):!!e[t]||!0,deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?!1!==i(t.toString(),e):!!delete e[t]||!0,has:(e,t)=>!!Reflect.has(e,t)||(Array.isArray(s)?s.includes(t.toString()):s?s(t.toString(),e):t in e)};return new window.Proxy(e||{},o)}function ke(e){return Ge(we({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function Re(){return!1}function Ne(e){var{setter:t,deleter:n,lookup:i}=e,s=Oe(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},s),{setter:t||Re,deleter:n||Re,lookup:i||Re})}function we(e){return Ne(e)}const Fe="InlineJS_ProxyGlobal";function je(e,t,n){const i=null==t?void 0:t.FindElementScope(n),s=null==i?void 0:i.GetId();if(!s)return["",null,null];const r=globalThis[Fe]=globalThis[Fe]||{},o=r[e]=r[e]||{};return s in o?[s,o[s],o]:(null==i||i.AddUninitCallback((()=>delete o[s])),[s,null,o])}class RootProxy extends GenericProxy{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,n)}}function Le(e){P().PushCurrentComponent(e)}function De(){return P().PopCurrentComponent()}function Te(){return P().PeekCurrentComponent()}function Me(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>Me(e,t,!0))):e.then(t)}const He="__InlineJS_Context__",$e="InlineJS_Func_Cache";function Be(e,t,n,s=!1){const r=b($e,t);if(r)return r;try{const n=new Function(He,`\n with (${He}){\n ${e(t)};\n };\n `);return f($e,t,n,{}),n}catch(e){if(s||!(e instanceof SyntaxError))return void i(e,`InlineJs.Region<${n||"NIL"}>.GenerateFunction`)}return null}function Je(e,t,n=!1){return Be((e=>`return (${e})`),e,t,n)}function We(e,t,n=!1){return Be((e=>e),e,t,n)}function ze(e,t,n,i=[]){var s;if("function"==typeof e){const r=R(n||""),o=null==r?void 0:r.FindProxy(null==r?void 0:r.GetBackend().changes.GetLastAccessContext()),l=e.apply((null===(s=o||(null==r?void 0:r.GetRootProxy()))||void 0===s?void 0:s.GetNative())||null,i||[]);return t?t(l):l}return t?t(e):e}function qe({componentId:e,contextElement:t,expression:n,disableFunctionCall:s=!1,waitPromise:r="recursive",voidOnly:o}){const l=e=>(e&&e(null),null);if(!(n=n.trim()))return l;let a=o?null:Je(n,e),c=!1;if(void 0===a)return l;if(!a&&(c=!0),!a&&!(a=We(n,e,!0)))return l;const u=(o,l,a,c,u=!0,d)=>{var h;const p=R(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(h=null==p?void 0:p.FindElementScope(t))||void 0===h?void 0:h.IsDestroyed()))return;const{context:_=null,changes:f=null}=(null==p?void 0:p.GetBackend())||{};null==_||_.Push(g.self,t),null==f||f.ResetLastAccessContext(),Le(e),Object.entries(c||{}).forEach((([e,t])=>null==_?void 0:_.Push(e,t)));try{let t=l(m);if(P().IsFuture(t)&&(t=t.Get()),!o)return s?t:ze(t,o,e,a);const n=e=>{if(e&&"none"!==r)return Me(e,o,"recursive"===r),d||"Loading data...";o(e)};s?n(t):ze(t,n,e,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;i(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==_?void 0:_.Pop(e,t))),De(),null==_||_.Pop(g.self)}};return(s,r=[],o,d)=>{try{return u(s,a.bind(t),r||[],o||{},void 0,d)}catch(d){if(d instanceof SyntaxError&&!c)return c=!0,a=We(n,e,!0),a?u(s,a.bind(t),r||[],o||{},!1):l(s);i(d,`InlineJs.Region<${e}>.RunFunction('${n}')`)}return l(s)}}function Ue(e){return qe(e)}function Ke(e,t){const n=(e,t)=>Me(e,t,!0);return e instanceof Loop?new Loop(((i,s)=>{e.While((e=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})),e.Final((e=>{n(e,(e=>{n(t(e),(e=>s(e)))}))}))})):e instanceof Promise?new Promise((i=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})):t(e)}function Ve(e,t,n){e instanceof Loop?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function Ye(e,t){if(!t)return()=>{};const n="handler"in t?t.handler:t;if(!n)return()=>{};const i="string"==typeof e?R(e):e;if(!i)return()=>{};const s=i.SetProxyAccessHandler(n||null)||null;return()=>t&&i.SetProxyAccessHandler(s)}function Ze(e){var t;const n=null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.GetProxyAccessHandler();return t=>{const i=Ye(e,n||null);s(t),i()}}function Qe({componentId:e,changes:t,callback:n,subscriptionsCallback:s,contextElement:r}){var o,l,a,c;t.PopAllGetAccessStorageSnapshots(!1),t.RestoreOptimizedGetAccessStorage();const{optimized:u,raw:d}=t.PopGetAccessStorage();if(0==((null===(o=u||d)||void 0===o?void 0:o.entries.length)||0))return s&&s({}),null;let h={},p=()=>{Object.keys(h).map((e=>R(e))).filter((e=>!!e)).forEach((e=>{const{changes:t}=e.GetBackend();h[e.GetId()].forEach((e=>t.Unsubscribe(e)))})),h={}},m=!1,_=()=>{m=!0};const f=t=>{const s=R(e);if(!s||m)return void p();const{changes:r}=s.GetBackend();r.PushOrigin(f);try{n({changes:t||[],cancel:_})}catch(t){i(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}r.PopOrigin(),m&&p()},b={};return null===(l=u||d)||void 0===l||l.entries.forEach((e=>(b[e.path]=b[e.path]||{})[e.compnentId]=!0)),Object.entries(b).forEach((([e,t])=>{Object.keys(t).map((e=>R(e))).filter((e=>!!e)).forEach((t=>{(h[t.GetId()]=h[t.GetId()]||[]).push(t.GetBackend().changes.Subscribe(e,f))}))})),r&&(null===(c=null===(a=R(e))||void 0===a?void 0:a.FindElementScope(r))||void 0===c||c.AddUninitCallback((()=>{_(),p()}))),s&&s(h),p}function Xe({componentId:e,callback:t,contextElement:n,options:s,subscriptionsCallback:r}){var o;const l=Ze(e),a=()=>{const s=R(e);if(!s)return;let o=!1;const{changes:a}=s.GetBackend(),c=n?s.FindElementScope(n):null,u=()=>{o=!0},d=null==c?void 0:c.GetElement();try{a.PushGetAccessStorage(),t({changes:[],cancel:u})}catch(t){i(t,`InlineJS.Component<${e}>.UseEffect`,d)}if(o)return a.PopAllGetAccessStorageSnapshots(!1),a.RestoreOptimizedGetAccessStorage(),void a.PopGetAccessStorage();Qe({componentId:e,changes:a,callback:e=>l((()=>t(e))),subscriptionsCallback:r,contextElement:d})};(null==s?void 0:s.nextTick)?null===(o=R(e))||void 0===o||o.GetBackend().changes.AddNextTickHandler(a):a()}function et(){return P().GetConfig()}function tt(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function nt(e){return P().GetDirectiveManager().AddExpansionRule(e)}function it(e){P().GetDirectiveManager().RemoveExpansionRule(e)}function st(e){return P().GetDirectiveManager().Expand(e)}let rt={};function ot(e,t,n){if(!e||!(e=e.trim()))return null;if((t=(t||"").trim())===e&&(t=""),e in rt)return{meta:rt[e],value:t,proxyAccessHandler:n};const i=st(e),s=i.match(et().GetDirectiveRegex());if(!s||3!=s.length||!s[2])return null;const r=s[2].indexOf(":");let o=-1==r?[s[2]]:[s[2].substring(0,r),s[2].substring(r+1)],l="",a="";o.length>1?[l,a]=o:[a]=o;let c=a.split("."),u="";l?u=c[0]:l=c[0],c.splice(0,1);const d=l.split("-"),h={view:{original:e,expanded:i},name:{value:l,joined:d.join("."),parts:d},arg:{key:u,options:c||[]}};return rt[e]=h,{meta:h,value:t,proxyAccessHandler:n}}function lt(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function at(e){return{originalView:e.meta.view.original,expandedView:e.meta.view.expanded,nameValue:e.meta.name.value,nameJoined:e.meta.name.joined,nameParts:e.meta.name.parts,argKey:e.meta.arg.key,argOptions:e.meta.arg.options,expression:e.value}}function ct(e,t,n,r=0){const o="string"==typeof e?R(e):e;if(!o)return i(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=o.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++r),l=l||P().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){const e=`${n.meta.name.parts.reduce(((e,t)=>e?`${e}${t.substring(0,1).toUpperCase()}${t.substring(1)}`:t),"")}DirectiveHandler`;e in globalThis&&"function"==typeof globalThis[e]&&(l=globalThis[e])}if(!l)return lt(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;const c=Ye(o,n.proxyAccessHandler||null);return 0==r&&!a&&o.CreateElementScope(t),s((()=>{l(Object.assign(Object.assign({},at(n)),{componentId:o.GetId(),component:o,contextElement:t}))}),"InlineJS.DispatchDirective",t),c(),!0}function ut({element:e,callback:t,attributeCallback:n,proxyAccessHandler:s}){Array.from(e.attributes||[]).forEach((r=>{try{n&&n(r.name,r.value||"");const e=ot(r.name,r.value||"",s);e&&t(e)}catch(t){i(t,"InlineJS.TraverseDirectives",e)}}))}function dt({component:e,element:t,options:n={},proxyAccessHandler:s}){if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||!be(e))}(t,n))return;const r="string"==typeof e?R(e):e;if(!r)return i("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let o=0;ut({element:t,proxyAccessHandler:s,callback:n=>{ct(e,t,n,o)&&(t.removeAttribute(n.meta.view.original),++o)},attributeCallback:(e,n)=>P().DispatchAttributeProcessing({name:e,value:n,proxyAccessHandler:s,componentId:r.GetId(),component:r,contextElement:t})}),P().DispatchTextContentProcessing({componentId:r.GetId(),component:r,contextElement:t,proxyAccessHandler:s}),"OnElementScopeCreated"in t&&"function"==typeof t.OnElementScopeCreated&&r.CreateElementScope(t);const l=r.FindElementScope(t);null==l||l.ExecutePostAttributesProcessCallbacks();const a=r.GetId(),c=()=>{const i=R(a);if(i&&!n.ignoreChildren&&!fe(t)){i.PushSelectionScope();const n={checkTemplate:!1,checkDocument:!1},r=(t,i)=>dt({component:e,proxyAccessHandler:s,options:Object.assign(Object.assign({},n),{ignoreChildren:i}),element:t});"TraverseChildren"in t&&"function"==typeof t.TraverseChildren?t.TraverseChildren((e=>r(e,e.contains(t)))):Array.from(t.children).forEach((e=>r(e,e.contains(t)))),i.PopSelectionScope()}null==l||l.ExecutePostProcessCallbacks()};"ProcessDirectivesCallback"in t?t.ProcessDirectivesCallback(c):c()}class ChangesMonitor{constructor(){this.listeners_=new Array}AddChangesMonitor(e){this.listeners_.push(e),this.listeners_.forEach((e=>s((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}RemoveChangesMonitor(e){const t=this.listeners_.length;this.listeners_=this.listeners_.filter((t=>t!==e)),t!=this.listeners_.length&&this.listeners_.forEach((e=>s((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}NotifyListeners_(e,t){this.listeners_.forEach((n=>s((()=>n({target:e,object:()=>B(t)})))))}}class Changes extends ChangesMonitor{constructor(e){super(),this.componentId_=e,this.nextTickHandlers_=new Array,this.nextIdleHandlers_=new Array,this.nextNonIdleHandlers_=new Array,this.isScheduled_=!1,this.isIdle_=!0,this.list_=new Array,this.subscribers_={},this.lastAccessContext_="",this.getAccessStorages_=new Stack,this.origins_=new Stack}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)}AddNextIdleHandler(e){this.nextIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)}AddNextNonIdleHandler(e){this.nextNonIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)}Schedule(){this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;const e=new Array;0!=this.list_.length&&(this.list_.splice(0).forEach((t=>{Object.values(this.subscribers_).filter((e=>e.path===t.path&&e.callback!==(e=>"original"in e?e.original.origin:e.origin)(t))).forEach((n=>((t,n)=>{const i=e.find((e=>e.callback===n));i?i.changes.push(t):e.push({callback:n,changes:new Array(t)})})(t,n.callback)))})),this.NotifyListeners_("list",this.list_)),0!=e.length?(this.isIdle_&&(this.isIdle_=!1,0!=this.nextNonIdleHandlers_.length&&(this.nextNonIdleHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextNonIdle`))),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_))),e.forEach((e=>e.callback(e.changes))),0!=this.nextTickHandlers_.length&&(this.nextTickHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextTick`))),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)),this.NotifyListeners_("scheduled",this.isScheduled_),this.Schedule()):this.isIdle_||(this.isIdle_=!0,0!=this.nextIdleHandlers_.length&&(this.nextIdleHandlers_.splice(0).forEach((e=>s(e,`InlineJs.Region<${this.componentId_}>.NextIdle`))),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)))})),this.NotifyListeners_("scheduled",this.isScheduled_))}Add(e){this.list_.push(e),this.Schedule(),this.NotifyListeners_("list",this.list_)}AddComposed(e,t,n){const i={componentId:this.componentId_,type:"set",path:t?`${t}.${e}`:e,prop:e,origin:this.origins_.Peek()};n?this.Add({original:i,path:n}):this.Add(i)}GetLastChange(e=0){return B(this.list_.at(-(e+1))||null)}AddGetAccess(e){var t,n,i,s;const r=(null===(t=R(Te()||""))||void 0===t?void 0:t.GetBackend().changes)||this,o=e.lastIndexOf(".");r.lastAccessContext_=-1==o?"":e.substring(0,o);const l=r.getAccessStorages_.Peek();(null==l?void 0:l.details)&&(null===(n=l.details.raw)||void 0===n||n.entries.push({compnentId:this.componentId_,path:e}),l.details.optimized&&l.details.optimized.entries!==(null===(i=l.details.raw)||void 0===i?void 0:i.entries)&&0!=l.details.optimized.entries.length&&l.lastAccessPath&&l.lastAccessPath.length<e.length&&0==e.indexOf(`${l.lastAccessPath}.`)?l.details.optimized.entries.at(-1).path=e:l.details.optimized&&l.details.optimized.entries!==(null===(s=l.details.raw)||void 0===s?void 0:s.entries)&&l.details.optimized.entries.push({compnentId:this.componentId_,path:e}),l.lastAccessPath=e,this.NotifyListeners_("last-access-context",this.list_),r.NotifyListeners_("get-access-storages",this.getAccessStorages_))}GetLastAccessContext(){return this.lastAccessContext_}ResetLastAccessContext(){this.lastAccessContext_="",this.NotifyListeners_("last-access-context",this.lastAccessContext_)}PushGetAccessStorage(e){var t;this.getAccessStorages_.Push({details:e||{optimized:"optimized"===(null===(t=R(this.componentId_))||void 0===t?void 0:t.GetReactiveState())?{entries:new Array,snapshots:new Stack}:void 0,raw:{entries:new Array,snapshots:new Stack}},lastAccessPath:""}),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopGetAccessStorage(){var e;const t=(null===(e=this.getAccessStorages_.Pop())||void 0===e?void 0:e.details)||null;return this.NotifyListeners_("get-access-storages",this.getAccessStorages_),t}SwapOptimizedGetAccessStorage(){const e=this.getAccessStorages_.Peek();(null==e?void 0:e.details.optimized)&&e.details.raw&&(e.details.optimized.entries=e.details.raw.entries,this.NotifyListeners_("get-access-storages",this.getAccessStorages_))}RestoreOptimizedGetAccessStorage(){var e;const t=this.getAccessStorages_.Peek();(null==t?void 0:t.details.optimized)&&t.details.optimized.entries===(null===(e=t.details.raw)||void 0===e?void 0:e.entries)&&(t.details.optimized.entries=t.details.raw.entries.slice(0),this.NotifyListeners_("get-access-storages",this.getAccessStorages_))}FlushRawGetAccessStorage(){var e,t;null===(t=null===(e=this.getAccessStorages_.Peek())||void 0===e?void 0:e.details.raw)||void 0===t||t.entries.splice(0),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PushGetAccessStorageSnapshot(){var e,t;const n=this.getAccessStorages_.Peek();null===(e=null==n?void 0:n.details.optimized)||void 0===e||e.snapshots.Push(n.details.optimized.entries.slice(0).map((e=>Object.assign({},e)))),null===(t=null==n?void 0:n.details.raw)||void 0===t||t.snapshots.Push(n.details.raw.entries.slice(0).map((e=>Object.assign({},e)))),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopGetAccessStorageSnapshot(e){var t,n,i,s;const r=this.getAccessStorages_.Peek(),o=null===(t=null==r?void 0:r.details.optimized)||void 0===t?void 0:t.snapshots.Pop();!e&&o&&(null===(n=null==r?void 0:r.details.optimized)||void 0===n?void 0:n.entries)&&(r.details.optimized.entries=o);const l=null===(i=null==r?void 0:r.details.raw)||void 0===i?void 0:i.snapshots.Pop();!e&&l&&(null===(s=null==r?void 0:r.details.raw)||void 0===s?void 0:s.entries)&&(r.details.raw.entries=l),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PopAllGetAccessStorageSnapshots(e){var t,n,i,s,r,o;const l=this.getAccessStorages_.Peek();let a=null===(t=null==l?void 0:l.details.optimized)||void 0===t?void 0:t.snapshots.Pop();for(;(null===(n=null==l?void 0:l.details.optimized)||void 0===n?void 0:n.snapshots)&&!l.details.optimized.snapshots.IsEmpty();)a=l.details.optimized.snapshots.Pop();!e&&a&&(null===(i=null==l?void 0:l.details.optimized)||void 0===i?void 0:i.entries)&&(l.details.optimized.entries=a);let c=null===(s=null==l?void 0:l.details.raw)||void 0===s?void 0:s.snapshots.Pop();for(;(null===(r=null==l?void 0:l.details.raw)||void 0===r?void 0:r.snapshots)&&!l.details.raw.snapshots.IsEmpty();)c=l.details.raw.snapshots.Pop();!e&&c&&(null===(o=null==l?void 0:l.details.raw)||void 0===o?void 0:o.entries)&&(l.details.raw.entries=c),this.NotifyListeners_("get-access-storages",this.getAccessStorages_)}PushOrigin(e){this.origins_.Push(e),this.NotifyListeners_("origins",this.origins_)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){const e=this.origins_.Pop();return this.NotifyListeners_("origins",this.origins_),e}Subscribe(e,t){var n;const i=null===(n=R(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&(this.subscribers_[i]={path:e,callback:t},this.NotifyListeners_("subscribers",this.subscribers_)),i||""}Unsubscribe(e,t){"string"!=typeof e?Object.entries(this.subscribers_).filter((([n,i])=>e===i.callback&&(!t||t===i.path))).map((([e])=>e)).forEach((e=>{this.Unsubscribe_(e)})):e in this.subscribers_&&this.Unsubscribe_(e),this.NotifyListeners_("subscribers",this.subscribers_)}Unsubscribe_(e){delete this.subscribers_[e]}}class Context{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new Stack).Push(t)}Pop(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Pop():t||null}Peek(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Peek():t||null}Get(e){return this.record_.hasOwnProperty(e)?this.record_[e]:null}GetHistory(e){return this.record_.hasOwnProperty(e)?this.record_[e].GetHistory():[]}GetRecordKeys(){return Object.keys(this.record_)}}var ht=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};function pt(e,t,n){const i="function"==typeof e?function(e){return{handler(t){var{argKey:n}=t,i=ht(t,["argKey"]);this.extensions.hasOwnProperty(n)?this.extensions[n](Object.assign({argKey:n},i)):e(Object.assign({argKey:n},i))},extensions:{}}}(e):e;return i.extensions[t]=n,i}function mt(e,t){let n="",i=null;return"function"==typeof e?(n=t||"",i=e):(n=e.GetName(),i=t=>e.Handle(t)),{computedName:n,callback:i}}class DirectiveManager{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){const t=P().GenerateUniqueId("exrule_");return this.expansionRules_[t]=e,t}RemoveExpansionRule(e){e in this.expansionRules_&&delete this.expansionRules_[e]}Expand(e){if(!(e=e.trim()))return e;for(const t in this.expansionRules_){const n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){const{computedName:n,callback:i}=mt(e,t);n&&i&&(this.handlers_[n]=i)}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e){if(!this.handlers_.hasOwnProperty(e))return null;const t=this.handlers_[e];return"function"==typeof t?t:t.handler.bind(t)}AddHandlerExtension(e,t,n){const i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;const{computedName:s,callback:r}=mt(t,n);s&&r&&(this.handlers_[e]=pt(i,s,r))}RemoveHandlerExtension(e,t){const n=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;n&&function(e,t){"function"!=typeof e&&e.extensions.hasOwnProperty(t)&&delete e.extensions[t]}(n,t)}}const _t="InlineJS_OutsideEvent";function ft(){return globalThis[_t]=globalThis[_t]||{targetScopes:new Array,eventCallbacks:{}}}function bt(e,t,n){let i=ft(),r=i.targetScopes.find((t=>t.target===e));r||(r={target:e,listeners:{}},i.targetScopes.push(r)),(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners||(r.listeners[e]={handlers:new Array,excepts:null}),r.listeners[e].handlers.push({callback:n,excepts:null}),e in i.eventCallbacks||(i.eventCallbacks[e]=e=>{i.targetScopes.forEach((t=>{e.type in t.listeners&&t.target!==e.target&&!t.target.contains(e.target)&&-1==(t.listeners[e.type].excepts||[]).findIndex((t=>t===e.target||t.contains(e.target)))&&t.listeners[e.type].handlers.filter((t=>-1==(t.excepts||[]).findIndex((t=>t===e.target||t.contains(e.target))))).forEach((t=>s((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function yt(e,t,n){const i=ft().targetScopes.find((t=>t.target===e));i&&(Array.isArray(t)?t:[t]).forEach((e=>{e in i.listeners&&(n?i.listeners[e].handlers=i.listeners[e].handlers.filter((e=>e.callback!==n)):delete i.listeners[e])}))}function vt(e,t,n){const i=ft().targetScopes.find((t=>t.target===e));i&&Object.keys(t).forEach((e=>{if(e in i.listeners)if(n){const s=i.listeners[e].handlers.find((e=>e.callback===n));s&&(s.excepts=s.excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((e=>{s.excepts.push(e)})))}else i.listeners[e].excepts=i.listeners[e].excepts||new Array,(Array.isArray(t[e])?t[e]:[t[e]]).forEach((t=>{i.listeners[e].excepts.push(t)}))}))}function gt(e){ft().targetScopes=ft().targetScopes.filter((t=>t.target!==e&&!e.contains(t.target)))}class ElementScope extends ChangesMonitor{constructor(e,t,n,i){super(),this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.isInitialized_=!1,this.key_="",this.locals_={},this.data_={},this.queuedAttributeChanges_=null,this.managers_={directive:null},this.callbacks_={post:new Array,postAttributes:new Array,uninit:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1}}SetInitialized(){this.isInitialized_=!0}IsInitialized(){return this.isInitialized_}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetKey(e){this.NotifyListeners_("key",this.key_=e)}GetKey(){return this.key_}GetElement(){return this.element_}IsRoot(){return this.isRoot_}SetLocal(e,t){this.state_.isMarked||(this.locals_[e]=t,this.NotifyListeners_("locals",this.locals_))}DeleteLocal(e){delete this.locals_[e],this.NotifyListeners_("locals",this.locals_)}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:P().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t,this.NotifyListeners_("data",this.data_))}GetData(e){return e in this.data_?this.data_[e]:P().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||(this.callbacks_.post.push(e),this.NotifyListeners_("post-process-callbacks",this.callbacks_.post))}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).splice(0).forEach((e=>s(e,"ElementScope.ExecutePostProcessCallbacks")))}AddPostAttributesProcessCallback(e){this.state_.isMarked||(this.callbacks_.postAttributes.push(e),this.NotifyListeners_("post-attributes-process-callbacks",this.callbacks_.postAttributes))}ExecutePostAttributesProcessCallbacks(){(this.callbacks_.postAttributes||[]).splice(0).forEach((e=>s(e,"ElementScope.ExecutePostAttributesProcessCallbacks")))}AddUninitCallback(e){this.state_.isMarked||(this.callbacks_.uninit.push(e),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit))}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e)),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit)}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e)),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>s((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;const n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(...t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]}),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}RemoveAttributeChangeCallback(e,t){const n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;const i="string"==typeof t?[t]:t||[];0!=i.length&&0!=this.callbacks_.attributeChange[n].whitelist.length?i.forEach((e=>{this.callbacks_.attributeChange[n].whitelist=this.callbacks_.attributeChange[n].whitelist.filter((t=>t!==e))})):this.callbacks_.attributeChange[n].whitelist.splice(0),0==this.callbacks_.attributeChange[n].whitelist.length&&this.callbacks_.attributeChange.splice(n,1),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}ExecuteAttributeChangeCallbacks(e){this.queuedAttributeChanges_?!this.queuedAttributeChanges_.includes(e)&&this.queuedAttributeChanges_.push(e):(this.queuedAttributeChanges_=[e],queueMicrotask((()=>{if(!this.queuedAttributeChanges_)return;const e=this.queuedAttributeChanges_;this.queuedAttributeChanges_=null,e.forEach((e=>{(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>s((()=>t.callback(e)))))}))})))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,!(this.element_ instanceof HTMLTemplateElement)){const t=R(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.callbacks_.uninit.splice(0).forEach((e=>{try{e()}catch(e){}})),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,gt(this.element_),P().GetMutationObserver().Unobserve(this.element_);const t=R(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[C],this.isRoot_){const e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>P().RemoveComponent(e)))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new DirectiveManager}DestroyChildren_(e,t,n){Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>{const i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Scope{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new RootProxy(this.componentId_,{},this.id_)}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}GetProxy(){return this.proxy_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;do{e=e.parentElement;try{if(t(e))return e}catch(e){}}while(e!==this.root_);return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}}class BaseComponent extends ChangesMonitor{constructor(e,t){super(),this.id_=e,this.root_=t,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_=new Context,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new Stack,this.selectionScopes_=new Stack,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=new Array,this.observers_={intersections:{}},this.changes_=new Changes(this.id_),this.rootProxy_=new RootProxy(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,P().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{const r=R(e);if(!r)return;const o=new Array,l=P().GetConfig().GetDirectiveRegex(),a=null==i?void 0:i.filter((e=>e.target instanceof HTMLElement));null==a||a.forEach((e=>{var t;l.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==r?void 0:r.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),a&&this.attributeObservers_.forEach((e=>{const t=a.filter((t=>t.target===e.element||e.element.contains(t.target)));0!=t.length&&s((()=>e.callback(t)))})),o.forEach((e=>dt({element:e,component:r,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));const c=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement&&!r.FindElementScope(e)){dt({component:r,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=r.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!c.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=r.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}SetReactiveState(e){this.NotifyListeners_("reactive-state",this.reactiveState_=e)}GetReactiveState(){return"default"===this.reactiveState_?et().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){const n=Ce(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}SetName(e){this.NotifyListeners_("name",this.name_=e)}GetName(){return this.name_}SetProxyAccessHandler(e){const t=this.proxyAccessHandler_;return this.proxyAccessHandler_=e,this.NotifyListeners_("proxy-access-handler",this.proxyAccessHandler_),t}GetProxyAccessHandler(){return this.proxyAccessHandler_}CreateScope(e){const t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;const n=new Scope(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,this.AddProxy(n.GetProxy()),this.NotifyListeners_("scopes",this.scopes_),n}RemoveScope(e){const t="string"==typeof e?e:e.GetId();this.scopes_.hasOwnProperty(t)&&(this.RemoveProxy(this.scopes_[t].GetProxy()),delete this.scopes_[t],this.NotifyListeners_("scopes",this.scopes_))}FindScopeById(e){return this.scopes_.hasOwnProperty(e)?this.scopes_[e]:null}FindScopeByName(e){return Object.values(this.scopes_).find((t=>t.GetName()===e))||null}FindScopeByRoot(e){return Object.values(this.scopes_).find((t=>t.GetRoot()===e))||null}PushCurrentScope(e){this.currentScope_.Push(e),this.NotifyListeners_("current-scope",this.currentScope_)}PopCurrentScope(){const e=this.currentScope_.IsEmpty(),t=this.currentScope_.Pop();return!e&&this.NotifyListeners_("current-scope",this.currentScope_),t}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){const t=P().PeekScopeContext();if(t)return t;let n=null;for(const t in this.scopes_){const i=this.scopes_[t],s=i.GetRoot();if(s===e)return i;!s.contains(e)||n&&!n.GetRoot().contains(s)||(n=i)}return n}PushSelectionScope(){const e={set:!1};return this.selectionScopes_.Push(e),this.NotifyListeners_("selection-scopes",this.selectionScopes_),e}PopSelectionScope(){const e=this.selectionScopes_.IsEmpty(),t=this.selectionScopes_.Pop();return!e&&this.NotifyListeners_("selection-scopes",this.selectionScopes_),t}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n;if(n===this.root_)break}catch(e){break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){const t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;const n=new ElementScope(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);this.elementScopes_[n.GetId()]=n,e[C]=n.GetId();const i=t=>{const n=X(e,[et().GetDirectiveName(t,!1),et().GetDirectiveName(t,!0)]);if(n){const t=ot(n.name,n.value);t&&ct(this,e,t)}};return["data","component","ref","locals","init"].forEach((e=>i(e))),n.SetInitialized(),"OnElementScopeCreated"in e&&"function"==typeof e.OnElementScopeCreated&&s((()=>e.OnElementScopeCreated({componentId:this.id_,component:this,scope:n}))),this.NotifyListeners_("element-scopes",this.elementScopes_),n}RemoveElementScope(e){delete this.elementScopes_[e],this.NotifyListeners_("element-scopes",this.elementScopes_)}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;const t=!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_;return t&&C in t&&"string"==typeof t[C]&&t[C]in this.elementScopes_?this.elementScopes_[t[C]]:null}FindElementLocal(e,t,n){const i=this.FindElementScope(e);if(null==i?void 0:i.HasLocal(t))return i;if(!n||!i&&"string"==typeof e)return null;const s=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_);if(!s)return null;const r=this.FindAncestor(s);return r?this.FindElementLocal(r,t,!0):null}FindElementLocalValue(e,t,n){const i=this.FindElementScope(e),s=i?i.GetLocal(t):P().CreateNothing();if(!P().IsNothing(s)||!n||!i&&"string"==typeof e)return s;const r=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(g.self):e instanceof Node?e:this.root_);if(!r)return s;const o=this.FindAncestor(r);return o?this.FindElementLocalValue(o,t,!0):s}SetElementLocalValue(e,t,n){var i;null===(i=this.FindElementScope(e))||void 0===i||i.SetLocal(t,n)}DeleteElementLocalValue(e,t){var n;null===(n=this.FindElementScope(e))||void 0===n||n.DeleteLocal(t)}AddProxy(e){this.proxies_[e.GetPath()]=e,this.NotifyListeners_("proxies",this.proxies_)}RemoveProxy(e){const t="string"==typeof e?e:e.GetPath();this.proxies_.hasOwnProperty(t)&&(delete this.proxies_[t],this.NotifyListeners_("proxies",this.proxies_))}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t,this.NotifyListeners_("refs",this.refs_)}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}GetRefElements(){return this.refs_}AddAttributeChangeCallback(e,t){this.attributeObservers_.push({element:e,callback:t}),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}RemoveAttributeChangeCallback(e,t){this.attributeObservers_=this.attributeObservers_.filter((n=>n.element!==e&&n.callback!==t)),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e,this.NotifyListeners_("intersection-observers",this.observers_.intersections)}FindIntersectionObserver(e){return e in this.observers_.intersections?this.observers_.intersections[e]:null}RemoveIntersectionObserver(e){e in this.observers_.intersections&&(delete this.observers_.intersections[e],this.NotifyListeners_("intersection-observers",this.observers_.intersections))}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return P()}}function Ct(e,t){var n;null===(n="string"==typeof e?R(e):e)||void 0===n||n.PushCurrentScope(t)}function Et(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function St(e){var t;return(null===(t="string"==typeof e?R(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function At(e,t,n,i={}){var s;let r=null;if(r=e instanceof HTMLElement?(null===(s="string"==typeof n?R(n):n)||void 0===s?void 0:s.FindElementScope(e))||null:e,!r)return i;let o=r.GetLocal(t);return P().IsNothing(o)&&r.SetLocal(t,o=i),o}const xt="__InlineJS_GLOBAL_COMPONENT_KEY__";function Pt(e){const t=globalThis[xt];if(t||!1===e)return t.component;const n=document.createElement("template");return globalThis[xt]={root:n,component:P().CreateComponent(n)},globalThis[xt]}const It=300,Ot=0,Gt=0;function kt(e,t){if(!e||P().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;const n=P().GetConcept("animation");return{ease:e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,actor:e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,duration:e.duration||It,delay:e.delay||Ot,repeats:e.repeats||Gt,allowed:e.allowed||"both"}}function Rt({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,onPass:o,reverse:l,allowRepeats:a,restore:c}){var u,d,h,p;const m=n||t;if("WaitTransition"in m&&"function"==typeof m.WaitTransition)return m.WaitTransition({componentId:e,contextElement:t,target:n,callback:i,onAbort:r,reverse:l,allowRepeats:a});const _=kt((null===(d=null===(u=R(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===d?void 0:d.GetData("transition"))||null,l||!1);if(!_||!_.actor||!_.ease||"number"!=typeof _.duration||_.duration<=0)return i(!1),null;const f=e=>{var t;return"function"==typeof(null==_?void 0:_.actor)?null==_?void 0:_.actor(e):_&&(null===(t=_.actor)||void 0===t?void 0:t.Handle(e))},b=e=>{var t;return"function"==typeof _.ease?_.ease(e):_&&(null===(t=_.ease)||void 0===t?void 0:t.Handle(e))||0};let y=!1,v=0;const g=()=>y=!0,C=e=>l?1-e:e,E=()=>{var n,i;return null===(i=null===(n=R(e))||void 0===n?void 0:n.FindElementScope(t))||void 0===i||i.RemoveUninitCallback(g),m.dispatchEvent(new CustomEvent("transition.canceled")),r&&s((()=>r())),!1},S=(e,t,n)=>{o&&s((()=>o({duration:_.duration,elapsed:t,fraction:n,target:m,stage:e})))};null===(p=null===(h=R(e))||void 0===h?void 0:h.FindElementScope(t))||void 0===p||p.AddUninitCallback(g);const A=_.duration,x=e=>{const t=C(e/A),n=b({duration:A,elapsed:e,fraction:t}),i=0==v++?"start":"middle";f({duration:A,elapsed:e,fraction:n,elapsedFraction:t,stage:i,restore:c,target:m,reverse:!!l}),S(i,e,n)};return x(0),oe(A,0,a?_.repeats:0,_.delay).While((({elapsed:e})=>{if(y)return E();0==v&&(m.style.transform="",m.style.transformOrigin="50% 50%",m.dispatchEvent(new CustomEvent("transition.enter"))),x(e)})).Final((()=>{if(y)E();else{const e=C(1);f({duration:A,elapsedFraction:e,elapsed:A,target:m,stage:"end",fraction:b({duration:_.duration,elapsed:_.duration,fraction:e}),reverse:!!l}),S("end",_.duration,e),m.dispatchEvent(new CustomEvent("transition.leave")),s((()=>i(!0)))}})),g}function Nt({element:e,html:t,type:n="replace",component:i,processDirectives:r=!0,afterRemove:o,afterInsert:l,afterTransitionCallback:a,transitionScope:c}){const u="string"==typeof i?i:(null==i?void 0:i.GetId())||"",d=()=>{const i=document.createElement("template");i.innerHTML=t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),l&&s(l,"InlineJS.InsertHtml",e);const o=R(u);r&&o&&Array.from(e.children).forEach((e=>dt({component:o,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),a&&((c||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),Rt({componentId:u,contextElement:c||e,target:e,callback:()=>{(c||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),a()}}))};if("replace"===n&&0!=e.childNodes.length){const t=e=>{const n=R(u),i=P();Array.from(e.children).forEach((e=>{var s;let r=null==n?void 0:n.FindElementScope(e);r||(r=null===(s=i.InferComponentFrom(e))||void 0===s?void 0:s.FindElementScope(e))?r.Destroy():t(e)}))},n=()=>{t(e),Array.from(e.childNodes).forEach((e=>e.remove())),o&&s(o,"InlineJS.InsertHtml",e)};a?((c||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),Rt({componentId:u,contextElement:c||e,target:e,reverse:!0,callback:()=>{(c||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),n(),d()}})):(n(),d())}else d()}class NextCooldown{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;const n=()=>{var t;return null===(t=this.setCallback_||e||this.callback_)||void 0===t?void 0:t()},i=Ze(this.componentId_);!this.queued_&&this.initialized_?(this.queued_=!0,this.ListenNext_(null===(t=R(this.componentId_))||void 0===t?void 0:t.GetBackend().changes,(()=>i((()=>{this.queued_=!1,n()}))))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}ListenNext_(e,t){}}class NextIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextIdleHandler(t)}}class NextNonIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextNonIdleHandler(t)}}class NextTick extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextTickHandler(t)}}class MagicManager{constructor(){this.handlers_={}}AddHandler(e,t,n){let i="",s=null;"function"==typeof e?(i=t||"",s=e):(i=e.GetName(),s=t=>e.Handle(t)),i&&(this.handlers_[i]={callback:s,onAccess:n})}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e,t){return e in this.handlers_?(t&&this.handlers_[e].onAccess&&this.handlers_[e].onAccess(t),this.handlers_[e].callback):null}}class MutationObserver{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{const t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t,i;if("childList"===(null==e?void 0:e.type)){const i=e=>{var t;const s=S((null===(t=F(e))||void 0===t?void 0:t.GetRoot())||null);s?n(s).removed.push(e):Array.from(e.childNodes).filter((t=>!t.contains(e))).forEach(i)};e.removedNodes.forEach(i);const s=e.target instanceof HTMLElement?S((null===(t=F(e.target))||void 0===t?void 0:t.GetRoot())||null):"";s&&n(s).added.push(...Array.from(e.addedNodes))}else if("attributes"===(null==e?void 0:e.type)&&e.attributeName){const t=e.target instanceof HTMLElement?S((null===(i=F(e.target))||void 0===i?void 0:i.GetRoot())||null):"";t&&n(t).attributes.push({name:e.attributeName,target:e.target})}})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{const i=n.target instanceof HTMLElement?S(n.target):"";if(!i||!(i in t))return;const r=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=r("add",n,t[i].added),l=r("remove",n,t[i].removed),a=r("attribute",n,t[i].attributes);(o||l||a)&&s((()=>n.handler({id:e,added:o,removed:l,attributes:a})),"InlineJS.MutationObserver")}))})),this.observer_.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!1})}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){const i=Ce(this.uniqueMarkers_);return this.handlers_[i]={target:e,handler:t,whitelist:n},i}Unobserve(e){"string"!=typeof e?Object.entries(this.handlers_).filter((([t,n])=>n.target===e)).forEach((([e])=>delete this.handlers_[e])):delete this.handlers_[e]}}class ResizeObserver{constructor(){if(this.observer_=null,this.handlers_=new Array,globalThis.MutationObserver)try{this.observer_=new globalThis.ResizeObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((n=>{s((()=>n.handler({entry:e,observer:t})),"InlineJS.ResizeObserver")}))}))}))}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){var i;this.handlers_.push({target:e,handler:t}),null===(i=this.observer_)||void 0===i||i.observe(e,n||{box:"border-box"})}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}}class Config{constructor(e){if(this.options_=e,this.defaultOptions_={reactiveState:"unoptimized",directivePrefix:"hx"},this.keyMap_={return:"enter",ctrl:"control",esc:"escape",space:" ",menu:"contextmenu",del:"delete",ins:"insert",plus:"+",minus:"-",star:"*",slash:"/",alpha:Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+97))),digit:Array.from({length:10}).map(((e,t)=>t.toString()))},this.booleanAttributes_=new Array("allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"),this.options_=ae(Object.assign({},h("config",!0)),ae(this.options_,this.defaultOptions_)),this.UpdateDirectiveRegex_(),!this.options_.directiveNameBuilder){const e=this.options_;e.directiveNameBuilder=(t,n=!1)=>{const i=e.directivePrefix||e.directivePrefix||"hx";return n?`data-${i}-${t}`:`${i}-${t}`}}}GetAppName(){return this.options_.appName||""}SetDirectivePrefix(e){this.options_.directivePrefix=e,this.UpdateDirectiveRegex_()}GetDirectivePrefix(){return this.options_.directivePrefix||this.defaultOptions_.directivePrefix||"hx"}SetElementPrefix(e){this.options_.elementPrefix=e}GetElementPrefix(){return this.options_.elementPrefix||this.GetDirectivePrefix()}GetDirectiveRegex(){return this.options_.directiveRegex||this.UpdateDirectiveRegex_()}GetDirectiveName(e,t){return this.options_.directiveNameBuilder?this.options_.directiveNameBuilder(e,t):e}GetElementName(e){return`${this.GetElementPrefix()}-${e}`}AddKeyEventMap(e,t){this.keyMap_[e]=t}RemoveKeyEventMap(e){delete this.keyMap_[e]}MapKeyEvent(e){return e in this.keyMap_?this.keyMap_[e]:e}AddBooleanAttribute(e){this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=this.booleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return this.booleanAttributes_.includes(e)}SetReactiveState(e){this.options_.reactiveState=e}GetReactiveState(){return this.options_.reactiveState||this.defaultOptions_.reactiveState||"unoptimized"}SetUseGlobalWindow(e){this.options_.useGlobalWindow=e}GetUseGlobalWindow(){return this.options_.useGlobalWindow||!1}UpdateDirectiveRegex_(){return this.options_.directiveRegex=this.options_.directiveRegex||new RegExp(`^(data-)?${this.GetDirectivePrefix()}-(.+)$`)}SetWrapScopedFunctions(e){this.options_.wrapScopedFunctions=e}GetWrapScopedFunctions(){return this.options_.wrapScopedFunctions||!1}}class NativeFetchConcept{Get(e,t){return fetch(e,t)}}var wt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};class BaseGlobal extends ChangesMonitor{constructor(e,t=0){super(),this.nothing_=new Nothing,this.storedObjects_={},this.lastStoredObjectKey_="",this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new Stack,this.scopeContext_=new Stack,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.customElements_={},this.managers_={directive:new DirectiveManager,magic:new MagicManager},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new MutationObserver,this.resizeObserver_=new ResizeObserver,this.nativeFetch_=new NativeFetchConcept,this.fetchConcept_=null,this.concepts_={},this.config_=new Config(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.NotifyListeners_("config",this.config_=e)}GetConfig(){return this.config_}GenerateUniqueId(e,t){const n=Ce(this.uniqueMarkers_,"",e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}StoreObject({object:e,componentId:t,contextElement:n}){var i;if(this.lastStoredObjectKey_=`@!@${pe(18)}@!@`,n){const s=null===(i=this.FindComponentById(t||"")||this.InferComponentFrom(n))||void 0===i?void 0:i.FindElementScope(n);if(s)return s.SetLocal(this.lastStoredObjectKey_,e),this.lastStoredObjectKey_}return this.storedObjects_[this.lastStoredObjectKey_]=e,this.NotifyListeners_("stored-objects",this.storedObjects_),this.lastStoredObjectKey_}RetrieveObject(e){return this.RetrieveObject_(e,!0)}PeekObject(e){return this.RetrieveObject_(e,!1)}GetLastObjectKey(){return this.lastStoredObjectKey_}AddComponentMonitor(e){this.componentsMonitorList_.push(e),this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}RemoveComponentMonitor(e){const t=this.componentsMonitorList_.length;this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e)),t!=this.componentsMonitorList_.length&&this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}CreateComponent(e){const t=this.InferComponentFrom(e);if(t)return t;const n=new BaseComponent(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.forEach((e=>s((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),this.NotifyListeners_("components",this.components_),n}RemoveComponent(e){const t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){const e=this.components_[t];delete this.components_[t],this.componentsMonitorList_.slice(0).forEach((t=>s((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent"))),this.NotifyListeners_("components",this.components_)}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&e in this.components_?this.components_[e]:null}FindComponentByName(e){return e&&Object.values(this.components_).find((t=>t.GetName()===e))||null}FindComponentByRoot(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e))||null}PushCurrentComponent(e){this.currentComponent_.Push(e),this.NotifyListeners_("current-component",this.currentComponent_)}PopCurrentComponent(){const e=this.currentComponent_.IsEmpty(),t=this.currentComponent_.Pop();return!e&&this.NotifyListeners_("current-component",this.currentComponent_),t}PeekCurrentComponent(){return this.currentComponent_.Peek()}GetCurrentComponent(){return this.FindComponentById(this.PeekCurrentComponent()||"")}InferComponentFrom(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e||t.GetRoot().contains(e)))||null}PushScopeContext(e){this.scopeContext_.Push(e),this.NotifyListeners_("scope-context",this.scopeContext_)}PopScopeContext(){const e=this.scopeContext_.IsEmpty(),t=this.scopeContext_.Pop();return!e&&this.NotifyListeners_("scope-context",this.scopeContext_),t}PeekScopeContext(){return this.scopeContext_.Peek()}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e),this.NotifyListeners_("attribute-processors",this.attributeProcessors_)}DispatchAttributeProcessing(e){var{componentId:t,component:n,contextElement:i,proxyAccessHandler:r}=e,o=wt(e,["componentId","component","contextElement","proxyAccessHandler"]);const l=Ye(n||this.FindComponentById(t),r||null);this.attributeProcessors_.forEach((e=>{s((()=>e(Object.assign({componentId:t,component:n,contextElement:i,proxyAccessHandler:r},o))),"InlineJS.Global.DispatchAttribute",i)})),l()}AddTextContentProcessor(e){this.textContentProcessors_.push(e),this.NotifyListeners_("text-content-processors",this.textContentProcessors_)}DispatchTextContentProcessing(e){var{componentId:t,component:n,contextElement:i,proxyAccessHandler:r}=e,o=wt(e,["componentId","component","contextElement","proxyAccessHandler"]);const l=Ye(n||this.FindComponentById(t),r||null);this.textContentProcessors_.forEach((e=>{s((()=>e(Object.assign({componentId:t,component:n,contextElement:i,proxyAccessHandler:r},o))),"InlineJS.Global.DispatchTextContent",i)})),l()}GetMutationObserver(){return this.mutationObserver_}GetResizeObserver(){return this.resizeObserver_}SetFetchConcept(e){this.fetchConcept_=e,this.NotifyListeners_("fetch-concept",this.fetchConcept_)}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t,this.NotifyListeners_("concepts",this.concepts_)}RemoveConcept(e){delete this.concepts_[e],this.NotifyListeners_("concepts",this.concepts_)}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}AddCustomElement(e,t){this.customElements_.hasOwnProperty(e)||(this.customElements_[e]=t,customElements.define(this.config_.GetElementName(e),t),this.NotifyListeners_("custom-elements",this.customElements_))}FindCustomElement(e){return this.customElements_.hasOwnProperty(e)?this.customElements_[e]:null}CreateChildProxy(e,t,n){return new ChildProxy(e,t,n)}CreateFuture(e){return new Future(e)}IsFuture(e){return e instanceof Future}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof Nothing}RetrieveObject_({key:e,componentId:t,contextElement:n},i){if(n){const s=this.FindComponentById(t||"")||this.InferComponentFrom(n);if(s){const t=s.FindElementLocal(n,e,!0);if(t){const n=t.GetLocal(e);return i&&(t.DeleteLocal(e),e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_="")),n}}}if(this.storedObjects_.hasOwnProperty(e)){const t=this.storedObjects_[e];return i&&(e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_=""),delete this.storedObjects_[e],this.NotifyListeners_("stored-objects",this.storedObjects_)),t}return this.CreateNothing()}}function Ft(e,t=0){const n=new BaseGlobal(e,t);return k(),p("global",{base:n}),window.dispatchEvent(new CustomEvent(x)),n}function jt(e,t=0){return P()||Ft(e,t)}var Lt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};const Dt=/\{\{\s*(.+?)\s*\}\}/g,Tt=/\{\{.+?\}\}/;function Mt(e){const t=e=>[...e.childNodes].reduce(((e,t)=>`${e}${3!=t.nodeType?n(t):t.textContent||""}`),""),n=e=>`${[...e.attributes].reduce(((e,t)=>`${e} ${t.name}="${t.value}"`),`<${e.tagName.toLowerCase()}`)+">"}${t(e)}</${e.tagName.toLowerCase()}>`;return t(e)}function Ht({componentId:e,contextElement:t,text:n,handler:i,testRegex:s,matchRegex:r,storeObject:o}){var l;let a=null,c=null;if(o){const o=n.trim();let l=(o.match(s||Tt)||[])[0];l&&l===o&&(l=l.replace(r||Dt,"$1").trim(),a=l?Ue({componentId:e,contextElement:t,expression:`return (${l});`,voidOnly:!0}):e=>e&&e(""),c=n=>i(J(n,e,t)))}a||(n=JSON.stringify(n).replace(r||Dt,'"+($1)+"').replace(/"\+\(\s*\)\+"/g,""),a=Ue({componentId:e,contextElement:t,expression:`const output = ${n}; return output;`})),null===(l=R(e))||void 0===l||l.CreateElementScope(t),Xe({componentId:e,contextElement:t,callback:()=>a(c||i)})}function $t(e){var{text:t,testRegex:n,matchRegex:i}=e,s=Lt(e,["text","testRegex","matchRegex"]);(n||i||Tt).test(t)&&Ht(Object.assign({text:t,testRegex:n,matchRegex:i},s))}function Bt({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:o}){if("string"==typeof n)return i&&$t({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:o});if(!(r||o||Tt).test(t.textContent||""))return;const l=new Array,a=new Array;let c=!1,u=()=>{c||(c=!0,queueMicrotask((()=>{c=!1,s((()=>(()=>{for(;t.firstChild;)t.firstChild.remove();let e=null;l.forEach((n=>{const i=n instanceof Element?n:document.createTextNode("string"==typeof n?n:n.evaluated);e?t.insertBefore(i,e):t.append(i),e=i}))})()),"InlineJS.Interpolate",t)})))};[...t.childNodes].forEach((n=>{if(3==n.nodeType&&n.textContent&&Tt.test(n.textContent)){const i={text:n.textContent||"",evaluated:n.textContent||""};l.push(i),a.push((()=>Ht({componentId:e,contextElement:t,text:i.text,handler:e=>{i.evaluated=e,u()},testRegex:r,matchRegex:o})))}else 3==n.nodeType?l.push(n.textContent||""):l.push(n)})),l.reverse(),a.forEach((e=>s(e,"InlineJS.Interpolate",t)))}function Jt({componentId:e,contextElement:t,name:n,value:i}){$t({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e),storeObject:!0})}function Wt({componentId:e,contextElement:t}){Bt({componentId:e,contextElement:t})}function zt(e){const t=e&&F(e);if(t)return void dt({component:t,element:e});const n=P(),i=n.GetConfig();[i.GetDirectiveName("data",!0),i.GetDirectiveName("data",!1)].forEach((t=>{(e||document).querySelectorAll(`[${t}]`).forEach((e=>{e.hasAttribute(t)&&document.contains(e)&&dt({component:n.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}))}function qt(e){jt();const t=h();t.hasOwnProperty("disableAutoBootstrap")&&t.disableAutoBootstrap||setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{zt(e)})):zt(e)}),0)}function Ut(e,t){let n="",i=null;if("function"==typeof e){const t=e();t?({name:n,callback:i}=t):(n=e("name"),i=e("callback"))}else u(e)?({name:n,callback:i}=e):P().GetDirectiveManager().AddHandler(e);n&&i&&(t?P().GetDirectiveManager().AddHandlerExtension(t,i,n):P().GetDirectiveManager().AddHandler(i,n))}function Kt(e,t){return{name:e,callback:t}}function Vt(e,t,n,i,s){const r=P().GetConfig().GetDirectiveName("on"),o=(s||[]).join("."),l=ot(o?`${r}:${n}.${o}`:`${r}:${n}`,i||"");return!!l&&ct(e,t,l)}const Yt=["bind","event","on"];function Zt({component:e,contextElement:t,key:n,event:i,expression:s,options:r,defaultEvent:o,eventWhitelist:l=[],optionBlacklist:a}){const c=()=>a?null==r?void 0:r.filter((e=>!a.includes(e))):r,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?Vt(e,t,u(i),s,c()):!(!o||i!==o&&!Yt.includes(i))&&Vt(e,t,u(o),s,c())}function Qt(e,t,n){const i=P().GetConfig().GetDirectiveName(t,!1),s=P().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(s)||n&&e.getAttribute(n)||null}function Xt({componentId:e,contextElement:t,key:n,expression:i,callback:s,arrayCallback:r,useEffect:o=!0}){let l=0,a=Ue({componentId:e,contextElement:t,expression:i}),c=(e,t)=>{Ke(e,(e=>{t==l&&(n?s([n,e]):u(e)?Object.entries(e).forEach(s):r&&("string"==typeof e||Array.isArray(e))&&r("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};o?Xe({componentId:e,contextElement:t,callback:()=>a((e=>c(e,++l)))}):a((e=>c(e,l)))}const en=Array.from(Array(100).keys()).map((e=>e/100));function tn(e){const t={root:null,rootMargin:"0px",threshold:0};return u(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=en),t}class IntersectionObserver{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;const n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{s((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),tn(t))}GetId(){return this.id_}GetNative(){return this.observer_}Observe(e,t){var n;this.handlers_.push({target:e,handler:t}),null===(n=this.observer_)||void 0===n||n.observe(e)}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}}function nn(e,t=0){return e&&e.match(/^[0-9]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseInt(e):parseInt(e):t}function sn({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:s}){const r=Array.isArray(e)?e:[e],o=e=>("number"==typeof n?n:n&&n(e))||0;return t.forEach(((n,l)=>{const a=r.find((e=>e&&n in e));if(!a)return s&&s({options:e,list:t,option:n,index:l});i&&!0===i({options:e,list:t,option:n,index:l})||("number"==typeof a[n]?l<t.length-1?a[n]=nn(t[l+1].trim(),o(n)):a[n]=o(n):"boolean"==typeof a[n]&&(a[n]=!0))})),e}function rn({componentId:e,component:t,contextElement:n,expression:i,argOptions:r,callback:o,options:l,defaultOptionValue:a,useEffect:c}){let u=Ue({componentId:e,contextElement:n,expression:i}),d=sn({options:l||{lazy:!1,ancestor:-1,threshold:-1},list:r,defaultNumber:0===a?0:a||-1}),h=()=>u((e=>Me(e,o))),p=()=>!1===c?h():Xe({componentId:e,contextElement:n,callback:h});if(d.lazy){const i=t||R(e),r={root:d.ancestor<0?null:null==i?void 0:i.FindAncestor(n,d.ancestor),threshold:d.threshold<0?0:d.threshold},o=i?new IntersectionObserver(i.GenerateUniqueId("intob_"),r):null;if(o){const t=null==i?void 0:i.GetProxyAccessHandler();null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:n,entry:i}={})=>{var r;if(null==i?void 0:i.isIntersecting){const i=Ye(e,t||null);null===(r=R(e))||void 0===r||r.RemoveIntersectionObserver(n),s(p),i()}}))}else p()}else p()}function on(e){let t,n="",i=null;if("function"==typeof e){const s=e();s?({name:n,callback:i,onAccess:t}=s):(n=e("name"),i=e("callback"),t=e("access"))}else u(e)?({name:n,callback:i,onAccess:t}=e):P().GetMagicManager().AddHandler(e);n&&i&&P().GetMagicManager().AddHandler(i,n,t)}function ln(e,t,n){return{name:e,callback:t,onAccess:n}}function an(e){return e.startsWith(":")?P().GetConfig().GetDirectiveName("bind")+e:null}function cn(e){return e.startsWith(".")?e.replace(".",P().GetConfig().GetDirectiveName("class:")):null}function un(e){return e.startsWith("@")?e.replace("@",P().GetConfig().GetDirectiveName("on:")):null}function dn(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}function hn(e=!0){e&&qt(),P().AddAttributeProcessor(Jt),P().AddTextContentProcessor(Wt)}function pn(){p("global",{bootstrap:zt,waitForGlobal:I,get:P,create:Ft,getElementContent:Mt,replaceText:Ht,interpolateText:$t,interpolate:Bt})}function mn(){p("utilities",{beginsWith:r,endsWith:z,toCamelCase:v,toSnakeCase:_e,insertHtml:Nt,findAncestor:q,getAttribute:Q,findFirstAttribute:X,findFirstAttributeValue:ee,setAttribute:me,isBooleanAttribute:te,supportsAttributes:M,getTarget:l,getTargets:a,isEqual:ne,isObject:u,toString:H,deepCopy:B,mergeObjects:ae,tidyPath:ce,pathToRelative:ue,splitPath:de,joinPath:he,getRandomString:pe,measureCallback:le,encodeAttribute:W,decodeAttribute:$,encodeValue:J,decodeValue:T,isTemplate:fe,isInsideTemplate:be})}function _n(){p("values",{future:Future,loop:Loop,nothing:Nothing,stack:Stack})}function fn(){p("version",{major:1,minor:2,patch:1,get value(){return`${this.major}.${this.minor}.${this.patch}`},toString(){return this.value}})}function bn(){hn(),pn(),mn(),_n(),fn()}},409:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDetailElementCompact=t.StripeDetailElement=void 0;const s=n(16),r=n(979);class StripeDetailElement extends r.StripeGenericField{constructor(){super(),this.input=null,this.name="",this.value=""}ToggleFocus(e){const t=this.GetInput_();t&&(e?t.focus():t.blur())}Reset(){const e=this.GetInput_();e&&(e.value="")}AddDetails(e){const t=this.GetInput_();this.name&&((null==t?void 0:t.value)||this.value)&&(e.billingDetails=e.billingDetails||{},"address"===this.name?(e.billingDetails.address=e.billingDetails.address||{},e.billingDetails.address.line1=(null==t?void 0:t.value)||this.value):e.billingDetails[this.name]=(null==t?void 0:t.value)||this.value)}GetInput_(){return this.input||this.querySelector("input")}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripeDetailElement.prototype,"input",void 0),i([(0,s.Property)({type:"string"})],StripeDetailElement.prototype,"name",void 0),i([(0,s.Property)({type:"string"})],StripeDetailElement.prototype,"value",void 0),t.StripeDetailElement=StripeDetailElement,t.StripeDetailElementCompact=function(){(0,s.RegisterCustomElement)(StripeDetailElement,"stripe-detail")}},538:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeFieldElementCompact=t.StripeFieldElement=void 0;const r=n(988),o=n(16),l=n(979);class StripeFieldElement extends l.StripeGenericField{constructor(){super(),this.stripeField_=null,this.isReady_=!1,this.isComplete_=!1,this.lastError_=null,this.readyWaiters_=new Array,this.changeListeners=new Array,this.options=null,this.type="",this.onready="",this.oncomplete="",this.onerrors=""}IsInteractive(){return!0}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}AddChangeListener(e){this.changeListeners.push(e)}RemoveChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)}ToggleFocus(e){var t,n;this.stripeField_&&(e?null===(t=this.stripeField_)||void 0===t||t.focus():null===(n=this.stripeField_)||void 0===n||n.blur())}Reset(){var e;this.stripeField_&&(null===(e=this.stripeField_)||void 0===e||e.clear())}AddDetails(e){this.stripeField_&&("card"===this.type||"number"===this.type||"cardNumber"===this.type)&&(e.method=this.stripeField_)}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.WaitInstance().then((e=>{var t;if(!(null==e?void 0:e.stripe))return;let n="";["number","expiry","cvc"].includes(this.type)?n=`card${this.type.substring(0,1).toUpperCase()}${this.type.substring(1)}`:["card","cardNumber","cardExpiry","cardCvc","postalCode","paymentRequestButton","iban","idealBank"].includes(this.type)&&(n=this.type),n&&e.elements&&(this.stripeField_=e.elements.create(n,this.options||(null===(t=this.GetStripe_())||void 0===t?void 0:t.options)||void 0),this.stripeField_.on("ready",(()=>{this.isReady_=!0,this.onready&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))})),this.stripeField_.on("change",(e=>{((null==e?void 0:e.error)||null)!==this.lastError_&&(this.lastError_=(null==e?void 0:e.error)||null,(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onerrors,disableFunctionCall:!1})(void 0,[this.lastError_],{error:this.lastError_}),this.changeListeners.forEach((e=>(0,r.JournalTry)((()=>e("error",this.lastError_)))))),((null==e?void 0:e.complete)||!1)!=this.isComplete_&&(this.isComplete_=(null==e?void 0:e.complete)||!1,(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncomplete,disableFunctionCall:!1})(void 0,[this.isComplete_],{complete:this.isComplete_}),this.changeListeners.forEach((e=>(0,r.JournalTry)((()=>e("complete",this.isComplete_))))))})),this.stripeField_.mount(this))}))})),n.AddUninitCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.RemoveStripeField(this),this.stripeField_=null}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeFieldElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"type",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"onready",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncomplete",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"onerrors",void 0),t.StripeFieldElement=StripeFieldElement,t.StripeFieldElementCompact=function(){(0,o.RegisterCustomElement)(StripeFieldElement,"stripe-field")}},979:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeGenericField=void 0;const r=n(988),o=n(16);class StripeGenericField extends o.CustomElement{constructor(){super(...arguments),this.stripe=null}IsInteractive(){return!1}WaitReady(){return Promise.resolve()}AddChangeListener(e){}RemoveChangeListener(e){}ToggleFocus(e){}Reset(){}AddDetails(e){}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),(()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.AddStripeField(this),t&&t()}))}GetStripe_(){return this.stripe||(0,r.FindAncestor)(this,(e=>"AddStripeField"in e))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeGenericField.prototype,"stripe",void 0),t.StripeGenericField=StripeGenericField},380:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripePaymentMenthodElementCompact=t.StripePaymentMenthodElement=void 0;const s=n(16),r=n(979);class StripePaymentMenthodElement extends r.StripeGenericField{constructor(){super({isTemplate:!0,isHidden:!0}),this.value=""}AddDetails(e){this.value&&(e.method=this.value)}}i([(0,s.Property)({type:"object",checkStoredObject:!0})],StripePaymentMenthodElement.prototype,"value",void 0),t.StripePaymentMenthodElement=StripePaymentMenthodElement,t.StripePaymentMenthodElementCompact=function(){(0,s.RegisterCustomElement)(StripePaymentMenthodElement,"stripe-payment-method")}},645:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeElementCompact=t.StripeElement=void 0;const r=n(988),o=n(16);class StripeElement extends o.CustomElement{constructor(){super(),this.stripe_=null,this.elements_=null,this.mounting_=!1,this.mounted_=!1,this.isReady_=!1,this.readyWaiters_=new Array,this.fields_=null,this.readyFields_=null,this.instanceWaiters_=new Array,this.interactiveFields_=null,this.completeFields_=null,this.errorFields_=null,this.options=null,this.publicKey="",this.onready="",this.oncomplete="",this.onerrors="",this.defer=!1,this.focusnext=!1}AddStripeField(e){this.fields_=this.fields_||[],this.fields_.push(e),e.WaitReady().then((()=>{this.readyFields_=this.readyFields_||[],this.readyFields_.push(e),e.IsInteractive()&&(this.interactiveFields_=this.interactiveFields_||[],this.interactiveFields_.push(e)),this.fields_&&this.readyFields_&&this.fields_.length<=this.readyFields_.length&&(0,r.JournalTry)((()=>{this.isReady_=!0,this.onready&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))}))})),e.AddChangeListener(((t,n)=>{if("complete"===t){let t=!1;this.completeFields_=this.completeFields_||[],n&&!this.completeFields_.includes(e)?(this.completeFields_.push(e),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length)):!n&&this.completeFields_.includes(e)&&(this.completeFields_=this.completeFields_.filter((t=>t!==e)),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length-1)),t&&this.oncomplete&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncomplete,disableFunctionCall:!1})(void 0,[!!n],{complete:!!n}),n&&this.focusnext&&this.FocusNextField(e)}else if("error"===t){let t=!1;this.errorFields_=this.errorFields_||[],this.errorFields_.push(e),this.errorFields_=this.errorFields_||[],n&&!this.errorFields_.includes(e)?(this.errorFields_.push(e),t=1==this.errorFields_.length):!n&&this.errorFields_.includes(e)&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)),t=0==this.errorFields_.length),t&&this.onerrors&&(0,r.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.onerrors,disableFunctionCall:!1})(void 0,[n],{error:n})}}))}RemoveStripeField(e){this.fields_&&(this.fields_=this.fields_.filter((t=>t!==e))),this.readyFields_&&(this.readyFields_=this.readyFields_.filter((t=>t!==e))),this.interactiveFields_&&(this.interactiveFields_=this.interactiveFields_.filter((t=>t!==e))),this.completeFields_&&(this.completeFields_=this.completeFields_.filter((t=>t!==e))),this.errorFields_&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)))}FocusNextField(e){if(this.fields_){const t=this.fields_.indexOf(e);t>=0&&t<this.fields_.length-1&&this.fields_[t+1].ToggleFocus(!0)}}GetDetails(){return{stripe:this.stripe_,elements:this.elements_}}GetInstance(){return this.stripe_}WaitInstance(){return new Promise((e=>{this.mounted_?e(this.GetDetails()):this.instanceWaiters_.push((()=>e(this.GetDetails())))}))}Mount(){this.mounted_||this.mounting_||(this.mounting_=!0,this.LoadResources().then((()=>{this.mounting_=!1,this.mounted_=!0,this.stripe_=Stripe(this.publicKey),this.elements_=this.stripe_.elements(),this.instanceWaiters_.splice(0).forEach((e=>(0,r.JournalTry)(e)))})))}Pay(e,t=!1){return this.PayOrSetup_(!0,e,t)}Setup(e){return this.PayOrSetup_(!1,e)}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=s(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>!this.defer&&this.Mount())),n.AddUninitCallback((()=>this.stripe_=null))}PayOrSetup_(e,t,n=!1){return new Promise(((i,s)=>{this.WaitInstance().then((r=>{var o,l;if(!(null==r?void 0:r.stripe))return i(!1);const a={};if(null===(o=this.fields_)||void 0===o||o.forEach((e=>e.AddDetails(a))),!a.method)return i(!1);let c;c="string"!=typeof a.method?{payment_method:{card:a.method,billing_details:a.billingDetails}}:{payment_method:a.method},e?((null===(l=a.billingDetails)||void 0===l?void 0:l.email)&&(c.receipt_email=a.billingDetails.email),n&&(c.setup_future_usage="off_session"),r.stripe.confirmCardPayment(t,c).then(i).catch(s)):r.stripe.confirmCardSetup(t,c).then(i).catch(s)})).catch(s)}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"publicKey",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"onready",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncomplete",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"onerrors",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"defer",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"focusnext",void 0),t.StripeElement=StripeElement,t.StripeElementCompact=function(){(0,o.RegisterCustomElement)(StripeElement,"stripe")}},419:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineJSStripe=void 0;const i=n(988),s=n(645),r=n(538),o=n(409),l=n(380);t.InlineJSStripe=function(){(0,i.WaitForGlobal)().then((()=>{(0,s.StripeElementCompact)(),(0,r.StripeFieldElementCompact)(),(0,o.StripeDetailElementCompact)(),(0,l.StripePaymentMenthodElementCompact)()}))}}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(0,n(419).InlineJSStripe)()})();
|
1
|
+
/*! For license information please see inlinejs-stripe.min.js.LICENSE.txt */
|
2
|
+
(()=>{"use strict";var e={543:(e,t,n)=>{n.r(t),n.d(t,{CustomElement:()=>CustomElement,GetGlobalPropertyScope:()=>o,GetProperties:()=>l,GetPropertyScope:()=>a,InlineJSElement:()=>y,NativeElement:()=>NativeElement,NativeElementCompact:()=>h,Property:()=>c,Register:()=>_,RegisterCustomElement:()=>r,ResourceElement:()=>ResourceElement,ResourceElementCompact:()=>p,ResourceTargetElement:()=>ResourceTargetElement,ResourceTargetElementCompact:()=>f});var i=n(867);function r(e,t){let n=(0,i.ToSnakeCase)(t||e.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,e)}const s=(0,i.RandomString)();function o(){return s}function l(){return(0,i.GetGlobalScope)(`customProperties.${s}`)}function a(e,t){return t||("constructor"in e?t=e.constructor.name:("function"==typeof e||"object"==typeof e&&"name"in e)&&(t=e.name)),t||""}function c(e){return function(t,n,r){let s="",o=null;const c=e&&"initial"in e?e.initial:t[n];(void 0!==c||!r&&(null==e?void 0:e.update))&&(o="boolean"===(null==e?void 0:e.type)?(e,t)=>{e&&"false"!==e?t.setAttribute(s,s):t.hasAttribute(s)&&t.removeAttribute(s)}:(e,t)=>{t.setAttribute(s,e)});let u=null,h={name:"",type:(null==e?void 0:e.type)||"string",spread:(null==e?void 0:e.spread)||"",update:(null==e?void 0:e.update)||!1,initial:c,checkStoredObject:(null==e?void 0:e.checkStoredObject)||!1,delimiter:(null==e?void 0:e.delimiter)||",",handler:null,setInitial:o};if(r){if("function"==typeof r.value&&!r.get&&!r.set&&((null==e?void 0:e.name)||/^Update.+Property/.test(r.value.name))){const t=r.value;s=(0,i.ToSnakeCase)((null==e?void 0:e.name)||r.value.name.replace(/^Update(.+)Property/,"$1")),u=(e,n)=>t.call(n,e)}}else s=(0,i.ToSnakeCase)((null==e?void 0:e.name)||n),u=(e,t)=>t[n]=e;if(s&&u){h.name=s,h.handler=u;const e=a(t);let n=l();n[e]=n[e]||new Array,n[e].push(h)}}}var u=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class CustomElement extends HTMLElement{constructor(e={}){super(),this.options_=e,this.componentId_="",this.storedProxyAccessHandler_=null,this.resources_=new Array,this.loadedResources_=null,this.loadingResources_=!1,this.queuedResourceHandlers_=new Array,this.nativeElement_=null,this.nativeElements_=new Array,this.nativeAttributesBlacklist_=new Array,this.nativeAttributesWhitelist_=new Array,this.propertyScopes_=new Array,this.instanceProperties_=new Array,this.instancePropertyNames_=new Array,this.attributeChangeHandlers_={},this.spreads_={},this.storedObjects_={},this.booleanAttributes_=new Array,this.nonBooleanAttributes_=new Array,(this.options_.isTemplate||this.options_.isHidden)&&(this.style.display="none");const t=globalThis.InlineJS;if(!(this.options_.disableImplicitData||(0,i.IsObject)(t)&&t.disableImplicitData)){const e=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!1),t=(0,i.GetGlobal)().GetConfig().GetDirectiveName("data",!0);let n=null;for(let i=this;i;i=i.parentNode)if(i instanceof Element&&(i.hasAttribute(e)||i.hasAttribute(t))){n=i;break}!n&&this.setAttribute(e,"")}}UpdateComponentProperty(e){var t;const n=(0,i.FindComponentById)(this.componentId_);n&&(e=(e||"").trim(),null===(t=n.FindScopeByRoot(this))||void 0===t||t.SetName(e),n.GetRoot()===this&&n.SetName(e))}AddResource(e){this.resources_.push(e)}RemoveResource(e){this.resources_=this.resources_.filter((t=>t!==e))}LoadResources(){return this.loadingResources_?new Promise(((e,t)=>{this.queuedResourceHandlers_.push((()=>{this.loadedResources_?e(this.loadedResources_):t()}))})):this.loadedResources_?Promise.resolve(this.loadedResources_):(this.loadingResources_=!0,new Promise(((e,t)=>{const n=new Array,r=new Array,s=t=>{this.loadingResources_=!1,this.loadedResources_=t,this.queuedResourceHandlers_.forEach((e=>e())),this.queuedResourceHandlers_=[],e(t)};if(this.resources_.forEach((e=>{"string"==typeof e?r.push(e):"LoadTargetResources"in e?n.push(e.LoadTargetResources()):"GetResource"in e?r.push(e.GetResource()):r.push(e)})),r.length>0){const e=(0,i.GetGlobal)().GetConcept("resource");if(e){const t=e.Get({items:r,attributes:this.GetResourceLoadAttributes_(),concurrent:this.IsConcurrentResourceLoad_()});n.push(t)}}0==n.length?s([]):Promise.all(n).then(s).catch(t)})))}AddNativeElement(e){this.nativeElements_.push(e),this.CopyNativeElements_(e)}RemoveNativeElement(e){this.nativeElements_=this.nativeElements_.filter((t=>t!==e))}AddBooleanAttribute(e){Array.isArray(e)?this.booleanAttributes_.push(...e):this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=Array.isArray(e)?this.booleanAttributes_.filter((t=>!e.includes(t))):this.booleanAttributes_.filter((t=>t!==e))}AddNonBooleanAttribute(e){Array.isArray(e)?this.nonBooleanAttributes_.push(...e):this.nonBooleanAttributes_.push(e)}RemoveNonBooleanAttribute(e){this.nonBooleanAttributes_=Array.isArray(e)?this.nonBooleanAttributes_.filter((t=>!e.includes(t))):this.nonBooleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return!this.nonBooleanAttributes_.includes(e)&&(!!this.booleanAttributes_.includes(e)||null)}IsTemplate(){return this.options_.isTemplate}OnElementScopeCreated(e){this.HandleElementScopeCreated_(e)}EvaluateExpression(e,t){return this.EvaluateWithStoredProxyAccessHandler((0,i.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:e,disableFunctionCall:null==t?void 0:t.disableFunctionCall,waitPromise:null==t?void 0:t.waitPromise,voidOnly:null==t?void 0:t.voidOnly}),null==t?void 0:t.callback,null==t?void 0:t.params,null==t?void 0:t.contexts)}EvaluateWithStoredProxyAccessHandler(e,t,n,i){if(!this.storedProxyAccessHandler_)return e(t,n,i);let r;return this.storedProxyAccessHandler_((()=>r=e(t,n,i))),r}AddPropertyScope_(e){this.propertyScopes_.push(a(CustomElement,e))}FindProperty_(e){return this.instanceProperties_.find((t=>t.name===e))}GetAllProperties_(){let e=new Array,t=l();for(let n of this.propertyScopes_)t.hasOwnProperty(n)&&e.push(...Object.values(t[n]));return e}HandleElementScopeCreated_({scope:e,componentId:t},n){this.componentId_=t,this.propertyScopes_=this.ComputePropertyScopes_(),this.storedProxyAccessHandler_=(0,i.StoreProxyHandler)(t),(this.instanceProperties_=this.GetAllProperties_()).forEach((e=>{"boolean"===e.type&&this.booleanAttributes_.push(e.name);const t=e.spread&&(0,i.ToSnakeCase)(e.spread);t&&this.spreads_.hasOwnProperty(t)?this.spreads_[t].push(e.name):t&&(this.spreads_[t]=[e.name])})),this.instancePropertyNames_=this.instanceProperties_.map((e=>e.name)),e.AddPostAttributesProcessCallback((()=>{this.instanceProperties_.forEach((e=>{void 0!==e.initial&&e.setInitial&&!this.hasAttribute(e.name)&&e.setInitial(this.EncodeValue_(e.initial,e.type),this)})),this.InitializeStateFromAttributes_(),n&&n()})),e.AddPostProcessCallback((()=>this.ShouldLoadResources_()&&this.LoadResources())),e.AddAttributeChangeCallback((e=>e&&this.AttributeChanged_(e))),e.AddUninitCallback((()=>{this.nativeElement_=null,this.storedProxyAccessHandler_=null}))}InitializeStateFromAttributes_(e){let t=Array.from(this.attributes);e&&(t=t.filter((({name:t})=>e.includes(t)))),t.forEach((({name:e})=>this.AttributeChanged_(e)))}EncodeValue_(e,t){return"boolean"===t?e?"true":"false":"json"===t?JSON.stringify(e):"array"===t?(e||[]).join(","):t.startsWith("array:")?(e||[]).map((e=>this.EncodeValue_(e,t.substring(6)))).join(","):"date"===t?(e||new Date).toString():(0,i.ToString)(e)}DecodeValue_(e,t,n){if("string"===t)return e||"";if("boolean"===t)return null!=e&&"0"!==e&&"false"!==e;if("number"===t)return null===e?NaN:parseFloat(e||"0")||0;if("json"===t){try{return JSON.parse(e||"")}catch(e){}return null}return"array"===t?(e||"").split(n||",").map((e=>e.trim()))||[]:t.startsWith("array:")?(e||"").split(n||",").map((e=>this.DecodeValue_(e,t.substring(6),n)))||[]:"date"===t?new Date(e||""):e}SpreadValue_(e,t){let n=e.split(" ");t.forEach(((e,t)=>{if(t>=n.length){let i=t%4-2;this.DispatchAttributeChange_(e,i<0||i>=n.length?n[0]:n[i])}else this.DispatchAttributeChange_(e,n[t])}))}DispatchAttributeChange_(e,t){let n=!1;this.spreads_.hasOwnProperty(e)&&(this.SpreadValue_(t||"",this.spreads_[e]),n=!0);const r=this.FindProperty_(e),s=this.storedObjects_.hasOwnProperty(e)&&this.storedObjects_[e];if(r){let o=null;if(r.checkStoredObject&&t){if(t===s)return;const n=(0,i.RetrieveStoredObject)({key:t,componentId:this.componentId_,contextElement:this});n!==t&&(this.storedObjects_[e]=t,o=e=>(0,i.JournalTry)((()=>e(n,this))))}o?o(r.handler):(0,i.JournalTry)((()=>r.handler(this.DecodeValue_(t,r.type||"string",r.delimiter),this))),n=!0}return n}AttributeChanged_(e){let t="";if(this.nativeElement_&&(e.startsWith("data-native-")?t=e.substring(12):e.startsWith("native-")?t=e.substring(7):e.startsWith("-")&&(t=e.substring(1))),t)this.hasAttribute(e)?this.nativeElement_.setAttribute(t,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(t)&&this.nativeElement_.removeAttribute(t);else{this.DispatchAttributeChange_(e,this.getAttribute(e))||!this.nativeAttributesWhitelist_.includes(e)&&this.nativeAttributesBlacklist_.includes(e)||!this.nativeElement_||e.startsWith("data-")||CustomElement.GlobalAttributes.includes(e)||(this.hasAttribute(e)?this.nativeElement_.setAttribute(e,this.getAttribute(e)||""):this.nativeElement_.hasAttribute(e)&&this.nativeElement_.removeAttribute(e))}}ComputePropertyScopes_(){let e=new Array;for(let t=Object.getPrototypeOf(this);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t))e.push(t.constructor.name);return e}SetNativeElement_(e){e!==this.nativeElement_&&(this.nativeElement_=e,this.CopyNativeElements_())}CopyNativeElements_(e){this.nativeElement_&&0!=this.nativeElements_.length&&((e?[e]:this.nativeElements_).forEach((e=>{e.GetAttributes().forEach((({name:e,value:t})=>this.nativeElement_.setAttribute(e,t)));for(let t=e.firstChild;t;t=e.firstChild)t.remove(),this.nativeElement_.appendChild(t)})),(0,i.ProcessDirectives)({component:this.componentId_,element:this.nativeElement_}))}GetResourceLoadAttributes_(){}IsConcurrentResourceLoad_(){return!0}ShouldLoadResources_(){return!0}}CustomElement.GlobalAttributes=["id","class","style","title","lang","dir","tabindex","accesskey","hidden","draggable","spellcheck","translate","contenteditable"],u([c({type:"string"})],CustomElement.prototype,"UpdateComponentProperty",null);class NativeElement extends CustomElement{constructor(){super(),this.attributes_=new Array,Array.from(this.attributes).forEach((({name:e,value:t})=>{this.attributes_.push({name:e,value:t}),this.removeAttribute(e)})),this.options_.isTemplate=!0,this.options_.isHidden=!0,this.style.display="none"}GetAttributes(){return this.attributes_}HandleElementScopeCreated_(e,t){var n;null===(n=(0,i.FindAncestor)(this,(e=>"AddNativeElement"in e)))||void 0===n||n.AddNativeElement(this),super.HandleElementScopeCreated_(e,t)}}function h(){r(NativeElement)}var d=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class ResourceElement extends CustomElement{constructor(){super({isTemplate:!0,isHidden:!0}),this.src="",this.type=""}GetResource(){return"link"===this.type||"script"===this.type||"data"===this.type?{type:this.type,path:this.src}:this.src}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}ShouldLoadResources_(){return!1}}function p(){r(ResourceElement,"resource")}d([c({type:"string"})],ResourceElement.prototype,"src",void 0),d([c({type:"string"})],ResourceElement.prototype,"type",void 0);var m=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};class ResourceTargetElement extends CustomElement{constructor(){super({isHidden:!0}),this.attributes_=null,this.sequential=!1,this.defer=!1,this.onloaded="",this.onloadederror=""}UpdateAttributesProperty(e){this.attributes_=e}LoadResources(){const e=this.loadedResources_;return new Promise(((t,n)=>{super.LoadResources().then((n=>{!e&&this.onloaded&&(0,i.JournalTry)((()=>this.EvaluateExpression(this.onloaded,{disableFunctionCall:!1,contexts:{data:n}}))),t(n)})).catch((e=>{this.onloadederror&&(0,i.JournalTry)((()=>this.EvaluateExpression(this.onloadederror,{disableFunctionCall:!1,contexts:{reason:e}}))),n(e)}))}))}LoadTargetResources(){return this.LoadResources()}HandleElementScopeCreated_(e,t){super.HandleElementScopeCreated_(e,(()=>{var e;null===(e=(0,i.FindAncestor)(this,(e=>"AddResource"in e)))||void 0===e||e.AddResource(this),t&&t()}))}GetResourceLoadAttributes_(){return this.attributes_||void 0}IsConcurrentResourceLoad_(){return!this.sequential}ShouldLoadResources_(){return!this.defer}}function f(){r(ResourceTargetElement,"resource-target")}function _(e){return function(t){let n=(0,i.ToSnakeCase)(e||t.name);n=n&&(0,i.GetGlobal)().GetConfig().GetElementName(n),n&&!customElements.get(n)&&customElements.define(n,t)}}function y(){(0,i.WaitForGlobal)().then((()=>{h(),p(),f()}))}m([c({type:"object",checkStoredObject:!0})],ResourceTargetElement.prototype,"UpdateAttributesProperty",null),m([c({type:"boolean"})],ResourceTargetElement.prototype,"sequential",void 0),m([c({type:"boolean"})],ResourceTargetElement.prototype,"defer",void 0),m([c({type:"string"})],ResourceTargetElement.prototype,"onloaded",void 0),m([c({type:"string"})],ResourceTargetElement.prototype,"onloadederror",void 0)},867:(e,t,n)=>{n.r(t),n.d(t,{AddChanges:()=>Ie,AddDirectiveExpansionRule:()=>lt,AddDirectiveHandler:()=>ii,AddMagicHandler:()=>fi,AddOutsideEventExcept:()=>At,AddOutsideEventListener:()=>St,ApplyDirectiveExpansionRules:()=>ct,AreObjects:()=>u,AttributeInterpolator:()=>Qn,AutoBootstrap:()=>ni,BaseComponent:()=>BaseComponent,BaseGlobal:()=>BaseGlobal,BeginsWith:()=>h,BindDirectiveExpansionRule:()=>yi,BindEvent:()=>li,BootstrapAndAttach:()=>ti,BuildGetterProxyOptions:()=>Me,BuildIntersectionOptions:()=>hi,BuildProxyOptions:()=>Le,CallIfFunction:()=>Ye,Changes:()=>Changes,ChildProxy:()=>ChildProxy,ClassDirectiveExpansionRule:()=>bi,ComponentCacheKey:()=>O,Config:()=>Config,ConsiderRange:()=>be,Context:()=>Context,ContextKeys:()=>E,CreateAnimationLoop:()=>ce,CreateChildProxy:()=>Re,CreateDirective:()=>ht,CreateDirectiveExpansionRule:()=>ot,CreateDirectiveHandlerCallback:()=>ri,CreateGlobal:()=>Jn,CreateInplaceProxy:()=>we,CreateLoop:()=>ae,CreateMagicHandlerCallback:()=>_i,CreateReadonlyProxy:()=>Fe,DecodeAttribute:()=>W,DecodeValue:()=>B,DeepCopy:()=>z,DefaultTransitionDelay:()=>Gt,DefaultTransitionDuration:()=>Tt,DefaultTransitionInitialDelay:()=>wt,DefaultTransitionRepeats:()=>Ft,DeleteProxyProp:()=>Oe,DirectiveManager:()=>DirectiveManager,DisableProxyAction:()=>De,DispatchDirective:()=>mt,ElementScope:()=>ElementScope,ElementScopeKey:()=>S,EncodeAttribute:()=>q,EncodeValue:()=>J,EndsWith:()=>K,EvaluateLater:()=>Ze,EvaluateMagicProperty:()=>ke,ExtractDuration:()=>di,FindAncestor:()=>V,FindAncestorByAttribute:()=>X,FindAncestorByAttributeValue:()=>Z,FindAncestorByClass:()=>Y,FindAncestorByTagName:()=>Q,FindCacheValue:()=>y,FindComponentByCallback:()=>D,FindComponentById:()=>G,FindComponentByName:()=>w,FindComponentByRoot:()=>F,FindFirstAttribute:()=>ne,FindFirstAttributeValue:()=>ie,FlattenDirective:()=>pt,ForwardEvent:()=>si,Future:()=>Future,GenerateFunctionFromString:()=>Xe,GenerateUniqueId:()=>Pe,GenerateValueReturningFunction:()=>Ke,GenerateVoidFunction:()=>Ve,GenericProxy:()=>GenericProxy,GetAttribute:()=>te,GetCache:()=>f,GetConfig:()=>st,GetDefaultCacheValue:()=>R,GetDefaultUniqueMarkers:()=>Ce,GetDirectiveValue:()=>ai,GetElementScopeId:()=>A,GetElementScopeIdWithElement:()=>C,GetGlobal:()=>I,GetGlobalScope:()=>d,GetLocal:()=>Ot,GetOrCreateGlobal:()=>qn,GetProxyProp:()=>Ne,GetTarget:()=>o,GetTargets:()=>l,GlobalCreatedEvent:()=>P,IncrementUniqueMarkers:()=>Ae,InferComponent:()=>L,InitCache:()=>m,InitComponentCache:()=>N,InitJITProxy:()=>He,InitializeDev:()=>Ei,InitializeGlobal:()=>Si,InitializeGlobalScope:()=>p,InitializeUtilities:()=>Ci,InitializeValues:()=>Ai,InitializeVersion:()=>xi,InlineJS:()=>Pi,InlineJSGlobalKey:()=>x,InsertHtml:()=>zn,Interpolate:()=>Zn,InterpolateText:()=>Xn,IntersectionObserver:()=>IntersectionObserver,InvalidateCache:()=>g,InvalidateComponentCache:()=>T,IsBooleanAttribute:()=>re,IsEqual:()=>se,IsInsideTemplate:()=>Se,IsObject:()=>c,IsTemplate:()=>Ee,JoinPath:()=>fe,JoinUniqueMarkers:()=>xe,JournalError:()=>i,JournalLog:()=>vi,JournalTry:()=>r,JournalWarn:()=>dt,LazyCheck:()=>mi,Loop:()=>Loop,MagicManager:()=>MagicManager,MeasureCallback:()=>ue,MergeObjects:()=>he,MutationObserver:()=>MutationObserver,NativeFetchConcept:()=>NativeFetchConcept,NextIdle:()=>NextIdle,NextNonIdle:()=>NextNonIdle,NextTick:()=>NextTick,Nothing:()=>Nothing,OnDirectiveExpansionRule:()=>gi,PathToRelative:()=>pe,PeekCurrentComponent:()=>$e,PeekCurrentScope:()=>kt,PeekStoredObject:()=>H,PopCurrentComponent:()=>Ue,PopCurrentScope:()=>It,ProcessDirectives:()=>_t,ProxyAccessStorage:()=>ProxyAccessStorage,ProxyKeys:()=>s,PushCurrentComponent:()=>Be,PushCurrentScope:()=>Pt,QueryGlobalComponent:()=>Nt,RandomString:()=>_e,Range:()=>Range,RemoveDirectiveExpansionRule:()=>at,RemoveOutsideEventListener:()=>Ct,ResizeObserver:()=>ResizeObserver,ResolveKeyValue:()=>ci,ResolveOptions:()=>pi,ResolveTransition:()=>Dt,RetrieveStoredObject:()=>j,RootProxy:()=>RootProxy,Scope:()=>Scope,SetAttributeUtil:()=>ge,SetCacheValue:()=>_,SetProxyAccessHandler:()=>tt,SetProxyProp:()=>Te,SplitPath:()=>me,Stack:()=>Stack,StoreProxyHandler:()=>nt,StreamData:()=>Qe,SubscribeToChanges:()=>it,SupportsAttributes:()=>U,TextContentInterpolator:()=>ei,TidyPath:()=>de,TimedRange:()=>TimedRange,ToCamelCase:()=>v,ToSnakeCase:()=>ve,ToString:()=>$,TraverseDirectives:()=>ft,TraverseInterpolationReplacements:()=>Yn,UnbindOutsideEvent:()=>xt,UseCache:()=>b,UseEffect:()=>rt,UseRange:()=>ye,WaitAnimation:()=>Lt,WaitForGlobal:()=>k,WaitPromise:()=>We,WaitTransition:()=>Mt,WaitWhile:()=>et});class Stack{constructor(e){this.list_=new Array,e&&(this.list_=e.list_.map((e=>e)))}Push(e){this.list_.push(e)}Purge(){return this.list_.splice(0)}Pop(){return 0==this.list_.length?null:this.list_.pop()}Peek(){return 0==this.list_.length?null:this.list_[this.list_.length-1]}IsEmpty(){return 0==this.list_.length}GetHistory(){return this.list_.map((e=>e))}}class Future{constructor(e){this.callback_=e}Get(){return this.callback_()}}function i(e,t,n){console.error({message:e,context:t||"N/A",contextElement:n||"N/A"})}function r(e,t,n){try{return e()}catch(e){i(e,t,n)}}class Loop{constructor(e){this.whileCallbacks_=new Array,this.finalCallbacks_=new Array,e((e=>{this.whileCallbacks_.slice(0).forEach(((t,n)=>{!1===r((()=>t(e)),"InlineJS.Loop.While")&&this.whileCallbacks_.splice(n,1)}))}),(e=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0).forEach((t=>r((()=>t(e)),"InlineJS.Loop.Final")))}),(()=>{this.whileCallbacks_.splice(0),this.finalCallbacks_.splice(0)}))}While(e){return this.whileCallbacks_.push(e),this}Final(e){return this.finalCallbacks_.push(e),this}}class Nothing{}const s={componentId:"__InlineJS_CompnentId__",name:"__InlineJS_Name__",path:"__InlineJS_Path__",parentPath:"__InlineJS_ParentPath__",target:"__InlineJS_Target__"};function o(e){return(Array.isArray(e)||e&&"object"==typeof e)&&s.target in e?o(e[s.target]):e}function l(e){return e.map((e=>o(e)))}function a(e){return(e=o(e))&&"object"==typeof e&&(s.target in e||"__proto__"in e&&"Object"===e.__proto__.constructor.name)}function c(e){return!!a(e)}function u(e){return-1==e.findIndex((e=>!a(e)))}class Range{constructor(e,t){this.from_=e,this.to_=t}GetFrom(){return this.from_}GetTo(){return this.to_}Step(e,t=0){const n=this.IsAscending(),{start:i,end:r}=n?{start:this.from_,end:this.to_}:{start:this.to_,end:this.from_};if("number"==typeof this.from_&&"number"==typeof this.to_)return this.from_+(this.to_-this.from_)*e+t;if("string"==typeof i&&"string"==typeof r){const s=r.length-i.length,o=n?Math.round(s*e):Math.round(s*(1-e));return i+r.substring(i.length+t,i.length+t+o)}if(Array.isArray(i)&&Array.isArray(r)){const s=r.length-i.length,o=n?Math.round(s*e):Math.round(s*(1-e));return[...i,...r.slice(i.length+t,i.length+t+o)]}if(c(this.from_)&&c(this.to_)){const s=Object.assign({},i),o=Object.keys(i),l=Object.keys(r),a=l.length-o.length,c=n?Math.round(a*e):Math.round(a*(1-e));return l.slice(o.length+t,o.length+t+c).forEach((e=>s[e]=r[e])),s}return null}IsAscending(){return"number"==typeof this.from_&&"number"==typeof this.to_?this.from_<this.to_:"string"==typeof this.from_&&"string"==typeof this.to_||Array.isArray(this.from_)&&Array.isArray(this.to_)?this.from_.length<this.to_.length:!(!c(this.from_)||!c(this.to_))&&Object.keys(this.from_).length<Object.keys(this.to_).length}}class TimedRange extends Range{constructor(e,t,n,i){super(e,t),this.duration_=n,this.delay_=i}GetDuration(){return this.duration_}GetDelay(){return this.delay_}}function h(e,t=!1){return new RegExp(`^${e}`,t?"i":void 0)}function d(e=null,t=!1){let n=globalThis.InlineJS=globalThis.InlineJS||{};return(e||"").trim().split(".").forEach((e=>{e&&(n=n[e]=n[e]&&c(n[e])?n[e]:{})})),!t||c(n)?n:{}}function p(e,t){const n=d(e);Object.entries(t).forEach((([e,t])=>n[e]=t))}function m(e,t){return d("cache")[e]="function"==typeof t?t():t}function f(e,t){const n=d("cache");return n.hasOwnProperty(e)?n[e]:m(e,t)}function _(e,t,n,i){const r=f(e,i);r&&"object"==typeof r&&(r[t]=n)}function y(e,t){const n=d("cache"),i=n.hasOwnProperty(e)?n[e]:void 0;if(i&&"object"==typeof i&&t in i)return i[t]}function b(e,t,n,i,r,s){let o=f(t,n);if(o&&i(o))return r(o);const l=e();return!1===l?s():(m(t,l),r(l))}function g(e){const t=d("cache");t.hasOwnProperty(e)&&delete t[e]}function v(e,t,n){const[i="",...r]=e.trim().split(n||"-"),s=e=>e.charAt(0).toUpperCase()+e.substring(1);return i&&(t?s(i):i)+(r||[]).map((e=>s(e))).join("")}const E={self:"self",event:"event",scope:"scope"},S="__InlineJS_ELSCOPE_KEY__";function C(e){for(;e;){const n=S in(t=e)&&"string"==typeof t[S]?t[S]:"";if(n)return[n,e];if(e===document.body)return[null,null];e=e.parentElement}var t;return[null,null]}function A(e){const[t]=C(e);return t||""}const x="__InlineJS_GLOBAL_KEY__",P="inlinejs.global.created";function I(){return d("global").base||null}function k(){return I()?Promise.resolve():new Promise((e=>window.addEventListener(P,e,{once:!0})))}const O="component";function R(){return{id:"",component:null}}function N(){m(O,{id:"",component:null})}function T(e){f(O,R).id===e&&g(O)}function G(e){return b((()=>{const t=I().FindComponentById(e);return!!t&&{id:e,component:t}}),O,R,(t=>t.id===e),(e=>e.component),(()=>null))}function w(e){return I().FindComponentByName(e)}function F(e){return I().FindComponentByRoot(e)}function D(e){return I().FindComponentByCallback(e)}function L(e){const t=A(e).match(/^Cmpnt\<([0-9_]+)\>/);return t?G(t[1]):D((t=>t.GetRoot()===e||t.GetRoot().contains(e)))}var M=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function j(e){var{key:t}=e,n=M(e,["key"]);const i=I().RetrieveObject(Object.assign({key:t},n));return I().IsNothing(i)?t:i}function H(e){var{key:t}=e,n=M(e,["key"]);const i=I().PeekObject(Object.assign({key:t},n));return I().IsNothing(i)?t:i}function B(e,t,n){var i;return j({key:e,componentId:t||(n?null===(i=L(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function U(e){return(e=o(e))&&"object"==typeof e&&"hasAttribute"in e&&"getAttribute"in e&&"setAttribute"in e&&"removeAttribute"in e}function $(e){return e=o(e),I().IsFuture(e)?$(e.Get()):!e&&!1!==e&&0!==e||I().IsNothing(e)?"":"boolean"==typeof e||"number"==typeof e||"string"==typeof e?e.toString():JSON.stringify(e)}function W(e,t,n){const i=t&&U(e)?e.getAttribute(t):null;return i?B(i,n,e):$(i)}function z(e){if(e=o(e),!Array.isArray(e)&&!c(e))return e;if(Array.isArray(e))return e.map((e=>z(e)));const t={};return Object.entries(e).forEach((([e,n])=>t[e]=z(n))),t}function J(e,t,n){var i;return null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e?$(e):I().StoreObject({object:e,componentId:t||(n?null===(i=L(n))||void 0===i?void 0:i.GetId():void 0),contextElement:n})}function q(e,t,n,i){(!t||!U(e))&&e.setAttribute(t,J(n,i,e))}function K(e,t=!1){return new RegExp(`${e}$`,t?"i":void 0)}function V(e,t){for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n}catch(e){break}return null}function Y(e,t){return V(e,(e=>e.classList.contains(t)))}function X(e,t){return V(e,(e=>e.hasAttribute(t)))}function Z(e,t,n){return V(e,(e=>e.getAttribute(t)===n))}function Q(e,t){return V(e,(e=>e.tagName.toLowerCase()===t.toLowerCase()))}function ee(e,t){return t&&U(e)?e.getAttribute(t):null}function te(e,t){for(const n of Array.isArray(t)?t:[t]){const t=ee(e,n);if(t)return t}return null}function ne(e,t){if(!U(e))return null;for(const n of t)if(e.hasAttribute(n))return{name:n,value:e.getAttribute(n)};return null}function ie(e,t){const n=ne(e,t);return n?n.value:null}function re(e,t){if(e.hasOwnProperty("IsBooleanAttribute")&&"function"==typeof e.IsBooleanAttribute){const n=e.IsBooleanAttribute(t);if(!1===n||!0===n)return n}return I().GetConfig().IsBooleanAttribute(t)}function se(e,t,n=!0){const[i,r]=n?l([e,t]):[e,t];if(i===r)return!0;if(Array.isArray(i)&&Array.isArray(r))return i.length==r.length&&-1==i.findIndex(((e,t)=>!se(e,r[t],n)));if(u([i,r])){const e=Object.keys(i),t=Object.keys(r);return e.length==t.length&&-1==e.findIndex((e=>!t.includes(e)||!se(i[e],r[e],n)))}return i==r}function oe(e,t,n,i,s,o=1){let l=!1,a=()=>l=!0,c=0,u=e=>t?Math.floor(e/t):e,h=performance.now(),d=h,p=0;const m=(t,n,i)=>{e((e=>{o>1?p++%o==0?f(t,n,i,e):m(t,n,i):f(t,n,i,e)}))},f=(e,o,f,_)=>{if(l)return void f();const y=_-h;if(s&&y>=s)if(n&&(n<0||c<n)){p=0;const t=y-s;i>0&&t<i?setTimeout((()=>{h=performance.now(),m(e,o,f)}),i-t):m(e,o,f),c+=1,h=_,d=_}else r((()=>o({repeats:c,steps:s?u(s):-1,elapsed:y,duration:s})));else{m(e,o,f);const n=_-d;n>=t&&(d=t?_-n%t:_,r((()=>e({repeats:c,steps:u(y),elapsed:y,duration:s,abort:a}))))}};return new Loop(((e,t,n)=>m(e,t,n)))}const le=[50,40,30,25,20,15,10,5,4,3,2,1,0];function ae(e,t=1e3,n=0,i=0,r=!0,s=1){let o=0,l=Math.floor(t/2.2);for(const e of le)if(e<=l){o=e;break}return oe((e=>setTimeout((()=>{r?requestAnimationFrame(e):e(performance.now())}),o)),t,n,i,e,s)}function ce(e,t=1e3,n=0,i=0,r=1){return oe(requestAnimationFrame,t,n,i,e,r)}function ue(e){const t=performance.now();return e(),performance.now()-t}function he(e,t){return Object.entries(t).forEach((([t,n])=>!(t in e)&&(e[t]=n))),e}function de(e,t=!1){return(e=e?e.trim():"")?(!(e=e.replace(/[?][?&=\/]+/g,"?").replace(/[&][?&=\/]+/g,"&").replace(/[=][?=\/]+/g,"=").replace(/[\/][\/=]+/g,"/").replace(/[:]{2,}/g,":").replace(/[:][\/]([^\/])/g,"://$1").replace(/[\/?&=]+$/,"")).startsWith("/?")&&(e=e.replace(/^[\/?&=]+/,"")),t&&(e=e.split(/[?&]/).reduce(((e,t,n)=>e?`${e}${n<2?"?":"&"}${t}`:t),"")),e):""}function pe(e,t,n,i=!1){return(e=de(e,i))===t?(e=n&&n||"/").startsWith("/")?e:`/${e}`:(e.startsWith(`${t}/`)&&(e=e.substring(t.length)),/^[a-zA-Z0-9_]+:\/\//.test(e)?e:(n&&(e=e.startsWith("/")?`${n}${e}`:`${n}/${e}`),e.startsWith("/")?e:`/${e}`))}function me(e,t,n){const i=(e=t?pe(e,t,n):e).indexOf("?");return{base:-1==i?e:e.substring(0,i),query:-1==i?"":e.substring(i+1)}}function fe({base:e,query:t},n,i,r,s=!1){let o=`${de(e,s)}?${t}`;return o=n?pe(o,n,i):de(o,s),o=r?de(`${n}/${o}`,s):o.startsWith("/")||/^[a-zA-Z0-9_]+:\/\//.test(o)?o:`/${o}`,o}function _e(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e||11},(()=>(t||n).charAt(Math.floor(Math.random()*(t||n).length)))).join("")}function ye(e,t,n=3e3,i=1e3,s=!0){const o=n=>{if(!s)return r((()=>t(n)));const i=e.GetFrom(),o=e.GetTo();return r("number"!=typeof i||"number"!=typeof o?()=>t(n):()=>t(Number.isInteger(i)&&Number.isInteger(o)?Math.floor(n):n))},l=()=>{const t=e.Step(1);null!==t&&o(t)};if(I().IsTimedRange(e)&&(n=e.GetDuration()||n,i=e.GetDelay()||i),n<=0)return void l();const a=e.Step(0);if(null===a)return void l();let c=a;!1!==o(c)&&ce(n,i).While((({elapsed:t,abort:i})=>{const r=e.Step(t/n);null===r?null==i||i():se(r,c)||(c=r,!1===o(r)&&(null==i||i()))})).Final(l)}function be(e,t,n=3e3,i=1e3,s=!0){I().IsRange(e)?ye(e,t,n,i,s):r((()=>t(e)))}function ge(e,t,n){t&&U(e)&&e.setAttribute(t,n)}function ve(e,t="-"){t=t||"-";const n=e.replace(/([A-Z]+)/g,(e=>`${t}${e.toLowerCase()}`));return n.startsWith(t)?n.substring(1):n}function Ee(e){return e instanceof HTMLTemplateElement||"IsTemplate"in e&&"function"==typeof e.IsTemplate&&!!e.IsTemplate()}function Se(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Element&&Ee(t))return!0;return!1}function Ce(){return{level0:0,level1:0,level2:0}}function Ae(e,t="level0",n="level1"){e[t]==(Number.MAX_SAFE_INTEGER||9007199254740991)?("level0"===t?Ae(e,"level1","level2"):++e[n],e[t]=0):++e[t]}function xe(e){return`${e.level2}_${e.level1}_${e.level0}`}function Pe(e,t,n,i){return Ae(e),`${t||""}${n||""}${xe(e)}${i||""}`}function Ie(e,t,n,i,r=!0){if(!i)return;const s={componentId:i.GetComponentId(),type:e,path:t,prop:n,origin:i.PeekOrigin()};if(i.Add(s),!r)return;const o=t.split(".");for(;o.length>2;)o.pop(),i.Add({original:s,path:o.join(".")})}function ke(e,t,n,s="",o=!0){const l="string"==typeof e?G(e):e;if(!l)return i(`Failed to find component for '$${n}'`,"InlineJS.EvaluateMagicProperty",t),I().CreateNothing();let a=s&&n.startsWith(s)?n.substring(s.length):n;const c=I().GetMagicManager().FindHandler(a,{contextElement:t,componentId:l.GetId(),component:l});if(!c){if(!o)return I().CreateNothing();const e=s&&n.startsWith(`${s}${s}`)||!1;a=e?a.substring(s.length):a;const t=l.FindScopeByName(a);if(t)return e?t.GetRoot():t.GetProxy().GetNative();const i=w(a);if(i)return e?i.GetRoot():i.GetRootProxy().GetNative();if(e){const e=l.GetId();return t=>{const i=L(t)||G(e);if(!i)return null;const r=i.FindElementScope(t),o=r&&r.GetLocal(n.substring(s.length));return r&&!I().IsNothing(o)?o:ke(i.GetId(),t,n,`${s}${s}`,!1)}}return I().CreateNothing()}return r((()=>c({componentId:l.GetId(),component:l,contextElement:t})),"InlineJS.EvaluateMagicProperty",t)}function Oe(e,t,n,i){var r;if(!(i in t))return!1;const s=G(e);return null===(r=null==s?void 0:s.FindProxy(n))||void 0===r||r.RemoveChild(i),delete t[i],null==s||s.RemoveProxy(`${n}.${i}`),Ie("delete",`${n}.${i}`,i,null==s?void 0:s.GetBackend().changes),!0}function Re(e,t,n,i){if(!e)return null;const r=e.FindChild(t);if(r)return r;if(!Array.isArray(n)&&!c(n))return null;const s=I().CreateChildProxy(e,t,n),o=i||G(e.GetComponentId());return o&&o.AddProxy(s),s}function Ne(e,t,n,i,r,o){var l,a,c;switch(r){case s.target:return n;case s.componentId:return e;case s.name:return i.split(".").at(-1);case s.path:return i;case s.parentPath:return i.split(".").slice(0,-1).join(".")||""}if(r in n){if(!n.hasOwnProperty(r))return n[r];const s=n[r];if(I().IsFuture(s))return s.Get();if(null===(l=I().GetCurrentProxyAccessStorage())||void 0===l||l.Put(e,`${i}.${r}`),"function"==typeof s)return s.bind(t.GetNative());const o=G(e);return o&&(null===(a=Re(o.FindProxy(i)||null,r,s,o))||void 0===a?void 0:a.GetNative())||s}if(o){const t=o(G(e)||void 0,r);if(!I().IsNothing(t))return I().IsFuture(t)?t.Get():t}return null===(c=I().GetCurrentProxyAccessStorage())||void 0===c||c.Put(e,`${i}.${r}`),null}function Te(e,t,n,i,r){var s;if(i in t&&r===t[i])return!0;const o=G(e);return null===(s=null==o?void 0:o.FindProxy(n))||void 0===s||s.RemoveChild(i),t[i]=r,null==o||o.RemoveProxy(`${n}.${i}`),Ie("set",`${n}.${i}`,i,null==o?void 0:o.GetBackend().changes),!0}class GenericProxy{constructor(e,t,n,i,s=null){this.componentId_=e,this.target_=t,this.name_=n,this.native_=null,this.children_={},this.parentPath_=(null==i?void 0:i.GetPath())||"",null==i||i.AddChild(this);const o=this.componentId_,l=!!s,a=this.GetPath(),c=(e,t)=>{if(!e)return I().CreateNothing();const{context:n}=e.GetBackend(),i=null==t?void 0:t.startsWith("$");if(i){const e=n.Peek(t.substring(1),I().CreateNothing());if(!I().IsNothing(e))return e}const r=n.Peek(E.self),s=null==e?void 0:e.FindElementLocalValue(r||e.GetRoot(),t,!0);if(!I().IsNothing(s))return s;const o=i?ke(e,r,t,"$"):I().CreateNothing();return t&&I().IsNothing(o)&&I().GetConfig().GetUseGlobalWindow()&&t in globalThis?globalThis[t]:o},u=!l&&!this.parentPath_,h=this,d={get(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),r=i&&i.Get?i.Get(t,e):I().CreateNothing();if(!I().IsNothing(r))return r}if((u||l)&&e.hasOwnProperty(t)&&"function"==typeof e[t]&&I().GetConfig().GetWrapScopedFunctions()){const n=I().FindComponentById(o),i=null==n?void 0:n.FindScopeById(s||""),l=e[t];i&&I().PushScopeContext(i);const a=r((()=>(...e)=>l(...e)));return i&&I().PopScopeContext(),a}return Ne(o,h,e,a,t.toString(),u?c:void 0)},set(e,t,n){var i;if("symbol"==typeof t||"prototype"===t)return Reflect.set(e,t,n);if(u){const r=null===(i=I().FindComponentById(o))||void 0===i?void 0:i.GetProxyAccessHandler(),s=r&&r.Set?r.Set(t,n,e):I().CreateNothing();if(!I().IsNothing(s))return s}return Te(o,e,a,t.toString(),n)},deleteProperty(e,t){var n;if("symbol"==typeof t||"prototype"===t)return Reflect.get(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler(),r=i&&i.Delete?i.Delete(t,e):I().CreateNothing();if(!I().IsNothing(r))return r}return Oe(o,e,a,t.toString())},has(e,t){var n;if("symbol"==typeof t)return Reflect.has(e,t);if(u){const i=null===(n=I().FindComponentById(o))||void 0===n?void 0:n.GetProxyAccessHandler();return!i||!i.Has||!!i.Has(t,e)}return Reflect.has(e,t)}};this.native_=new window.Proxy(this.target_,d)}IsRoot(){return!this.parentPath_}GetComponentId(){return this.componentId_}GetTarget(){return this.target_}GetNative(){return this.native_}GetName(){return this.name_}GetPath(){return this.parentPath_?`${this.parentPath_}.${this.name_}`:this.name_}GetParentPath(){return this.parentPath_}AddChild(e){this.children_[e.GetName()]=e}RemoveChild(e){delete this.children_["string"==typeof e?e:e.GetName()]}FindChild(e){return this.children_.hasOwnProperty(e)?this.children_[e]:null}Destroy(){Object.values(this.children_).forEach((e=>e.Destroy())),this.componentId_="",this.name_="",this.target_=null,this.parentPath_="",this.native_=null,this.children_={}}}class ChildProxy extends GenericProxy{constructor(e,t,n){super(e.GetComponentId(),n,t,e)}}var Ge=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function we({target:e,getter:t,setter:n,deleter:i,lookup:r,alert:s}){const o={get(e,n){var i;if("symbol"==typeof n||"string"==typeof n&&"prototype"===n)return Reflect.get(e,n);const r=t?t(n.toString(),e):e[n];return I().IsNothing(r)?Reflect.get(e,n):(!s||s.list&&!s.list.includes(n.toString())||null===(i=I().GetCurrentProxyAccessStorage())||void 0===i||i.Put(s.componentId,`${s.id}.${n.toString()}`),r)},set:(e,t,i)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.set(e,t,i):n?!1!==n(t.toString(),i,e):Reflect.set(e,t,i),deleteProperty:(e,t)=>"symbol"==typeof t||"string"==typeof t&&"prototype"===t?Reflect.deleteProperty(e,t):i?!1!==i(t.toString(),e):Reflect.deleteProperty(e,t),has:(e,t)=>!!Reflect.has(e,t)||(Array.isArray(r)?r.includes(t.toString()):r?r(t.toString(),e):t in e)};return new window.Proxy(e||{},o)}function Fe(e){return we(Me({getter:t=>t&&t in e&&e[t]||null,lookup:[...Object.keys(e)]}))}function De(){return!1}function Le(e){var{setter:t,deleter:n,lookup:i}=e,r=Ge(e,["setter","deleter","lookup"]);return Object.assign(Object.assign({},r),{setter:t||De,deleter:n||De,lookup:i||De})}function Me(e){return Le(e)}const je="InlineJS_ProxyGlobal";function He(e,t,n){const i=null==t?void 0:t.FindElementScope(n),r=null==i?void 0:i.GetId();if(!r)return["",null,null];const s=globalThis[je]=globalThis[je]||{},o=s[e]=s[e]||{};return r in o?[r,o[r],o]:(null==i||i.AddUninitCallback((()=>delete o[r])),[r,null,o])}class RootProxy extends GenericProxy{constructor(e,t,n){super(e,t,`Proxy<${n||e}>`,void 0,n)}}function Be(e){I().PushCurrentComponent(e)}function Ue(){return I().PopCurrentComponent()}function $e(){return I().PeekCurrentComponent()}function We(e,t,n){if(!(e instanceof Promise))return t(e);n?e.then((e=>We(e,t,!0))):e.then(t)}const ze="__InlineJS_Context__",Je="InlineJS_Func_Cache";function qe(e,t,n,r=!1){const s=y(Je,t);if(s)return s;try{const n=new Function(ze,`\n with (${ze}){\n ${e(t)};\n };\n `);return _(Je,t,n,{}),n}catch(e){if(r||!(e instanceof SyntaxError))return void i(e,`InlineJs.Region<${n||"NIL"}>.GenerateFunction`)}return null}function Ke(e,t,n=!1){return qe((e=>`return (${e})`),e,t,n)}function Ve(e,t,n=!1){return qe((e=>e),e,t,n)}function Ye(e,t,n,i=[]){if("function"==typeof e){const n=e(...i);return t?t(n):n}return t?t(e):e}function Xe({componentId:e,contextElement:t,expression:n,disableFunctionCall:r=!1,waitPromise:s="recursive",voidOnly:o}){const l=e=>(e&&e(null),null);if(!(n=n.trim()))return l;let a=o?null:Ke(n,e),c=!1;if(void 0===a)return l;if(!a&&(c=!0),!a&&!(a=Ve(n,e,!0)))return l;const u=(o,l,a,c,u=!0,h)=>{var d;const p=G(e),m=null==p?void 0:p.GetRootProxy().GetNative();if(!m||(null===(d=null==p?void 0:p.FindElementScope(t))||void 0===d?void 0:d.IsDestroyed()))return;const{context:f=null,changes:_=null}=(null==p?void 0:p.GetBackend())||{};null==f||f.Push(E.self,t),Be(e),Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Push(e,t)));try{let e=l(m);if(I().IsFuture(e)&&(e=e.Get()),!o)return r?e:Ye(e,o,0,a);const t=e=>{if(e&&"none"!==s)return We(e,o,"recursive"===s),h||"Loading data...";o(e)};return r?t(e):Ye(e,t,0,a)}catch(t){if(u&&t instanceof SyntaxError)throw t;i(t,`InlineJs.Region<${e}>.RunFunction('${n}')`)}finally{Object.entries(c||{}).forEach((([e,t])=>null==f?void 0:f.Pop(e,t))),Ue(),null==f||f.Pop(E.self)}};return(r,s=[],o,h)=>{try{return u(r,a.bind(t),s||[],o||{},void 0,h)}catch(h){if(h instanceof SyntaxError&&!c)return c=!0,a=Ve(n,e,!0),a?u(r,a.bind(t),s||[],o||{},!1):l(r);i(h,`InlineJs.Region<${e}>.RunFunction('${n}')`)}return l(r)}}function Ze(e){return Xe(e)}function Qe(e,t){const n=(e,t)=>We(e,t,!0);return e instanceof Loop?new Loop(((i,r)=>{e.While((e=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})),e.Final((e=>{n(e,(e=>{n(t(e),(e=>r(e)))}))}))})):e instanceof Promise?new Promise((i=>{n(e,(e=>{n(t(e),(e=>i(e)))}))})):t(e)}function et(e,t,n){e instanceof Loop?e.While(t).Final(!1===n?()=>{}:n||t):t(e)}function tt(e,t){if(!t)return()=>{};const n="handler"in t?t.handler:t;if(!n)return()=>{};const i="string"==typeof e?G(e):e;if(!i)return()=>{};const r=i.SetProxyAccessHandler(n||null)||null;return()=>t&&i.SetProxyAccessHandler(r)}function nt(e){var t;const n=null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.GetProxyAccessHandler();return t=>{const i=tt(e,n||null);r(t),i()}}function it({componentId:e,proxyAccessStorage:t,callback:n,subscriptionsCallback:r,contextElement:s}){var o,l;if(t.IsEmpty())return null==r||r({}),null;let a={},c=()=>{for(const e in a){const t=G(e);if(!t)continue;const{changes:n}=t.GetBackend();a[e].forEach((e=>n.Unsubscribe(e)))}a={}},u=!1,h=()=>{u=!0};const d=t=>{const r=G(e);if(!r||u)return void c();const{changes:s}=r.GetBackend();s.PushOrigin(d);try{n({changes:t,cancel:h})}catch(t){i(t,`InlineJS.Component<${e}>.SubscribeToChanges.OnChange`)}s.PopOrigin(),u&&c()},p=t.GetGroupedEntries();for(const e in p){const t=G(e);if(!t)continue;const n=new Array,{changes:i}=t.GetBackend();p[e].forEach((e=>n.push(i.Subscribe(e.path,d)))),a[e]=n}return s&&(null===(l=null===(o=G(e))||void 0===o?void 0:o.FindElementScope(s))||void 0===l||l.AddMarkedCallback((()=>{h(),c()}))),null==r||r(a),c}class ProxyAccessStorage{constructor(){this.storage_={},this.isSuspended_=!1}Put(e,t){if(this.isSuspended_)return;const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i),s=[];for(const e in this.storage_){if(e.startsWith(r)&&(e.length===r.length||"."===e[r.length]))return;!r.startsWith(e)||r.length!==e.length&&"."!==r[e.length]||s.push(e)}this.storage_[r]={componentId:n,path:i},s.forEach((e=>delete this.storage_[e]))}Remove(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t);delete this.storage_[ProxyAccessStorage.EncodeEntryPath(n,i)]}Clear(){this.storage_={}}GetEntries(){return Object.values(this.storage_)}GetGroupedEntries(){const e={};for(const t in this.storage_){const n=this.storage_[t];!e[n.componentId]&&(e[n.componentId]=[]),e[n.componentId].push(n)}return e}GetLongestPath(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i);let s=null,o="";for(const e in this.storage_)!e.startsWith(r)||e.length!==r.length&&"."!==e[r.length]||e.length>o.length&&(s=this.storage_[e],o=e);return s}HasEntry(e,t){const{componentId:n,path:i}=ProxyAccessStorage.ResolveDetails(e,t),r=ProxyAccessStorage.EncodeEntryPath(n,i);for(const e in this.storage_)if(e.startsWith(r)&&(e.length===r.length||"."===e[r.length]))return!0;return!1}Count(){return Object.keys(this.storage_).length}IsEmpty(){return 0===Object.keys(this.storage_).length}Suspend(){this.isSuspended_=!0}Resume(){this.isSuspended_=!1}IsSuspended(){return this.isSuspended_}static ResolveDetails(e,t){return"string"==typeof e?{componentId:e,path:t||""}:e}static EncodeEntryPath(e,t){return`${e}:${t}`}}function rt({componentId:e,callback:t,contextElement:n,options:i,subscriptionsCallback:r,cancelCallback:s}){var o;const l=nt(e),a=()=>{const i=G(e);if(!i)return;let o=!1,a=null,c=()=>{o=!0};n&&(a=n instanceof HTMLElement?i.CreateElementScope(n):i.FindElementScope(n));const u=new ProxyAccessStorage;I().UseProxyAccessStorage((()=>{t({changes:[],cancel:c})}),u);!o&&it({componentId:e,proxyAccessStorage:u,subscriptionsCallback:r,callback:e=>l((()=>t(e))),contextElement:null==a?void 0:a.GetElement()})&&s&&s(c)};(null==i?void 0:i.nextTick)?null===(o=G(e))||void 0===o||o.GetBackend().changes.AddNextTickHandler(a):a()}function st(){return I().GetConfig()}function ot(e,t){return n=>-1==n.search(e)?null:n.replace(e,t)}function lt(e){return I().GetDirectiveManager().AddExpansionRule(e)}function at(e){I().GetDirectiveManager().RemoveExpansionRule(e)}function ct(e){return I().GetDirectiveManager().Expand(e)}let ut={};function ht(e,t,n){if(!e||!(e=e.trim()))return null;if((t=(t||"").trim())===e&&(t=""),e in ut)return{meta:ut[e],value:t,proxyAccessHandler:n};const i=ct(e),r=i.match(st().GetDirectiveRegex());if(!r||3!=r.length||!r[2])return null;const s=r[2].indexOf(":");let o=-1==s?[r[2]]:[r[2].substring(0,s),r[2].substring(s+1)],l="",a="";o.length>1?[l,a]=o:[a]=o;let c=a.split("."),u="";if(l?u=c[0]:l=c[0],!l)return null;c.splice(0,1);const h=l.split("-"),d={view:{original:e,expanded:i},name:{value:l,joined:h.join("."),parts:h},arg:{key:u,options:c||[]}};return ut[e]=d,{meta:d,value:t,proxyAccessHandler:n}}function dt(e,t,n){console.warn({message:e,context:t||"N/A",contextElement:n||"N/A"})}function pt(e){return{originalView:e.meta.view.original,expandedView:e.meta.view.expanded,nameValue:e.meta.name.value,nameJoined:e.meta.name.joined,nameParts:e.meta.name.parts,argKey:e.meta.arg.key,argOptions:e.meta.arg.options,expression:e.value}}function mt(e,t,n,s=0){const o="string"==typeof e?G(e):e;if(!o)return i(`Failed to find component for '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;let l=null,a=o.FindElementScope(t);if(a&&(l=a.GetDirectiveManager().FindHandler(n.meta.name.joined),++s),l=l||I().GetDirectiveManager().FindHandler(n.meta.name.joined),!l){const e=`${n.meta.name.parts.reduce(((e,t)=>e?`${e}${t.substring(0,1).toUpperCase()}${t.substring(1)}`:t),"")}DirectiveHandler`;e in globalThis&&"function"==typeof globalThis[e]&&(l=globalThis[e])}if(!l)return dt(`No handler found '${n.meta.view.original}'`,"InlineJS.DispatchDirective",t),!1;const c=tt(o,n.proxyAccessHandler||null);return 0==s&&!a&&o.CreateElementScope(t),r((()=>{l(Object.assign(Object.assign({},pt(n)),{componentId:o.GetId(),component:o,contextElement:t}))}),"InlineJS.DispatchDirective",t),c(),!0}function ft({element:e,callback:t,attributeCallback:n,proxyAccessHandler:r}){Array.from(e.attributes).forEach((s=>{try{n&&n(s.name,s.value||"");const e=ht(s.name,s.value||"",r);e&&t(e)}catch(t){i(t,"InlineJS.TraverseDirectives",e)}}))}function _t({component:e,element:t,options:n={},proxyAccessHandler:r}){if(!function(e,{checkTemplate:t=!0,checkDocument:n=!0}){return 1===(null==e?void 0:e.nodeType)&&(!n||document.contains(e))&&(!t||!Se(e))}(t,n))return;const s="string"==typeof e?G(e):e;if(!s)return i("Failed to find component.","InlineJS.ProcessDirectives",t),!1;let o=0;ft({element:t,proxyAccessHandler:r,callback:n=>{mt(e,t,n,o)&&(t.removeAttribute(n.meta.view.original),++o)},attributeCallback:(e,n)=>I().DispatchAttributeProcessing({name:e,value:n,proxyAccessHandler:r,componentId:s.GetId(),component:s,contextElement:t})}),I().DispatchTextContentProcessing({componentId:s.GetId(),component:s,contextElement:t,proxyAccessHandler:r}),"OnElementScopeCreated"in t&&"function"==typeof t.OnElementScopeCreated&&s.CreateElementScope(t);const l=s.FindElementScope(t);null==l||l.ExecutePostAttributesProcessCallbacks();const a=s.GetId(),c=()=>{const e=G(a);if(e&&!e.IsDestroyed()&&!n.ignoreChildren&&!Ee(t)){e.PushSelectionScope();const n={checkTemplate:!1,checkDocument:!1},i=(t,i)=>_t({component:e,proxyAccessHandler:r,options:Object.assign(Object.assign({},n),{ignoreChildren:i}),element:t});"TraverseChildren"in t&&"function"==typeof t.TraverseChildren?t.TraverseChildren((e=>i(e,e.contains(t)))):Array.from(t.children).forEach((e=>i(e,e.contains(t)))),e.PopSelectionScope()}null==l||l.ExecutePostProcessCallbacks()};"ProcessDirectivesCallback"in t?t.ProcessDirectivesCallback(c):c()}class ChangesMonitor{constructor(){this.listeners_=new Array}AddChangesMonitor(e){this.listeners_.push(e),this.listeners_.forEach((e=>r((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}RemoveChangesMonitor(e){const t=this.listeners_.length;this.listeners_=this.listeners_.filter((t=>t!==e)),t!=this.listeners_.length&&this.listeners_.forEach((e=>r((()=>e({target:"changes-monitor",object:()=>Object.assign({},this.listeners_)})))))}NotifyListeners_(e,t){this.listeners_.forEach((n=>r((()=>n({target:e,object:()=>z(t)})))))}}class Changes extends ChangesMonitor{constructor(e){super(),this.componentId_=e,this.nextTickHandlers_=new Array,this.nextIdleHandlers_=new Array,this.nextNonIdleHandlers_=new Array,this.isScheduled_=!1,this.isIdle_=!0,this.isDestroyed_=!1,this.list_=new Array,this.subscribers_={},this.subscriberPaths_={},this.origins_=new Stack,this.recentRemovals_=null}GetComponentId(){return this.componentId_}AddNextTickHandler(e){this.nextTickHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)}AddNextIdleHandler(e){this.nextIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)}AddNextNonIdleHandler(e){this.nextNonIdleHandlers_.push(e),this.Schedule(),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)}Schedule(){this.isDestroyed_||this.isScheduled_||(this.isScheduled_=!0,queueMicrotask((()=>{this.isScheduled_=!1;const e=new Map,t=(t,n)=>{var i;if(null===(i=this.recentRemovals_)||void 0===i?void 0:i.includes(n))return;const r=e.get(n)||[];r.push(t),e.set(n,r)};if(0!=this.list_.length){this.list_.splice(0).forEach((e=>{const n=(e=>"original"in e?e.original.origin:e.origin)(e);Object.keys(this.subscribers_).forEach((i=>{(i===e.path||i.startsWith(`${e.path}.`))&&Object.values(this.subscribers_[i]).filter((e=>e!==n)).forEach((n=>t(e,n)))}))})),this.NotifyListeners_("list",this.list_)}const n=()=>{0!=this.nextTickHandlers_.length&&(this.nextTickHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextTick`))),this.NotifyListeners_("next-tick-handlers",this.nextTickHandlers_)),this.recentRemovals_=null};if(0==e.size)return this.isIdle_=!0,0!=this.nextIdleHandlers_.length&&(this.nextIdleHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextIdle`))),this.NotifyListeners_("next-idle-handlers",this.nextIdleHandlers_)),void n();this.isIdle_=!1,e.forEach(((e,t)=>{var n;!(null===(n=this.recentRemovals_)||void 0===n?void 0:n.includes(t))&&r((()=>t(e)),`InlineJs.Region<${this.componentId_}>.Schedule`)})),0!=this.nextNonIdleHandlers_.length&&(this.nextNonIdleHandlers_.splice(0).forEach((e=>r(e,`InlineJs.Region<${this.componentId_}>.NextNonIdle`))),this.NotifyListeners_("next-non-idle-handlers",this.nextNonIdleHandlers_)),n(),this.NotifyListeners_("scheduled",this.isScheduled_),this.Schedule()})),this.NotifyListeners_("scheduled",this.isScheduled_))}Add(e){this.list_.push(e),this.Schedule(),this.NotifyListeners_("list",this.list_)}AddComposed(e,t,n){const i={componentId:this.componentId_,type:"set",path:t?`${t}.${e}`:e,prop:e,origin:this.origins_.Peek()};n?this.Add({original:i,path:n}):this.Add(i)}GetLastChange(e=0){return z(this.list_.at(-(e+1))||null)}PushOrigin(e){this.origins_.Push(e),this.NotifyListeners_("origins",this.origins_)}PeekOrigin(){return this.origins_.Peek()}PopOrigin(){const e=this.origins_.Pop();return this.NotifyListeners_("origins",this.origins_),e}Subscribe(e,t){var n;const i=null===(n=G(this.componentId_))||void 0===n?void 0:n.GenerateUniqueId("sub_");return i&&((this.subscribers_[e]=this.subscribers_[e]||{})[i]=t,this.subscriberPaths_[i]=e,this.NotifyListeners_("subscribers",this.subscribers_)),i||""}Unsubscribe(e,t){if(this.recentRemovals_=this.recentRemovals_||[],"string"!=typeof e){(t?[t]:Object.keys(this.subscribers_)).forEach((t=>{t in this.subscribers_&&Object.entries(this.subscribers_[t]).filter((([t,n])=>e===n)).map((([e])=>e)).forEach((e=>this.Unsubscribe_(e)))}))}else e in this.subscriberPaths_&&this.Unsubscribe_(e);this.NotifyListeners_("subscribers",this.subscribers_)}Destroy(){this.isDestroyed_||(this.isDestroyed_=!0,this.componentId_="",this.nextTickHandlers_.splice(0),this.nextIdleHandlers_.splice(0),this.nextNonIdleHandlers_.splice(0),this.isScheduled_=!1,this.isIdle_=!0,this.list_.splice(0),this.subscribers_={},this.subscriberPaths_={},this.origins_.Purge())}Unsubscribe_(e){var t;const n=this.subscriberPaths_[e];n&&n in this.subscribers_&&e in this.subscribers_[n]&&(null===(t=this.recentRemovals_)||void 0===t||t.push(this.subscribers_[n][e]),delete this.subscribers_[n][e],delete this.subscriberPaths_[e],0==Object.keys(this.subscribers_[n]).length&&delete this.subscribers_[n])}}class Context{constructor(){this.record_={}}Push(e,t){(this.record_[e]=this.record_[e]||new Stack).Push(t)}Purge(){const e=this.record_;return this.record_={},e}Pop(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Pop():t||null}Peek(e,t){return this.record_.hasOwnProperty(e)?this.record_[e].Peek():t||null}Get(e){return this.record_.hasOwnProperty(e)?this.record_[e]:null}GetHistory(e){return this.record_.hasOwnProperty(e)?this.record_[e].GetHistory():[]}GetRecordKeys(){return Object.keys(this.record_)}}var yt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function bt(e,t,n){const i="function"==typeof e?function(e){const t={handler:n=>{var{argKey:i}=n,r=yt(n,["argKey"]);t.extensions.hasOwnProperty(i)?t.extensions[i](Object.assign({argKey:i},r)):e(Object.assign({argKey:i},r))},extensions:{}};return t}(e):e;return i.extensions[t]=n,i}function gt(e,t){let n="",i=null;return"function"==typeof e?(n=t||"",i=e):(n=e.GetName(),i=t=>e.Handle(t)),{computedName:n,callback:i}}class DirectiveManager{constructor(){this.expansionRules_={},this.handlers_={}}AddExpansionRule(e){const t=I().GenerateUniqueId("exrule_");return this.expansionRules_[t]=e,t}RemoveExpansionRule(e){e in this.expansionRules_&&delete this.expansionRules_[e]}Expand(e){if(!(e=e.trim()))return e;for(const t in this.expansionRules_){const n=this.expansionRules_[t](e);if(n)return n}return e}AddHandler(e,t){const{computedName:n,callback:i}=gt(e,t);n&&i&&(this.handlers_[n]=i)}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e){if(!this.handlers_.hasOwnProperty(e))return null;const t=this.handlers_[e];return"function"==typeof t?t:t.handler}AddHandlerExtension(e,t,n){const i=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;if(!i)return;const{computedName:r,callback:s}=gt(t,n);r&&s&&(this.handlers_[e]=bt(i,r,s))}RemoveHandlerExtension(e,t){const n=this.handlers_.hasOwnProperty(e)?this.handlers_[e]:null;n&&function(e,t){"function"!=typeof e&&e.extensions.hasOwnProperty(t)&&delete e.extensions[t]}(n,t)}}const vt="InlineJS_OutsideEvent";function Et(){return globalThis[vt]=globalThis[vt]||{targetScopes:new Array,eventCallbacks:{}}}function St(e,t,n){let i=Et(),s=i.targetScopes.find((t=>t.target===e));s||(s={target:e,listeners:{}},i.targetScopes.push(s)),(Array.isArray(t)?t:[t]).forEach((e=>{e in s.listeners||(s.listeners[e]={handlers:new Array,excepts:null}),s.listeners[e].handlers.push({callback:n,excepts:null}),e in i.eventCallbacks||(i.eventCallbacks[e]=e=>{i.targetScopes.forEach((t=>{e.type in t.listeners&&t.target!==e.target&&!t.target.contains(e.target)&&-1==(t.listeners[e.type].excepts||[]).findIndex((t=>t===e.target||t.contains(e.target)))&&t.listeners[e.type].handlers.filter((t=>-1==(t.excepts||[]).findIndex((t=>t===e.target||t.contains(e.target))))).forEach((t=>r((()=>t.callback(e)),"InlineJS.OutsideEventListener")))}))},window.addEventListener(e,i.eventCallbacks[e]))}))}function Ct(e,t,n){const i=Et(),r=i.targetScopes.find((t=>t.target===e));r&&(Array.isArray(t)?t:[t]).forEach((e=>{e in r.listeners&&(n?(r.listeners[e].handlers=r.listeners[e].handlers.filter((e=>e.callback!==n)),0===r.listeners[e].handlers.length&&delete r.listeners[e]):delete r.listeners[e]),e in i.eventCallbacks&&!i.targetScopes.some((t=>e in t.listeners))&&(window.removeEventListener(e,i.eventCallbacks[e]),delete i.eventCallbacks[e])}))}function At(e,t,n){const i=Et().targetScopes.find((t=>t.target===e));i&&Object.entries(t).forEach((([e,t])=>{const r=i.listeners[e];if(!r)return;const s=Array.isArray(t)?t:[t];if(n){const e=r.handlers.find((e=>e.callback===n));e&&(e.excepts=e.excepts||[],e.excepts.push(...s))}else r.excepts=r.excepts||[],r.excepts.push(...s)}))}function xt(e){const t=Et(),n=t.targetScopes;t.targetScopes=t.targetScopes.filter((t=>t.target!==e&&!e.contains(t.target))),n.length!==t.targetScopes.length&&Object.keys(t.eventCallbacks).forEach((e=>{t.targetScopes.some((t=>e in t.listeners))||(window.removeEventListener(e,t.eventCallbacks[e]),delete t.eventCallbacks[e])}))}class ElementScope extends ChangesMonitor{constructor(e,t,n,i){super(),this.componentId_=e,this.id_=t,this.element_=n,this.isRoot_=i,this.isInitialized_=!1,this.key_="",this.locals_={},this.data_={},this.queuedAttributeChanges_=null,this.managers_={directive:null},this.callbacks_={post:new Array,postAttributes:new Array,uninit:new Array,marked:new Array,treeChange:new Array,attributeChange:new Array},this.state_={isMarked:!1,isDestroyed:!1}}SetInitialized(){this.isInitialized_=!0}IsInitialized(){return this.isInitialized_}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetKey(e){this.NotifyListeners_("key",this.key_=e)}GetKey(){return this.key_}GetElement(){return this.element_}IsRoot(){return this.isRoot_}SetLocal(e,t){this.state_.isMarked||(this.locals_[e]=t,this.NotifyListeners_("locals",this.locals_))}DeleteLocal(e){delete this.locals_[e],this.NotifyListeners_("locals",this.locals_)}HasLocal(e){return e in this.locals_}GetLocal(e){return e in this.locals_?this.locals_[e]:I().CreateNothing()}GetLocals(){return this.locals_}SetData(e,t){this.state_.isMarked||(this.data_[e]=t,this.NotifyListeners_("data",this.data_))}GetData(e){return e in this.data_?this.data_[e]:I().CreateNothing()}AddPostProcessCallback(e){this.state_.isMarked||(this.callbacks_.post.push(e),this.NotifyListeners_("post-process-callbacks",this.callbacks_.post))}ExecutePostProcessCallbacks(){(this.callbacks_.post||[]).splice(0).forEach((e=>r(e,"ElementScope.ExecutePostProcessCallbacks")))}AddPostAttributesProcessCallback(e){this.state_.isMarked||(this.callbacks_.postAttributes.push(e),this.NotifyListeners_("post-attributes-process-callbacks",this.callbacks_.postAttributes))}ExecutePostAttributesProcessCallbacks(){(this.callbacks_.postAttributes||[]).splice(0).forEach((e=>r(e,"ElementScope.ExecutePostAttributesProcessCallbacks")))}AddUninitCallback(e){this.state_.isDestroyed?r(e):(this.callbacks_.uninit.push(e),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit))}RemoveUninitCallback(e){this.callbacks_.uninit=this.callbacks_.uninit.filter((t=>t!==e)),this.NotifyListeners_("uninit-callbacks",this.callbacks_.uninit)}AddMarkedCallback(e){this.state_.isMarked?r(e):(this.callbacks_.marked.push(e),this.NotifyListeners_("marked-callbacks",this.callbacks_.marked))}RemoveMarkedCallback(e){this.callbacks_.marked=this.callbacks_.marked.filter((t=>t!==e)),this.NotifyListeners_("marked-callbacks",this.callbacks_.marked)}AddTreeChangeCallback(e){this.callbacks_.treeChange.push(e),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}RemoveTreeChangeCallback(e){this.callbacks_.treeChange=this.callbacks_.treeChange.filter((t=>t!==e)),this.NotifyListeners_("tree-change-callbacks",this.callbacks_.treeChange)}ExecuteTreeChangeCallbacks(e,t){this.callbacks_.treeChange.forEach((n=>r((()=>n({added:e,removed:t})))))}AddAttributeChangeCallback(e,t){if(this.state_.isMarked)return;const n=this.callbacks_.attributeChange.find((t=>t.callback===e));n?n.whitelist.push(..."string"==typeof t?[t]:t||[]):this.callbacks_.attributeChange.push({callback:e,whitelist:"string"==typeof t?[t]:t||[]}),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}RemoveAttributeChangeCallback(e,t){const n=this.callbacks_.attributeChange.findIndex((t=>t.callback===e));if(-1==n)return;const i="string"==typeof t?[t]:t||[];0!=i.length&&0!=this.callbacks_.attributeChange[n].whitelist.length?i.forEach((e=>{this.callbacks_.attributeChange[n].whitelist=this.callbacks_.attributeChange[n].whitelist.filter((t=>t!==e))})):this.callbacks_.attributeChange[n].whitelist.splice(0),0==this.callbacks_.attributeChange[n].whitelist.length&&this.callbacks_.attributeChange.splice(n,1),this.NotifyListeners_("attribute-change-callbacks",this.callbacks_.attributeChange)}ExecuteAttributeChangeCallbacks(e){this.queuedAttributeChanges_?!this.queuedAttributeChanges_.includes(e)&&this.queuedAttributeChanges_.push(e):(this.queuedAttributeChanges_=[e],queueMicrotask((()=>{if(!this.queuedAttributeChanges_)return;const e=this.queuedAttributeChanges_;this.queuedAttributeChanges_=null,e.forEach((e=>{(this.callbacks_.attributeChange||[]).filter((t=>0==(t.whitelist||[]).length||t.whitelist.includes(e))).forEach((t=>r((()=>t.callback(e)))))}))})))}Destroy(e){if(this.state_.isDestroyed)return;if(this.state_.isMarked=!0,this.callbacks_.marked.splice(0).forEach((e=>r(e))),!(this.element_ instanceof HTMLTemplateElement)){const t=G(this.componentId_);t&&this.DestroyChildren_(t,this.element_,e||!1)}if(e)return;this.queuedAttributeChanges_=null,this.callbacks_.uninit.splice(0).forEach((e=>r(e))),this.callbacks_.post.splice(0),this.callbacks_.treeChange.splice(0),this.callbacks_.attributeChange.splice(0),this.data_={},this.locals_={},this.state_.isDestroyed=!0,xt(this.element_),I().GetMutationObserver().Unobserve(this.element_);const t=G(this.componentId_);if(null==t||t.RemoveElementScope(this.id_),delete this.element_[S],this.isRoot_){const e=this.componentId_;null==t||t.GetBackend().changes.AddNextTickHandler((()=>{I().RemoveComponent(e),T(e)}))}}IsMarked(){return this.state_.isMarked}IsDestroyed(){return this.state_.isDestroyed}GetDirectiveManager(){return this.managers_.directive=this.managers_.directive||new DirectiveManager}DestroyChildren_(e,t,n){Array.from(t.children).filter((e=>!e.contains(t))).forEach((t=>{const i=e.FindElementScope(t);i?i.Destroy(n):this.DestroyChildren_(e,t,n)}))}}class Scope{constructor(e,t,n){this.componentId_=e,this.id_=t,this.root_=n,this.name_="",this.proxy_=new RootProxy(this.componentId_,{},this.id_)}GetComponentId(){return this.componentId_}GetId(){return this.id_}SetName(e){this.name_=e}GetName(){return this.name_}GetRoot(){return this.root_}GetProxy(){return this.proxy_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentElement;n;n=n.parentElement){try{if(t(n))return n}catch(e){}if(n===this.root_)break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}Destroy(){this.componentId_="",this.id_="",this.name_="",this.root_=document.createElement("div"),r((()=>this.proxy_.Destroy()))}}class BaseComponent extends ChangesMonitor{constructor(e,t){super(),this.id_=e,this.root_=t,this.isDestroying_=!1,this.isDestroyed_=!1,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_=new Context,this.scopes_={},this.elementScopes_={},this.proxies_={},this.refs_={},this.currentScope_=new Stack,this.selectionScopes_=new Stack,this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=new Array,this.observers_={intersections:{}},this.changes_=new Changes(this.id_),this.rootProxy_=new RootProxy(this.id_,{}),this.proxies_[this.rootProxy_.GetPath()]=this.rootProxy_,I().GetMutationObserver().Observe(this.root_,(({added:t,removed:n,attributes:i})=>{const s=G(e);if(!s)return;const o=new Array,l=I().GetConfig().GetDirectiveRegex(),a=null==i?void 0:i.filter((e=>e.target instanceof HTMLElement));null==a||a.forEach((e=>{var t;l.test(e.name)?e.target.hasAttribute(e.name)&&!o.includes(e.target)&&o.push(e.target):null===(t=null==s?void 0:s.FindElementScope(e.target))||void 0===t||t.ExecuteAttributeChangeCallbacks(e.name)})),a&&this.attributeObservers_.forEach((e=>{const t=a.filter((t=>t.target===e.element||e.element.contains(t.target)));0!=t.length&&r((()=>e.callback(t)))})),o.forEach((e=>_t({element:e,component:s,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})));const c=[...t||[]];null==t||t.filter((e=>!(null==n?void 0:n.includes(e)))).forEach((e=>{var t;if(e instanceof HTMLElement&&!s.FindElementScope(e)){_t({component:s,element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}});for(let n=e.parentElement;n&&(null===(t=s.FindElementScope(n))||void 0===t||t.ExecuteTreeChangeCallbacks([e],[]),n!==this.root_);n=n.parentElement);}})),null==n||n.filter((e=>!c.includes(e))).forEach((e=>{var t;e instanceof HTMLElement&&(null===(t=s.FindElementScope(e))||void 0===t||t.Destroy())}))}),["add","remove","attribute"])}Destroy(){this.isDestroying_||this.isDestroyed_||(this.isDestroying_=!0,this.reactiveState_="default",this.name_="",this.proxyAccessHandler_=null,this.context_.Purge(),r((()=>this.changes_.Destroy())),Object.values(this.scopes_).forEach((e=>r((()=>e.Destroy())))),this.scopes_={},Object.values(this.elementScopes_).forEach((e=>r((()=>e.Destroy())))),this.elementScopes_={},r((()=>this.rootProxy_.Destroy())),this.refs_={},Object.values(this.proxies_).forEach((e=>r((()=>e.Destroy())))),this.proxies_={},this.currentScope_.Purge(),this.selectionScopes_.Purge(),this.uniqueMarkers_={level0:0,level1:0,level2:0},this.attributeObservers_=[],Object.values(this.observers_.intersections).forEach((e=>r((()=>e.Destroy())))),this.observers_.intersections={},this.isDestroyed_=!0,this.isDestroying_=!1)}IsDestroyed(){return this.isDestroying_||this.isDestroyed_}SetReactiveState(e){this.NotifyListeners_("reactive-state",this.reactiveState_=e)}GetReactiveState(){return"default"===this.reactiveState_?st().GetReactiveState():this.reactiveState_}GetId(){return this.id_}GenerateUniqueId(e,t){const n=Pe(this.uniqueMarkers_,`Cmpnt<${this.id_}>.`,e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}SetName(e){this.NotifyListeners_("name",this.name_=e)}GetName(){return this.name_}SetProxyAccessHandler(e){const t=this.proxyAccessHandler_;return this.proxyAccessHandler_=e,this.NotifyListeners_("proxy-access-handler",this.proxyAccessHandler_),t}GetProxyAccessHandler(){return this.proxyAccessHandler_}CreateScope(e){const t=Object.values(this.scopes_).find((t=>t.GetRoot()===e));if(t)return t;if(e===this.root_||!this.root_.contains(e))return null;const n=new Scope(this.id_,this.GenerateUniqueId("scope_"),e);return this.scopes_[n.GetId()]=n,this.AddProxy(n.GetProxy()),this.NotifyListeners_("scopes",this.scopes_),n}RemoveScope(e){const t="string"==typeof e?e:e.GetId();this.scopes_.hasOwnProperty(t)&&(this.RemoveProxy(this.scopes_[t].GetProxy()),delete this.scopes_[t],this.NotifyListeners_("scopes",this.scopes_))}FindScopeById(e){return this.scopes_.hasOwnProperty(e)?this.scopes_[e]:null}FindScopeByName(e){return Object.values(this.scopes_).find((t=>t.GetName()===e))||null}FindScopeByRoot(e){return Object.values(this.scopes_).find((t=>t.GetRoot()===e))||null}PushCurrentScope(e){this.currentScope_.Push(e),this.NotifyListeners_("current-scope",this.currentScope_)}PopCurrentScope(){const e=this.currentScope_.IsEmpty(),t=this.currentScope_.Pop();return!e&&this.NotifyListeners_("current-scope",this.currentScope_),t}PeekCurrentScope(){return this.currentScope_.Peek()}InferScopeFrom(e){const t=I().PeekScopeContext();if(t)return t;let n=null;for(const t in this.scopes_){const i=this.scopes_[t],r=i.GetRoot();if(r===e)return i;!r.contains(e)||n&&!n.GetRoot().contains(r)||(n=i)}return n}PushSelectionScope(){const e={set:!1};return this.selectionScopes_.Push(e),this.NotifyListeners_("selection-scopes",this.selectionScopes_),e}PopSelectionScope(){const e=this.selectionScopes_.IsEmpty(),t=this.selectionScopes_.Pop();return!e&&this.NotifyListeners_("selection-scopes",this.selectionScopes_),t}PeekSelectionScope(){return this.selectionScopes_.Peek()}GetRoot(){return this.root_}FindElement(e,t){if(e===this.root_||!this.root_.contains(e))return null;for(let n=e.parentNode;n;n=n.parentNode)try{if(n instanceof HTMLElement&&t(n))return n;if(n===this.root_)break}catch(e){break}return null}FindAncestor(e,t){let n=t||0;return this.FindElement(e,(()=>0==n--))}CreateElementScope(e){const t=Object.values(this.elementScopes_).find((t=>t.GetElement()===e));if(t)return t;if(e!==this.root_&&!this.root_.contains(e))return null;const n=new ElementScope(this.id_,this.GenerateUniqueId("elscope_"),e,e===this.root_);this.elementScopes_[n.GetId()]=n,e[S]=n.GetId();const i=t=>{const n=ne(e,[st().GetDirectiveName(t,!1),st().GetDirectiveName(t,!0)]);if(n){const t=ht(n.name,n.value);t&&mt(this,e,t)}};return["data","component","ref","locals","init"].forEach((e=>i(e))),n.SetInitialized(),"OnElementScopeCreated"in e&&"function"==typeof e.OnElementScopeCreated&&r((()=>e.OnElementScopeCreated({componentId:this.id_,component:this,scope:n}))),this.NotifyListeners_("element-scopes",this.elementScopes_),n}RemoveElementScope(e){delete this.elementScopes_[e],this.NotifyListeners_("element-scopes",this.elementScopes_)}FindElementScope(e){if("string"==typeof e)return e in this.elementScopes_?this.elementScopes_[e]:null;const t=!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_;return t&&S in t&&"string"==typeof t[S]&&t[S]in this.elementScopes_?this.elementScopes_[t[S]]:null}FindElementLocal(e,t,n){const i=this.FindElementScope(e);if(null==i?void 0:i.HasLocal(t))return i;if(!n||!i&&"string"==typeof e)return null;const r=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_);if(!r)return null;const s=this.FindAncestor(r);return s?this.FindElementLocal(s,t,!0):null}FindElementLocalValue(e,t,n){const i=this.FindElementScope(e),r=i?i.GetLocal(t):I().CreateNothing();if(!I().IsNothing(r)||!n||!i&&"string"==typeof e)return r;const s=(null==i?void 0:i.GetElement())||(!0===e?this.context_.Peek(E.self):e instanceof Node?e:this.root_);if(!s)return r;const o=this.FindAncestor(s);return o?this.FindElementLocalValue(o,t,!0):r}SetElementLocalValue(e,t,n){var i;null===(i=this.FindElementScope(e))||void 0===i||i.SetLocal(t,n)}DeleteElementLocalValue(e,t){var n;null===(n=this.FindElementScope(e))||void 0===n||n.DeleteLocal(t)}AddProxy(e){this.proxies_[e.GetPath()]=e,this.NotifyListeners_("proxies",this.proxies_)}RemoveProxy(e){const t="string"==typeof e?e:e.GetPath();this.proxies_.hasOwnProperty(t)&&(delete this.proxies_[t],this.NotifyListeners_("proxies",this.proxies_))}GetRootProxy(){return this.rootProxy_}FindProxy(e){return e in this.proxies_?this.proxies_[e]:null}AddRefElement(e,t){this.refs_[e]=t,this.NotifyListeners_("refs",this.refs_)}FindRefElement(e){return e in this.refs_?this.refs_[e]:null}GetRefElements(){return this.refs_}AddAttributeChangeCallback(e,t){this.attributeObservers_.push({element:e,callback:t}),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}RemoveAttributeChangeCallback(e,t){this.attributeObservers_=this.attributeObservers_.filter((n=>n.element!==e||t&&n.callback!==t)),this.NotifyListeners_("attribute-observers",this.attributeObservers_)}AddIntersectionObserver(e){this.observers_.intersections[e.GetId()]=e,this.NotifyListeners_("intersection-observers",this.observers_.intersections)}FindIntersectionObserver(e){return e in this.observers_.intersections?this.observers_.intersections[e]:null}RemoveIntersectionObserver(e){e in this.observers_.intersections&&(delete this.observers_.intersections[e],this.NotifyListeners_("intersection-observers",this.observers_.intersections))}GetBackend(){return{context:this.context_,changes:this.changes_}}GetGlobal(){return I()}}function Pt(e,t){var n;null===(n="string"==typeof e?G(e):e)||void 0===n||n.PushCurrentScope(t)}function It(e){var t;return(null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.PopCurrentScope())||null}function kt(e){var t;return(null===(t="string"==typeof e?G(e):e)||void 0===t?void 0:t.PeekCurrentScope())||null}function Ot(e,t,n,i={}){var r;let s=null;if(s=e instanceof HTMLElement?(null===(r="string"==typeof n?G(n):n)||void 0===r?void 0:r.FindElementScope(e))||null:e,!s)return i;let o=s.GetLocal(t);return I().IsNothing(o)&&s.SetLocal(t,o=i),o}const Rt="__InlineJS_GLOBAL_COMPONENT_KEY__";function Nt(e){const t=globalThis[Rt];if(t||!1===e)return t.component;const n=document.createElement("template");return globalThis[Rt]={root:n,component:I().CreateComponent(n)},globalThis[Rt]}const Tt=300,Gt=0,wt=0,Ft=0;function Dt(e,t){if(!e||I().IsNothing(e)||e.allowed&&"both"!==e.allowed&&e.allowed!==(t?"reversed":"normal"))return null;const n=I().GetConcept("animation");return{ease:e.ease||(null==n?void 0:n.GetEaseCollection().Find("default"))||null,actor:e.actor||(null==n?void 0:n.GetActorCollection().Find("default"))||null,duration:e.duration||Tt,initialDelay:e.initialDelay||wt,delay:e.delay||Gt,repeats:e.repeats||Ft,allowed:e.allowed||"both"}}function Lt({componentId:e,contextElement:t,target:n,keyframes:i,duration:s=0,initialDelay:o=0,delay:l=0,repeats:a=0,callback:c,onAbort:u}){var h,d;if(s<=0)return r((()=>c(!1))),null;const p=n||t;let m=null;const f=()=>{_||(p.dispatchEvent(new CustomEvent("transition.enter")),(m=p.animate(i)).finished.then((()=>{p.dispatchEvent(new CustomEvent("transition.leave")),(-1===a||a>0)&&(a>0&&a--,setTimeout((()=>f()),l)),r((()=>c(!0)))})).catch((()=>{g(),r((()=>c(!0)))})))};let _=!1,y=!1;const b=()=>{_||(_=!0,g())},g=()=>{var t,n;if(!y)return null===(n=null===(t=G(e))||void 0===t?void 0:t.FindElementScope(p))||void 0===n||n.RemoveUninitCallback(b),p.dispatchEvent(new CustomEvent("transition.canceled")),null==m||m.cancel(),u&&r((()=>u())),y=!0,!1};return null===(d=null===(h=G(e))||void 0===h?void 0:h.FindElementScope(p))||void 0===d||d.AddUninitCallback(b),o>0?setTimeout((()=>!_&&f()),o):f(),b}function Mt({componentId:e,contextElement:t,target:n,callback:i,onAbort:s,onPass:o,reverse:l,allowRepeats:a,restore:c}){var u,h,d,p;const m=n||t;if("WaitTransition"in m&&"function"==typeof m.WaitTransition)return m.WaitTransition({componentId:e,contextElement:t,target:n,callback:i,onAbort:s,reverse:l,allowRepeats:a});const f=Dt((null===(h=null===(u=G(e))||void 0===u?void 0:u.FindElementScope(t))||void 0===h?void 0:h.GetData("transition"))||null,l||!1);if(!f||!f.actor||!f.ease||"number"!=typeof f.duration||f.duration<=0)return i(!1),null;const _=e=>{var t;return"function"==typeof(null==f?void 0:f.actor)?null==f?void 0:f.actor(e):f&&(null===(t=f.actor)||void 0===t?void 0:t.Handle(e))},y=e=>{var t;return"function"==typeof f.ease?f.ease(e):f&&(null===(t=f.ease)||void 0===t?void 0:t.Handle(e))||0};let b=!1,g=0;const v=()=>b=!0,E=e=>l?1-e:e,S=()=>{var n,i;return null===(i=null===(n=G(e))||void 0===n?void 0:n.FindElementScope(t))||void 0===i||i.RemoveUninitCallback(v),m.dispatchEvent(new CustomEvent("transition.canceled")),s&&r((()=>s())),!1},C=(e,t,n)=>{o&&r((()=>o({duration:f.duration,elapsed:t,fraction:n,target:m,stage:e})))};null===(p=null===(d=G(e))||void 0===d?void 0:d.FindElementScope(t))||void 0===p||p.AddUninitCallback(v);const A=f.duration,x=e=>{const t=E(e/A),n=y({duration:A,elapsed:e,fraction:t}),i=0==g++?"start":"middle";_({duration:A,elapsed:e,fraction:n,elapsedFraction:t,stage:i,restore:c,target:m,reverse:!!l}),C(i,e,n)};x(0);const P=()=>{ce(A,0,a?f.repeats:0,f.delay).While((({elapsed:e})=>{if(b)return S();0==g&&(m.style.transform="",m.style.transformOrigin="50% 50%",m.dispatchEvent(new CustomEvent("transition.enter"))),x(e)})).Final((()=>{if(b)S();else{const e=E(1);_({duration:A,elapsedFraction:e,elapsed:A,target:m,stage:"end",fraction:y({duration:f.duration,elapsed:f.duration,fraction:e}),reverse:!!l}),C("end",f.duration,e),m.dispatchEvent(new CustomEvent("transition.leave")),r((()=>i(!0)))}}))};return(f.initialDelay||0)>0?setTimeout((()=>!b&&P()),f.initialDelay):P(),v}const{entries:jt,setPrototypeOf:Ht,isFrozen:Bt,getPrototypeOf:Ut,getOwnPropertyDescriptor:$t}=Object;let{freeze:Wt,seal:zt,create:Jt}=Object,{apply:qt,construct:Kt}="undefined"!=typeof Reflect&&Reflect;Wt||(Wt=function(e){return e}),zt||(zt=function(e){return e}),qt||(qt=function(e,t,n){return e.apply(t,n)}),Kt||(Kt=function(e,t){return new e(...t)});const Vt=hn(Array.prototype.forEach),Yt=hn(Array.prototype.lastIndexOf),Xt=hn(Array.prototype.pop),Zt=hn(Array.prototype.push),Qt=hn(Array.prototype.splice),en=hn(String.prototype.toLowerCase),tn=hn(String.prototype.toString),nn=hn(String.prototype.match),rn=hn(String.prototype.replace),sn=hn(String.prototype.indexOf),on=hn(String.prototype.trim),ln=hn(Object.prototype.hasOwnProperty),an=hn(RegExp.prototype.test),cn=(un=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kt(un,t)});var un;function hn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return qt(e,t,i)}}function dn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:en;Ht&&Ht(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(Bt(t)||(t[i]=e),r=e)}e[r]=!0}return e}function pn(e){for(let t=0;t<e.length;t++){ln(e,t)||(e[t]=null)}return e}function mn(e){const t=Jt(null);for(const[n,i]of jt(e)){ln(e,n)&&(Array.isArray(i)?t[n]=pn(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=mn(i):t[n]=i)}return t}function fn(e,t){for(;null!==e;){const n=$t(e,t);if(n){if(n.get)return hn(n.get);if("function"==typeof n.value)return hn(n.value)}e=Ut(e)}return function(){return null}}const _n=Wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yn=Wt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bn=Wt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),gn=Wt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vn=Wt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),En=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Sn=Wt(["#text"]),Cn=Wt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),An=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xn=Wt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pn=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),In=zt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kn=zt(/<%[\w\W]*|[\w\W]*%>/gm),On=zt(/\$\{[\w\W]*/gm),Rn=zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nn=zt(/^aria-[\-\w]+$/),Tn=zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gn=zt(/^(?:\w+script|data):/i),wn=zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fn=zt(/^html$/i),Dn=zt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ln=Object.freeze({__proto__:null,ARIA_ATTR:Nn,ATTR_WHITESPACE:wn,CUSTOM_ELEMENT:Dn,DATA_ATTR:Rn,DOCTYPE_NAME:Fn,ERB_EXPR:kn,IS_ALLOWED_URI:Tn,IS_SCRIPT_OR_DATA:Gn,MUSTACHE_EXPR:In,TMPLIT_EXPR:On});const Mn=1,jn=3,Hn=7,Bn=8,Un=9,$n=function(){return"undefined"==typeof window?null:window};var Wn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$n();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==Un||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const r=i,s=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:a,Element:c,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:m}=t,f=c.prototype,_=fn(f,"cloneNode"),y=fn(f,"remove"),b=fn(f,"nextSibling"),g=fn(f,"childNodes"),v=fn(f,"parentNode");if("function"==typeof l){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let E,S="";const{implementation:C,createNodeIterator:A,createDocumentFragment:x,getElementsByTagName:P}=i,{importNode:I}=r;let k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof jt&&"function"==typeof v&&C&&void 0!==C.createHTMLDocument;const{MUSTACHE_EXPR:O,ERB_EXPR:R,TMPLIT_EXPR:N,DATA_ATTR:T,ARIA_ATTR:G,IS_SCRIPT_OR_DATA:w,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:D}=Ln;let{IS_ALLOWED_URI:L}=Ln,M=null;const j=dn({},[..._n,...yn,...bn,...vn,...Sn]);let H=null;const B=dn({},[...Cn,...An,...xn,...Pn]);let U=Object.seal(Jt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,W=null,z=!0,J=!0,q=!1,K=!0,V=!1,Y=!0,X=!1,Z=!1,Q=!1,ee=!1,te=!1,ne=!1,ie=!0,re=!1,se=!0,oe=!1,le={},ae=null;const ce=dn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const he=dn({},["audio","video","img","source","image","track"]);let de=null;const pe=dn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let ye=_e,be=!1,ge=null;const ve=dn({},[me,fe,_e],tn);let Ee=dn({},["mi","mo","mn","ms","mtext"]),Se=dn({},["annotation-xml"]);const Ce=dn({},["title","style","font","a","script"]);let Ae=null;const xe=["application/xhtml+xml","text/html"];let Pe=null,Ie=null;const ke=i.createElement("form"),Oe=function(e){return e instanceof RegExp||e instanceof Function},Re=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ie||Ie!==e){if(e&&"object"==typeof e||(e={}),e=mn(e),Ae=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Pe="application/xhtml+xml"===Ae?tn:en,M=ln(e,"ALLOWED_TAGS")?dn({},e.ALLOWED_TAGS,Pe):j,H=ln(e,"ALLOWED_ATTR")?dn({},e.ALLOWED_ATTR,Pe):B,ge=ln(e,"ALLOWED_NAMESPACES")?dn({},e.ALLOWED_NAMESPACES,tn):ve,de=ln(e,"ADD_URI_SAFE_ATTR")?dn(mn(pe),e.ADD_URI_SAFE_ATTR,Pe):pe,ue=ln(e,"ADD_DATA_URI_TAGS")?dn(mn(he),e.ADD_DATA_URI_TAGS,Pe):he,ae=ln(e,"FORBID_CONTENTS")?dn({},e.FORBID_CONTENTS,Pe):ce,$=ln(e,"FORBID_TAGS")?dn({},e.FORBID_TAGS,Pe):mn({}),W=ln(e,"FORBID_ATTR")?dn({},e.FORBID_ATTR,Pe):mn({}),le=!!ln(e,"USE_PROFILES")&&e.USE_PROFILES,z=!1!==e.ALLOW_ARIA_ATTR,J=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,V=e.SAFE_FOR_TEMPLATES||!1,Y=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,L=e.ALLOWED_URI_REGEXP||Tn,ye=e.NAMESPACE||_e,Ee=e.MATHML_TEXT_INTEGRATION_POINTS||Ee,Se=e.HTML_INTEGRATION_POINTS||Se,U=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),V&&(J=!1),te&&(ee=!0),le&&(M=dn({},Sn),H=[],!0===le.html&&(dn(M,_n),dn(H,Cn)),!0===le.svg&&(dn(M,yn),dn(H,An),dn(H,Pn)),!0===le.svgFilters&&(dn(M,bn),dn(H,An),dn(H,Pn)),!0===le.mathMl&&(dn(M,vn),dn(H,xn),dn(H,Pn))),e.ADD_TAGS&&(M===j&&(M=mn(M)),dn(M,e.ADD_TAGS,Pe)),e.ADD_ATTR&&(H===B&&(H=mn(H)),dn(H,e.ADD_ATTR,Pe)),e.ADD_URI_SAFE_ATTR&&dn(de,e.ADD_URI_SAFE_ATTR,Pe),e.FORBID_CONTENTS&&(ae===ce&&(ae=mn(ae)),dn(ae,e.FORBID_CONTENTS,Pe)),se&&(M["#text"]=!0),X&&dn(M,["html","head","body"]),M.table&&(dn(M,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw cn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw cn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=e.TRUSTED_TYPES_POLICY,S=E.createHTML("")}else void 0===E&&(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(m,s)),null!==E&&"string"==typeof S&&(S=E.createHTML(""));Wt&&Wt(e),Ie=e}},Ne=dn({},[...yn,...bn,...gn]),Te=dn({},[...vn,...En]),Ge=function(e){Zt(n.removed,{element:e});try{v(e).removeChild(e)}catch(t){y(e)}},we=function(e,t){try{Zt(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Zt(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ge(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Fe=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=nn(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ae&&ye===_e&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=E?E.createHTML(e):e;if(ye===_e)try{t=(new p).parseFromString(r,Ae)}catch(e){}if(!t||!t.documentElement){t=C.createDocument(ye,"template",null);try{t.documentElement.innerHTML=be?S:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),ye===_e?P.call(t,X?"html":"body")[0]:X?t.documentElement:s},De=function(e){return A.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Me=function(e){return"function"==typeof a&&e instanceof a};function je(e,t,i){Vt(e,(e=>{e.call(n,t,i,Ie)}))}const He=function(e){let t=null;if(je(k.beforeSanitizeElements,e,null),Le(e))return Ge(e),!0;const i=Pe(e.nodeName);if(je(k.uponSanitizeElement,e,{tagName:i,allowedTags:M}),Y&&e.hasChildNodes()&&!Me(e.firstElementChild)&&an(/<[/\w!]/g,e.innerHTML)&&an(/<[/\w!]/g,e.textContent))return Ge(e),!0;if(e.nodeType===Hn)return Ge(e),!0;if(Y&&e.nodeType===Bn&&an(/<[/\w]/g,e.data))return Ge(e),!0;if(!M[i]||$[i]){if(!$[i]&&Ue(i)){if(U.tagNameCheck instanceof RegExp&&an(U.tagNameCheck,i))return!1;if(U.tagNameCheck instanceof Function&&U.tagNameCheck(i))return!1}if(se&&!ae[i]){const t=v(e)||e.parentNode,n=g(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const r=_(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,b(e))}}}return Ge(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=en(e.tagName),i=en(t.tagName);return!!ge[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===_e?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===i||Ee[i]):Boolean(Ne[n]):e.namespaceURI===me?t.namespaceURI===_e?"math"===n:t.namespaceURI===fe?"math"===n&&Se[i]:Boolean(Te[n]):e.namespaceURI===_e?!(t.namespaceURI===fe&&!Se[i])&&!(t.namespaceURI===me&&!Ee[i])&&!Te[n]&&(Ce[n]||!Ne[n]):!("application/xhtml+xml"!==Ae||!ge[e.namespaceURI]))}(e)?(Ge(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!an(/<\/no(script|embed|frames)/i,e.innerHTML)?(V&&e.nodeType===jn&&(t=e.textContent,Vt([O,R,N],(e=>{t=rn(t,e," ")})),e.textContent!==t&&(Zt(n.removed,{element:e.cloneNode()}),e.textContent=t)),je(k.afterSanitizeElements,e,null),!1):(Ge(e),!0)},Be=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in ke))return!1;if(J&&!W[t]&&an(T,t));else if(z&&an(G,t));else if(!H[t]||W[t]){if(!(Ue(e)&&(U.tagNameCheck instanceof RegExp&&an(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&an(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&an(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(de[t]);else if(an(L,rn(n,F,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==sn(n,"data:")||!ue[e]){if(q&&!an(w,rn(n,F,"")));else if(n)return!1}else;return!0},Ue=function(e){return"annotation-xml"!==e&&nn(e,D)},$e=function(e){je(k.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let r=t.length;for(;r--;){const s=t[r],{name:o,namespaceURI:l,value:a}=s,c=Pe(o),u=a;let h="value"===o?u:on(u);if(i.attrName=c,i.attrValue=h,i.keepAttr=!0,i.forceKeepAttr=void 0,je(k.uponSanitizeAttribute,e,i),h=i.attrValue,!re||"id"!==c&&"name"!==c||(we(o,e),h="user-content-"+h),Y&&an(/((--!?|])>)|<\/(style|title)/i,h)){we(o,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){we(o,e);continue}if(!K&&an(/\/>/i,h)){we(o,e);continue}V&&Vt([O,R,N],(e=>{h=rn(h,e," ")}));const d=Pe(e.nodeName);if(Be(d,c,h)){if(E&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(d,c)){case"TrustedHTML":h=E.createHTML(h);break;case"TrustedScriptURL":h=E.createScriptURL(h)}if(h!==u)try{l?e.setAttributeNS(l,o,h):e.setAttribute(o,h),Le(e)?Ge(e):Xt(n.removed)}catch(t){we(o,e)}}else we(o,e)}je(k.afterSanitizeAttributes,e,null)},We=function e(t){let n=null;const i=De(t);for(je(k.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)je(k.uponSanitizeShadowNode,n,null),He(n),$e(n),n.content instanceof o&&e(n.content);je(k.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,s=null,l=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Me(e)){if("function"!=typeof e.toString)throw cn("toString is not a function");if("string"!=typeof(e=e.toString()))throw cn("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Re(t),n.removed=[],"string"==typeof e&&(oe=!1),oe){if(e.nodeName){const t=Pe(e.nodeName);if(!M[t]||$[t])throw cn("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)i=Fe("\x3c!----\x3e"),s=i.ownerDocument.importNode(e,!0),s.nodeType===Mn&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!ee&&!V&&!X&&-1===e.indexOf("<"))return E&&ne?E.createHTML(e):e;if(i=Fe(e),!i)return ee?null:ne?S:""}i&&Q&&Ge(i.firstChild);const u=De(oe?e:i);for(;l=u.nextNode();)He(l),$e(l),l.content instanceof o&&We(l.content);if(oe)return e;if(ee){if(te)for(c=x.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(H.shadowroot||H.shadowrootmode)&&(c=I.call(r,c,!0)),c}let h=X?i.outerHTML:i.innerHTML;return X&&M["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&an(Fn,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),V&&Vt([O,R,N],(e=>{h=rn(h,e," ")})),E&&ne?E.createHTML(h):h},n.setConfig=function(){Re(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Ie=null,Z=!1},n.isValidAttribute=function(e,t,n){Ie||Re({});const i=Pe(e),r=Pe(t);return Be(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&Zt(k[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Yt(k[e],t);return-1===n?void 0:Qt(k[e],n,1)[0]}return Xt(k[e])},n.removeHooks=function(e){k[e]=[]},n.removeAllHooks=function(){k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function zn({element:e,html:t,type:n="replace",component:i,processDirectives:s=!0,beforeRemove:o,afterRemove:l,beforeInsert:a,afterInsert:c,afterTransitionCallback:u,transitionScope:h,useTransition:d,sanitize:p=!0}){const m="string"==typeof i?i:(null==i?void 0:i.GetId())||"",f=()=>{if(!1===(a&&r(a,"InlineJS.InsertHtml",e)))return;const i=document.createElement("template");i.innerHTML=p?Wn.sanitize(t):t,"replace"===n||"append"===n?e.append(...Array.from(i.content.childNodes)):"prepend"===n&&e.prepend(...Array.from(i.content.childNodes)),c&&r(c,"InlineJS.InsertHtml",e);const o=G(m);s&&o&&Array.from(e.children).forEach((e=>_t({component:o,element:e,options:{checkTemplate:!0,checkDocument:!0,ignoreChildren:!1}}))),(u||d)&&((h||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!0}})),Mt({componentId:m,contextElement:h||e,target:e,callback:()=>{(h||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!0}})),u&&u()}}))},_=e=>{const t=G(m),n=I();Array.from(e.children).forEach((e=>{var i;let r=null==t?void 0:t.FindElementScope(e);r||(r=null===(i=n.InferComponentFrom(e))||void 0===i?void 0:i.FindElementScope(e))?r.Destroy():_(e)}))},y=()=>{!1!==(o&&r((()=>o(!1)),"InlineJS.InsertHtml",e))&&(_(e),Array.from(e.childNodes).forEach((e=>e.remove())),l&&r(l,"InlineJS.InsertHtml",e))};if("replace"===n&&0!=e.childNodes.length){if(!1===(o&&r((()=>o(!0)),"InlineJS.InsertHtml",e)))return;u||d?((h||e).dispatchEvent(new CustomEvent("html.transition.begin",{detail:{insert:!1}})),Mt({componentId:m,contextElement:h||e,target:e,reverse:!0,callback:()=>{(h||e).dispatchEvent(new CustomEvent("html.transition.end",{detail:{insert:!1}})),y(),f()}})):(y(),f())}else f()}class NextCooldown{constructor(e,t,n=!1){this.componentId_=e,this.callback_=t,this.initialized_=n,this.queued_=!1,this.setCallback_=null}Queue(e){var t;const n=()=>{var t;return null===(t=this.setCallback_||e||this.callback_)||void 0===t?void 0:t()},i=nt(this.componentId_);!this.queued_&&this.initialized_?(this.queued_=!0,this.ListenNext_(null===(t=G(this.componentId_))||void 0===t?void 0:t.GetBackend().changes,(()=>i((()=>{this.queued_=!1,n()}))))):this.initialized_?this.setCallback_=e||null:(this.initialized_=!0,n())}ListenNext_(e,t){}}class NextIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextIdleHandler(t)}}class NextNonIdle extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextNonIdleHandler(t)}}class NextTick extends NextCooldown{constructor(e,t,n=!1){super(e,t,n)}ListenNext_(e,t){null==e||e.AddNextTickHandler(t)}}class MagicManager{constructor(){this.handlers_={}}AddHandler(e,t,n){let i="",r=null;"function"==typeof e?(i=t||"",r=e):(i=e.GetName(),r=t=>e.Handle(t)),i&&(this.handlers_[i]={callback:r,onAccess:n})}RemoveHandler(e){e in this.handlers_&&delete this.handlers_[e]}FindHandler(e,t){return e in this.handlers_?(t&&this.handlers_[e].onAccess&&this.handlers_[e].onAccess(t),this.handlers_[e].callback):null}}class MutationObserver{constructor(){if(this.uniqueMarkers_={level0:0,level1:0,level2:0},this.observer_=null,this.handlers_={},globalThis.MutationObserver)try{this.observer_=new globalThis.MutationObserver((e=>{const t={},n=e=>t[e]=t[e]||{added:new Array,removed:new Array,attributes:new Array};e.forEach((e=>{var t,i;if("childList"===(null==e?void 0:e.type)){const i=e=>{var t;const r=A((null===(t=L(e))||void 0===t?void 0:t.GetRoot())||null);r?n(r).removed.push(e):Array.from(e.childNodes).filter((t=>!t.contains(e))).forEach(i)};e.removedNodes.forEach(i);const r=e.target instanceof HTMLElement?A((null===(t=L(e.target))||void 0===t?void 0:t.GetRoot())||null):"";r&&n(r).added.push(...Array.from(e.addedNodes))}else if("attributes"===(null==e?void 0:e.type)&&e.attributeName){const t=e.target instanceof HTMLElement?A((null===(i=L(e.target))||void 0===i?void 0:i.GetRoot())||null):"";t&&n(t).attributes.push({name:e.attributeName,target:e.target})}})),0!=Object.keys(t).length&&Object.entries(this.handlers_).forEach((([e,n])=>{const i=n.target instanceof HTMLElement?A(n.target):"";if(!i||!(i in t))return;const s=(e,t,n)=>!t.whitelist||t.whitelist.includes(e)?n:void 0,o=s("add",n,t[i].added),l=s("remove",n,t[i].removed),a=s("attribute",n,t[i].attributes);(o||l||a)&&r((()=>n.handler({id:e,added:o,removed:l,attributes:a})),"InlineJS.MutationObserver")}))})),this.observer_.observe(document,{childList:!0,subtree:!0,attributes:!0,characterData:!1})}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){const i=Pe(this.uniqueMarkers_);return this.handlers_[i]={target:e,handler:t,whitelist:n},i}Unobserve(e){"string"!=typeof e?Object.entries(this.handlers_).filter((([t,n])=>n.target===e)).forEach((([e])=>delete this.handlers_[e])):delete this.handlers_[e]}Destroy(){var e;this.uniqueMarkers_={level0:0,level1:0,level2:0},this.handlers_={},null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}class ResizeObserver{constructor(){if(this.observer_=null,this.handlers_=new Array,globalThis.MutationObserver)try{this.observer_=new globalThis.ResizeObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((n=>{r((()=>n.handler({entry:e,observer:t})),"InlineJS.ResizeObserver")}))}))}))}catch(e){this.observer_=null}}GetNative(){return this.observer_}Observe(e,t,n){var i;this.handlers_.push({target:e,handler:t}),null===(i=this.observer_)||void 0===i||i.observe(e,n||{box:"border-box"})}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}Destroy(){var e;this.handlers_=[],null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}class Config{constructor(e){if(this.options_=e,this.defaultOptions_={reactiveState:"unoptimized",directivePrefix:"hx"},this.keyMap_={return:"enter",ctrl:"control",esc:"escape",space:" ",menu:"contextmenu",del:"delete",ins:"insert",plus:"+",minus:"-",star:"*",slash:"/",alpha:Array.from({length:26}).map(((e,t)=>String.fromCharCode(t+97))),digit:Array.from({length:10}).map(((e,t)=>t.toString()))},this.booleanAttributes_=new Array("allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"),this.options_=he(Object.assign({},d("config",!0)),he(this.options_,this.defaultOptions_)),this.UpdateDirectiveRegex_(),!this.options_.directiveNameBuilder){const e=this.options_,t=this.defaultOptions_;e.directiveNameBuilder=(n,i=!1)=>{const r=e.directivePrefix||t.directivePrefix||"hx";return i?`data-${r}-${n}`:`${r}-${n}`}}}GetAppName(){return this.options_.appName||""}SetDirectivePrefix(e){this.options_.directivePrefix=e,this.UpdateDirectiveRegex_()}GetDirectivePrefix(){return this.options_.directivePrefix||this.defaultOptions_.directivePrefix||"hx"}SetElementPrefix(e){this.options_.elementPrefix=e}GetElementPrefix(){return this.options_.elementPrefix||this.GetDirectivePrefix()}GetDirectiveRegex(){return this.options_.directiveRegex||this.UpdateDirectiveRegex_()}GetDirectiveName(e,t){return this.options_.directiveNameBuilder?this.options_.directiveNameBuilder(e,t):e}GetElementName(e){return`${this.GetElementPrefix()}-${e}`}AddKeyEventMap(e,t){this.keyMap_[e]=t}RemoveKeyEventMap(e){delete this.keyMap_[e]}MapKeyEvent(e){return e in this.keyMap_?this.keyMap_[e]:e}AddBooleanAttribute(e){this.booleanAttributes_.push(e)}RemoveBooleanAttribute(e){this.booleanAttributes_=this.booleanAttributes_.filter((t=>t!==e))}IsBooleanAttribute(e){return this.booleanAttributes_.includes(e)}SetReactiveState(e){this.options_.reactiveState=e}GetReactiveState(){return this.options_.reactiveState||this.defaultOptions_.reactiveState||"unoptimized"}SetUseGlobalWindow(e){this.options_.useGlobalWindow=e}GetUseGlobalWindow(){return this.options_.useGlobalWindow||!1}UpdateDirectiveRegex_(){return this.options_.directiveRegex=new RegExp(`^(data-)?${this.GetDirectivePrefix()}-(.+)$`)}SetWrapScopedFunctions(e){this.options_.wrapScopedFunctions=e}GetWrapScopedFunctions(){return this.options_.wrapScopedFunctions||!1}}class NativeFetchConcept{Get(e,t){return fetch(e,t)}}class BaseGlobal extends ChangesMonitor{constructor(e,t=0){super(),this.nothing_=new Nothing,this.currentProxyAccessStorage_=null,this.storedObjects_={},this.lastStoredObjectKey_="",this.componentsMonitorList_=new Array,this.components_={},this.currentComponent_=new Stack,this.scopeContext_=new Stack,this.attributeProcessors_=new Array,this.textContentProcessors_=new Array,this.customElements_={},this.managers_={directive:new DirectiveManager,magic:new MagicManager},this.uniqueMarkers_={level0:0,level1:0,level2:0},this.mutationObserver_=new MutationObserver,this.resizeObserver_=new ResizeObserver,this.nativeFetch_=new NativeFetchConcept,this.fetchConcept_=null,this.concepts_={},this.config_=new Config(e||{}),this.uniqueMarkers_.level0=t||0}SwapConfig(e){this.NotifyListeners_("config",this.config_=e)}GetConfig(){return this.config_}SetCurrentProxyAccessStorage(e){const t=this.currentProxyAccessStorage_;return this.currentProxyAccessStorage_=e,t}GetCurrentProxyAccessStorage(){return this.currentProxyAccessStorage_}UseProxyAccessStorage(e,t){t=t||new ProxyAccessStorage;const n=this.SetCurrentProxyAccessStorage(t),i=r((()=>e(t)),"InlineJS.Global.UseProxyAccessStorage");return this.SetCurrentProxyAccessStorage(n),i}SuspendProxyAccessStorage(e){const t=this.currentProxyAccessStorage_;null==t||t.Suspend();const n=r((()=>e()));return null==t||t.Resume(),n}GenerateUniqueId(e,t){const n=Pe(this.uniqueMarkers_,"",e,t);return this.NotifyListeners_("unique-markers",this.uniqueMarkers_),n}StoreObject({object:e,componentId:t,contextElement:n}){var i;if(this.lastStoredObjectKey_=`@!@${_e(18)}@!@`,n){const r=null===(i=this.FindComponentById(t||"")||this.InferComponentFrom(n))||void 0===i?void 0:i.FindElementScope(n);if(r)return r.SetLocal(this.lastStoredObjectKey_,e),this.lastStoredObjectKey_}return this.storedObjects_[this.lastStoredObjectKey_]=e,this.NotifyListeners_("stored-objects",this.storedObjects_),this.lastStoredObjectKey_}RetrieveObject(e){return this.RetrieveObject_(e,!0)}PeekObject(e){return this.RetrieveObject_(e,!1)}GetLastObjectKey(){return this.lastStoredObjectKey_}AddComponentMonitor(e){this.componentsMonitorList_.push(e),this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}RemoveComponentMonitor(e){const t=this.componentsMonitorList_.length;this.componentsMonitorList_=this.componentsMonitorList_.filter((t=>t!==e)),t!=this.componentsMonitorList_.length&&this.NotifyListeners_("components-monitors",this.componentsMonitorList_)}CreateComponent(e){const t=this.InferComponentFrom(e);if(t)return t;const n=new BaseComponent(this.GenerateUniqueId(),e);return this.components_[n.GetId()]=n,this.componentsMonitorList_.forEach((e=>r((()=>e({action:"add",component:n})),"InlineJS.Global.CreateComponent"))),this.NotifyListeners_("components",this.components_),n}RemoveComponent(e){const t="string"==typeof e?e:e.GetId();if(this.components_.hasOwnProperty(t)){const e=this.components_[t];delete this.components_[t],e.Destroy(),T(t),this.componentsMonitorList_.slice(0).forEach((t=>r((()=>t({action:"remove",component:e})),"InlineJS.Global.RemoveComponent"))),this.NotifyListeners_("components",this.components_)}}TraverseComponents(e){Object.values(this.components_).some((t=>!1===e(t)))}FindComponentById(e){return e&&this.components_.hasOwnProperty(e)?this.components_[e]:null}FindComponentByName(e){return e&&Object.values(this.components_).find((t=>t.GetName()===e))||null}FindComponentByRoot(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e))||null}FindComponentByCallback(e){return Object.values(this.components_).find(e)||null}PushCurrentComponent(e){this.currentComponent_.Push(e),this.NotifyListeners_("current-component",this.currentComponent_)}PopCurrentComponent(){const e=this.currentComponent_.IsEmpty(),t=this.currentComponent_.Pop();return!e&&this.NotifyListeners_("current-component",this.currentComponent_),t}PeekCurrentComponent(){return this.currentComponent_.Peek()}GetCurrentComponent(){return this.FindComponentById(this.PeekCurrentComponent()||"")}InferComponentFrom(e){return e&&Object.values(this.components_).find((t=>t.GetRoot()===e||t.GetRoot().contains(e)))||null}PushScopeContext(e){this.scopeContext_.Push(e),this.NotifyListeners_("scope-context",this.scopeContext_)}PopScopeContext(){const e=this.scopeContext_.IsEmpty(),t=this.scopeContext_.Pop();return!e&&this.NotifyListeners_("scope-context",this.scopeContext_),t}PeekScopeContext(){return this.scopeContext_.Peek()}GetDirectiveManager(){return this.managers_.directive}GetMagicManager(){return this.managers_.magic}AddAttributeProcessor(e){this.attributeProcessors_.push(e),this.NotifyListeners_("attribute-processors",this.attributeProcessors_)}DispatchAttributeProcessing(e){this.DispatchProcessing_(this.attributeProcessors_,e,"InlineJS.Global.DispatchAttribute")}AddTextContentProcessor(e){this.textContentProcessors_.push(e),this.NotifyListeners_("text-content-processors",this.textContentProcessors_)}DispatchTextContentProcessing(e){this.DispatchProcessing_(this.textContentProcessors_,e,"InlineJS.Global.DispatchTextContent")}GetMutationObserver(){return this.mutationObserver_}GetResizeObserver(){return this.resizeObserver_}SetFetchConcept(e){this.fetchConcept_=e,this.NotifyListeners_("fetch-concept",this.fetchConcept_)}GetFetchConcept(){return this.fetchConcept_||this.nativeFetch_}SetConcept(e,t){this.concepts_[e]=t,this.NotifyListeners_("concepts",this.concepts_)}RemoveConcept(e){delete this.concepts_[e],this.NotifyListeners_("concepts",this.concepts_)}GetConcept(e){return this.concepts_.hasOwnProperty(e)?this.concepts_[e]:null}AddCustomElement(e,t){this.customElements_.hasOwnProperty(e)||(this.customElements_[e]=t,customElements.define(this.config_.GetElementName(e),t),this.NotifyListeners_("custom-elements",this.customElements_))}FindCustomElement(e){return this.customElements_.hasOwnProperty(e)?this.customElements_[e]:null}CreateChildProxy(e,t,n){return new ChildProxy(e,t,n)}CreateFuture(e){return new Future(e)}IsFuture(e){return e instanceof Future}CreateNothing(){return this.nothing_}IsNothing(e){return e instanceof Nothing}CreateRange(e,t){return new Range(e,t)}IsRange(e){return e instanceof Range}CreateTimedRange(e,t,n,i){return new TimedRange(e,t,n,i)}IsTimedRange(e){return e instanceof TimedRange}RetrieveObject_({key:e,componentId:t,contextElement:n},i){if(n){const r=this.FindComponentById(t||"")||this.InferComponentFrom(n);if(r){const t=r.FindElementLocal(n,e,!0);if(t){const n=t.GetLocal(e);return i&&(t.DeleteLocal(e),e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_="")),n}}}if(this.storedObjects_.hasOwnProperty(e)){const t=this.storedObjects_[e];return i&&(e===this.lastStoredObjectKey_&&(this.lastStoredObjectKey_=""),delete this.storedObjects_[e],this.NotifyListeners_("stored-objects",this.storedObjects_)),t}return this.CreateNothing()}DispatchProcessing_(e,t,n){const i=tt(t.component||this.FindComponentById(t.componentId),t.proxyAccessHandler||null);e.forEach((e=>{r((()=>e(t)),n,t.contextElement)})),i()}}function Jn(e,t=0){const n=new BaseGlobal(e,t);return N(),p("global",{base:n}),window.dispatchEvent(new CustomEvent(P)),n}function qn(e,t=0){return I()||Jn(e,t)}const Kn=/\{\{\s*(.+?)\s*\}\}/g,Vn=/\{\{.+?\}\}/;function Yn(e,t,n,i,r){const s=[...n.matchAll(i)];if(0===s.length)return void r(0,n,I().CreateNothing(),"");let o=0;s.forEach(((i,l)=>{var a,c;const u=i[1],h=n.substring(o,i.index);o=(i.index||0)+i[0].length;const d=l<s.length-1?"":n.substring(o);let p=!0,m=null;rt({componentId:e,contextElement:t,callback:()=>{let n=0;Ze({componentId:e,contextElement:t,expression:u})((e=>{const t=++n;be(e,(e=>{if(t!==n)return!1;r(l,p?h:"",e,p?d:""),p=!1}))}))},cancelCallback:e=>m=e}),null===(c=null===(a=G(e))||void 0===a?void 0:a.FindElementScope(t))||void 0===c||c.AddUninitCallback((()=>null==m?void 0:m()))}))}function Xn({componentId:e,contextElement:t,text:n,testRegex:i,matchRegex:r,storeObject:s,handler:o}){if(!(i||Vn).test(n))return o(n);const l=[...n.matchAll(r||Kn)].length;if(0===l)return o(n);const a=new Array;let c=0;Yn(e,t,n,r||Kn,((n,i,r,u)=>{const h=3*n;h>=a.length?(a.push(i),I().IsNothing(r)?a.push(""):a.push(s?J(r,e,t):$(r)),a.push(u),c++,c===l&&o(a.join(""))):(a[h+1]=s?J(r,e,t):$(r),o(a.join("")))}))}function Zn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s}){if("string"==typeof n)return i&&Xn({componentId:e,contextElement:t,text:n,handler:i,testRegex:r,matchRegex:s});[...t.childNodes].forEach((n=>{if(n.parentNode&&n.nodeType===Node.TEXT_NODE&&n.textContent&&(r||Vn).test(n.textContent)){const i=n.textContent,r=document.createDocumentFragment(),o=new Array;Yn(e,t,i,s||Kn,((e,t,n,i)=>{if(t&&r.appendChild(document.createTextNode(t)),!I().IsNothing(n))if(e>=o.length){const e=document.createTextNode("");r.appendChild(e),e.textContent=$(n),o.push(e)}else o[e].textContent=$(n);i&&r.appendChild(document.createTextNode(i))})),n.parentNode.replaceChild(r,n)}}))}function Qn({componentId:e,contextElement:t,name:n,value:i}){Xn({componentId:e,contextElement:t,text:i,handler:e=>t.setAttribute(n,e),storeObject:!0})}function ei({componentId:e,contextElement:t}){Zn({componentId:e,contextElement:t})}function ti(e){const t=e&&L(e);if(t)return void _t({component:t,element:e});const n=I(),i=n.GetConfig(),r=[i.GetDirectiveName("data",!0),i.GetDirectiveName("data",!1)],s=r.map((e=>`[${e}]`)).join(", "),o=new Set;e?(r.some((t=>e.hasAttribute(t)))&&o.add(e),e.querySelectorAll(s).forEach((e=>o.add(e)))):document.querySelectorAll(s).forEach((e=>o.add(e))),o.forEach((e=>{r.some((t=>e.hasAttribute(t)))&&document.contains(e)&&_t({component:n.CreateComponent(e),element:e,options:{checkTemplate:!0,checkDocument:!1,ignoreChildren:!1}})}))}function ni(e){qn();const t=d();t.hasOwnProperty("disableAutoBootstrap")&&t.disableAutoBootstrap||setTimeout((()=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>{ti(e)})):ti(e)}),0)}function ii(e,t){let n="",i=null;if("function"==typeof e)if(0===e.length){const t=e();t&&({name:n,callback:i}=t)}else n=e("name"),i=e("callback");else c(e)?({name:n,callback:i}=e):I().GetDirectiveManager().AddHandler(e);n&&i&&(t?I().GetDirectiveManager().AddHandlerExtension(t,i,n):I().GetDirectiveManager().AddHandler(i,n))}function ri(e,t){return{name:e,callback:t}}function si(e,t,n,i,r){const s=I().GetConfig().GetDirectiveName("on"),o=(r||[]).join("."),l=ht(o?`${s}:${n}.${o}`:`${s}:${n}`,i||"");return!!l&&mt(e,t,l)}const oi=["bind","event","on"];function li({component:e,contextElement:t,key:n,event:i,expression:r,options:s,defaultEvent:o,eventWhitelist:l=[],optionBlacklist:a}){const c=()=>a?null==s?void 0:s.filter((e=>!a.includes(e))):s,u=e=>n?`${n}-${e}.join`:e;return l.includes(i)?si(e,t,u(i),r,c()):!(!o||i!==o&&!oi.includes(i))&&si(e,t,u(o),r,c())}function ai(e,t,n){const i=I().GetConfig().GetDirectiveName(t,!1),r=I().GetConfig().GetDirectiveName(t,!0);return e.getAttribute(i)||e.getAttribute(r)||n&&e.getAttribute(n)||null}function ci({componentId:e,contextElement:t,key:n,expression:i,callback:r,arrayCallback:s,useEffect:o=!0}){let l=0,a=Ze({componentId:e,contextElement:t,expression:i}),u=(e,t)=>{Qe(e,(e=>{t==l&&(n?r([n,e]):c(e)?Object.entries(e).forEach(r):s&&("string"==typeof e||Array.isArray(e))&&s("string"==typeof e?e.trim().split(" ").filter((e=>!!e)):e))}))};o?rt({componentId:e,contextElement:t,callback:()=>a((e=>u(e,++l)))}):a((e=>u(e,l)))}const ui=Array.from(Array(100).keys()).map((e=>e/100));function hi(e){const t={root:null,rootMargin:"0px",threshold:0};return c(e)&&Object.entries(t).forEach((([n,i])=>t[n]=n in e&&e[n]||i)),e.spread&&(t.threshold=ui),t}class IntersectionObserver{constructor(e,t){this.id_=e,this.observer_=null,this.handlers_=new Array;const n=this.id_;this.observer_=new globalThis.IntersectionObserver(((e,t)=>{e.forEach((e=>{this.handlers_.filter((({target:t})=>t===e.target)).forEach((i=>{r((()=>i.handler({entry:e,id:n,observer:t})),"InlineJS.IntersectionObserver")}))}))}),hi(t))}GetId(){return this.id_}GetNative(){return this.observer_}Observe(e,t){var n;this.handlers_.push({target:e,handler:t}),null===(n=this.observer_)||void 0===n||n.observe(e)}Unobserve(e){var t;this.handlers_=this.handlers_.filter((t=>t.target===e)),null===(t=this.observer_)||void 0===t||t.unobserve(e)}Destroy(){var e;this.handlers_.forEach((({target:e})=>{var t;return null===(t=this.observer_)||void 0===t?void 0:t.unobserve(e)})),this.handlers_=[],null===(e=this.observer_)||void 0===e||e.disconnect(),this.observer_=null}}function di(e,t=0){return e&&e.match(/^[0-9\.]+(s|ms)?$/)?-1==e.indexOf("m")&&-1!=e.indexOf("s")?1e3*parseFloat(e):parseFloat(e):t}function pi({options:e,list:t,defaultNumber:n,callback:i,unknownCallback:r}){const s=Array.isArray(e)?e:[e],o=e=>("number"==typeof n?n:n&&n(e))||0;for(let n=0;n<t.length;++n){const l=t[n],a=s.find((e=>e&&l in e));if(a){if(!i||!0!==i({options:e,list:t,option:l,index:n}))if("number"==typeof a[l]){const e=n<t.length-1?t[n+1].trim():"";e&&/^[0-9]/.test(e)?(a[l]=di(e,o(l)),++n):a[l]=o(l)}else"boolean"==typeof a[l]&&(a[l]=!0)}else r&&r({options:e,list:t,option:l,index:n})}return e}function mi({componentId:e,component:t,contextElement:n,expression:i,argOptions:s,callback:o,options:l,defaultOptionValue:a,useEffect:c}){let u=Ze({componentId:e,contextElement:n,expression:i}),h=pi({options:l||{lazy:!1,ancestor:-1,threshold:-1},list:s,defaultNumber:0===a?0:a||-1}),d=()=>u((e=>We(e,o))),p=()=>!1===c?d():rt({componentId:e,contextElement:n,callback:d});if(h.lazy){const i=t||G(e),s={root:h.ancestor<0?null:null==i?void 0:i.FindAncestor(n,h.ancestor),threshold:h.threshold<0?0:h.threshold},o=i?new IntersectionObserver(i.GenerateUniqueId("intob_"),s):null;if(o){const t=null==i?void 0:i.GetProxyAccessHandler();null==i||i.AddIntersectionObserver(o),o.Observe(n,(({id:n,entry:i}={})=>{var s;if(null==i?void 0:i.isIntersecting){const i=tt(e,t||null);if(n){const t=G(e);null===(s=null==t?void 0:t.FindIntersectionObserver(n))||void 0===s||s.Destroy(),null==t||t.RemoveIntersectionObserver(n)}r(p),i()}}))}else p()}else p()}function fi(e){let t,n="",i=null;if("function"==typeof e)if(0===e.length){const r=e();r&&({name:n,callback:i,onAccess:t}=r)}else n=e("name"),i=e("callback"),t=e("access");else c(e)?({name:n,callback:i,onAccess:t}=e):I().GetMagicManager().AddHandler(e);n&&i&&I().GetMagicManager().AddHandler(i,n,t)}function _i(e,t,n){return{name:e,callback:t,onAccess:n}}function yi(e){return e.startsWith(":")?I().GetConfig().GetDirectiveName("bind")+e:null}function bi(e){return e.startsWith(".")?e.replace(".",I().GetConfig().GetDirectiveName("class:")):null}function gi(e){return e.startsWith("@")?e.replace("@",I().GetConfig().GetDirectiveName("on:")):null}function vi(e,t,n){console.log({message:e,context:t||"N/A",contextElement:n||"N/A"})}function Ei(e=!0){e&&ni(),I().AddAttributeProcessor(Qn),I().AddTextContentProcessor(ei)}function Si(){p("global",{bootstrap:ti,waitForGlobal:k,get:I,create:Jn,traverseInterpolationReplacements:Yn,interpolateText:Xn,interpolate:Zn,processDirectives:_t})}function Ci(){p("utilities",{beginsWith:h,endsWith:K,toCamelCase:v,toSnakeCase:ve,insertHtml:zn,findAncestor:V,getAttribute:te,findFirstAttribute:ne,findFirstAttributeValue:ie,setAttribute:ge,isBooleanAttribute:re,supportsAttributes:U,getTarget:o,getTargets:l,isEqual:se,isObject:c,toString:$,deepCopy:z,mergeObjects:he,tidyPath:de,pathToRelative:pe,splitPath:me,joinPath:fe,getRandomString:_e,measureCallback:ue,encodeAttribute:q,decodeAttribute:W,encodeValue:J,decodeValue:B,isTemplate:Ee,isInsideTemplate:Se})}function Ai(){p("values",{future:Future,loop:Loop,nothing:Nothing,stack:Stack})}function xi(){p("version",{major:1,minor:4,patch:3,get value(){return`${this.major}.${this.minor}.${this.patch}`},toString(){return this.value}})}function Pi(){Ei(),Si(),Ci(),Ai(),xi()}},204:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeDetailElementCompact=t.StripeDetailElement=void 0;const r=n(543),s=n(9);class StripeDetailElement extends s.StripeGenericField{constructor(){super(...arguments),this.input=null,this.name="",this.value=""}ToggleFocus(e){const t=this.GetInput_();t&&(e?t.focus():t.blur())}Reset(){const e=this.GetInput_();e&&(e.value="")}AddDetails(e){const t=this.GetInput_();if(!this.name||!(null==t?void 0:t.value)&&!this.value)return;e.billingDetails=e.billingDetails||{};const n=this.name.split(".");if(1==n.length)e.billingDetails[this.name]=(null==t?void 0:t.value)||this.value;else{let i=e.billingDetails;n.slice(0,-1).forEach((e=>{i=i[e]=i[e]||{}})),i[n.slice(-1)[0]]=(null==t?void 0:t.value)||this.value}}GetInput_(){return this.input||this.querySelector("input")}}i([(0,r.Property)({type:"object",checkStoredObject:!0})],StripeDetailElement.prototype,"input",void 0),i([(0,r.Property)({type:"string"})],StripeDetailElement.prototype,"name",void 0),i([(0,r.Property)({type:"string",checkStoredObject:!0})],StripeDetailElement.prototype,"value",void 0),t.StripeDetailElement=StripeDetailElement,t.StripeDetailElementCompact=function(){(0,r.RegisterCustomElement)(StripeDetailElement,"stripe-detail")}},449:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeFieldElementCompact=t.StripeFieldElement=void 0;const s=n(867),o=n(543),l=n(9);class StripeFieldElement extends l.StripeGenericField{constructor(){super(),this.stripeField_=null,this.isReady_=!1,this.isComplete_=!1,this.lastError_=null,this.readyWaiters_=new Array,this.changeListeners=new Array,this.options=null,this.type="",this.oncustomready="",this.oncustomcomplete="",this.oncustomerror=""}IsInteractive(){return!0}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}AddChangeListener(e){this.changeListeners.push(e)}RemoveChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)}ToggleFocus(e){var t,n;this.stripeField_&&(e?null===(t=this.stripeField_)||void 0===t||t.focus():null===(n=this.stripeField_)||void 0===n||n.blur())}Reset(){var e;this.stripeField_&&(null===(e=this.stripeField_)||void 0===e||e.clear())}AddDetails(e){this.stripeField_&&("card"===this.type||"number"===this.type||"cardNumber"===this.type)&&(e.method=this.stripeField_)}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=r(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.WaitInstance().then((e=>{var t;if(!(null==e?void 0:e.stripe)||!e.elements)return;let n="";["number","expiry","cvc"].includes(this.type)?n=`card${this.type.substring(0,1).toUpperCase()}${this.type.substring(1)}`:["card","cardNumber","cardExpiry","cardCvc","postalCode","paymentRequestButton","iban","idealBank"].includes(this.type)&&(n=this.type),n?(this.stripeField_=e.elements.create(n,this.options||(null===(t=this.GetStripe_())||void 0===t?void 0:t.options)||void 0),this.stripeField_.on("ready",(()=>{this.isReady_=!0,this.oncustomready&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,s.JournalTry)(e)))})),this.stripeField_.on("change",(e=>{((null==e?void 0:e.error)||null)!==this.lastError_&&(this.lastError_=(null==e?void 0:e.error)||null,this.oncustomerror&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomerror,disableFunctionCall:!1})(void 0,[this.lastError_],{error:this.lastError_}),this.changeListeners.forEach((e=>(0,s.JournalTry)((()=>e("error",this.lastError_)))))),((null==e?void 0:e.complete)||!1)!=this.isComplete_&&(this.isComplete_=(null==e?void 0:e.complete)||!1,this.oncustomcomplete&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomcomplete,disableFunctionCall:!1})(void 0,[this.isComplete_],{complete:this.isComplete_}),this.changeListeners.forEach((e=>(0,s.JournalTry)((()=>e("complete",this.isComplete_))))))})),this.stripeField_.mount(this)):(0,s.JournalWarn)("The element type provided is invalid.","StripeField.Mount",this)})).catch((e=>(0,s.JournalError)(e,"StripeField.Mount",this)))})),n.AddUninitCallback((()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.RemoveStripeField(this),this.stripeField_=null}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeFieldElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"type",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomready",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomcomplete",void 0),i([(0,o.Property)({type:"string"})],StripeFieldElement.prototype,"oncustomerror",void 0),t.StripeFieldElement=StripeFieldElement,t.StripeFieldElementCompact=function(){(0,o.RegisterCustomElement)(StripeFieldElement,"stripe-field")}},9:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeGenericField=void 0;const s=n(867),o=n(543);class StripeGenericField extends o.CustomElement{constructor(){super(...arguments),this.stripe=null}IsInteractive(){return!1}WaitReady(){return Promise.resolve()}AddChangeListener(e){}RemoveChangeListener(e){}ToggleFocus(e){}Reset(){}AddDetails(e){}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=r(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),(()=>{var e;null===(e=this.GetStripe_())||void 0===e||e.AddStripeField(this),t&&t()}))}GetStripe_(){return this.stripe||(0,s.FindAncestor)(this,(e=>"AddStripeField"in e))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeGenericField.prototype,"stripe",void 0),t.StripeGenericField=StripeGenericField},113:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.StripePaymentMenthodElementCompact=t.StripePaymentMenthodElement=void 0;const r=n(543),s=n(9);class StripePaymentMenthodElement extends s.StripeGenericField{constructor(){super({isTemplate:!0,isHidden:!0}),this.value=""}AddDetails(e){this.value&&(e.method=this.value)}}i([(0,r.Property)({type:"object",checkStoredObject:!0})],StripePaymentMenthodElement.prototype,"value",void 0),t.StripePaymentMenthodElement=StripePaymentMenthodElement,t.StripePaymentMenthodElementCompact=function(){(0,r.RegisterCustomElement)(StripePaymentMenthodElement,"stripe-payment-method")}},372:function(e,t,n){var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.StripeElementCompact=t.StripeElement=void 0;const s=n(867),o=n(543);class StripeElement extends o.CustomElement{constructor(){super(),this.stripe_=null,this.elements_=null,this.mounting_=!1,this.mounted_=!1,this.isReady_=!1,this.readyWaiters_=new Array,this.fields_=null,this.readyFields_=null,this.instanceWaiters_=new Array,this.interactiveFields_=null,this.completeFields_=null,this.errorFields_=null,this.options=null,this.publicKey="",this.oncustomready="",this.oncustomcomplete="",this.oncustomerror="",this.defer=!1,this.focusnext=!1}AddStripeField(e){this.fields_=this.fields_||[],this.fields_.push(e),e.WaitReady().then((()=>{this.readyFields_=this.readyFields_||[],this.readyFields_.push(e),e.IsInteractive()&&(this.interactiveFields_=this.interactiveFields_||[],this.interactiveFields_.push(e)),this.fields_&&this.readyFields_&&this.fields_.length<=this.readyFields_.length&&(0,s.JournalTry)((()=>{this.isReady_=!0,this.oncustomready&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomready,disableFunctionCall:!1})(),this.readyWaiters_.splice(0).forEach((e=>(0,s.JournalTry)(e)))}))})),e.AddChangeListener(((t,n)=>{if("complete"===t){let t=!1;this.completeFields_=this.completeFields_||[],n&&!this.completeFields_.includes(e)?(this.completeFields_.push(e),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length)):!n&&this.completeFields_.includes(e)&&(this.completeFields_=this.completeFields_.filter((t=>t!==e)),t=!(!this.interactiveFields_||this.completeFields_.length!=this.interactiveFields_.length-1)),t&&this.oncustomcomplete&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomcomplete,disableFunctionCall:!1})(void 0,[!!n],{complete:!!n}),n&&this.focusnext&&this.FocusNextField(e)}else if("error"===t){let t=!1;this.errorFields_=this.errorFields_||[],this.errorFields_.push(e),this.errorFields_=this.errorFields_||[],n&&!this.errorFields_.includes(e)?(this.errorFields_.push(e),t=1==this.errorFields_.length):!n&&this.errorFields_.includes(e)&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)),t=0==this.errorFields_.length),t&&this.oncustomerror&&(0,s.EvaluateLater)({componentId:this.componentId_,contextElement:this,expression:this.oncustomerror,disableFunctionCall:!1})(void 0,[n],{error:n})}}))}RemoveStripeField(e){this.fields_&&(this.fields_=this.fields_.filter((t=>t!==e))),this.readyFields_&&(this.readyFields_=this.readyFields_.filter((t=>t!==e))),this.interactiveFields_&&(this.interactiveFields_=this.interactiveFields_.filter((t=>t!==e))),this.completeFields_&&(this.completeFields_=this.completeFields_.filter((t=>t!==e))),this.errorFields_&&(this.errorFields_=this.errorFields_.filter((t=>t!==e)))}FocusNextField(e){if(this.fields_){const t=this.fields_.indexOf(e);t>=0&&t<this.fields_.length-1&&this.fields_[t+1].ToggleFocus(!0)}}GetDetails(){return{stripe:this.stripe_,elements:this.elements_}}GetInstance(){return this.stripe_}WaitInstance(){return new Promise((e=>{this.mounted_?e(this.GetDetails()):this.instanceWaiters_.push((()=>e(this.GetDetails())))}))}Mount(){this.mounted_||this.mounting_||(this.mounting_=!0,this.LoadResources().then((()=>{this.mounting_=!1,this.mounted_=!0,this.stripe_=Stripe(this.publicKey),this.elements_=this.stripe_.elements(),this.instanceWaiters_.splice(0).forEach((e=>(0,s.JournalTry)(e)))})))}Pay(e,t=!1){return this.PayOrSetup_(!0,e,t)}Setup(e){return this.PayOrSetup_(!1,e)}WaitReady(){return new Promise((e=>{this.isReady_?e():this.readyWaiters_.push((()=>e()))}))}HandleElementScopeCreated_(e,t){var{scope:n}=e,i=r(e,["scope"]);super.HandleElementScopeCreated_(Object.assign({scope:n},i),t),n.AddPostProcessCallback((()=>!this.defer&&this.Mount())),n.AddUninitCallback((()=>this.stripe_=null))}PayOrSetup_(e,t,n=!1){return new Promise(((i,r)=>{this.WaitInstance().then((s=>{var o,l;if(!(null==s?void 0:s.stripe))return i(!1);const a={};if(null===(o=this.fields_)||void 0===o||o.forEach((e=>e.AddDetails(a))),!a.method)return i(!1);let c;c="string"==typeof a.method?{payment_method:a.method}:{payment_method:{card:a.method,billing_details:a.billingDetails}},e?((null===(l=a.billingDetails)||void 0===l?void 0:l.email)&&(c.receipt_email=a.billingDetails.email),n&&(c.setup_future_usage="off_session"),s.stripe.confirmCardPayment(t,c).then(i).catch(r)):s.stripe.confirmCardSetup(t,c).then(i).catch(r)})).catch(r)}))}}i([(0,o.Property)({type:"object",checkStoredObject:!0})],StripeElement.prototype,"options",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"publicKey",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncustomready",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncustomcomplete",void 0),i([(0,o.Property)({type:"string"})],StripeElement.prototype,"oncustomerror",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"defer",void 0),i([(0,o.Property)({type:"boolean"})],StripeElement.prototype,"focusnext",void 0),t.StripeElement=StripeElement,t.StripeElementCompact=function(){(0,o.RegisterCustomElement)(StripeElement,"stripe")}},0:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineJSStripe=void 0;const i=n(867),r=n(372),s=n(449),o=n(204),l=n(113);t.InlineJSStripe=function(){(0,i.WaitForGlobal)().then((()=>{(0,r.StripeElementCompact)(),(0,s.StripeFieldElementCompact)(),(0,o.StripeDetailElementCompact)(),(0,l.StripePaymentMenthodElementCompact)()}))}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(0,n(0).InlineJSStripe)()})();
|