diff --git a/.vscode/settings.json b/.vscode/settings.json index ccbd382e52..3211f5706d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "files.associations": { "**/modules/*/behaviors/*/partials/*.htm": "php", - "**/modules/*/blocks/*.block": "wintercms", + "**/modules/*/blocks/*.block": "wintercms-block", "**/modules/*/controllers/*/*.htm": "php", "**/modules/*/formwidgets/*/partials/*.htm": "php", "**/modules/*/layouts/*.htm": "php", @@ -12,7 +12,7 @@ "**/modules/*/widgets/*/partials/*.htm": "php", "**/plugins/*/*/behaviors/*/partials/*.htm": "php", - "**/plugins/*/*/blocks/*.block": "wintercms", + "**/plugins/*/*/blocks/*.block": "wintercms-block", "**/plugins/*/*/components/**/*.htm": "wintercms-twig", "**/plugins/*/*/controllers/*/*.htm": "php", "**/plugins/*/*/formwidgets/*/partials/*.htm": "php", @@ -23,7 +23,7 @@ "**/plugins/*/*/views/mail/*.htm": "wintercms", "**/plugins/*/*/widgets/*/partials/*.htm": "php", - "**/themes/*/blocks/**/*.block": "wintercms", + "**/themes/*/blocks/**/*.block": "wintercms-block", "**/themes/*/content/**/*.htm": "wintercms", "**/themes/*/layouts/*.htm": "wintercms", "**/themes/*/pages/**/*.htm": "wintercms", @@ -32,6 +32,7 @@ "emmet.includeLanguages": { "wintercms": "html", "wintercms-twig": "html", + "wintercms-block": "html" }, "eslint.validate": [ "javascript", diff --git a/README.md b/README.md index 2f72a3ccee..7215c8bd31 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ No matter how large or small your project is, Winter provides a rich development [![Tests](https://img.shields.io/github/actions/workflow/status/wintercms/winter/tests.yml?branch=develop&label=tests&style=flat-square)](https://github.com/wintercms/winter/actions) [![License](https://img.shields.io/github/license/wintercms/winter?label=open%20source&style=flat-square)](https://packagist.org/packages/wintercms/winter) [![Discord](https://img.shields.io/discord/816852513684193281?label=discord&style=flat-square)](https://discord.gg/D5MFSPH6Ux) +[![RINGER](https://www.ringerhq.com/images/get-support-on-ringer.svg)](https://www.ringerhq.com/i/wintercms/winter) [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/wintercms/winter) @@ -45,7 +46,7 @@ The best place to learn Winter is by [reading the documentation](https://winterc Winter was forked from October CMS in March 2021 due to a difference in open source management philosophies between the core maintainer team and the two founders of October. -The development of Winter is lead by [Luke Towers](https://luketowers.ca/), along with many wonderful people that dedicate their time to help support and grow the community. +The development of Winter is lead by [Luke Towers](https://luketowers.ca/), along with many wonderful people that dedicate their time to help support and grow the community. The [Frostbyte Foundation](mailto:hello@frostbytefoundation.org) provides an organisational backing for the project and the continued development of Winter, its plugins and themes and its ecosystem. diff --git a/modules/backend/assets/css/winter.css b/modules/backend/assets/css/winter.css index f517a261ab..ed82c286bc 100644 --- a/modules/backend/assets/css/winter.css +++ b/modules/backend/assets/css/winter.css @@ -65,6 +65,9 @@ .sweet-alert h2{word-break:break-word;word-wrap:break-word;max-height:350px;overflow-y:auto;margin:10px 0 17px 0;color:#2b3e50;text-align:left;font-size:15px;line-height:23px} .sweet-alert p{margin:0} .sweet-alert p.text-muted{margin-bottom:20px;color:#555} +.global-notice{position:sticky;top:0;display:flex;align-items:center;flex-wrap:wrap;gap:0.5em;justify-content:space-between;z-index:10500;background:#ab2a1c;color:#FFF;padding:0.5em 0.75em} +.global-notice .notice-icon{font-size:1.5em;vertical-align:bottom;display:inline-block;margin-right:.25em} +.global-notice .notice-text{display:inline-block;vertical-align:middle} .control-simplelist{font-size:13px;padding:20px 20px 2px 20px;margin-bottom:20px;background:#fff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px} .control-simplelist ul{padding-left:15px} .control-simplelist.form-control ul{margin-bottom:0} diff --git a/modules/backend/assets/less/controls/global-notice.less b/modules/backend/assets/less/controls/global-notice.less new file mode 100644 index 0000000000..8264e6ae36 --- /dev/null +++ b/modules/backend/assets/less/controls/global-notice.less @@ -0,0 +1,25 @@ +.global-notice { + position: sticky; + top: 0; + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 0.5em; + justify-content: space-between; + z-index: 10500; + background: #ab2a1c; + color: #FFF; + padding: 0.5em 0.75em; + + .notice-icon { + font-size: 1.5em; + vertical-align: bottom; + display: inline-block; + margin-right: .25em; + } + + .notice-text { + display: inline-block; + vertical-align:middle; + } +} diff --git a/modules/backend/assets/less/winter.less b/modules/backend/assets/less/winter.less index 76c192a2d1..704b4f5543 100644 --- a/modules/backend/assets/less/winter.less +++ b/modules/backend/assets/less/winter.less @@ -10,6 +10,7 @@ @import "core/boot.less"; @import "controls/alert.less"; +@import "controls/global-notice.less"; @import "controls/simplelist.less"; @import "controls/scrollbar.less"; @import "controls/filelist.less"; diff --git a/modules/backend/assets/ui/js/build/vendor.js b/modules/backend/assets/ui/js/build/vendor.js index 720890f919..329e260659 100644 --- a/modules/backend/assets/ui/js/build/vendor.js +++ b/modules/backend/assets/ui/js/build/vendor.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_backend_module=self.webpackChunk_wintercms_wn_backend_module||[]).push([[101],{609:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var s=0;s{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}},471:function(e,t,n){n.r(t),n.d(t,{BaseTransition:function(){return lr},Comment:function(){return Yo},EffectScope:function(){return le},Fragment:function(){return Jo},KeepAlive:function(){return _r},ReactiveEffect:function(){return xe},Static:function(){return Qo},Suspense:function(){return Hn},Teleport:function(){return qo},Text:function(){return Zo},Transition:function(){return Bi},TransitionGroup:function(){return rc},VueElement:function(){return Pi},callWithAsyncErrorHandling:function(){return tn},callWithErrorHandling:function(){return en},camelize:function(){return Y},capitalize:function(){return ee},cloneVNode:function(){return bs},compatUtils:function(){return hi},compile:function(){return Tf},computed:function(){return Gs},createApp:function(){return $c},createBlock:function(){return ls},createCommentVNode:function(){return xs},createElementBlock:function(){return cs},createElementVNode:function(){return ms},createHydrationRenderer:function(){return Bo},createPropsRestProxy:function(){return ri},createRenderer:function(){return Lo},createSSRApp:function(){return Fc},createSlots:function(){return Zr},createStaticVNode:function(){return Ss},createTextVNode:function(){return _s},createVNode:function(){return gs},customRef:function(){return qt},defineAsyncComponent:function(){return vr},defineComponent:function(){return mr},defineCustomElement:function(){return Ri},defineEmits:function(){return Zs},defineExpose:function(){return Ys},defineProps:function(){return Js},defineSSRCustomElement:function(){return Oi},devtools:function(){return xn},effect:function(){return we},effectScope:function(){return ue},getCurrentInstance:function(){return Ps},getCurrentScope:function(){return fe},getTransitionRawChildren:function(){return hr},guardReactiveProps:function(){return ys},h:function(){return si},handleError:function(){return nn},hydrate:function(){return Ic},initCustomFormatter:function(){return li},initDirectivesForSSR:function(){return Bc},inject:function(){return Zn},isMemoSame:function(){return ai},isProxy:function(){return Ot},isReactive:function(){return Tt},isReadonly:function(){return Nt},isRef:function(){return Vt},isRuntimeOnly:function(){return Ds},isShallow:function(){return Rt},isVNode:function(){return us},markRaw:function(){return Pt},mergeDefaults:function(){return ni},mergeProps:function(){return Es},nextTick:function(){return dn},normalizeClass:function(){return f},normalizeProps:function(){return p},normalizeStyle:function(){return i},onActivated:function(){return xr},onBeforeMount:function(){return Or},onBeforeUnmount:function(){return Ir},onBeforeUpdate:function(){return Pr},onDeactivated:function(){return Cr},onErrorCaptured:function(){return Br},onMounted:function(){return Mr},onRenderTracked:function(){return Lr},onRenderTriggered:function(){return Vr},onScopeDispose:function(){return pe},onServerPrefetch:function(){return Fr},onUnmounted:function(){return $r},onUpdated:function(){return Ar},openBlock:function(){return ts},popScopeId:function(){return An},provide:function(){return Jn},proxyRefs:function(){return zt},pushScopeId:function(){return Pn},queuePostFlushCb:function(){return gn},reactive:function(){return xt},readonly:function(){return wt},ref:function(){return Lt},registerRuntimeCompiler:function(){return Us},render:function(){return Ac},renderList:function(){return Jr},renderSlot:function(){return Yr},resolveComponent:function(){return Hr},resolveDirective:function(){return Kr},resolveDynamicComponent:function(){return zr},resolveFilter:function(){return di},resolveTransitionHooks:function(){return ar},setBlockTracking:function(){return ss},setDevtoolsHook:function(){return kn},setTransitionHooks:function(){return dr},shallowReactive:function(){return Ct},shallowReadonly:function(){return kt},shallowRef:function(){return Bt},ssrContextKey:function(){return ii},ssrUtils:function(){return pi},stop:function(){return ke},toDisplayString:function(){return S},toHandlerKey:function(){return te},toHandlers:function(){return Xr},toRaw:function(){return Mt},toRef:function(){return Zt},toRefs:function(){return Gt},transformVNodeArgs:function(){return fs},triggerRef:function(){return Dt},unref:function(){return Ht},useAttrs:function(){return ei},useCssModule:function(){return Ai},useCssVars:function(){return Ii},useSSRContext:function(){return ci},useSlots:function(){return Xs},useTransitionState:function(){return ir},vModelCheckbox:function(){return fc},vModelDynamic:function(){return yc},vModelRadio:function(){return dc},vModelSelect:function(){return hc},vModelText:function(){return ac},vShow:function(){return Ec},version:function(){return fi},warn:function(){return Xt},watch:function(){return tr},watchEffect:function(){return Yn},watchPostEffect:function(){return Qn},watchSyncEffect:function(){return Xn},withAsyncContext:function(){return oi},withCtx:function(){return $n},withDefaults:function(){return Qs},withDirectives:function(){return jr},withKeys:function(){return kc},withMemo:function(){return ui},withModifiers:function(){return Cc},withScopeId:function(){return In}});var r={};function o(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}n.r(r),n.d(r,{BaseTransition:function(){return lr},Comment:function(){return Yo},EffectScope:function(){return le},Fragment:function(){return Jo},KeepAlive:function(){return _r},ReactiveEffect:function(){return xe},Static:function(){return Qo},Suspense:function(){return Hn},Teleport:function(){return qo},Text:function(){return Zo},Transition:function(){return Bi},TransitionGroup:function(){return rc},VueElement:function(){return Pi},callWithAsyncErrorHandling:function(){return tn},callWithErrorHandling:function(){return en},camelize:function(){return Y},capitalize:function(){return ee},cloneVNode:function(){return bs},compatUtils:function(){return hi},computed:function(){return Gs},createApp:function(){return $c},createBlock:function(){return ls},createCommentVNode:function(){return xs},createElementBlock:function(){return cs},createElementVNode:function(){return ms},createHydrationRenderer:function(){return Bo},createPropsRestProxy:function(){return ri},createRenderer:function(){return Lo},createSSRApp:function(){return Fc},createSlots:function(){return Zr},createStaticVNode:function(){return Ss},createTextVNode:function(){return _s},createVNode:function(){return gs},customRef:function(){return qt},defineAsyncComponent:function(){return vr},defineComponent:function(){return mr},defineCustomElement:function(){return Ri},defineEmits:function(){return Zs},defineExpose:function(){return Ys},defineProps:function(){return Js},defineSSRCustomElement:function(){return Oi},devtools:function(){return xn},effect:function(){return we},effectScope:function(){return ue},getCurrentInstance:function(){return Ps},getCurrentScope:function(){return fe},getTransitionRawChildren:function(){return hr},guardReactiveProps:function(){return ys},h:function(){return si},handleError:function(){return nn},hydrate:function(){return Ic},initCustomFormatter:function(){return li},initDirectivesForSSR:function(){return Bc},inject:function(){return Zn},isMemoSame:function(){return ai},isProxy:function(){return Ot},isReactive:function(){return Tt},isReadonly:function(){return Nt},isRef:function(){return Vt},isRuntimeOnly:function(){return Ds},isShallow:function(){return Rt},isVNode:function(){return us},markRaw:function(){return Pt},mergeDefaults:function(){return ni},mergeProps:function(){return Es},nextTick:function(){return dn},normalizeClass:function(){return f},normalizeProps:function(){return p},normalizeStyle:function(){return i},onActivated:function(){return xr},onBeforeMount:function(){return Or},onBeforeUnmount:function(){return Ir},onBeforeUpdate:function(){return Pr},onDeactivated:function(){return Cr},onErrorCaptured:function(){return Br},onMounted:function(){return Mr},onRenderTracked:function(){return Lr},onRenderTriggered:function(){return Vr},onScopeDispose:function(){return pe},onServerPrefetch:function(){return Fr},onUnmounted:function(){return $r},onUpdated:function(){return Ar},openBlock:function(){return ts},popScopeId:function(){return An},provide:function(){return Jn},proxyRefs:function(){return zt},pushScopeId:function(){return Pn},queuePostFlushCb:function(){return gn},reactive:function(){return xt},readonly:function(){return wt},ref:function(){return Lt},registerRuntimeCompiler:function(){return Us},render:function(){return Ac},renderList:function(){return Jr},renderSlot:function(){return Yr},resolveComponent:function(){return Hr},resolveDirective:function(){return Kr},resolveDynamicComponent:function(){return zr},resolveFilter:function(){return di},resolveTransitionHooks:function(){return ar},setBlockTracking:function(){return ss},setDevtoolsHook:function(){return kn},setTransitionHooks:function(){return dr},shallowReactive:function(){return Ct},shallowReadonly:function(){return kt},shallowRef:function(){return Bt},ssrContextKey:function(){return ii},ssrUtils:function(){return pi},stop:function(){return ke},toDisplayString:function(){return S},toHandlerKey:function(){return te},toHandlers:function(){return Xr},toRaw:function(){return Mt},toRef:function(){return Zt},toRefs:function(){return Gt},transformVNodeArgs:function(){return fs},triggerRef:function(){return Dt},unref:function(){return Ht},useAttrs:function(){return ei},useCssModule:function(){return Ai},useCssVars:function(){return Ii},useSSRContext:function(){return ci},useSlots:function(){return Xs},useTransitionState:function(){return ir},vModelCheckbox:function(){return fc},vModelDynamic:function(){return yc},vModelRadio:function(){return dc},vModelSelect:function(){return hc},vModelText:function(){return ac},vShow:function(){return Ec},version:function(){return fi},warn:function(){return Xt},watch:function(){return tr},watchEffect:function(){return Yn},watchPostEffect:function(){return Qn},watchSyncEffect:function(){return Xn},withAsyncContext:function(){return oi},withCtx:function(){return $n},withDefaults:function(){return Qs},withDirectives:function(){return jr},withKeys:function(){return kc},withMemo:function(){return ui},withModifiers:function(){return Cc},withScopeId:function(){return In}});const s=o("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function i(e){if(I(e)){const t={};for(let n=0;n{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function f(e){let t="";if(B(e))t=e;else if(I(e))for(let n=0;nb(e,t)))}const S=e=>B(e)?e:null==e?"":I(e)||U(e)&&(e.toString===H||!L(e.toString))?JSON.stringify(e,x,2):String(e),x=(e,t)=>t&&t.__v_isRef?x(e,t.value):$(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:F(t)?{[`Set(${t.size})`]:[...t.values()]}:!U(t)||I(t)||z(t)?t:String(t),C={},w=[],k=()=>{},E=()=>!1,T=/^on[^a-z]/,N=e=>T.test(e),R=e=>e.startsWith("onUpdate:"),O=Object.assign,M=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},P=Object.prototype.hasOwnProperty,A=(e,t)=>P.call(e,t),I=Array.isArray,$=e=>"[object Map]"===W(e),F=e=>"[object Set]"===W(e),V=e=>"[object Date]"===W(e),L=e=>"function"==typeof e,B=e=>"string"==typeof e,j=e=>"symbol"==typeof e,U=e=>null!==e&&"object"==typeof e,D=e=>U(e)&&L(e.then)&&L(e.catch),H=Object.prototype.toString,W=e=>H.call(e),z=e=>"[object Object]"===W(e),K=e=>B(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,q=o(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),G=o("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),J=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Z=/-(\w)/g,Y=J((e=>e.replace(Z,((e,t)=>t?t.toUpperCase():"")))),Q=/\B([A-Z])/g,X=J((e=>e.replace(Q,"-$1").toLowerCase())),ee=J((e=>e.charAt(0).toUpperCase()+e.slice(1))),te=J((e=>e?`on${ee(e)}`:"")),ne=(e,t)=>!Object.is(e,t),re=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},se=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ie;let ce;class le{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=ce,!e&&ce&&(this.index=(ce.scopes||(ce.scopes=[])).push(this)-1)}run(e){if(this.active){const t=ce;try{return ce=this,e()}finally{ce=t}}else 0}on(){ce=this}off(){ce=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},he=e=>(e.w&ye)>0,me=e=>(e.n&ye)>0,ge=new WeakMap;let ve=0,ye=1;let be;const _e=Symbol(""),Se=Symbol("");class xe{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,ae(this,n)}run(){if(!this.active)return this.fn();let e=be,t=Ee;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=be,be=this,Ee=!0,ye=1<<++ve,ve<=30?(({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{("length"===n||n>=e)&&c.push(t)}))}else switch(void 0!==n&&c.push(i.get(n)),t){case"add":I(e)?K(n)&&c.push(i.get("length")):(c.push(i.get(_e)),$(e)&&c.push(i.get(Se)));break;case"delete":I(e)||(c.push(i.get(_e)),$(e)&&c.push(i.get(Se)));break;case"set":$(e)&&c.push(i.get(_e))}if(1===c.length)c[0]&&Ae(c[0]);else{const e=[];for(const t of c)t&&e.push(...t);Ae(de(e))}}function Ae(e,t){const n=I(e)?e:[...e];for(const e of n)e.computed&&Ie(e,t);for(const e of n)e.computed||Ie(e,t)}function Ie(e,t){(e!==be||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const $e=o("__proto__,__v_isRef,__isVue"),Fe=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(j)),Ve=He(),Le=He(!1,!0),Be=He(!0),je=He(!0,!0),Ue=De();function De(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Mt(this);for(let e=0,t=this.length;e{e[t]=function(...e){Ne();const n=Mt(this)[t].apply(this,e);return Re(),n}})),e}function He(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&o===(e?t?_t:bt:t?yt:vt).get(n))return n;const s=I(n);if(!e&&s&&A(Ue,r))return Reflect.get(Ue,r,o);const i=Reflect.get(n,r,o);return(j(r)?Fe.has(r):$e(r))?i:(e||Oe(n,0,r),t?i:Vt(i)?s&&K(r)?i:i.value:U(i)?e?wt(i):xt(i):i)}}function We(e=!1){return function(t,n,r,o){let s=t[n];if(Nt(s)&&Vt(s)&&!Vt(r))return!1;if(!e&&(Rt(r)||Nt(r)||(s=Mt(s),r=Mt(r)),!I(t)&&Vt(s)&&!Vt(r)))return s.value=r,!0;const i=I(t)&&K(n)?Number(n)e,Ze=e=>Reflect.getPrototypeOf(e);function Ye(e,t,n=!1,r=!1){const o=Mt(e=e.__v_raw),s=Mt(t);n||(t!==s&&Oe(o,0,t),Oe(o,0,s));const{has:i}=Ze(o),c=r?Je:n?It:At;return i.call(o,t)?c(e.get(t)):i.call(o,s)?c(e.get(s)):void(e!==o&&e.get(t))}function Qe(e,t=!1){const n=this.__v_raw,r=Mt(n),o=Mt(e);return t||(e!==o&&Oe(r,0,e),Oe(r,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function Xe(e,t=!1){return e=e.__v_raw,!t&&Oe(Mt(e),0,_e),Reflect.get(e,"size",e)}function et(e){e=Mt(e);const t=Mt(this);return Ze(t).has.call(t,e)||(t.add(e),Pe(t,"add",e,e)),this}function tt(e,t){t=Mt(t);const n=Mt(this),{has:r,get:o}=Ze(n);let s=r.call(n,e);s||(e=Mt(e),s=r.call(n,e));const i=o.call(n,e);return n.set(e,t),s?ne(t,i)&&Pe(n,"set",e,t):Pe(n,"add",e,t),this}function nt(e){const t=Mt(this),{has:n,get:r}=Ze(t);let o=n.call(t,e);o||(e=Mt(e),o=n.call(t,e));r&&r.call(t,e);const s=t.delete(e);return o&&Pe(t,"delete",e,void 0),s}function rt(){const e=Mt(this),t=0!==e.size,n=e.clear();return t&&Pe(e,"clear",void 0,void 0),n}function ot(e,t){return function(n,r){const o=this,s=o.__v_raw,i=Mt(s),c=t?Je:e?It:At;return!e&&Oe(i,0,_e),s.forEach(((e,t)=>n.call(r,c(e),c(t),o)))}}function st(e,t,n){return function(...r){const o=this.__v_raw,s=Mt(o),i=$(s),c="entries"===e||e===Symbol.iterator&&i,l="keys"===e&&i,u=o[e](...r),a=n?Je:t?It:At;return!t&&Oe(s,0,l?Se:_e),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function it(e){return function(...t){return"delete"!==e&&this}}function ct(){const e={get(e){return Ye(this,e)},get size(){return Xe(this)},has:Qe,add:et,set:tt,delete:nt,clear:rt,forEach:ot(!1,!1)},t={get(e){return Ye(this,e,!1,!0)},get size(){return Xe(this)},has:Qe,add:et,set:tt,delete:nt,clear:rt,forEach:ot(!1,!0)},n={get(e){return Ye(this,e,!0)},get size(){return Xe(this,!0)},has(e){return Qe.call(this,e,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:ot(!0,!1)},r={get(e){return Ye(this,e,!0,!0)},get size(){return Xe(this,!0)},has(e){return Qe.call(this,e,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:ot(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=st(o,!1,!1),n[o]=st(o,!0,!1),t[o]=st(o,!1,!0),r[o]=st(o,!0,!0)})),[e,n,t,r]}const[lt,ut,at,ft]=ct();function pt(e,t){const n=t?e?ft:at:e?ut:lt;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(A(n,r)&&r in t?n:t,r,o)}const dt={get:pt(!1,!1)},ht={get:pt(!1,!0)},mt={get:pt(!0,!1)},gt={get:pt(!0,!0)};const vt=new WeakMap,yt=new WeakMap,bt=new WeakMap,_t=new WeakMap;function St(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>W(e).slice(8,-1))(e))}function xt(e){return Nt(e)?e:Et(e,!1,ze,dt,vt)}function Ct(e){return Et(e,!1,qe,ht,yt)}function wt(e){return Et(e,!0,Ke,mt,bt)}function kt(e){return Et(e,!0,Ge,gt,_t)}function Et(e,t,n,r,o){if(!U(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=St(e);if(0===i)return e;const c=new Proxy(e,2===i?r:n);return o.set(e,c),c}function Tt(e){return Nt(e)?Tt(e.__v_raw):!(!e||!e.__v_isReactive)}function Nt(e){return!(!e||!e.__v_isReadonly)}function Rt(e){return!(!e||!e.__v_isShallow)}function Ot(e){return Tt(e)||Nt(e)}function Mt(e){const t=e&&e.__v_raw;return t?Mt(t):e}function Pt(e){return oe(e,"__v_skip",!0),e}const At=e=>U(e)?xt(e):e,It=e=>U(e)?wt(e):e;function $t(e){Ee&&be&&Me((e=Mt(e)).dep||(e.dep=de()))}function Ft(e,t){(e=Mt(e)).dep&&Ae(e.dep)}function Vt(e){return!(!e||!0!==e.__v_isRef)}function Lt(e){return jt(e,!1)}function Bt(e){return jt(e,!0)}function jt(e,t){return Vt(e)?e:new Ut(e,t)}class Ut{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Mt(e),this._value=t?e:At(e)}get value(){return $t(this),this._value}set value(e){const t=this.__v_isShallow||Rt(e)||Nt(e);e=t?e:Mt(e),ne(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:At(e),Ft(this))}}function Dt(e){Ft(e)}function Ht(e){return Vt(e)?e.value:e}const Wt={get:(e,t,n)=>Ht(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Vt(o)&&!Vt(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function zt(e){return Tt(e)?e:new Proxy(e,Wt)}class Kt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>$t(this)),(()=>Ft(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function qt(e){return new Kt(e)}function Gt(e){const t=I(e)?new Array(e.length):{};for(const n in e)t[n]=Zt(e,n);return t}class Jt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function Zt(e,t,n){const r=e[t];return Vt(r)?r:new Jt(e,t,n)}var Yt;class Qt{constructor(e,t,n,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[Yt]=!1,this._dirty=!0,this.effect=new xe(e,(()=>{this._dirty||(this._dirty=!0,Ft(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=n}get value(){const e=Mt(this);return $t(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}Yt="__v_isReadonly";function Xt(e,...t){}function en(e,t,n,r){let o;try{o=r?e(...r):e()}catch(e){nn(e,t,n)}return o}function tn(e,t,n,r){if(L(e)){const o=en(e,t,n,r);return o&&D(o)&&o.catch((e=>{nn(e,t,n)})),o}const o=[];for(let s=0;s>>1;bn(sn[r])bn(e)-bn(t))),an=0;annull==e.id?1/0:e.id,_n=(e,t)=>{const n=bn(e)-bn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Sn(e){on=!1,rn=!0,sn.sort(_n);try{for(cn=0;cnxn.emit(e,...t))),Cn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(r=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===r?void 0:r.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{kn(e,t)})),setTimeout((()=>{xn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,wn=!0,Cn=[])}),3e3)}else wn=!0,Cn=[]}function En(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||C;let o=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in r){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=r[e]||C;s&&(o=n.map((e=>B(e)?e.trim():e))),t&&(o=n.map(se))}let c;let l=r[c=te(t)]||r[c=te(Y(t))];!l&&s&&(l=r[c=te(X(t))]),l&&tn(l,e,6,o);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,tn(u,e,6,o)}}function Tn(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(void 0!==o)return o;const s=e.emits;let i={},c=!1;if(!L(e)){const r=e=>{const n=Tn(e,t,!0);n&&(c=!0,O(i,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return s||c?(I(s)?s.forEach((e=>i[e]=null)):O(i,s),U(e)&&r.set(e,i),i):(U(e)&&r.set(e,null),null)}function Nn(e,t){return!(!e||!N(t))&&(t=t.slice(2).replace(/Once$/,""),A(e,t[0].toLowerCase()+t.slice(1))||A(e,X(t))||A(e,t))}let Rn=null,On=null;function Mn(e){const t=Rn;return Rn=e,On=e&&e.type.__scopeId||null,t}function Pn(e){On=e}function An(){On=null}const In=e=>$n;function $n(e,t=Rn,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&ss(-1);const o=Mn(t);let s;try{s=e(...n)}finally{Mn(o),r._d&&ss(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function Fn(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[i],slots:c,attrs:l,emit:u,render:a,renderCache:f,data:p,setupState:d,ctx:h,inheritAttrs:m}=e;let g,v;const y=Mn(e);try{if(4&n.shapeFlag){const e=o||r;g=Cs(a.call(e,e,f,s,d,p,h)),v=l}else{const e=t;0,g=Cs(e.length>1?e(s,{attrs:l,slots:c,emit:u}):e(s,null)),v=t.props?l:Ln(l)}}catch(t){Xo.length=0,nn(t,e,1),g=gs(Yo)}let b=g;if(v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=b;e.length&&7&t&&(i&&e.some(R)&&(v=Bn(v,i)),b=bs(b,v))}return n.dirs&&(b=bs(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),g=b,Mn(y),g}function Vn(e){let t;for(let n=0;n{let t;for(const n in e)("class"===n||"style"===n||N(n))&&((t||(t={}))[n]=e[n]);return t},Bn=(e,t)=>{const n={};for(const r in e)R(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function jn(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;oe.__isSuspense,Hn={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,s,i,c,l,u){null==e?function(e,t,n,r,o,s,i,c,l){const{p:u,o:{createElement:a}}=l,f=a("div"),p=e.suspense=zn(e,o,r,t,f,n,s,i,c,l);u(null,p.pendingBranch=e.ssContent,f,null,r,p,s,i),p.deps>0?(Wn(e,"onPending"),Wn(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,s,i),Gn(p,e.ssFallback)):p.resolve()}(t,n,r,o,s,i,c,l,u):function(e,t,n,r,o,s,i,c,{p:l,um:u,o:{createElement:a}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=f;if(m)f.pendingBranch=p,as(p,m)?(l(m,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0?f.resolve():g&&(l(h,d,n,r,o,null,s,i,c),Gn(f,d))):(f.pendingId++,v?(f.isHydrating=!1,f.activeBranch=m):u(m,o,f),f.deps=0,f.effects.length=0,f.hiddenContainer=a("div"),g?(l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0?f.resolve():(l(h,d,n,r,o,null,s,i,c),Gn(f,d))):h&&as(p,h)?(l(h,p,n,r,o,f,s,i,c),f.resolve(!0)):(l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0&&f.resolve()));else if(h&&as(p,h))l(h,p,n,r,o,f,s,i,c),Gn(f,p);else if(Wn(t,"onPending"),f.pendingBranch=p,f.pendingId++,l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,r,o,i,c,l,u)},hydrate:function(e,t,n,r,o,s,i,c,l){const u=t.suspense=zn(t,r,n,e.parentNode,document.createElement("div"),null,o,s,i,c,!0),a=l(e,u.pendingBranch=t.ssContent,n,u,s,i);0===u.deps&&u.resolve();return a},create:zn,normalize:function(e){const{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=Kn(r?n.default:n),e.ssFallback=r?Kn(n.fallback):gs(Yo)}};function Wn(e,t){const n=e.props&&e.props[t];L(n)&&n()}function zn(e,t,n,r,o,s,i,c,l,u,a=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:m,remove:g}}=u,v=se(e.props&&e.props.timeout),y={vnode:e,parent:t,parentComponent:n,isSVG:i,container:r,hiddenContainer:o,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof v?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:a,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:r,pendingId:o,effects:s,parentComponent:i,container:c}=y;if(y.isHydrating)y.isHydrating=!1;else if(!e){const e=n&&r.transition&&"out-in"===r.transition.mode;e&&(n.transition.afterLeave=()=>{o===y.pendingId&&p(r,c,t,0)});let{anchor:t}=y;n&&(t=h(n),d(n,i,y,!0)),e||p(r,c,t,0)}Gn(y,r),y.pendingBranch=null,y.isInFallback=!1;let l=y.parent,u=!1;for(;l;){if(l.pendingBranch){l.effects.push(...s),u=!0;break}l=l.parent}u||gn(s),y.effects=[],Wn(t,"onResolve")},fallback(e){if(!y.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:r,container:o,isSVG:s}=y;Wn(t,"onFallback");const i=h(n),u=()=>{y.isInFallback&&(f(null,e,o,i,r,null,s,c,l),Gn(y,e))},a=e.transition&&"out-in"===e.transition.mode;a&&(n.transition.afterLeave=u),y.isInFallback=!0,d(n,r,null,!0),a||u()},move(e,t,n){y.activeBranch&&p(y.activeBranch,e,t,n),y.container=e},next(){return y.activeBranch&&h(y.activeBranch)},registerDep(e,t){const n=!!y.pendingBranch;n&&y.deps++;const r=e.vnode.el;e.asyncDep.catch((t=>{nn(t,e,0)})).then((o=>{if(e.isUnmounted||y.isUnmounted||y.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;js(e,o,!1),r&&(s.el=r);const c=!r&&e.subTree.el;t(e,s,m(r||e.subTree.el),r?null:h(e.subTree),y,i,l),c&&g(c),Un(e,s.el),n&&0==--y.deps&&y.resolve()}))},unmount(e,t){y.isUnmounted=!0,y.activeBranch&&d(y.activeBranch,n,e,t),y.pendingBranch&&d(y.pendingBranch,n,e,t)}};return y}function Kn(e){let t;if(L(e)){const n=os&&e._c;n&&(e._d=!1,ts()),e=e(),n&&(e._d=!0,t=es,ns())}if(I(e)){const t=Vn(e);0,e=t}return e=Cs(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function qn(e,t){t&&t.pendingBranch?I(e)?t.effects.push(...e):t.effects.push(e):gn(e)}function Gn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,o=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=o,Un(r,o))}function Jn(e,t){if(Ms){let n=Ms.provides;const r=Ms.parent&&Ms.parent.provides;r===n&&(n=Ms.provides=Object.create(r)),n[e]=t}else 0}function Zn(e,t,n=!1){const r=Ms||Rn;if(r){const o=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&L(t)?t.call(r.proxy):t}else 0}function Yn(e,t){return nr(e,null,t)}function Qn(e,t){return nr(e,null,{flush:"post"})}function Xn(e,t){return nr(e,null,{flush:"sync"})}const er={};function tr(e,t,n){return nr(e,t,n)}function nr(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:i}=C){const c=Ms;let l,u,a=!1,f=!1;if(Vt(e)?(l=()=>e.value,a=Rt(e)):Tt(e)?(l=()=>e,r=!0):I(e)?(f=!0,a=e.some((e=>Tt(e)||Rt(e))),l=()=>e.map((e=>Vt(e)?e.value:Tt(e)?sr(e):L(e)?en(e,c,2):void 0))):l=L(e)?t?()=>en(e,c,2):()=>{if(!c||!c.isUnmounted)return u&&u(),tn(e,c,3,[d])}:k,t&&r){const e=l;l=()=>sr(e())}let p,d=e=>{u=v.onStop=()=>{en(e,c,4)}};if(Ls){if(d=k,t?n&&tn(t,c,3,[l(),f?[]:void 0,d]):l(),"sync"!==o)return k;{const e=ci();p=e.__watcherHandles||(e.__watcherHandles=[])}}let h=f?new Array(e.length).fill(er):er;const m=()=>{if(v.active)if(t){const e=v.run();(r||a||(f?e.some(((e,t)=>ne(e,h[t]))):ne(e,h)))&&(u&&u(),tn(t,c,3,[e,h===er?void 0:f&&h[0]===er?[]:h,d]),h=e)}else v.run()};let g;m.allowRecurse=!!t,"sync"===o?g=m:"post"===o?g=()=>Vo(m,c&&c.suspense):(m.pre=!0,c&&(m.id=c.uid),g=()=>hn(m));const v=new xe(l,g);t?n?m():h=v.run():"post"===o?Vo(v.run.bind(v),c&&c.suspense):v.run();const y=()=>{v.stop(),c&&c.scope&&M(c.scope.effects,v)};return p&&p.push(y),y}function rr(e,t,n){const r=this.proxy,o=B(e)?e.includes(".")?or(r,e):()=>r[e]:e.bind(r,r);let s;L(t)?s=t:(s=t.handler,n=t);const i=Ms;As(this);const c=nr(o,s.bind(r),n);return i?As(i):Is(),c}function or(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{sr(e,t)}));else if(z(e))for(const n in e)sr(e[n],t);return e}function ir(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Mr((()=>{e.isMounted=!0})),Ir((()=>{e.isUnmounting=!0})),e}const cr=[Function,Array],lr={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:cr,onEnter:cr,onAfterEnter:cr,onEnterCancelled:cr,onBeforeLeave:cr,onLeave:cr,onAfterLeave:cr,onLeaveCancelled:cr,onBeforeAppear:cr,onAppear:cr,onAfterAppear:cr,onAppearCancelled:cr},setup(e,{slots:t}){const n=Ps(),r=ir();let o;return()=>{const s=t.default&&hr(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){let e=!1;for(const t of s)if(t.type!==Yo){0,i=t,e=!0;break}}const c=Mt(e),{mode:l}=c;if(r.isLeaving)return fr(i);const u=pr(i);if(!u)return fr(i);const a=ar(u,c,r,n);dr(u,a);const f=n.subTree,p=f&&pr(f);let d=!1;const{getTransitionKey:h}=u.type;if(h){const e=h();void 0===o?o=e:e!==o&&(o=e,d=!0)}if(p&&p.type!==Yo&&(!as(u,p)||d)){const e=ar(p,c,r,n);if(dr(p,e),"out-in"===l)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,!1!==n.update.active&&n.update()},fr(i);"in-out"===l&&u.type!==Yo&&(e.delayLeave=(e,t,n)=>{ur(r,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete a.delayedLeave},a.delayedLeave=n})}return i}}};function ur(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ar(e,t,n,r){const{appear:o,mode:s,persisted:i=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:a,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),_=ur(n,e),S=(e,t)=>{e&&tn(e,r,9,t)},x=(e,t)=>{const n=t[1];S(e,t),I(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},C={mode:s,persisted:i,beforeEnter(t){let r=c;if(!n.isMounted){if(!o)return;r=m||c}t._leaveCb&&t._leaveCb(!0);const s=_[b];s&&as(e,s)&&s.el._leaveCb&&s.el._leaveCb(),S(r,[t])},enter(e){let t=l,r=u,s=a;if(!n.isMounted){if(!o)return;t=g||l,r=v||u,s=y||a}let i=!1;const c=e._enterCb=t=>{i||(i=!0,S(t?s:r,[e]),C.delayedLeave&&C.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,c]):c()},leave(t,r){const o=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return r();S(f,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,r(),S(n?h:d,[t]),t._leaveCb=void 0,_[o]===e&&delete _[o])};_[o]=e,p?x(p,[t,i]):i()},clone(e){return ar(e,t,n,r)}};return C}function fr(e){if(br(e))return(e=bs(e)).children=null,e}function pr(e){return br(e)?e.children?e.children[0]:void 0:e}function dr(e,t){6&e.shapeFlag&&e.component?dr(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hr(e,t=!1,n){let r=[],o=0;for(let s=0;s1)for(let e=0;e!!e.type.__asyncLoader;function vr(e){L(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:s,suspensible:i=!0,onError:c}=e;let l,u=null,a=0;const f=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise(((t,n)=>{c(e,(()=>t((a++,u=null,f()))),(()=>n(e)),a+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t))))};return mr({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return l},setup(){const e=Ms;if(l)return()=>yr(l,e);const t=t=>{u=null,nn(t,e,13,!r)};if(i&&e.suspense||Ls)return f().then((t=>()=>yr(t,e))).catch((e=>(t(e),()=>r?gs(r,{error:e}):null)));const c=Lt(!1),a=Lt(),p=Lt(!!o);return o&&setTimeout((()=>{p.value=!1}),o),null!=s&&setTimeout((()=>{if(!c.value&&!a.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),a.value=e}}),s),f().then((()=>{c.value=!0,e.parent&&br(e.parent.vnode)&&hn(e.parent.update)})).catch((e=>{t(e),a.value=e})),()=>c.value&&l?yr(l,e):a.value&&r?gs(r,{error:a.value}):n&&!p.value?gs(n):void 0}})}function yr(e,t){const{ref:n,props:r,children:o,ce:s}=t.vnode,i=gs(e,r,o);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const br=e=>e.type.__isKeepAlive,_r={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ps(),r=n.ctx;if(!r.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const o=new Map,s=new Set;let i=null;const c=n.suspense,{renderer:{p:l,m:u,um:a,o:{createElement:f}}}=r,p=f("div");function d(e){Er(e),a(e,n,c,!0)}function h(e){o.forEach(((t,n)=>{const r=Ks(t.type);!r||e&&e(r)||m(n)}))}function m(e){const t=o.get(e);i&&t.type===i.type?i&&Er(i):d(t),o.delete(e),s.delete(e)}r.activate=(e,t,n,r,o)=>{const s=e.component;u(e,t,n,0,c),l(s.vnode,e,t,n,s,c,r,e.slotScopeIds,o),Vo((()=>{s.isDeactivated=!1,s.a&&re(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Ts(t,s.parent,e)}),c)},r.deactivate=e=>{const t=e.component;u(e,p,null,1,c),Vo((()=>{t.da&&re(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Ts(n,t.parent,e),t.isDeactivated=!0}),c)},tr((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Sr(e,t))),t&&h((e=>!Sr(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&o.set(g,Tr(n.subTree))};return Mr(v),Ar(v),Ir((()=>{o.forEach((e=>{const{subTree:t,suspense:r}=n,o=Tr(t);if(e.type!==o.type)d(e);else{Er(o);const e=o.component.da;e&&Vo(e,r)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),r=n[0];if(n.length>1)return i=null,n;if(!(us(r)&&(4&r.shapeFlag||128&r.shapeFlag)))return i=null,r;let c=Tr(r);const l=c.type,u=Ks(gr(c)?c.type.__asyncResolved||{}:l),{include:a,exclude:f,max:p}=e;if(a&&(!u||!Sr(a,u))||f&&u&&Sr(f,u))return i=c,r;const d=null==c.key?l:c.key,h=o.get(d);return c.el&&(c=bs(c),128&r.shapeFlag&&(r.ssContent=c)),g=d,h?(c.el=h.el,c.component=h.component,c.transition&&dr(c,c.transition),c.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),c.shapeFlag|=256,i=c,Dn(r.type)?r:c}}};function Sr(e,t){return I(e)?e.some((e=>Sr(e,t))):B(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function xr(e,t){wr(e,"a",t)}function Cr(e,t){wr(e,"da",t)}function wr(e,t,n=Ms){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Nr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)br(e.parent.vnode)&&kr(r,t,n,e),e=e.parent}}function kr(e,t,n,r){const o=Nr(t,e,r,!0);$r((()=>{M(r[t],o)}),n)}function Er(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Tr(e){return 128&e.shapeFlag?e.ssContent:e}function Nr(e,t,n=Ms,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;Ne(),As(n);const o=tn(t,n,e,r);return Is(),Re(),o});return r?o.unshift(s):o.push(s),s}}const Rr=e=>(t,n=Ms)=>(!Ls||"sp"===e)&&Nr(e,((...e)=>t(...e)),n),Or=Rr("bm"),Mr=Rr("m"),Pr=Rr("bu"),Ar=Rr("u"),Ir=Rr("bum"),$r=Rr("um"),Fr=Rr("sp"),Vr=Rr("rtg"),Lr=Rr("rtc");function Br(e,t=Ms){Nr("ec",e,t)}function jr(e,t){const n=Rn;if(null===n)return e;const r=zs(n)||n.proxy,o=e.dirs||(e.dirs=[]);for(let e=0;et(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let r=0,i=n.length;r{const t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function Yr(e,t,n={},r,o){if(Rn.isCE||Rn.parent&&gr(Rn.parent)&&Rn.parent.isCE)return"default"!==t&&(n.name=t),gs("slot",n,r&&r());let s=e[t];s&&s._c&&(s._d=!1),ts();const i=s&&Qr(s(n)),c=ls(Jo,{key:n.key||i&&i.key||`_${t}`},i||(r?r():[]),i&&1===e._?64:-2);return!o&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),s&&s._c&&(s._d=!0),c}function Qr(e){return e.some((e=>!us(e)||e.type!==Yo&&!(e.type===Jo&&!Qr(e.children))))?e:null}function Xr(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:te(r)]=e[r];return n}const eo=e=>e?$s(e)?zs(e)||e.proxy:eo(e.parent):null,to=O(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>eo(e.parent),$root:e=>eo(e.root),$emit:e=>e.emit,$options:e=>uo(e),$forceUpdate:e=>e.f||(e.f=()=>hn(e.update)),$nextTick:e=>e.n||(e.n=dn.bind(e.proxy)),$watch:e=>rr.bind(e)}),no=(e,t)=>e!==C&&!e.__isScriptSetup&&A(e,t),ro={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:c,appContext:l}=e;let u;if("$"!==t[0]){const c=i[t];if(void 0!==c)switch(c){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(no(r,t))return i[t]=1,r[t];if(o!==C&&A(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&A(u,t))return i[t]=3,s[t];if(n!==C&&A(n,t))return i[t]=4,n[t];so&&(i[t]=0)}}const a=to[t];let f,p;return a?("$attrs"===t&&Oe(e,0,t),a(e)):(f=c.__cssModules)&&(f=f[t])?f:n!==C&&A(n,t)?(i[t]=4,n[t]):(p=l.config.globalProperties,A(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return no(o,t)?(o[t]=n,!0):r!==C&&A(r,t)?(r[t]=n,!0):!A(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let c;return!!n[i]||e!==C&&A(e,i)||no(t,i)||(c=s[0])&&A(c,i)||A(r,i)||A(to,i)||A(o.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:A(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};const oo=O({},ro,{get(e,t){if(t!==Symbol.unscopables)return ro.get(e,t,e)},has(e,t){return"_"!==t[0]&&!s(t)}});let so=!0;function io(e){const t=uo(e),n=e.proxy,r=e.ctx;so=!1,t.beforeCreate&&co(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:c,provide:l,inject:u,created:a,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:_,render:S,renderTracked:x,renderTriggered:C,errorCaptured:w,serverPrefetch:E,expose:T,inheritAttrs:N,components:R,directives:O,filters:M}=t;if(u&&function(e,t,n=k,r=!1){I(e)&&(e=ho(e));for(const n in e){const o=e[n];let s;s=U(o)?"default"in o?Zn(o.from||n,o.default,!0):Zn(o.from||n):Zn(o),Vt(s)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[n]=s}}(u,r,null,e.appContext.config.unwrapInjectedRef),i)for(const e in i){const t=i[e];L(t)&&(r[e]=t.bind(n))}if(o){0;const t=o.call(n,n);0,U(t)&&(e.data=xt(t))}if(so=!0,s)for(const e in s){const t=s[e],o=L(t)?t.bind(n,n):L(t.get)?t.get.bind(n,n):k;0;const i=!L(t)&&L(t.set)?t.set.bind(n):k,c=Gs({get:o,set:i});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)lo(c[e],r,n,e);if(l){const e=L(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{Jn(t,e[t])}))}function P(e,t){I(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(a&&co(a,e,"c"),P(Or,f),P(Mr,p),P(Pr,d),P(Ar,h),P(xr,m),P(Cr,g),P(Br,w),P(Lr,x),P(Vr,C),P(Ir,y),P($r,_),P(Fr,E),I(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===k&&(e.render=S),null!=N&&(e.inheritAttrs=N),R&&(e.components=R),O&&(e.directives=O)}function co(e,t,n){tn(I(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function lo(e,t,n,r){const o=r.includes(".")?or(n,r):()=>n[r];if(B(e)){const n=t[e];L(n)&&tr(o,n)}else if(L(e))tr(o,e.bind(n));else if(U(e))if(I(e))e.forEach((e=>lo(e,t,n,r)));else{const r=L(e.handler)?e.handler.bind(n):t[e.handler];L(r)&&tr(o,r,e)}else 0}function uo(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,c=s.get(t);let l;return c?l=c:o.length||n||r?(l={},o.length&&o.forEach((e=>ao(l,e,i,!0))),ao(l,t,i)):l=t,U(t)&&s.set(t,l),l}function ao(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&ao(e,s,n,!0),o&&o.forEach((t=>ao(e,t,n,!0)));for(const o in t)if(r&&"expose"===o);else{const r=fo[o]||n&&n[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const fo={data:po,props:go,emits:go,methods:go,computed:go,beforeCreate:mo,created:mo,beforeMount:mo,mounted:mo,beforeUpdate:mo,updated:mo,beforeDestroy:mo,beforeUnmount:mo,destroyed:mo,unmounted:mo,activated:mo,deactivated:mo,errorCaptured:mo,serverPrefetch:mo,components:go,directives:go,watch:function(e,t){if(!e)return t;if(!t)return e;const n=O(Object.create(null),e);for(const r in t)n[r]=mo(e[r],t[r]);return n},provide:po,inject:function(e,t){return go(ho(e),ho(t))}};function po(e,t){return t?e?function(){return O(L(e)?e.call(this,this):e,L(t)?t.call(this,this):t)}:t:e}function ho(e){if(I(e)){const t={};for(let n=0;n{l=!0;const[n,r]=bo(e,t,!0);O(i,n),r&&c.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!l)return U(e)&&r.set(e,w),w;if(I(s))for(let e=0;e-1,r[1]=n<0||e-1||A(r,"default"))&&c.push(t)}}}}const u=[i,c];return U(e)&&r.set(e,u),u}function _o(e){return"$"!==e[0]}function So(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function xo(e,t){return So(e)===So(t)}function Co(e,t){return I(t)?t.findIndex((t=>xo(t,e))):L(t)&&xo(t,e)?0:-1}const wo=e=>"_"===e[0]||"$stable"===e,ko=e=>I(e)?e.map(Cs):[Cs(e)],Eo=(e,t,n)=>{if(t._n)return t;const r=$n(((...e)=>ko(t(...e))),n);return r._c=!1,r},To=(e,t,n)=>{const r=e._ctx;for(const n in e){if(wo(n))continue;const o=e[n];if(L(o))t[n]=Eo(0,o,r);else if(null!=o){0;const e=ko(o);t[n]=()=>e}}},No=(e,t)=>{const n=ko(t);e.slots.default=()=>n};function Ro(){return{app:null,config:{isNativeTag:E,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Oo=0;function Mo(e,t){return function(n,r=null){L(n)||(n=Object.assign({},n)),null==r||U(r)||(r=null);const o=Ro(),s=new Set;let i=!1;const c=o.app={_uid:Oo++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:fi,get config(){return o.config},set config(e){0},use(e,...t){return s.has(e)||(e&&L(e.install)?(s.add(e),e.install(c,...t)):L(e)&&(s.add(e),e(c,...t))),c},mixin(e){return o.mixins.includes(e)||o.mixins.push(e),c},component(e,t){return t?(o.components[e]=t,c):o.components[e]},directive(e,t){return t?(o.directives[e]=t,c):o.directives[e]},mount(s,l,u){if(!i){0;const a=gs(n,r);return a.appContext=o,l&&t?t(a,s):e(a,s,u),i=!0,c._container=s,s.__vue_app__=c,zs(a.component)||a.component.proxy}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return o.provides[e]=t,c}};return c}}function Po(e,t,n,r,o=!1){if(I(e))return void e.forEach(((e,s)=>Po(e,t&&(I(t)?t[s]:t),n,r,o)));if(gr(r)&&!o)return;const s=4&r.shapeFlag?zs(r.component)||r.component.proxy:r.el,i=o?null:s,{i:c,r:l}=e;const u=t&&t.r,a=c.refs===C?c.refs={}:c.refs,f=c.setupState;if(null!=u&&u!==l&&(B(u)?(a[u]=null,A(f,u)&&(f[u]=null)):Vt(u)&&(u.value=null)),L(l))en(l,c,12,[i,a]);else{const t=B(l),r=Vt(l);if(t||r){const c=()=>{if(e.f){const n=t?A(f,l)?f[l]:a[l]:l.value;o?I(n)&&M(n,s):I(n)?n.includes(s)||n.push(s):t?(a[l]=[s],A(f,l)&&(f[l]=a[l])):(l.value=[s],e.k&&(a[e.k]=l.value))}else t?(a[l]=i,A(f,l)&&(f[l]=i)):r&&(l.value=i,e.k&&(a[e.k]=i))};i?(c.id=-1,Vo(c,n)):c()}else 0}}let Ao=!1;const Io=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,$o=e=>8===e.nodeType;function Fo(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:s,parentNode:i,remove:c,insert:l,createComment:u}}=e,a=(n,r,c,u,g,v=!1)=>{const y=$o(n)&&"["===n.data,b=()=>h(n,r,c,u,g,y),{type:_,ref:S,shapeFlag:x,patchFlag:C}=r;let w=n.nodeType;r.el=n,-2===C&&(v=!1,r.dynamicChildren=null);let k=null;switch(_){case Zo:3!==w?""===r.children?(l(r.el=o(""),i(n),n),k=n):k=b():(n.data!==r.children&&(Ao=!0,n.data=r.children),k=s(n));break;case Yo:k=8!==w||y?b():s(n);break;case Qo:if(y&&(w=(n=s(n)).nodeType),1===w||3===w){k=n;const e=!r.children.length;for(let t=0;t{i=i||!!t.dynamicChildren;const{type:l,props:u,patchFlag:a,shapeFlag:f,dirs:d}=t,h="input"===l&&d||"option"===l;if(h||-1!==a){if(d&&Ur(t,null,n,"created"),u)if(h||!i||48&a)for(const t in u)(h&&t.endsWith("value")||N(t)&&!q(t))&&r(e,t,null,u[t],!1,void 0,n);else u.onClick&&r(e,"onClick",null,u.onClick,!1,void 0,n);let l;if((l=u&&u.onVnodeBeforeMount)&&Ts(l,n,t),d&&Ur(t,null,n,"beforeMount"),((l=u&&u.onVnodeMounted)||d)&&qn((()=>{l&&Ts(l,n,t),d&&Ur(t,null,n,"mounted")}),o),16&f&&(!u||!u.innerHTML&&!u.textContent)){let r=p(e.firstChild,t,e,n,o,s,i);for(;r;){Ao=!0;const e=r;r=r.nextSibling,c(e)}}else 8&f&&e.textContent!==t.children&&(Ao=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,r,o,s,i,c)=>{c=c||!!t.dynamicChildren;const l=t.children,u=l.length;for(let t=0;t{const{slotScopeIds:a}=t;a&&(o=o?o.concat(a):a);const f=i(e),d=p(s(e),t,f,n,r,o,c);return d&&$o(d)&&"]"===d.data?s(t.anchor=d):(Ao=!0,l(t.anchor=u("]"),f,d),d)},h=(e,t,r,o,l,u)=>{if(Ao=!0,t.el=null,u){const t=m(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const a=s(e),f=i(e);return c(e),n(null,t,f,a,r,o,Io(f),l),a},m=e=>{let t=0;for(;e;)if((e=s(e))&&$o(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),yn(),void(t._vnode=e);Ao=!1,a(t.firstChild,e,null,null,null),yn(),t._vnode=e,Ao&&console.error("Hydration completed but contains mismatches.")},a]}const Vo=qn;function Lo(e){return jo(e)}function Bo(e){return jo(e,Fo)}function jo(e,t){(ie||(ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{})).__VUE__=!0;const{insert:r,remove:o,patchProp:s,createElement:i,createText:c,createComment:l,setText:u,setElementText:a,parentNode:f,nextSibling:p,setScopeId:d=k,insertStaticContent:h}=e,m=(e,t,n,r=null,o=null,s=null,i=!1,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!as(e,t)&&(r=G(e),D(e,o,s,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:u,ref:a,shapeFlag:f}=t;switch(u){case Zo:g(e,t,n,r);break;case Yo:v(e,t,n,r);break;case Qo:null==e&&y(t,n,r,i);break;case Jo:M(e,t,n,r,o,s,i,c,l);break;default:1&f?_(e,t,n,r,o,s,i,c,l):6&f?P(e,t,n,r,o,s,i,c,l):(64&f||128&f)&&u.process(e,t,n,r,o,s,i,c,l,Z)}null!=a&&o&&Po(a,e&&e.ref,s,t||e,!t)},g=(e,t,n,o)=>{if(null==e)r(t.el=c(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&u(n,t.children)}},v=(e,t,n,o)=>{null==e?r(t.el=l(t.children||""),n,o):t.el=e.el},y=(e,t,n,r)=>{[e.el,e.anchor]=h(e.children,t,n,r,e.el,e.anchor)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=p(e),o(e),e=n;o(t)},_=(e,t,n,r,o,s,i,c,l)=>{i=i||"svg"===t.type,null==e?S(t,n,r,o,s,i,c,l):T(e,t,o,s,i,c,l)},S=(e,t,n,o,c,l,u,f)=>{let p,d;const{type:h,props:m,shapeFlag:g,transition:v,dirs:y}=e;if(p=e.el=i(e.type,l,m&&m.is,m),8&g?a(p,e.children):16&g&&E(e.children,p,null,o,c,l&&"foreignObject"!==h,u,f),y&&Ur(e,null,o,"created"),m){for(const t in m)"value"===t||q(t)||s(p,t,null,m[t],l,e.children,o,c,K);"value"in m&&s(p,"value",null,m.value),(d=m.onVnodeBeforeMount)&&Ts(d,o,e)}x(p,e,e.scopeId,u,o),y&&Ur(e,null,o,"beforeMount");const b=(!c||c&&!c.pendingBranch)&&v&&!v.persisted;b&&v.beforeEnter(p),r(p,t,n),((d=m&&m.onVnodeMounted)||b||y)&&Vo((()=>{d&&Ts(d,o,e),b&&v.enter(p),y&&Ur(e,null,o,"mounted")}),c)},x=(e,t,n,r,o)=>{if(n&&d(e,n),r)for(let t=0;t{for(let u=l;u{const l=t.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=t;u|=16&e.patchFlag;const d=e.props||C,h=t.props||C;let m;n&&Uo(n,!1),(m=h.onVnodeBeforeUpdate)&&Ts(m,n,t,e),p&&Ur(t,e,n,"beforeUpdate"),n&&Uo(n,!0);const g=o&&"foreignObject"!==t.type;if(f?N(e.dynamicChildren,f,l,n,r,g,i):c||L(e,t,l,null,n,r,g,i,!1),u>0){if(16&u)R(l,t,d,h,n,r,o);else if(2&u&&d.class!==h.class&&s(l,"class",null,h.class,o),4&u&&s(l,"style",d.style,h.style,o),8&u){const i=t.dynamicProps;for(let t=0;t{m&&Ts(m,n,t,e),p&&Ur(t,e,n,"updated")}),r)},N=(e,t,n,r,o,s,i)=>{for(let c=0;c{if(n!==r){if(n!==C)for(const l in n)q(l)||l in r||s(e,l,n[l],null,c,t.children,o,i,K);for(const l in r){if(q(l))continue;const u=r[l],a=n[l];u!==a&&"value"!==l&&s(e,l,a,u,c,t.children,o,i,K)}"value"in r&&s(e,"value",n.value,r.value)}},M=(e,t,n,o,s,i,l,u,a)=>{const f=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(u=u?u.concat(m):m),null==e?(r(f,n,o),r(p,n,o),E(t.children,n,p,s,i,l,u,a)):d>0&&64&d&&h&&e.dynamicChildren?(N(e.dynamicChildren,h,n,s,i,l,u),(null!=t.key||s&&t===s.subTree)&&Do(e,t,!0)):L(e,t,n,p,s,i,l,u,a)},P=(e,t,n,r,o,s,i,c,l)=>{t.slotScopeIds=c,null==e?512&t.shapeFlag?o.ctx.activate(t,n,r,i,l):I(t,n,r,o,s,i,l):$(e,t,l)},I=(e,t,n,r,o,s,i)=>{const c=e.component=Os(e,r,o);if(br(e)&&(c.ctx.renderer=Z),Bs(c),c.asyncDep){if(o&&o.registerDep(c,F),!e.el){const e=c.subTree=gs(Yo);v(null,e,t,n)}}else F(c,e,t,n,o,s,i)},$=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:c,patchFlag:l}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!o&&!c||c&&c.$stable)||r!==i&&(r?!i||jn(r,i,u):!!i);if(1024&l)return!0;if(16&l)return r?jn(r,i,u):!!i;if(8&l){const e=t.dynamicProps;for(let t=0;tcn&&sn.splice(t,1)}(r.update),r.update()}else t.el=e.el,r.vnode=t},F=(e,t,n,r,o,s,i)=>{const c=e.effect=new xe((()=>{if(e.isMounted){let t,{next:n,bu:r,u:c,parent:l,vnode:u}=e,a=n;0,Uo(e,!1),n?(n.el=u.el,V(e,n,i)):n=u,r&&re(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Ts(t,l,n,u),Uo(e,!0);const p=Fn(e);0;const d=e.subTree;e.subTree=p,m(d,p,f(d.el),G(d),e,o,s),n.el=p.el,null===a&&Un(e,p.el),c&&Vo(c,o),(t=n.props&&n.props.onVnodeUpdated)&&Vo((()=>Ts(t,l,n,u)),o)}else{let i;const{el:c,props:l}=t,{bm:u,m:a,parent:f}=e,p=gr(t);if(Uo(e,!1),u&&re(u),!p&&(i=l&&l.onVnodeBeforeMount)&&Ts(i,f,t),Uo(e,!0),c&&ee){const n=()=>{e.subTree=Fn(e),ee(c,e.subTree,e,o,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{0;const i=e.subTree=Fn(e);0,m(null,i,n,r,e,o,s),t.el=i.el}if(a&&Vo(a,o),!p&&(i=l&&l.onVnodeMounted)){const e=t;Vo((()=>Ts(i,f,e)),o)}(256&t.shapeFlag||f&&gr(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&Vo(e.a,o),e.isMounted=!0,t=n=r=null}}),(()=>hn(l)),e.scope),l=e.update=()=>c.run();l.id=e.uid,Uo(e,!0),l()},V=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,c=Mt(o),[l]=e.propsOptions;let u=!1;if(!(r||i>0)||16&i){let r;vo(e,t,o,s)&&(u=!0);for(const s in c)t&&(A(t,s)||(r=X(s))!==s&&A(t,r))||(l?!n||void 0===n[s]&&void 0===n[r]||(o[s]=yo(l,c,s,void 0,e,!0)):delete o[s]);if(s!==c)for(const e in s)t&&A(t,e)||(delete s[e],u=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let r=0;r{const{vnode:r,slots:o}=e;let s=!0,i=C;if(32&r.shapeFlag){const e=t._;e?n&&1===e?s=!1:(O(o,t),n||1!==e||delete o._):(s=!t.$stable,To(t,o)),i=t}else t&&(No(e,t),i={default:1});if(s)for(const e in o)wo(e)||e in i||delete o[e]})(e,t.children,n),Ne(),vn(),Re()},L=(e,t,n,r,o,s,i,c,l=!1)=>{const u=e&&e.children,f=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void j(u,p,n,r,o,s,i,c,l);if(256&d)return void B(u,p,n,r,o,s,i,c,l)}8&h?(16&f&&K(u,o,s),p!==u&&a(n,p)):16&f?16&h?j(u,p,n,r,o,s,i,c,l):K(u,o,s,!0):(8&f&&a(n,""),16&h&&E(p,n,r,o,s,i,c,l))},B=(e,t,n,r,o,s,i,c,l)=>{t=t||w;const u=(e=e||w).length,a=t.length,f=Math.min(u,a);let p;for(p=0;pa?K(e,o,s,!0,!1,f):E(t,n,r,o,s,i,c,l,f)},j=(e,t,n,r,o,s,i,c,l)=>{let u=0;const a=t.length;let f=e.length-1,p=a-1;for(;u<=f&&u<=p;){const r=e[u],a=t[u]=l?ws(t[u]):Cs(t[u]);if(!as(r,a))break;m(r,a,n,null,o,s,i,c,l),u++}for(;u<=f&&u<=p;){const r=e[f],u=t[p]=l?ws(t[p]):Cs(t[p]);if(!as(r,u))break;m(r,u,n,null,o,s,i,c,l),f--,p--}if(u>f){if(u<=p){const e=p+1,f=ep)for(;u<=f;)D(e[u],o,s,!0),u++;else{const d=u,h=u,g=new Map;for(u=h;u<=p;u++){const e=t[u]=l?ws(t[u]):Cs(t[u]);null!=e.key&&g.set(e.key,u)}let v,y=0;const b=p-h+1;let _=!1,S=0;const x=new Array(b);for(u=0;u=b){D(r,o,s,!0);continue}let a;if(null!=r.key)a=g.get(r.key);else for(v=h;v<=p;v++)if(0===x[v-h]&&as(r,t[v])){a=v;break}void 0===a?D(r,o,s,!0):(x[a-h]=u+1,a>=S?S=a:_=!0,m(r,t[a],n,null,o,s,i,c,l),y++)}const C=_?function(e){const t=e.slice(),n=[0];let r,o,s,i,c;const l=e.length;for(r=0;r>1,e[n[c]]0&&(t[r]=n[s-1]),n[s]=r)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(x):w;for(v=C.length-1,u=b-1;u>=0;u--){const e=h+u,f=t[e],p=e+1{const{el:i,type:c,transition:l,children:u,shapeFlag:a}=e;if(6&a)return void U(e.component.subTree,t,n,o);if(128&a)return void e.suspense.move(t,n,o);if(64&a)return void c.move(e,t,n,Z);if(c===Jo){r(i,t,n);for(let e=0;e{let s;for(;e&&e!==t;)s=p(e),r(e,n,o),e=s;r(t,n,o)})(e,t,n);if(2!==o&&1&a&&l)if(0===o)l.beforeEnter(i),r(i,t,n),Vo((()=>l.enter(i)),s);else{const{leave:e,delayLeave:o,afterLeave:s}=l,c=()=>r(i,t,n),u=()=>{e(i,(()=>{c(),s&&s()}))};o?o(i,c,u):u()}else r(i,t,n)},D=(e,t,n,r=!1,o=!1)=>{const{type:s,props:i,ref:c,children:l,dynamicChildren:u,shapeFlag:a,patchFlag:f,dirs:p}=e;if(null!=c&&Po(c,null,n,e,!0),256&a)return void t.ctx.deactivate(e);const d=1&a&&p,h=!gr(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&Ts(m,t,e),6&a)z(e.component,n,r);else{if(128&a)return void e.suspense.unmount(n,r);d&&Ur(e,null,t,"beforeUnmount"),64&a?e.type.remove(e,t,n,o,Z,r):u&&(s!==Jo||f>0&&64&f)?K(u,t,n,!1,!0):(s===Jo&&384&f||!o&&16&a)&&K(l,t,n),r&&H(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&Vo((()=>{m&&Ts(m,t,e),d&&Ur(e,null,t,"unmounted")}),n)},H=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===Jo)return void W(n,r);if(t===Qo)return void b(e);const i=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:r}=s,o=()=>t(n,i);r?r(e.el,i,o):o()}else i()},W=(e,t)=>{let n;for(;e!==t;)n=p(e),o(e),e=n;o(t)},z=(e,t,n)=>{const{bum:r,scope:o,update:s,subTree:i,um:c}=e;r&&re(r),o.stop(),s&&(s.active=!1,D(i,e,t,n)),c&&Vo(c,t),Vo((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},K=(e,t,n,r=!1,o=!1,s=0)=>{for(let i=s;i6&e.shapeFlag?G(e.component.subTree):128&e.shapeFlag?e.suspense.next():p(e.anchor||e.el),J=(e,t,n)=>{null==e?t._vnode&&D(t._vnode,null,null,!0):m(t._vnode||null,e,t,null,null,null,n),vn(),yn(),t._vnode=e},Z={p:m,um:D,m:U,r:H,mt:I,mc:E,pc:L,pbc:N,n:G,o:e};let Q,ee;return t&&([Q,ee]=t(Z)),{render:J,hydrate:Q,createApp:Mo(J,Q)}}function Uo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Do(e,t,n=!1){const r=e.children,o=t.children;if(I(r)&&I(o))for(let e=0;ee&&(e.disabled||""===e.disabled),Wo=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,zo=(e,t)=>{const n=e&&e.to;if(B(n)){if(t){const e=t(n);return e}return null}return n};function Ko(e,t,n,{o:{insert:r},m:o},s=2){0===s&&r(e.targetAnchor,t,n);const{el:i,anchor:c,shapeFlag:l,children:u,props:a}=e,f=2===s;if(f&&r(i,t,n),(!f||Ho(a))&&16&l)for(let e=0;e{16&y&&a(b,e,t,o,s,i,c,l)};v?g(n,u):f&&g(f,p)}else{t.el=e.el;const r=t.anchor=e.anchor,a=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=Ho(e.props),g=m?n:a,y=m?r:d;if(i=i||Wo(a),_?(p(e.dynamicChildren,_,g,o,s,i,c),Do(e,t,!0)):l||f(e,t,g,y,o,s,i,c,!1),v)m||Ko(t,n,r,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=zo(t.props,h);e&&Ko(t,e,null,u,0)}else m&&Ko(t,a,d,u,1)}Go(t)},remove(e,t,n,r,{um:o,o:{remove:s}},i){const{shapeFlag:c,children:l,anchor:u,targetAnchor:a,target:f,props:p}=e;if(f&&s(a),(i||!Ho(p))&&(s(u),16&c))for(let e=0;e0?es||w:null,ns(),os>0&&es&&es.push(e),e}function cs(e,t,n,r,o,s){return is(ms(e,t,n,r,o,s,!0))}function ls(e,t,n,r,o){return is(gs(e,t,n,r,o,!0))}function us(e){return!!e&&!0===e.__v_isVNode}function as(e,t){return e.type===t.type&&e.key===t.key}function fs(e){rs=e}const ps="__vInternal",ds=({key:e})=>null!=e?e:null,hs=({ref:e,ref_key:t,ref_for:n})=>null!=e?B(e)||Vt(e)||L(e)?{i:Rn,r:e,k:t,f:!!n}:e:null;function ms(e,t=null,n=null,r=0,o=null,s=(e===Jo?0:1),i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ds(t),ref:t&&hs(t),scopeId:On,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Rn};return c?(ks(l,n),128&s&&e.normalize(l)):n&&(l.shapeFlag|=B(n)?8:16),os>0&&!i&&es&&(l.patchFlag>0||6&s)&&32!==l.patchFlag&&es.push(l),l}const gs=vs;function vs(e,t=null,n=null,r=0,o=null,s=!1){if(e&&e!==Wr||(e=Yo),us(e)){const r=bs(e,t,!0);return n&&ks(r,n),os>0&&!s&&es&&(6&r.shapeFlag?es[es.indexOf(e)]=r:es.push(r)),r.patchFlag|=-2,r}if(qs(e)&&(e=e.__vccOpts),t){t=ys(t);let{class:e,style:n}=t;e&&!B(e)&&(t.class=f(e)),U(n)&&(Ot(n)&&!I(n)&&(n=O({},n)),t.style=i(n))}return ms(e,t,n,r,o,B(e)?1:Dn(e)?128:(e=>e.__isTeleport)(e)?64:U(e)?4:L(e)?2:0,s,!0)}function ys(e){return e?Ot(e)||ps in e?O({},e):e:null}function bs(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:i}=e,c=t?Es(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&ds(c),ref:t&&t.ref?n&&o?I(o)?o.concat(hs(t)):[o,hs(t)]:hs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Jo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&bs(e.ssContent),ssFallback:e.ssFallback&&bs(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx}}function _s(e=" ",t=0){return gs(Zo,null,e,t)}function Ss(e,t){const n=gs(Qo,null,e);return n.staticCount=t,n}function xs(e="",t=!1){return t?(ts(),ls(Yo,null,e)):gs(Yo,null,e)}function Cs(e){return null==e||"boolean"==typeof e?gs(Yo):I(e)?gs(Jo,null,e.slice()):"object"==typeof e?ws(e):gs(Zo,null,String(e))}function ws(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:bs(e)}function ks(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(I(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),ks(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||ps in t?3===r&&Rn&&(1===Rn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Rn}}else L(t)?(t={default:t,_ctx:Rn},n=32):(t=String(t),64&r?(n=16,t=[_s(t)]):n=8);e.children=t,e.shapeFlag|=n}function Es(...e){const t={};for(let n=0;nMs||Rn,As=e=>{Ms=e,e.scope.on()},Is=()=>{Ms&&Ms.scope.off(),Ms=null};function $s(e){return 4&e.vnode.shapeFlag}let Fs,Vs,Ls=!1;function Bs(e,t=!1){Ls=t;const{props:n,children:r}=e.vnode,o=$s(e);!function(e,t,n,r=!1){const o={},s={};oe(s,ps,1),e.propsDefaults=Object.create(null),vo(e,t,o,s);for(const t in e.propsOptions[0])t in o||(o[t]=void 0);n?e.props=r?o:Ct(o):e.type.props?e.props=o:e.props=s,e.attrs=s}(e,n,o,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Mt(t),oe(t,"_",n)):To(t,e.slots={})}else e.slots={},t&&No(e,t);oe(e.slots,ps,1)})(e,r);const s=o?function(e,t){const n=e.type;0;e.accessCache=Object.create(null),e.proxy=Pt(new Proxy(e.ctx,ro)),!1;const{setup:r}=n;if(r){const n=e.setupContext=r.length>1?Ws(e):null;As(e),Ne();const o=en(r,e,0,[e.props,n]);if(Re(),Is(),D(o)){if(o.then(Is,Is),t)return o.then((n=>{js(e,n,t)})).catch((t=>{nn(t,e,0)}));e.asyncDep=o}else js(e,o,t)}else Hs(e,t)}(e,t):void 0;return Ls=!1,s}function js(e,t,n){L(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:U(t)&&(e.setupState=zt(t)),Hs(e,n)}function Us(e){Fs=e,Vs=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,oo))}}const Ds=()=>!Fs;function Hs(e,t,n){const r=e.type;if(!e.render){if(!t&&Fs&&!r.render){const t=r.template||uo(e).template;if(t){0;const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:i}=r,c=O(O({isCustomElement:n,delimiters:s},o),i);r.render=Fs(t,c)}}e.render=r.render||k,Vs&&Vs(e)}As(e),Ne(),io(e),Re(),Is()}function Ws(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get(t,n){return Oe(e,0,"$attrs"),t[n]}})}(e))},slots:e.slots,emit:e.emit,expose:t}}function zs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(zt(Pt(e.exposed)),{get(t,n){return n in t?t[n]:n in to?to[n](e):void 0},has(e,t){return t in e||t in to}}))}function Ks(e,t=!0){return L(e)?e.displayName||e.name:e.name||t&&e.__name}function qs(e){return L(e)&&"__vccOpts"in e}const Gs=(e,t)=>function(e,t,n=!1){let r,o;const s=L(e);return s?(r=e,o=k):(r=e.get,o=e.set),new Qt(r,o,s||!o,n)}(e,0,Ls);function Js(){return null}function Zs(){return null}function Ys(e){0}function Qs(e,t){return null}function Xs(){return ti().slots}function ei(){return ti().attrs}function ti(){const e=Ps();return e.setupContext||(e.setupContext=Ws(e))}function ni(e,t){const n=I(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const e in t){const r=n[e];r?I(r)||L(r)?n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(n[e]={default:t[e]})}return n}function ri(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function oi(e){const t=Ps();let n=e();return Is(),D(n)&&(n=n.catch((e=>{throw As(t),e}))),[n,()=>As(t)]}function si(e,t,n){const r=arguments.length;return 2===r?U(t)&&!I(t)?us(t)?gs(e,null,[t]):gs(e,t):gs(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&us(n)&&(n=[n]),gs(e,t,n))}const ii=Symbol(""),ci=()=>{{const e=Zn(ii);return e}};function li(){return void 0}function ui(e,t,n,r){const o=n[r];if(o&&ai(o,e))return o;const s=t();return s.memo=e.slice(),n[r]=s}function ai(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&es&&es.push(e),!0}const fi="3.2.45",pi={createComponentInstance:Os,setupComponent:Bs,renderComponentRoot:Fn,setCurrentRenderingInstance:Mn,isVNode:us,normalizeVNode:Cs},di=null,hi=null,mi="undefined"!=typeof document?document:null,gi=mi&&mi.createElement("template"),vi={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?mi.createElementNS("http://www.w3.org/2000/svg",e):mi.createElement(e,n?{is:n}:void 0);return"select"===e&&r&&null!=r.multiple&&o.setAttribute("multiple",r.multiple),o},createText:e=>mi.createTextNode(e),createComment:e=>mi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==s&&(o=o.nextSibling););else{gi.innerHTML=r?`${e}`:e;const o=gi.content;if(r){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const yi=/\s*!important$/;function bi(e,t,n){if(I(n))n.forEach((n=>bi(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=Si[t];if(n)return n;let r=Y(t);if("filter"!==r&&r in e)return Si[t]=r;r=ee(r);for(let n=0;n<_i.length;n++){const o=_i[n]+r;if(o in e)return Si[t]=o}return t}(e,t);yi.test(n)?e.setProperty(X(r),n.replace(yi,""),"important"):e[r]=n}}const _i=["Webkit","Moz","ms"],Si={};const xi="http://www.w3.org/1999/xlink";function Ci(e,t,n,r){e.addEventListener(t,n,r)}function wi(e,t,n,r,o=null){const s=e._vei||(e._vei={}),i=s[t];if(r&&i)i.value=r;else{const[n,c]=function(e){let t;if(ki.test(e)){let n;for(t={};n=e.match(ki);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):X(e.slice(2));return[n,t]}(t);if(r){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tn(function(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>Ei||(Ti.then((()=>Ei=0)),Ei=Date.now()))(),n}(r,o);Ci(e,n,i,c)}else i&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,i,c),s[t]=void 0)}}const ki=/(?:Once|Passive|Capture)$/;let Ei=0;const Ti=Promise.resolve();const Ni=/^on[a-z]/;function Ri(e,t){const n=mr(e);class r extends Pi{constructor(e){super(n,e,t)}}return r.def=n,r}const Oi=e=>Ri(e,Ic),Mi="undefined"!=typeof HTMLElement?HTMLElement:class{};class Pi extends Mi{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,dn((()=>{this._connected||(Ac(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let e=0;e{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:r}=e;let o;if(n&&!I(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=se(this._props[e])),(o||(o=Object.create(null)))[Y(e)]=!0)}this._numberProps=o,t&&this._resolveProps(e),this._applyStyles(r),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=I(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e],!0,!1);for(const e of n.map(Y))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t)}})}_setAttr(e){let t=this.getAttribute(e);const n=Y(e);this._numberProps&&this._numberProps[n]&&(t=se(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!0){t!==this._props[e]&&(this._props[e]=t,r&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(X(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(X(e),t+""):t||this.removeAttribute(X(e))))}_update(){Ac(this._createVNode(),this.shadowRoot)}_createVNode(){const e=gs(this._def,O({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),X(e)!==e&&t(X(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof Pi){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Ai(e="$style"){{const t=Ps();if(!t)return C;const n=t.type.__cssModules;if(!n)return C;const r=n[e];return r||C}}function Ii(e){const t=Ps();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>Fi(e,n)))},r=()=>{const r=e(t.proxy);$i(t.subTree,r),n(r)};Qn(r),Mr((()=>{const e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),$r((()=>e.disconnect()))}))}function $i(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{$i(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Fi(e.el,t);else if(e.type===Jo)e.children.forEach((e=>$i(e,t)));else if(e.type===Qo){let{el:n,anchor:r}=e;for(;n&&(Fi(n,t),n!==r);)n=n.nextSibling}}function Fi(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Vi="transition",Li="animation",Bi=(e,{slots:t})=>si(lr,Wi(e),t);Bi.displayName="Transition";const ji={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ui=Bi.props=O({},lr.props,ji),Di=(e,t=[])=>{I(e)?e.forEach((e=>e(...t))):e&&e(...t)},Hi=e=>!!e&&(I(e)?e.some((e=>e.length>1)):e.length>1);function Wi(e){const t={};for(const n in e)n in ji||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:a=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(U(e))return[zi(e.enter),zi(e.leave)];{const t=zi(e);return[t,t]}}(o),m=h&&h[0],g=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:_,onLeaveCancelled:S,onBeforeAppear:x=v,onAppear:C=y,onAppearCancelled:w=b}=t,k=(e,t,n)=>{qi(e,t?a:c),qi(e,t?u:i),n&&n()},E=(e,t)=>{e._isLeaving=!1,qi(e,f),qi(e,d),qi(e,p),t&&t()},T=e=>(t,n)=>{const o=e?C:y,i=()=>k(t,e,n);Di(o,[t,i]),Gi((()=>{qi(t,e?l:s),Ki(t,e?a:c),Hi(o)||Zi(t,r,m,i)}))};return O(t,{onBeforeEnter(e){Di(v,[e]),Ki(e,s),Ki(e,i)},onBeforeAppear(e){Di(x,[e]),Ki(e,l),Ki(e,u)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>E(e,t);Ki(e,f),ec(),Ki(e,p),Gi((()=>{e._isLeaving&&(qi(e,f),Ki(e,d),Hi(_)||Zi(e,r,g,n))})),Di(_,[e,n])},onEnterCancelled(e){k(e,!1),Di(b,[e])},onAppearCancelled(e){k(e,!0),Di(w,[e])},onLeaveCancelled(e){E(e),Di(S,[e])}})}function zi(e){return se(e)}function Ki(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function qi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Gi(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Ji=0;function Zi(e,t,n,r){const o=e._endId=++Ji,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:c,propCount:l}=Yi(e,t);if(!i)return r();const u=i+"end";let a=0;const f=()=>{e.removeEventListener(u,p),s()},p=t=>{t.target===e&&++a>=l&&f()};setTimeout((()=>{a(n[e]||"").split(", "),o=r(`${Vi}Delay`),s=r(`${Vi}Duration`),i=Qi(o,s),c=r(`${Li}Delay`),l=r(`${Li}Duration`),u=Qi(c,l);let a=null,f=0,p=0;t===Vi?i>0&&(a=Vi,f=i,p=s.length):t===Li?u>0&&(a=Li,f=u,p=l.length):(f=Math.max(i,u),a=f>0?i>u?Vi:Li:null,p=a?a===Vi?s.length:l.length:0);return{type:a,timeout:f,propCount:p,hasTransform:a===Vi&&/\b(transform|all)(,|$)/.test(r(`${Vi}Property`).toString())}}function Qi(e,t){for(;e.lengthXi(t)+Xi(e[n]))))}function Xi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function ec(){return document.body.offsetHeight}const tc=new WeakMap,nc=new WeakMap,rc={name:"TransitionGroup",props:O({},Ui,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ps(),r=ir();let o,s;return Ar((()=>{if(!o.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&r.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&r.classList.add(e))),r.style.display="none";const o=1===t.nodeType?t:t.parentNode;o.appendChild(r);const{hasTransform:s}=Yi(r);return o.removeChild(r),s}(o[0].el,n.vnode.el,t))return;o.forEach(oc),o.forEach(sc);const r=o.filter(ic);ec(),r.forEach((e=>{const n=e.el,r=n.style;Ki(n,t),r.transform=r.webkitTransform=r.transitionDuration="";const o=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",o),n._moveCb=null,qi(n,t))};n.addEventListener("transitionend",o)}))})),()=>{const i=Mt(e),c=Wi(i);let l=i.tag||Jo;o=s,s=t.default?hr(t.default()):[];for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return I(t)?e=>re(t,e):t};function lc(e){e.target.composing=!0}function uc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ac={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e._assign=cc(o);const s=r||o.props&&"number"===o.props.type;Ci(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),s&&(r=se(r)),e._assign(r)})),n&&Ci(e,"change",(()=>{e.value=e.value.trim()})),t||(Ci(e,"compositionstart",lc),Ci(e,"compositionend",uc),Ci(e,"change",uc))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},s){if(e._assign=cc(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(r&&e.value.trim()===t)return;if((o||"number"===e.type)&&se(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},fc={deep:!0,created(e,t,n){e._assign=cc(n),Ci(e,"change",(()=>{const t=e._modelValue,n=gc(e),r=e.checked,o=e._assign;if(I(t)){const e=_(t,n),s=-1!==e;if(r&&!s)o(t.concat(n));else if(!r&&s){const n=[...t];n.splice(e,1),o(n)}}else if(F(t)){const e=new Set(t);r?e.add(n):e.delete(n),o(e)}else o(vc(e,r))}))},mounted:pc,beforeUpdate(e,t,n){e._assign=cc(n),pc(e,t,n)}};function pc(e,{value:t,oldValue:n},r){e._modelValue=t,I(t)?e.checked=_(t,r.props.value)>-1:F(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=b(t,vc(e,!0)))}const dc={created(e,{value:t},n){e.checked=b(t,n.props.value),e._assign=cc(n),Ci(e,"change",(()=>{e._assign(gc(e))}))},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=cc(r),t!==n&&(e.checked=b(t,r.props.value))}},hc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=F(t);Ci(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?se(gc(e)):gc(e)));e._assign(e.multiple?o?new Set(t):t:t[0])})),e._assign=cc(r)},mounted(e,{value:t}){mc(e,t)},beforeUpdate(e,t,n){e._assign=cc(n)},updated(e,{value:t}){mc(e,t)}};function mc(e,t){const n=e.multiple;if(!n||I(t)||F(t)){for(let r=0,o=e.options.length;r-1:o.selected=t.has(s);else if(b(gc(o),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function gc(e){return"_value"in e?e._value:e.value}function vc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const yc={created(e,t,n){_c(e,t,n,null,"created")},mounted(e,t,n){_c(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){_c(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){_c(e,t,n,r,"updated")}};function bc(e,t){switch(e){case"SELECT":return hc;case"TEXTAREA":return ac;default:switch(t){case"checkbox":return fc;case"radio":return dc;default:return ac}}}function _c(e,t,n,r,o){const s=bc(e.tagName,n.props&&n.props.type)[o];s&&s(e,t,n,r)}const Sc=["ctrl","shift","alt","meta"],xc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Sc.some((n=>e[`${n}Key`]&&!t.includes(n)))},Cc=(e,t)=>(n,...r)=>{for(let e=0;en=>{if(!("key"in n))return;const r=X(n.key);return t.some((e=>e===r||wc[e]===r))?e(n):void 0},Ec={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Tc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Tc(e,!0),r.enter(e)):r.leave(e,(()=>{Tc(e,!1)})):Tc(e,t))},beforeUnmount(e,{value:t}){Tc(e,t)}};function Tc(e,t){e.style.display=t?e._vod:"none"}const Nc=O({patchProp:(e,t,n,r,o=!1,s,i,c,l)=>{"class"===t?function(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,o):"style"===t?function(e,t,n){const r=e.style,o=B(n);if(n&&!o){for(const e in n)bi(r,e,n[e]);if(t&&!B(t))for(const e in t)null==n[e]&&bi(r,e,"")}else{const s=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}(e,n,r):N(t)?R(t)||wi(e,t,0,r,i):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&Ni.test(t)&&L(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Ni.test(t)&&B(n))return!1;return t in e}(e,t,r,o))?function(e,t,n,r,o,s,i){if("innerHTML"===t||"textContent"===t)return r&&i(r,o,s),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const r=null==n?"":n;return e.value===r&&"OPTION"!==e.tagName||(e.value=r),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=y(n):null==n&&"string"===r?(n="",c=!0):"number"===r&&(n=0,c=!0)}try{e[t]=n}catch(e){}c&&e.removeAttribute(t)}(e,t,r,s,i,c,l):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r,o){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(xi,t.slice(6,t.length)):e.setAttributeNS(xi,t,n);else{const r=v(t);null==n||r&&!y(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,o))}},vi);let Rc,Oc=!1;function Mc(){return Rc||(Rc=Lo(Nc))}function Pc(){return Rc=Oc?Rc:Bo(Nc),Oc=!0,Rc}const Ac=(...e)=>{Mc().render(...e)},Ic=(...e)=>{Pc().hydrate(...e)},$c=(...e)=>{const t=Mc().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=Vc(e);if(!r)return;const o=t._component;L(o)||o.render||o.template||(o.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t},Fc=(...e)=>{const t=Pc().createApp(...e);const{mount:n}=t;return t.mount=e=>{const t=Vc(e);if(t)return n(t,!0,t instanceof SVGElement)},t};function Vc(e){if(B(e)){return document.querySelector(e)}return e}let Lc=!1;const Bc=()=>{Lc||(Lc=!0,ac.getSSRProps=({value:e})=>({value:e}),dc.getSSRProps=({value:e},t)=>{if(t.props&&b(t.props.value,e))return{checked:!0}},fc.getSSRProps=({value:e},t)=>{if(I(e)){if(t.props&&_(e,t.props.value)>-1)return{checked:!0}}else if(F(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},yc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=bc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Ec.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};function jc(e){throw e}function Uc(e){}function Dc(e,t,n,r){const o=new SyntaxError(String(e));return o.code=e,o.loc=t,o}const Hc=Symbol(""),Wc=Symbol(""),zc=Symbol(""),Kc=Symbol(""),qc=Symbol(""),Gc=Symbol(""),Jc=Symbol(""),Zc=Symbol(""),Yc=Symbol(""),Qc=Symbol(""),Xc=Symbol(""),el=Symbol(""),tl=Symbol(""),nl=Symbol(""),rl=Symbol(""),ol=Symbol(""),sl=Symbol(""),il=Symbol(""),cl=Symbol(""),ll=Symbol(""),ul=Symbol(""),al=Symbol(""),fl=Symbol(""),pl=Symbol(""),dl=Symbol(""),hl=Symbol(""),ml=Symbol(""),gl=Symbol(""),vl=Symbol(""),yl=Symbol(""),bl=Symbol(""),_l=Symbol(""),Sl=Symbol(""),xl=Symbol(""),Cl=Symbol(""),wl=Symbol(""),kl=Symbol(""),El=Symbol(""),Tl=Symbol(""),Nl={[Hc]:"Fragment",[Wc]:"Teleport",[zc]:"Suspense",[Kc]:"KeepAlive",[qc]:"BaseTransition",[Gc]:"openBlock",[Jc]:"createBlock",[Zc]:"createElementBlock",[Yc]:"createVNode",[Qc]:"createElementVNode",[Xc]:"createCommentVNode",[el]:"createTextVNode",[tl]:"createStaticVNode",[nl]:"resolveComponent",[rl]:"resolveDynamicComponent",[ol]:"resolveDirective",[sl]:"resolveFilter",[il]:"withDirectives",[cl]:"renderList",[ll]:"renderSlot",[ul]:"createSlots",[al]:"toDisplayString",[fl]:"mergeProps",[pl]:"normalizeClass",[dl]:"normalizeStyle",[hl]:"normalizeProps",[ml]:"guardReactiveProps",[gl]:"toHandlers",[vl]:"camelize",[yl]:"capitalize",[bl]:"toHandlerKey",[_l]:"setBlockTracking",[Sl]:"pushScopeId",[xl]:"popScopeId",[Cl]:"withCtx",[wl]:"unref",[kl]:"isRef",[El]:"withMemo",[Tl]:"isMemoSame"};const Rl={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function Ol(e,t,n,r,o,s,i,c=!1,l=!1,u=!1,a=Rl){return e&&(c?(e.helper(Gc),e.helper(su(e.inSSR,u))):e.helper(ou(e.inSSR,u)),i&&e.helper(il)),{type:13,tag:t,props:n,children:r,patchFlag:o,dynamicProps:s,directives:i,isBlock:c,disableTracking:l,isComponent:u,loc:a}}function Ml(e,t=Rl){return{type:17,loc:t,elements:e}}function Pl(e,t=Rl){return{type:15,loc:t,properties:e}}function Al(e,t){return{type:16,loc:Rl,key:B(e)?Il(e,!0):e,value:t}}function Il(e,t=!1,n=Rl,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function $l(e,t=Rl){return{type:8,loc:t,children:e}}function Fl(e,t=[],n=Rl){return{type:14,loc:n,callee:e,arguments:t}}function Vl(e,t,n=!1,r=!1,o=Rl){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:o}}function Ll(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:Rl}}const Bl=e=>4===e.type&&e.isStatic,jl=(e,t)=>e===t||e===X(t);function Ul(e){return jl(e,"Teleport")?Wc:jl(e,"Suspense")?zc:jl(e,"KeepAlive")?Kc:jl(e,"BaseTransition")?qc:void 0}const Dl=/^\d|[^\$\w]/,Hl=e=>!Dl.test(e),Wl=/[A-Za-z_$\xA0-\uFFFF]/,zl=/[\.\?\w$\xA0-\uFFFF]/,Kl=/\s+[.[]\s*|\s*[.[]\s+/g,ql=e=>{e=e.trim().replace(Kl,(e=>e.trim()));let t=0,n=[],r=0,o=0,s=null;for(let i=0;i4===e.key.type&&e.key.content===r))}return n}function au(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function fu(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(ou(r,e.isComponent)),t(Gc),t(su(r,e.isComponent)))}function pu(e,t){const n=t.options?t.options.compatConfig:t.compatConfig,r=n&&n[e];return"MODE"===e?r||3:r}function du(e,t){const n=pu("MODE",t),r=pu(e,t);return 3===n?!0===r:!1!==r}function hu(e,t,n,...r){return du(e,t)}const mu=/&(gt|lt|amp|apos|quot);/g,gu={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},vu={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:E,isPreTag:E,isCustomElement:E,decodeEntities:e=>e.replace(mu,((e,t)=>gu[t])),onError:jc,onWarn:Uc,comments:!1};function yu(e,t={}){const n=function(e,t){const n=O({},vu);let r;for(r in t)n[r]=void 0===t[r]?vu[r]:t[r];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),r=Pu(n);return function(e,t=Rl){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}(bu(n,0,[]),Au(n,r))}function bu(e,t,n){const r=Iu(n),o=r?r.ns:0,s=[];for(;!ju(e,t,n);){const i=e.source;let c;if(0===t||1===t)if(!e.inVPre&&$u(i,e.options.delimiters[0]))c=Ru(e,t);else if(0===t&&"<"===i[0])if(1===i.length)Bu(e,5,1);else if("!"===i[1])$u(i,"\x3c!--")?c=xu(e):$u(i,""===i[2]){Bu(e,14,2),Fu(e,3);continue}if(/[a-z]/i.test(i[2])){Bu(e,23),Eu(e,1,r);continue}Bu(e,12,2),c=Cu(e)}else/[a-z]/i.test(i[1])?(c=wu(e,n),du("COMPILER_NATIVE_TEMPLATE",e)&&c&&"template"===c.tag&&!c.props.some((e=>7===e.type&&ku(e.name)))&&(c=c.children)):"?"===i[1]?(Bu(e,21,1),c=Cu(e)):Bu(e,12,1);if(c||(c=Ou(e,t)),I(c))for(let e=0;e/.exec(e.source);if(r){r.index<=3&&Bu(e,0),r[1]&&Bu(e,10),n=e.source.slice(4,r.index);const t=e.source.slice(0,r.index);let o=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",o));)Fu(e,s-o+1),s+4");return-1===o?(r=e.source.slice(n),Fu(e,e.source.length)):(r=e.source.slice(n,o),Fu(e,o+1)),{type:3,content:r,loc:Au(e,t)}}function wu(e,t){const n=e.inPre,r=e.inVPre,o=Iu(t),s=Eu(e,0,o),i=e.inPre&&!n,c=e.inVPre&&!r;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),c&&(e.inVPre=!1),s;t.push(s);const l=e.options.getTextMode(s,o),u=bu(e,l,t);t.pop();{const t=s.props.find((e=>6===e.type&&"inline-template"===e.name));if(t&&hu("COMPILER_INLINE_TEMPLATE",e,t.loc)){const n=Au(e,s.loc.end);t.value={type:2,content:n.source,loc:n}}}if(s.children=u,Uu(e.source,s.tag))Eu(e,1,o);else if(Bu(e,24,0,s.loc.start),0===e.source.length&&"script"===s.tag.toLowerCase()){const t=u[0];t&&$u(t.loc.source,"\x3c!--")&&Bu(e,8)}return s.loc=Au(e,s.loc.start),i&&(e.inPre=!1),c&&(e.inVPre=!1),s}const ku=o("if,else,else-if,for,slot");function Eu(e,t,n){const r=Pu(e),o=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=o[1],i=e.options.getNamespace(s,n);Fu(e,o[0].length),Vu(e);const c=Pu(e),l=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let u=Tu(e,t);0===t&&!e.inVPre&&u.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,O(e,c),e.source=l,u=Tu(e,t).filter((e=>"v-pre"!==e.name)));let a=!1;if(0===e.source.length?Bu(e,9):(a=$u(e.source,"/>"),1===t&&a&&Bu(e,4),Fu(e,a?2:1)),1===t)return;let f=0;return e.inVPre||("slot"===s?f=2:"template"===s?u.some((e=>7===e.type&&ku(e.name)))&&(f=3):function(e,t,n){const r=n.options;if(r.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||Ul(e)||r.isBuiltInComponent&&r.isBuiltInComponent(e)||r.isNativeTag&&!r.isNativeTag(e))return!0;for(let e=0;e0&&!$u(e.source,">")&&!$u(e.source,"/>");){if($u(e.source,"/")){Bu(e,22),Fu(e,1),Vu(e);continue}1===t&&Bu(e,3);const o=Nu(e,r);6===o.type&&o.value&&"class"===o.name&&(o.value.content=o.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(o),/^[^\t\r\n\f />]/.test(e.source)&&Bu(e,15),Vu(e)}return n}function Nu(e,t){const n=Pu(e),r=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(r)&&Bu(e,2),t.add(r),"="===r[0]&&Bu(e,19);{const t=/["'<]/g;let n;for(;n=t.exec(r);)Bu(e,17,n.index)}let o;Fu(e,r.length),/^[\t\r\n\f ]*=/.test(e.source)&&(Vu(e),Fu(e,1),Vu(e),o=function(e){const t=Pu(e);let n;const r=e.source[0],o='"'===r||"'"===r;if(o){Fu(e,1);const t=e.source.indexOf(r);-1===t?n=Mu(e,e.source.length,4):(n=Mu(e,t,4),Fu(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const r=/["'<=`]/g;let o;for(;o=r.exec(t[0]);)Bu(e,18,o.index);n=Mu(e,t[0].length,4)}return{content:n,isQuoted:o,loc:Au(e,t)}}(e),o||Bu(e,13));const s=Au(e,n);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(r)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(r);let i,c=$u(r,"."),l=t[1]||(c||$u(r,":")?"bind":$u(r,"@")?"on":"slot");if(t[2]){const o="slot"===l,s=r.lastIndexOf(t[2]),c=Au(e,Lu(e,n,s),Lu(e,n,s+t[2].length+(o&&t[3]||"").length));let u=t[2],a=!0;u.startsWith("[")?(a=!1,u.endsWith("]")?u=u.slice(1,u.length-1):(Bu(e,27),u=u.slice(1))):o&&(u+=t[3]||""),i={type:4,content:u,isStatic:a,constType:a?3:0,loc:c}}if(o&&o.isQuoted){const e=o.loc;e.start.offset++,e.start.column++,e.end=Jl(e.start,o.content),e.source=e.source.slice(1,-1)}const u=t[3]?t[3].slice(1).split("."):[];return c&&u.push("prop"),"bind"===l&&i&&u.includes("sync")&&hu("COMPILER_V_BIND_SYNC",e,0,i.loc.source)&&(l="model",u.splice(u.indexOf("sync"),1)),{type:7,name:l,exp:o&&{type:4,content:o.content,isStatic:!1,constType:0,loc:o.loc},arg:i,modifiers:u,loc:s}}return!e.inVPre&&$u(r,"v-")&&Bu(e,26),{type:6,name:r,value:o&&{type:2,content:o.content,loc:o.loc},loc:s}}function Ru(e,t){const[n,r]=e.options.delimiters,o=e.source.indexOf(r,n.length);if(-1===o)return void Bu(e,25);const s=Pu(e);Fu(e,n.length);const i=Pu(e),c=Pu(e),l=o-n.length,u=e.source.slice(0,l),a=Mu(e,l,t),f=a.trim(),p=a.indexOf(f);p>0&&Zl(i,u,p);return Zl(c,u,l-(a.length-f.length-p)),Fu(e,r.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:f,loc:Au(e,i,c)},loc:Au(e,s)}}function Ou(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let r=e.source.length;for(let t=0;to&&(r=o)}const o=Pu(e);return{type:2,content:Mu(e,r,t),loc:Au(e,o)}}function Mu(e,t,n){const r=e.source.slice(0,t);return Fu(e,t),2!==n&&3!==n&&r.includes("&")?e.options.decodeEntities(r,4===n):r}function Pu(e){const{column:t,line:n,offset:r}=e;return{column:t,line:n,offset:r}}function Au(e,t,n){return{start:t,end:n=n||Pu(e),source:e.originalSource.slice(t.offset,n.offset)}}function Iu(e){return e[e.length-1]}function $u(e,t){return e.startsWith(t)}function Fu(e,t){const{source:n}=e;Zl(e,n,t),e.source=n.slice(t)}function Vu(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&Fu(e,t[0].length)}function Lu(e,t,n){return Jl(t,e.originalSource.slice(t.offset,n),n)}function Bu(e,t,n,r=Pu(e)){n&&(r.offset+=n,r.column+=n),e.options.onError(Dc(t,{start:r,end:r,source:""}))}function ju(e,t,n){const r=e.source;switch(t){case 0:if($u(r,"=0;--e)if(Uu(r,n[e].tag))return!0;break;case 1:case 2:{const e=Iu(n);if(e&&Uu(r,e.tag))return!0;break}case 3:if($u(r,"]]>"))return!0}return!r}function Uu(e,t){return $u(e,"]/.test(e[2+t.length]||">")}function Du(e,t){Wu(e,t,Hu(e,e.children[0]))}function Hu(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!ru(t)}function Wu(e,t,n=!1){const{children:r}=e,o=r.length;let s=0;for(let e=0;e0){if(e>=2){o.codegenNode.patchFlag="-1",o.codegenNode=t.hoist(o.codegenNode),s++;continue}}else{const e=o.codegenNode;if(13===e.type){const n=Zu(e);if((!n||512===n||1===n)&&Gu(o,t)>=2){const n=Ju(o);n&&(e.props=t.hoist(n))}e.dynamicProps&&(e.dynamicProps=t.hoist(e.dynamicProps))}}}if(1===o.type){const e=1===o.tagType;e&&t.scopes.vSlot++,Wu(o,t),e&&t.scopes.vSlot--}else if(11===o.type)Wu(o,t,1===o.children.length);else if(9===o.type)for(let e=0;e1)for(let o=0;on&&(w.childIndex--,w.onNodeRemoved()):(w.currentNode=null,w.onNodeRemoved()),w.parent.children.splice(n,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){B(e)&&(e=Il(e)),w.hoists.push(e);const t=Il(`_hoisted_${w.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){return function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:Rl}}(w.cached++,e,t)}};return w.filters=new Set,w}function Qu(e,t){const n=Yu(e,t);Xu(e,n),t.hoistStatic&&Du(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:r}=e;if(1===r.length){const n=r[0];if(Hu(e,n)&&n.codegenNode){const r=n.codegenNode;13===r.type&&fu(r,t),e.codegenNode=r}else e.codegenNode=n}else if(r.length>1){let r=64;0,e.codegenNode=Ol(t,n(Hc),void 0,e.children,r+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=[...n.helpers.keys()],e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.filters=[...n.filters]}function Xu(e,t){t.currentNode=e;const{nodeTransforms:n}=t,r=[];for(let o=0;o{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(1===e.type){const{props:o}=e;if(3===e.tagType&&o.some(tu))return;const s=[];for(let i=0;i`${Nl[e]}: _${Nl[e]}`;function ra(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:o="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:c="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:a=!1,isTS:f=!1,inSSR:p=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:r,filename:o,scopeId:s,optimizeImports:i,runtimeGlobalName:c,runtimeModuleName:l,ssrRuntimeModuleName:u,ssr:a,isTS:f,inSSR:p,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(e){return`_${Nl[e]}`},push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:r,push:o,prefixIdentifiers:s,indent:i,deindent:c,newline:l,scopeId:u,ssr:a}=n,f=e.helpers.length>0,p=!s&&"module"!==r;!function(e,t){const{ssr:n,prefixIdentifiers:r,push:o,newline:s,runtimeModuleName:i,runtimeGlobalName:c,ssrRuntimeModuleName:l}=t,u=c;if(e.helpers.length>0&&(o(`const _Vue = ${u}\n`),e.hoists.length)){o(`const { ${[Yc,Qc,Xc,el,tl].filter((t=>e.helpers.includes(t))).map(na).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:r,helper:o,scopeId:s,mode:i}=t;r();for(let o=0;o0)&&l()),e.directives.length&&(oa(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),oa(e.filters,"filter",n),l()),e.temps>0){o("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(o("\n"),l()),a||o("return "),e.codegenNode?ca(e.codegenNode,n):o("null"),p&&(c(),o("}")),c(),o("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function oa(e,t,{helper:n,push:r,newline:o,isTS:s}){const i=n("filter"===t?sl:"component"===t?nl:ol);for(let n=0;n3||!1;t.push("["),n&&t.indent(),ia(e,t,n),n&&t.deindent(),t.push("]")}function ia(e,t,n=!1,r=!0){const{push:o,newline:s}=t;for(let i=0;ie||"null"))}([s,i,c,l,u]),t),n(")"),f&&n(")");a&&(n(", "),ca(a,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:r,pure:o}=t,s=B(e.callee)?e.callee:r(e.callee);o&&n(ta);n(s+"(",e),ia(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:r,deindent:o,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const c=i.length>1||!1;n(c?"{":"{ "),c&&r();for(let e=0;e "),(l||c)&&(n("{"),r());i?(l&&n("return "),I(i)?sa(i,t):ca(i,t)):c&&ca(c,t);(l||c)&&(o(),n("}"));u&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:r,alternate:o,newline:s}=e,{push:i,indent:c,deindent:l,newline:u}=t;if(4===n.type){const e=!Hl(n.content);e&&i("("),la(n,t),e&&i(")")}else i("("),ca(n,t),i(")");s&&c(),t.indentLevel++,s||i(" "),i("? "),ca(r,t),t.indentLevel--,s&&u(),s||i(" "),i(": ");const a=19===o.type;a||t.indentLevel++;ca(o,t),a||t.indentLevel--;s&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:r,indent:o,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(o(),n(`${r(_l)}(-1),`),i());n(`_cache[${e.index}] = `),ca(e.value,t),e.isVNode&&(n(","),i(),n(`${r(_l)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:ia(e.body,t,!0,!1)}}function la(e,t){const{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,e)}function ua(e,t){for(let n=0;nfunction(e,t,n,r){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const r=t.exp?t.exp.loc:e.loc;n.onError(Dc(28,t.loc)),t.exp=Il("true",!1,r)}0;if("if"===t.name){const o=pa(e,t),s={type:9,loc:e.loc,branches:[o]};if(n.replaceNode(s),r)return r(s,o,!0)}else{const o=n.parent.children;let s=o.indexOf(e);for(;s-- >=-1;){const i=o[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(Dc(30,e.loc)),n.removeNode();const o=pa(e,t);0,i.branches.push(o);const s=r&&r(i,o,!1);Xu(o,n),s&&s(),n.currentNode=null}else n.onError(Dc(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,r)=>{const o=n.parent.children;let s=o.indexOf(e),i=0;for(;s-- >=0;){const e=o[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(r)e.codegenNode=da(t,i,n);else{const r=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);r.alternate=da(t,i+e.branches.length-1,n)}}}))));function pa(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Yl(e,"for")?e.children:[e],userKey:Ql(e,"key"),isTemplateIf:n}}function da(e,t,n){return e.condition?Ll(e.condition,ha(e,t,n),Fl(n.helper(Xc),['""',"true"])):ha(e,t,n)}function ha(e,t,n){const{helper:r}=n,o=Al("key",Il(`${t}`,!1,Rl,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return lu(e,o,n),e}{let t=64;return Ol(n,r(Hc),Pl([o]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(c=e).type&&c.callee===El?c.arguments[1].returns:c;return 13===t.type&&fu(t,n),lu(t,o,n),e}var c}const ma=ea("for",((e,t,n)=>{const{helper:r,removeHelper:o}=n;return function(e,t,n,r){if(!t.exp)return void n.onError(Dc(31,t.loc));const o=ba(t.exp,n);if(!o)return void n.onError(Dc(32,t.loc));const{addIdentifiers:s,removeIdentifiers:i,scopes:c}=n,{source:l,value:u,key:a,index:f}=o,p={type:11,loc:t.loc,source:l,valueAlias:u,keyAlias:a,objectIndexAlias:f,parseResult:o,children:nu(e)?e.children:[e]};n.replaceNode(p),c.vFor++;const d=r&&r(p);return()=>{c.vFor--,d&&d()}}(e,t,n,(t=>{const s=Fl(r(cl),[t.source]),i=nu(e),c=Yl(e,"memo"),l=Ql(e,"key"),u=l&&(6===l.type?Il(l.value.content,!0):l.exp),a=l?Al("key",u):null,f=4===t.source.type&&t.source.constType>0,p=f?64:l?128:256;return t.codegenNode=Ol(n,r(Hc),void 0,s,p+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let l;const{children:p}=t;const d=1!==p.length||1!==p[0].type,h=ru(e)?e:i&&1===e.children.length&&ru(e.children[0])?e.children[0]:null;if(h?(l=h.codegenNode,i&&a&&lu(l,a,n)):d?l=Ol(n,r(Hc),a?Pl([a]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(l=p[0].codegenNode,i&&a&&lu(l,a,n),l.isBlock!==!f&&(l.isBlock?(o(Gc),o(su(n.inSSR,l.isComponent))):o(ou(n.inSSR,l.isComponent))),l.isBlock=!f,l.isBlock?(r(Gc),r(su(n.inSSR,l.isComponent))):r(ou(n.inSSR,l.isComponent))),c){const e=Vl(Sa(t.parseResult,[Il("_cached")]));e.body={type:21,body:[$l(["const _memo = (",c.exp,")"]),$l(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(Tl)}(_cached, _memo)) return _cached`]),$l(["const _item = ",l]),Il("_item.memo = _memo"),Il("return _item")],loc:Rl},s.arguments.push(e,Il("_cache"),Il(String(n.cached++)))}else s.arguments.push(Vl(Sa(t.parseResult),l,!0))}}))}));const ga=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,va=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ya=/^\(|\)$/g;function ba(e,t){const n=e.loc,r=e.content,o=r.match(ga);if(!o)return;const[,s,i]=o,c={source:_a(n,i.trim(),r.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let l=s.trim().replace(ya,"").trim();const u=s.indexOf(l),a=l.match(va);if(a){l=l.replace(va,"").trim();const e=a[1].trim();let t;if(e&&(t=r.indexOf(e,u+l.length),c.key=_a(n,e,t)),a[2]){const o=a[2].trim();o&&(c.index=_a(n,o,r.indexOf(o,c.key?t+e.length:u+l.length)))}}return l&&(c.value=_a(n,l,u)),c}function _a(e,t,n){return Il(t,!1,Gl(e,n,t.length))}function Sa({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Il("_".repeat(t+1),!1)))}([e,t,n,...r])}const xa=Il("undefined",!1),Ca=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Yl(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},wa=(e,t,n)=>Vl(e,t,!1,!0,t.length?t[0].loc:n);function ka(e,t,n=wa){t.helper(Cl);const{children:r,loc:o}=e,s=[],i=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const l=Yl(e,"slot",!0);if(l){const{arg:e,exp:t}=l;e&&!Bl(e)&&(c=!0),s.push(Al(e||Il("default",!0),n(t,r,o)))}let u=!1,a=!1;const f=[],p=new Set;let d=0;for(let e=0;e{const s=n(e,r,o);return t.compatConfig&&(s.isNonScopedSlot=!0),Al("default",s)};u?f.length&&f.some((e=>Na(e)))&&(a?t.onError(Dc(39,f[0].loc)):s.push(e(void 0,f))):s.push(e(void 0,r))}const h=c?2:Ta(e.children)?3:1;let m=Pl(s.concat(Al("_",Il(h+"",!1))),o);return i.length&&(m=Fl(t.helper(ul),[m,Ml(i)])),{slots:m,hasDynamicSlots:c}}function Ea(e,t,n){const r=[Al("name",e),Al("fn",t)];return null!=n&&r.push(Al("key",Il(String(n),!0))),Pl(r)}function Ta(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:r}=e,o=1===e.tagType;let s=o?function(e,t,n=!1){let{tag:r}=e;const o=Ia(r),s=Ql(e,"is");if(s)if(o||du("COMPILER_IS_ON_ELEMENT",t)){const e=6===s.type?s.value&&Il(s.value.content,!0):s.exp;if(e)return Fl(t.helper(rl),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(r=s.value.content.slice(4));const i=!o&&Yl(e,"is");if(i&&i.exp)return Fl(t.helper(rl),[i.exp]);const c=Ul(r)||t.isBuiltInComponent(r);if(c)return n||t.helper(c),c;return t.helper(nl),t.components.add(r),au(r,"component")}(e,t):`"${n}"`;const i=U(s)&&s.callee===rl;let c,l,u,a,f,p,d=0,h=i||s===Wc||s===zc||!o&&("svg"===n||"foreignObject"===n);if(r.length>0){const n=Ma(e,t,void 0,o,i);c=n.props,d=n.patchFlag,f=n.dynamicPropNames;const r=n.directives;p=r&&r.length?Ml(r.map((e=>function(e,t){const n=[],r=Ra.get(e);r?n.push(t.helperString(r)):(t.helper(ol),t.directives.add(e.name),n.push(au(e.name,"directive")));const{loc:o}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Il("true",!1,o);n.push(Pl(e.modifiers.map((e=>Al(e,t))),o))}return Ml(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===Kc&&(h=!0,d|=1024);if(o&&s!==Wc&&s!==Kc){const{slots:n,hasDynamicSlots:r}=ka(e,t);l=n,r&&(d|=1024)}else if(1===e.children.length&&s!==Wc){const n=e.children[0],r=n.type,o=5===r||8===r;o&&0===zu(n,t)&&(d|=1),l=o||2===r?n:e.children}else l=e.children}0!==d&&(u=String(d),f&&f.length&&(a=function(e){let t="[";for(let n=0,r=e.length;n0;let d=!1,h=0,m=!1,g=!1,v=!1,y=!1,b=!1,_=!1;const S=[],x=e=>{u.length&&(a.push(Pl(Pa(u),c)),u=[]),e&&a.push(e)},C=({key:e,value:n})=>{if(Bl(e)){const s=e.content,i=N(s);if(!i||r&&!o||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||q(s)||(y=!0),i&&q(s)&&(_=!0),20===n.type||(4===n.type||8===n.type)&&zu(n,t)>0)return;"ref"===s?m=!0:"class"===s?g=!0:"style"===s?v=!0:"key"===s||S.includes(s)||S.push(s),!r||"class"!==s&&"style"!==s||S.includes(s)||S.push(s)}else b=!0};for(let o=0;o0&&u.push(Al(Il("ref_for",!0),Il("true")))),"is"===n&&(Ia(i)||r&&r.content.startsWith("vue:")||du("COMPILER_IS_ON_ELEMENT",t)))continue;u.push(Al(Il(n,!0,Gl(e,0,n.length)),Il(r?r.content:"",o,r?r.loc:e)))}else{const{name:n,arg:o,exp:h,loc:m}=l,g="bind"===n,v="on"===n;if("slot"===n){r||t.onError(Dc(40,m));continue}if("once"===n||"memo"===n)continue;if("is"===n||g&&Xl(o,"is")&&(Ia(i)||du("COMPILER_IS_ON_ELEMENT",t)))continue;if(v&&s)continue;if((g&&Xl(o,"key")||v&&p&&Xl(o,"vue:before-update"))&&(d=!0),g&&Xl(o,"ref")&&t.scopes.vFor>0&&u.push(Al(Il("ref_for",!0),Il("true"))),!o&&(g||v)){if(b=!0,h)if(g){if(x(),du("COMPILER_V_BIND_OBJECT_ORDER",t)){a.unshift(h);continue}a.push(h)}else x({type:14,loc:m,callee:t.helper(gl),arguments:r?[h]:[h,"true"]});else t.onError(Dc(g?34:35,m));continue}const y=t.directiveTransforms[n];if(y){const{props:n,needRuntime:r}=y(l,e,t);!s&&n.forEach(C),v&&o&&!Bl(o)?x(Pl(n,c)):u.push(...n),r&&(f.push(l),j(r)&&Ra.set(l,r))}else G(n)||(f.push(l),p&&(d=!0))}}let w;if(a.length?(x(),w=a.length>1?Fl(t.helper(fl),a,c):a[0]):u.length&&(w=Pl(Pa(u),c)),b?h|=16:(g&&!r&&(h|=2),v&&!r&&(h|=4),S.length&&(h|=8),y&&(h|=32)),d||0!==h&&32!==h||!(m||_||f.length>0)||(h|=512),!t.inSSR&&w)switch(w.type){case 15:let e=-1,n=-1,r=!1;for(let t=0;t{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))})((e=>e.replace($a,((e,t)=>t?t.toUpperCase():"")))),Va=(e,t)=>{if(ru(e)){const{children:n,loc:r}=e,{slotName:o,slotProps:s}=function(e,t){let n,r='"default"';const o=[];for(let t=0;t0){const{props:r,directives:s}=Ma(e,t,o,!1,!1);n=r,s.length&&t.onError(Dc(36,s[0].loc))}return{slotName:r,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",o,"{}","undefined","true"];let c=2;s&&(i[2]=s,c=3),n.length&&(i[3]=Vl([],n,!1,!1,r),c=4),t.scopeId&&!t.slotted&&(c=5),i.splice(c),e.codegenNode=Fl(t.helper(ll),i,r)}};const La=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Ba=(e,t,n,r)=>{const{loc:o,modifiers:s,arg:i}=e;let c;if(e.exp||s.length||n.onError(Dc(35,o)),4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);c=Il(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?te(Y(e)):`on:${e}`,!0,i.loc)}else c=$l([`${n.helperString(bl)}(`,i,")"]);else c=i,c.children.unshift(`${n.helperString(bl)}(`),c.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let u=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const e=ql(l.content),t=!(e||La.test(l.content)),n=l.content.includes(";");0,(t||u&&e)&&(l=$l([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let a={props:[Al(c,l||Il("() => {}",!1,o))]};return r&&(a=r(a)),u&&(a.props[0].value=n.cache(a.props[0].value)),a.props.forEach((e=>e.key.isHandlerKey=!0)),a},ja=(e,t,n)=>{const{exp:r,modifiers:o,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),o.includes("camel")&&(4===i.type?i.isStatic?i.content=Y(i.content):i.content=`${n.helperString(vl)}(${i.content})`:(i.children.unshift(`${n.helperString(vl)}(`),i.children.push(")"))),n.inSSR||(o.includes("prop")&&Ua(i,"."),o.includes("attr")&&Ua(i,"^")),!r||4===r.type&&!r.content.trim()?(n.onError(Dc(34,s)),{props:[Al(i,Il("",!0,s))]}):{props:[Al(i,r)]}},Ua=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Da=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let r,o=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e{if(1===e.type&&Yl(e,"once",!0)){if(Ha.has(e)||t.inVOnce)return;return Ha.add(e),t.inVOnce=!0,t.helper(_l),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},za=(e,t,n)=>{const{exp:r,arg:o}=e;if(!r)return n.onError(Dc(41,e.loc)),Ka();const s=r.loc.source,i=4===r.type?r.content:s,c=n.bindingMetadata[s];if("props"===c||"props-aliased"===c)return n.onError(Dc(44,r.loc)),Ka();if(!i.trim()||!ql(i))return n.onError(Dc(42,r.loc)),Ka();const l=o||Il("modelValue",!0),u=o?Bl(o)?`onUpdate:${o.content}`:$l(['"onUpdate:" + ',o]):"onUpdate:modelValue";let a;a=$l([`${n.isTS?"($event: any)":"$event"} => ((`,r,") = $event)"]);const f=[Al(l,e.exp),Al(u,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Hl(e)?e:JSON.stringify(e))+": true")).join(", "),n=o?Bl(o)?`${o.content}Modifiers`:$l([o,' + "Modifiers"']):"modelModifiers";f.push(Al(n,Il(`{ ${t} }`,!1,e.loc,2)))}return Ka(f)};function Ka(e=[]){return{props:e}}const qa=/[\w).+\-_$\]]/,Ga=(e,t)=>{du("COMPILER_FILTER",t)&&(5===e.type&&Ja(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&Ja(e.exp,t)})))};function Ja(e,t){if(4===e.type)Za(e,t);else for(let n=0;n=0&&(e=n.charAt(t)," "===e);t--);e&&qa.test(e)||(a=!0)}}else void 0===i?(h=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(h,s).trim()),h=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==h&&g(),m.length){for(s=0;s{if(1===e.type){const n=Yl(e,"memo");if(!n||Qa.has(e))return;return Qa.add(e),()=>{const r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&fu(r,t),e.codegenNode=Fl(t.helper(El),[n.exp,Vl(void 0,r),"_cache",String(t.cached++)]))}}};function ef(e,t={}){const n=t.onError||jc,r="module"===t.mode;!0===t.prefixIdentifiers?n(Dc(47)):r&&n(Dc(48));t.cacheHandlers&&n(Dc(49)),t.scopeId&&!r&&n(Dc(50));const o=B(e)?yu(e,t):e,[s,i]=[[Wa,fa,Xa,ma,Ga,Va,Oa,Ca,Da],{on:Ba,bind:ja,model:za}];return Qu(o,O({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:O({},i,t.directiveTransforms||{})})),ra(o,O({},t,{prefixIdentifiers:false}))}const tf=Symbol(""),nf=Symbol(""),rf=Symbol(""),of=Symbol(""),sf=Symbol(""),cf=Symbol(""),lf=Symbol(""),uf=Symbol(""),af=Symbol(""),ff=Symbol("");var pf;let df;pf={[tf]:"vModelRadio",[nf]:"vModelCheckbox",[rf]:"vModelText",[of]:"vModelSelect",[sf]:"vModelDynamic",[cf]:"withModifiers",[lf]:"withKeys",[uf]:"vShow",[af]:"Transition",[ff]:"TransitionGroup"},Object.getOwnPropertySymbols(pf).forEach((e=>{Nl[e]=pf[e]}));const hf=o("style,iframe,script,noscript",!0),mf={isVoidTag:m,isNativeTag:e=>d(e)||h(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return df||(df=document.createElement("div")),t?(df.innerHTML=`
`,df.children[0].getAttribute("foo")):(df.innerHTML=e,df.textContent)},isBuiltInComponent:e=>jl(e,"Transition")?af:jl(e,"TransitionGroup")?ff:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(hf(e))return 2}return 0}},gf=(e,t)=>{const n=a(e);return Il(JSON.stringify(n),!1,t,3)};function vf(e,t){return Dc(e,t)}const yf=o("passive,once,capture"),bf=o("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),_f=o("left,right"),Sf=o("onkeyup,onkeydown,onkeypress",!0),xf=(e,t)=>Bl(e)&&"onclick"===e.content.toLowerCase()?Il(t,!0):4!==e.type?$l(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e;const Cf=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||(t.onError(vf(61,e.loc)),t.removeNode())},wf=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Il("style",!0,t.loc),exp:gf(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],kf={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(vf(51,o)),t.children.length&&(n.onError(vf(52,o)),t.children.length=0),{props:[Al(Il("innerHTML",!0,o),r||Il("",!0))]}},text:(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(vf(53,o)),t.children.length&&(n.onError(vf(54,o)),t.children.length=0),{props:[Al(Il("textContent",!0),r?zu(r,n)>0?r:Fl(n.helperString(al),[r],o):Il("",!0))]}},model:(e,t,n)=>{const r=za(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(vf(56,e.arg.loc));const{tag:o}=t,s=n.isCustomElement(o);if("input"===o||"textarea"===o||"select"===o||s){let i=rf,c=!1;if("input"===o||s){const r=Ql(t,"type");if(r){if(7===r.type)i=sf;else if(r.value)switch(r.value.content){case"radio":i=tf;break;case"checkbox":i=nf;break;case"file":c=!0,n.onError(vf(57,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=sf)}else"select"===o&&(i=of);c||(r.needRuntime=n.helper(i))}else n.onError(vf(55,e.loc));return r.props=r.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),r},on:(e,t,n)=>Ba(e,t,n,(t=>{const{modifiers:r}=e;if(!r.length)return t;let{key:o,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:c,eventOptionModifiers:l}=((e,t,n,r)=>{const o=[],s=[],i=[];for(let r=0;r{const{exp:r,loc:o}=e;return r||n.onError(vf(59,o)),{props:[],needRuntime:n.helper(uf)}}};const Ef=Object.create(null);function Tf(e,t){if(!B(e)){if(!e.nodeType)return k;e=e.innerHTML}const n=e,o=Ef[n];if(o)return o;if("#"===e[0]){const t=document.querySelector(e);0,e=t?t.innerHTML:""}const s=O({hoistStatic:!0,onError:void 0,onWarn:k},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));const{code:i}=function(e,t={}){return ef(e,O({},mf,t,{nodeTransforms:[Cf,...wf,...t.nodeTransforms||[]],directiveTransforms:O({},kf,t.directiveTransforms||{}),transformHoist:null}))}(e,s);const c=new Function("Vue",i)(r);return c._rc=!0,Ef[n]=c}Us(Tf)}}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_backend_module=self.webpackChunk_wintercms_wn_backend_module||[]).push([[101],{609:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var s=0;s{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}},471:function(e,t,n){n.r(t),n.d(t,{BaseTransition:function(){return hr},Comment:function(){return is},EffectScope:function(){return pe},Fragment:function(){return os},KeepAlive:function(){return Er},ReactiveEffect:function(){return Te},Static:function(){return cs},Suspense:function(){return Jn},Teleport:function(){return ns},Text:function(){return ss},Transition:function(){return Ji},TransitionGroup:function(){return hc},VueElement:function(){return Ui},assertNumber:function(){return sn},callWithAsyncErrorHandling:function(){return ln},callWithErrorHandling:function(){return cn},camelize:function(){return Q},capitalize:function(){return ne},cloneVNode:function(){return Ns},compatUtils:function(){return Ci},compile:function(){return Bf},computed:function(){return ri},createApp:function(){return Kc},createBlock:function(){return vs},createCommentVNode:function(){return Ms},createElementBlock:function(){return gs},createElementVNode:function(){return ws},createHydrationRenderer:function(){return qo},createPropsRestProxy:function(){return pi},createRenderer:function(){return Go},createSSRApp:function(){return Gc},createSlots:function(){return ro},createStaticVNode:function(){return Os},createTextVNode:function(){return Rs},createVNode:function(){return ks},customRef:function(){return Xt},defineAsyncComponent:function(){return Cr},defineComponent:function(){return Sr},defineCustomElement:function(){return Bi},defineEmits:function(){return si},defineExpose:function(){return ii},defineProps:function(){return oi},defineSSRCustomElement:function(){return ji},devtools:function(){return Nn},effect:function(){return Re},effectScope:function(){return de},getCurrentInstance:function(){return Ds},getCurrentScope:function(){return me},getTransitionRawChildren:function(){return br},guardReactiveProps:function(){return Ts},h:function(){return hi},handleError:function(){return un},hydrate:function(){return zc},initCustomFormatter:function(){return vi},initDirectivesForSSR:function(){return Yc},inject:function(){return nr},isMemoSame:function(){return _i},isProxy:function(){return Ft},isReactive:function(){return Pt},isReadonly:function(){return At},isRef:function(){return Ut},isRuntimeOnly:function(){return Zs},isShallow:function(){return It},isVNode:function(){return ys},markRaw:function(){return Lt},mergeDefaults:function(){return fi},mergeProps:function(){return Fs},nextTick:function(){return _n},normalizeClass:function(){return p},normalizeProps:function(){return d},normalizeStyle:function(){return c},onActivated:function(){return Nr},onBeforeMount:function(){return $r},onBeforeUnmount:function(){return jr},onBeforeUpdate:function(){return Vr},onDeactivated:function(){return Rr},onErrorCaptured:function(){return zr},onMounted:function(){return Lr},onRenderTracked:function(){return Wr},onRenderTriggered:function(){return Hr},onScopeDispose:function(){return ge},onServerPrefetch:function(){return Ur},onUnmounted:function(){return Dr},onUpdated:function(){return Br},openBlock:function(){return as},popScopeId:function(){return Bn},provide:function(){return tr},proxyRefs:function(){return Yt},pushScopeId:function(){return Vn},queuePostFlushCb:function(){return xn},reactive:function(){return Tt},readonly:function(){return Rt},ref:function(){return Ht},registerRuntimeCompiler:function(){return Ys},render:function(){return Wc},renderList:function(){return no},renderSlot:function(){return oo},resolveComponent:function(){return Yr},resolveDirective:function(){return Qr},resolveDynamicComponent:function(){return Xr},resolveFilter:function(){return xi},resolveTransitionHooks:function(){return gr},setBlockTracking:function(){return hs},setDevtoolsHook:function(){return Mn},setTransitionHooks:function(){return _r},shallowReactive:function(){return Nt},shallowReadonly:function(){return Ot},shallowRef:function(){return Wt},ssrContextKey:function(){return mi},ssrUtils:function(){return Si},stop:function(){return Oe},toDisplayString:function(){return x},toHandlerKey:function(){return re},toHandlers:function(){return io},toRaw:function(){return $t},toRef:function(){return tn},toRefs:function(){return Qt},transformVNodeArgs:function(){return bs},triggerRef:function(){return Gt},unref:function(){return qt},useAttrs:function(){return ui},useCssModule:function(){return Hi},useCssVars:function(){return Wi},useSSRContext:function(){return gi},useSlots:function(){return li},useTransitionState:function(){return pr},vModelCheckbox:function(){return xc},vModelDynamic:function(){return Rc},vModelRadio:function(){return wc},vModelSelect:function(){return kc},vModelText:function(){return Sc},vShow:function(){return Lc},version:function(){return bi},warn:function(){return on},watch:function(){return cr},watchEffect:function(){return rr},watchPostEffect:function(){return or},watchSyncEffect:function(){return sr},withAsyncContext:function(){return di},withCtx:function(){return Dn},withDefaults:function(){return ci},withDirectives:function(){return Kr},withKeys:function(){return $c},withMemo:function(){return yi},withModifiers:function(){return Ic},withScopeId:function(){return jn}});var r={};function o(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}n.r(r),n.d(r,{BaseTransition:function(){return hr},Comment:function(){return is},EffectScope:function(){return pe},Fragment:function(){return os},KeepAlive:function(){return Er},ReactiveEffect:function(){return Te},Static:function(){return cs},Suspense:function(){return Jn},Teleport:function(){return ns},Text:function(){return ss},Transition:function(){return Ji},TransitionGroup:function(){return hc},VueElement:function(){return Ui},assertNumber:function(){return sn},callWithAsyncErrorHandling:function(){return ln},callWithErrorHandling:function(){return cn},camelize:function(){return Q},capitalize:function(){return ne},cloneVNode:function(){return Ns},compatUtils:function(){return Ci},computed:function(){return ri},createApp:function(){return Kc},createBlock:function(){return vs},createCommentVNode:function(){return Ms},createElementBlock:function(){return gs},createElementVNode:function(){return ws},createHydrationRenderer:function(){return qo},createPropsRestProxy:function(){return pi},createRenderer:function(){return Go},createSSRApp:function(){return Gc},createSlots:function(){return ro},createStaticVNode:function(){return Os},createTextVNode:function(){return Rs},createVNode:function(){return ks},customRef:function(){return Xt},defineAsyncComponent:function(){return Cr},defineComponent:function(){return Sr},defineCustomElement:function(){return Bi},defineEmits:function(){return si},defineExpose:function(){return ii},defineProps:function(){return oi},defineSSRCustomElement:function(){return ji},devtools:function(){return Nn},effect:function(){return Re},effectScope:function(){return de},getCurrentInstance:function(){return Ds},getCurrentScope:function(){return me},getTransitionRawChildren:function(){return br},guardReactiveProps:function(){return Ts},h:function(){return hi},handleError:function(){return un},hydrate:function(){return zc},initCustomFormatter:function(){return vi},initDirectivesForSSR:function(){return Yc},inject:function(){return nr},isMemoSame:function(){return _i},isProxy:function(){return Ft},isReactive:function(){return Pt},isReadonly:function(){return At},isRef:function(){return Ut},isRuntimeOnly:function(){return Zs},isShallow:function(){return It},isVNode:function(){return ys},markRaw:function(){return Lt},mergeDefaults:function(){return fi},mergeProps:function(){return Fs},nextTick:function(){return _n},normalizeClass:function(){return p},normalizeProps:function(){return d},normalizeStyle:function(){return c},onActivated:function(){return Nr},onBeforeMount:function(){return $r},onBeforeUnmount:function(){return jr},onBeforeUpdate:function(){return Vr},onDeactivated:function(){return Rr},onErrorCaptured:function(){return zr},onMounted:function(){return Lr},onRenderTracked:function(){return Wr},onRenderTriggered:function(){return Hr},onScopeDispose:function(){return ge},onServerPrefetch:function(){return Ur},onUnmounted:function(){return Dr},onUpdated:function(){return Br},openBlock:function(){return as},popScopeId:function(){return Bn},provide:function(){return tr},proxyRefs:function(){return Yt},pushScopeId:function(){return Vn},queuePostFlushCb:function(){return xn},reactive:function(){return Tt},readonly:function(){return Rt},ref:function(){return Ht},registerRuntimeCompiler:function(){return Ys},render:function(){return Wc},renderList:function(){return no},renderSlot:function(){return oo},resolveComponent:function(){return Yr},resolveDirective:function(){return Qr},resolveDynamicComponent:function(){return Xr},resolveFilter:function(){return xi},resolveTransitionHooks:function(){return gr},setBlockTracking:function(){return hs},setDevtoolsHook:function(){return Mn},setTransitionHooks:function(){return _r},shallowReactive:function(){return Nt},shallowReadonly:function(){return Ot},shallowRef:function(){return Wt},ssrContextKey:function(){return mi},ssrUtils:function(){return Si},stop:function(){return Oe},toDisplayString:function(){return x},toHandlerKey:function(){return re},toHandlers:function(){return io},toRaw:function(){return $t},toRef:function(){return tn},toRefs:function(){return Qt},transformVNodeArgs:function(){return bs},triggerRef:function(){return Gt},unref:function(){return qt},useAttrs:function(){return ui},useCssModule:function(){return Hi},useCssVars:function(){return Wi},useSSRContext:function(){return gi},useSlots:function(){return li},useTransitionState:function(){return pr},vModelCheckbox:function(){return xc},vModelDynamic:function(){return Rc},vModelRadio:function(){return wc},vModelSelect:function(){return kc},vModelText:function(){return Sc},vShow:function(){return Lc},version:function(){return bi},warn:function(){return on},watch:function(){return cr},watchEffect:function(){return rr},watchPostEffect:function(){return or},watchSyncEffect:function(){return sr},withAsyncContext:function(){return di},withCtx:function(){return Dn},withDefaults:function(){return ci},withDirectives:function(){return Kr},withKeys:function(){return $c},withMemo:function(){return yi},withModifiers:function(){return Ic},withScopeId:function(){return jn}});const s={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"HYDRATE_EVENTS",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},i=o("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function c(e){if(F(e)){const t={};for(let n=0;n{if(e){const n=e.split(u);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function p(e){let t="";if(j(e))t=e;else if(F(e))for(let n=0;nb(e,t)))}const x=e=>j(e)?e:null==e?"":F(e)||U(e)&&(e.toString===W||!B(e.toString))?JSON.stringify(e,C,2):String(e),C=(e,t)=>t&&t.__v_isRef?C(e,t.value):$(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:L(t)?{[`Set(${t.size})`]:[...t.values()]}:!U(t)||F(t)||G(t)?t:String(t),w={},k=[],E=()=>{},T=()=>!1,N=/^on[^a-z]/,R=e=>N.test(e),O=e=>e.startsWith("onUpdate:"),M=Object.assign,P=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},A=Object.prototype.hasOwnProperty,I=(e,t)=>A.call(e,t),F=Array.isArray,$=e=>"[object Map]"===z(e),L=e=>"[object Set]"===z(e),V=e=>"[object Date]"===z(e),B=e=>"function"==typeof e,j=e=>"string"==typeof e,D=e=>"symbol"==typeof e,U=e=>null!==e&&"object"==typeof e,H=e=>U(e)&&B(e.then)&&B(e.catch),W=Object.prototype.toString,z=e=>W.call(e),K=e=>z(e).slice(8,-1),G=e=>"[object Object]"===z(e),q=e=>j(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,J=o(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Y=o("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Z=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},X=/-(\w)/g,Q=Z((e=>e.replace(X,((e,t)=>t?t.toUpperCase():"")))),ee=/\B([A-Z])/g,te=Z((e=>e.replace(ee,"-$1").toLowerCase())),ne=Z((e=>e.charAt(0).toUpperCase()+e.slice(1))),re=Z((e=>e?`on${ne(e)}`:"")),oe=(e,t)=>!Object.is(e,t),se=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},ce=e=>{const t=parseFloat(e);return isNaN(t)?e:t},le=e=>{const t=j(e)?Number(e):NaN;return isNaN(t)?e:t};let ue;const ae=()=>ue||(ue="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});let fe;class pe{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=fe,!e&&fe&&(this.index=(fe.scopes||(fe.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=fe;try{return fe=this,e()}finally{fe=t}}else 0}on(){fe=this}off(){fe=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},ye=e=>(e.w&xe)>0,_e=e=>(e.n&xe)>0,be=new WeakMap;let Se=0,xe=1;const Ce=30;let we;const ke=Symbol(""),Ee=Symbol("");class Te{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,he(this,n)}run(){if(!this.active)return this.fn();let e=we,t=Me;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=we,we=this,Me=!0,xe=1<<++Se,Se<=Ce?(({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{("length"===n||n>=e)&&c.push(t)}))}else switch(void 0!==n&&c.push(i.get(n)),t){case"add":F(e)?q(n)&&c.push(i.get("length")):(c.push(i.get(ke)),$(e)&&c.push(i.get(Ee)));break;case"delete":F(e)||(c.push(i.get(ke)),$(e)&&c.push(i.get(Ee)));break;case"set":$(e)&&c.push(i.get(ke))}if(1===c.length)c[0]&&Ve(c[0]);else{const e=[];for(const t of c)t&&e.push(...t);Ve(ve(e))}}function Ve(e,t){const n=F(e)?e:[...e];for(const e of n)e.computed&&Be(e,t);for(const e of n)e.computed||Be(e,t)}function Be(e,t){(e!==we||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const je=o("__proto__,__v_isRef,__isVue"),De=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(D)),Ue=Je(),He=Je(!1,!0),We=Je(!0),ze=Je(!0,!0),Ke=Ge();function Ge(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=$t(this);for(let e=0,t=this.length;e{e[t]=function(...e){Ae();const n=$t(this)[t].apply(this,e);return Ie(),n}})),e}function qe(e){const t=$t(this);return Fe(t,0,e),t.hasOwnProperty(e)}function Je(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&o===(e?t?Et:kt:t?wt:Ct).get(n))return n;const s=F(n);if(!e){if(s&&I(Ke,r))return Reflect.get(Ke,r,o);if("hasOwnProperty"===r)return qe}const i=Reflect.get(n,r,o);return(D(r)?De.has(r):je(r))?i:(e||Fe(n,0,r),t?i:Ut(i)?s&&q(r)?i:i.value:U(i)?e?Rt(i):Tt(i):i)}}function Ye(e=!1){return function(t,n,r,o){let s=t[n];if(At(s)&&Ut(s)&&!Ut(r))return!1;if(!e&&(It(r)||At(r)||(s=$t(s),r=$t(r)),!F(t)&&Ut(s)&&!Ut(r)))return s.value=r,!0;const i=F(t)&&q(n)?Number(n)e,nt=e=>Reflect.getPrototypeOf(e);function rt(e,t,n=!1,r=!1){const o=$t(e=e.__v_raw),s=$t(t);n||(t!==s&&Fe(o,0,t),Fe(o,0,s));const{has:i}=nt(o),c=r?tt:n?Bt:Vt;return i.call(o,t)?c(e.get(t)):i.call(o,s)?c(e.get(s)):void(e!==o&&e.get(t))}function ot(e,t=!1){const n=this.__v_raw,r=$t(n),o=$t(e);return t||(e!==o&&Fe(r,0,e),Fe(r,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function st(e,t=!1){return e=e.__v_raw,!t&&Fe($t(e),0,ke),Reflect.get(e,"size",e)}function it(e){e=$t(e);const t=$t(this);return nt(t).has.call(t,e)||(t.add(e),Le(t,"add",e,e)),this}function ct(e,t){t=$t(t);const n=$t(this),{has:r,get:o}=nt(n);let s=r.call(n,e);s||(e=$t(e),s=r.call(n,e));const i=o.call(n,e);return n.set(e,t),s?oe(t,i)&&Le(n,"set",e,t):Le(n,"add",e,t),this}function lt(e){const t=$t(this),{has:n,get:r}=nt(t);let o=n.call(t,e);o||(e=$t(e),o=n.call(t,e));r&&r.call(t,e);const s=t.delete(e);return o&&Le(t,"delete",e,void 0),s}function ut(){const e=$t(this),t=0!==e.size,n=e.clear();return t&&Le(e,"clear",void 0,void 0),n}function at(e,t){return function(n,r){const o=this,s=o.__v_raw,i=$t(s),c=t?tt:e?Bt:Vt;return!e&&Fe(i,0,ke),s.forEach(((e,t)=>n.call(r,c(e),c(t),o)))}}function ft(e,t,n){return function(...r){const o=this.__v_raw,s=$t(o),i=$(s),c="entries"===e||e===Symbol.iterator&&i,l="keys"===e&&i,u=o[e](...r),a=n?tt:t?Bt:Vt;return!t&&Fe(s,0,l?Ee:ke),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function pt(e){return function(...t){return"delete"!==e&&this}}function dt(){const e={get(e){return rt(this,e)},get size(){return st(this)},has:ot,add:it,set:ct,delete:lt,clear:ut,forEach:at(!1,!1)},t={get(e){return rt(this,e,!1,!0)},get size(){return st(this)},has:ot,add:it,set:ct,delete:lt,clear:ut,forEach:at(!1,!0)},n={get(e){return rt(this,e,!0)},get size(){return st(this,!0)},has(e){return ot.call(this,e,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:at(!0,!1)},r={get(e){return rt(this,e,!0,!0)},get size(){return st(this,!0)},has(e){return ot.call(this,e,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:at(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=ft(o,!1,!1),n[o]=ft(o,!0,!1),t[o]=ft(o,!1,!0),r[o]=ft(o,!0,!0)})),[e,n,t,r]}const[ht,mt,gt,vt]=dt();function yt(e,t){const n=t?e?vt:gt:e?mt:ht;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(I(n,r)&&r in t?n:t,r,o)}const _t={get:yt(!1,!1)},bt={get:yt(!1,!0)},St={get:yt(!0,!1)},xt={get:yt(!0,!0)};const Ct=new WeakMap,wt=new WeakMap,kt=new WeakMap,Et=new WeakMap;function Tt(e){return At(e)?e:Mt(e,!1,Ze,_t,Ct)}function Nt(e){return Mt(e,!1,Qe,bt,wt)}function Rt(e){return Mt(e,!0,Xe,St,kt)}function Ot(e){return Mt(e,!0,et,xt,Et)}function Mt(e,t,n,r,o){if(!U(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=(c=e).__v_skip||!Object.isExtensible(c)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(K(c));var c;if(0===i)return e;const l=new Proxy(e,2===i?r:n);return o.set(e,l),l}function Pt(e){return At(e)?Pt(e.__v_raw):!(!e||!e.__v_isReactive)}function At(e){return!(!e||!e.__v_isReadonly)}function It(e){return!(!e||!e.__v_isShallow)}function Ft(e){return Pt(e)||At(e)}function $t(e){const t=e&&e.__v_raw;return t?$t(t):e}function Lt(e){return ie(e,"__v_skip",!0),e}const Vt=e=>U(e)?Tt(e):e,Bt=e=>U(e)?Rt(e):e;function jt(e){Me&&we&&$e((e=$t(e)).dep||(e.dep=ve()))}function Dt(e,t){const n=(e=$t(e)).dep;n&&Ve(n)}function Ut(e){return!(!e||!0!==e.__v_isRef)}function Ht(e){return zt(e,!1)}function Wt(e){return zt(e,!0)}function zt(e,t){return Ut(e)?e:new Kt(e,t)}class Kt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:$t(e),this._value=t?e:Vt(e)}get value(){return jt(this),this._value}set value(e){const t=this.__v_isShallow||It(e)||At(e);e=t?e:$t(e),oe(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Vt(e),Dt(this))}}function Gt(e){Dt(e)}function qt(e){return Ut(e)?e.value:e}const Jt={get:(e,t,n)=>qt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Ut(o)&&!Ut(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Yt(e){return Pt(e)?e:new Proxy(e,Jt)}class Zt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>jt(this)),(()=>Dt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Xt(e){return new Zt(e)}function Qt(e){const t=F(e)?new Array(e.length):{};for(const n in e)t[n]=tn(e,n);return t}class en{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){var n;return null===(n=be.get(e))||void 0===n?void 0:n.get(t)}($t(this._object),this._key)}}function tn(e,t,n){const r=e[t];return Ut(r)?r:new en(e,t,n)}var nn;class rn{constructor(e,t,n,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[nn]=!1,this._dirty=!0,this.effect=new Te(e,(()=>{this._dirty||(this._dirty=!0,Dt(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=n}get value(){const e=$t(this);return jt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}nn="__v_isReadonly";function on(e,...t){}function sn(e,t){}function cn(e,t,n,r){let o;try{o=r?e(...r):e()}catch(e){un(e,t,n)}return o}function ln(e,t,n,r){if(B(e)){const o=cn(e,t,n,r);return o&&H(o)&&o.catch((e=>{un(e,t,n)})),o}const o=[];for(let s=0;s>>1;kn(pn[r])kn(e)-kn(t))),gn=0;gnnull==e.id?1/0:e.id,En=(e,t)=>{const n=kn(e)-kn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Tn(e){fn=!1,an=!0,pn.sort(En);try{for(dn=0;dnNn.emit(e,...t))),Rn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(r=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===r?void 0:r.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{Mn(e,t)})),setTimeout((()=>{Nn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,On=!0,Rn=[])}),3e3)}else On=!0,Rn=[]}function Pn(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||w;let o=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in r){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=r[e]||w;s&&(o=n.map((e=>j(e)?e.trim():e))),t&&(o=n.map(ce))}let c;let l=r[c=re(t)]||r[c=re(Q(t))];!l&&s&&(l=r[c=re(te(t))]),l&&ln(l,e,6,o);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,ln(u,e,6,o)}}function An(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(void 0!==o)return o;const s=e.emits;let i={},c=!1;if(!B(e)){const r=e=>{const n=An(e,t,!0);n&&(c=!0,M(i,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return s||c?(F(s)?s.forEach((e=>i[e]=null)):M(i,s),U(e)&&r.set(e,i),i):(U(e)&&r.set(e,null),null)}function In(e,t){return!(!e||!R(t))&&(t=t.slice(2).replace(/Once$/,""),I(e,t[0].toLowerCase()+t.slice(1))||I(e,te(t))||I(e,t))}let Fn=null,$n=null;function Ln(e){const t=Fn;return Fn=e,$n=e&&e.type.__scopeId||null,t}function Vn(e){$n=e}function Bn(){$n=null}const jn=e=>Dn;function Dn(e,t=Fn,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&hs(-1);const o=Ln(t);let s;try{s=e(...n)}finally{Ln(o),r._d&&hs(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function Un(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[i],slots:c,attrs:l,emit:u,render:a,renderCache:f,data:p,setupState:d,ctx:h,inheritAttrs:m}=e;let g,v;const y=Ln(e);try{if(4&n.shapeFlag){const e=o||r;g=Ps(a.call(e,e,f,s,d,p,h)),v=l}else{const e=t;0,g=Ps(e.length>1?e(s,{attrs:l,slots:c,emit:u}):e(s,null)),v=t.props?l:Wn(l)}}catch(t){ls.length=0,un(t,e,1),g=ks(is)}let _=g;if(v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=_;e.length&&7&t&&(i&&e.some(O)&&(v=zn(v,i)),_=Ns(_,v))}return n.dirs&&(_=Ns(_),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),g=_,Ln(y),g}function Hn(e){let t;for(let n=0;n{let t;for(const n in e)("class"===n||"style"===n||R(n))&&((t||(t={}))[n]=e[n]);return t},zn=(e,t)=>{const n={};for(const r in e)O(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function Kn(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;oe.__isSuspense,Jn={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,s,i,c,l,u){null==e?function(e,t,n,r,o,s,i,c,l){const{p:u,o:{createElement:a}}=l,f=a("div"),p=e.suspense=Zn(e,o,r,t,f,n,s,i,c,l);u(null,p.pendingBranch=e.ssContent,f,null,r,p,s,i),p.deps>0?(Yn(e,"onPending"),Yn(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,s,i),er(p,e.ssFallback)):p.resolve()}(t,n,r,o,s,i,c,l,u):function(e,t,n,r,o,s,i,c,{p:l,um:u,o:{createElement:a}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=f;if(m)f.pendingBranch=p,_s(p,m)?(l(m,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0?f.resolve():g&&(l(h,d,n,r,o,null,s,i,c),er(f,d))):(f.pendingId++,v?(f.isHydrating=!1,f.activeBranch=m):u(m,o,f),f.deps=0,f.effects.length=0,f.hiddenContainer=a("div"),g?(l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0?f.resolve():(l(h,d,n,r,o,null,s,i,c),er(f,d))):h&&_s(p,h)?(l(h,p,n,r,o,f,s,i,c),f.resolve(!0)):(l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0&&f.resolve()));else if(h&&_s(p,h))l(h,p,n,r,o,f,s,i,c),er(f,p);else if(Yn(t,"onPending"),f.pendingBranch=p,f.pendingId++,l(null,p,f.hiddenContainer,null,o,f,s,i,c),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,r,o,i,c,l,u)},hydrate:function(e,t,n,r,o,s,i,c,l){const u=t.suspense=Zn(t,r,n,e.parentNode,document.createElement("div"),null,o,s,i,c,!0),a=l(e,u.pendingBranch=t.ssContent,n,u,s,i);0===u.deps&&u.resolve();return a},create:Zn,normalize:function(e){const{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=Xn(r?n.default:n),e.ssFallback=r?Xn(n.fallback):ks(is)}};function Yn(e,t){const n=e.props&&e.props[t];B(n)&&n()}function Zn(e,t,n,r,o,s,i,c,l,u,a=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:m,remove:g}}=u,v=e.props?le(e.props.timeout):void 0;const y={vnode:e,parent:t,parentComponent:n,isSVG:i,container:r,hiddenContainer:o,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof v?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:a,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:r,pendingId:o,effects:s,parentComponent:i,container:c}=y;if(y.isHydrating)y.isHydrating=!1;else if(!e){const e=n&&r.transition&&"out-in"===r.transition.mode;e&&(n.transition.afterLeave=()=>{o===y.pendingId&&p(r,c,t,0)});let{anchor:t}=y;n&&(t=h(n),d(n,i,y,!0)),e||p(r,c,t,0)}er(y,r),y.pendingBranch=null,y.isInFallback=!1;let l=y.parent,u=!1;for(;l;){if(l.pendingBranch){l.effects.push(...s),u=!0;break}l=l.parent}u||xn(s),y.effects=[],Yn(t,"onResolve")},fallback(e){if(!y.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:r,container:o,isSVG:s}=y;Yn(t,"onFallback");const i=h(n),u=()=>{y.isInFallback&&(f(null,e,o,i,r,null,s,c,l),er(y,e))},a=e.transition&&"out-in"===e.transition.mode;a&&(n.transition.afterLeave=u),y.isInFallback=!0,d(n,r,null,!0),a||u()},move(e,t,n){y.activeBranch&&p(y.activeBranch,e,t,n),y.container=e},next(){return y.activeBranch&&h(y.activeBranch)},registerDep(e,t){const n=!!y.pendingBranch;n&&y.deps++;const r=e.vnode.el;e.asyncDep.catch((t=>{un(t,e,0)})).then((o=>{if(e.isUnmounted||y.isUnmounted||y.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;Js(e,o,!1),r&&(s.el=r);const c=!r&&e.subTree.el;t(e,s,m(r||e.subTree.el),r?null:h(e.subTree),y,i,l),c&&g(c),Gn(e,s.el),n&&0==--y.deps&&y.resolve()}))},unmount(e,t){y.isUnmounted=!0,y.activeBranch&&d(y.activeBranch,n,e,t),y.pendingBranch&&d(y.pendingBranch,n,e,t)}};return y}function Xn(e){let t;if(B(e)){const n=ds&&e._c;n&&(e._d=!1,as()),e=e(),n&&(e._d=!0,t=us,fs())}if(F(e)){const t=Hn(e);0,e=t}return e=Ps(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Qn(e,t){t&&t.pendingBranch?F(e)?t.effects.push(...e):t.effects.push(e):xn(e)}function er(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,o=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=o,Gn(r,o))}function tr(e,t){if(js){let n=js.provides;const r=js.parent&&js.parent.provides;r===n&&(n=js.provides=Object.create(r)),n[e]=t}else 0}function nr(e,t,n=!1){const r=js||Fn;if(r){const o=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&B(t)?t.call(r.proxy):t}else 0}function rr(e,t){return lr(e,null,t)}function or(e,t){return lr(e,null,{flush:"post"})}function sr(e,t){return lr(e,null,{flush:"sync"})}const ir={};function cr(e,t,n){return lr(e,t,n)}function lr(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:i}=w){const c=me()===(null==js?void 0:js.scope)?js:null;let l,u,a=!1,f=!1;if(Ut(e)?(l=()=>e.value,a=It(e)):Pt(e)?(l=()=>e,r=!0):F(e)?(f=!0,a=e.some((e=>Pt(e)||It(e))),l=()=>e.map((e=>Ut(e)?e.value:Pt(e)?fr(e):B(e)?cn(e,c,2):void 0))):l=B(e)?t?()=>cn(e,c,2):()=>{if(!c||!c.isUnmounted)return u&&u(),ln(e,c,3,[d])}:E,t&&r){const e=l;l=()=>fr(e())}let p,d=e=>{u=v.onStop=()=>{cn(e,c,4)}};if(Gs){if(d=E,t?n&&ln(t,c,3,[l(),f?[]:void 0,d]):l(),"sync"!==o)return E;{const e=gi();p=e.__watcherHandles||(e.__watcherHandles=[])}}let h=f?new Array(e.length).fill(ir):ir;const m=()=>{if(v.active)if(t){const e=v.run();(r||a||(f?e.some(((e,t)=>oe(e,h[t]))):oe(e,h)))&&(u&&u(),ln(t,c,3,[e,h===ir?void 0:f&&h[0]===ir?[]:h,d]),h=e)}else v.run()};let g;m.allowRecurse=!!t,"sync"===o?g=m:"post"===o?g=()=>Ko(m,c&&c.suspense):(m.pre=!0,c&&(m.id=c.uid),g=()=>bn(m));const v=new Te(l,g);t?n?m():h=v.run():"post"===o?Ko(v.run.bind(v),c&&c.suspense):v.run();const y=()=>{v.stop(),c&&c.scope&&P(c.scope.effects,v)};return p&&p.push(y),y}function ur(e,t,n){const r=this.proxy,o=j(e)?e.includes(".")?ar(r,e):()=>r[e]:e.bind(r,r);let s;B(t)?s=t:(s=t.handler,n=t);const i=js;Us(this);const c=lr(o,s.bind(r),n);return i?Us(i):Hs(),c}function ar(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{fr(e,t)}));else if(G(e))for(const n in e)fr(e[n],t);return e}function pr(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Lr((()=>{e.isMounted=!0})),jr((()=>{e.isUnmounting=!0})),e}const dr=[Function,Array],hr={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:dr,onEnter:dr,onAfterEnter:dr,onEnterCancelled:dr,onBeforeLeave:dr,onLeave:dr,onAfterLeave:dr,onLeaveCancelled:dr,onBeforeAppear:dr,onAppear:dr,onAfterAppear:dr,onAppearCancelled:dr},setup(e,{slots:t}){const n=Ds(),r=pr();let o;return()=>{const s=t.default&&br(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){let e=!1;for(const t of s)if(t.type!==is){0,i=t,e=!0;break}}const c=$t(e),{mode:l}=c;if(r.isLeaving)return vr(i);const u=yr(i);if(!u)return vr(i);const a=gr(u,c,r,n);_r(u,a);const f=n.subTree,p=f&&yr(f);let d=!1;const{getTransitionKey:h}=u.type;if(h){const e=h();void 0===o?o=e:e!==o&&(o=e,d=!0)}if(p&&p.type!==is&&(!_s(u,p)||d)){const e=gr(p,c,r,n);if(_r(p,e),"out-in"===l)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,!1!==n.update.active&&n.update()},vr(i);"in-out"===l&&u.type!==is&&(e.delayLeave=(e,t,n)=>{mr(r,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete a.delayedLeave},a.delayedLeave=n})}return i}}};function mr(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function gr(e,t,n,r){const{appear:o,mode:s,persisted:i=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:a,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,_=String(e.key),b=mr(n,e),S=(e,t)=>{e&&ln(e,r,9,t)},x=(e,t)=>{const n=t[1];S(e,t),F(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},C={mode:s,persisted:i,beforeEnter(t){let r=c;if(!n.isMounted){if(!o)return;r=m||c}t._leaveCb&&t._leaveCb(!0);const s=b[_];s&&_s(e,s)&&s.el._leaveCb&&s.el._leaveCb(),S(r,[t])},enter(e){let t=l,r=u,s=a;if(!n.isMounted){if(!o)return;t=g||l,r=v||u,s=y||a}let i=!1;const c=e._enterCb=t=>{i||(i=!0,S(t?s:r,[e]),C.delayedLeave&&C.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,c]):c()},leave(t,r){const o=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return r();S(f,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,r(),S(n?h:d,[t]),t._leaveCb=void 0,b[o]===e&&delete b[o])};b[o]=e,p?x(p,[t,i]):i()},clone(e){return gr(e,t,n,r)}};return C}function vr(e){if(kr(e))return(e=Ns(e)).children=null,e}function yr(e){return kr(e)?e.children?e.children[0]:void 0:e}function _r(e,t){6&e.shapeFlag&&e.component?_r(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function br(e,t=!1,n){let r=[],o=0;for(let s=0;s1)for(let e=0;e!!e.type.__asyncLoader;function Cr(e){B(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:s,suspensible:i=!0,onError:c}=e;let l,u=null,a=0;const f=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise(((t,n)=>{c(e,(()=>t((a++,u=null,f()))),(()=>n(e)),a+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t))))};return Sr({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return l},setup(){const e=js;if(l)return()=>wr(l,e);const t=t=>{u=null,un(t,e,13,!r)};if(i&&e.suspense||Gs)return f().then((t=>()=>wr(t,e))).catch((e=>(t(e),()=>r?ks(r,{error:e}):null)));const c=Ht(!1),a=Ht(),p=Ht(!!o);return o&&setTimeout((()=>{p.value=!1}),o),null!=s&&setTimeout((()=>{if(!c.value&&!a.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),a.value=e}}),s),f().then((()=>{c.value=!0,e.parent&&kr(e.parent.vnode)&&bn(e.parent.update)})).catch((e=>{t(e),a.value=e})),()=>c.value&&l?wr(l,e):a.value&&r?ks(r,{error:a.value}):n&&!p.value?ks(n):void 0}})}function wr(e,t){const{ref:n,props:r,children:o,ce:s}=t.vnode,i=ks(e,r,o);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const kr=e=>e.type.__isKeepAlive,Er={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ds(),r=n.ctx;if(!r.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const o=new Map,s=new Set;let i=null;const c=n.suspense,{renderer:{p:l,m:u,um:a,o:{createElement:f}}}=r,p=f("div");function d(e){Pr(e),a(e,n,c,!0)}function h(e){o.forEach(((t,n)=>{const r=ti(t.type);!r||e&&e(r)||m(n)}))}function m(e){const t=o.get(e);i&&_s(t,i)?i&&Pr(i):d(t),o.delete(e),s.delete(e)}r.activate=(e,t,n,r,o)=>{const s=e.component;u(e,t,n,0,c),l(s.vnode,e,t,n,s,c,r,e.slotScopeIds,o),Ko((()=>{s.isDeactivated=!1,s.a&&se(s.a);const t=e.props&&e.props.onVnodeMounted;t&&$s(t,s.parent,e)}),c)},r.deactivate=e=>{const t=e.component;u(e,p,null,1,c),Ko((()=>{t.da&&se(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&$s(n,t.parent,e),t.isDeactivated=!0}),c)},cr((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Tr(e,t))),t&&h((e=>!Tr(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&o.set(g,Ar(n.subTree))};return Lr(v),Br(v),jr((()=>{o.forEach((e=>{const{subTree:t,suspense:r}=n,o=Ar(t);if(e.type!==o.type||e.key!==o.key)d(e);else{Pr(o);const e=o.component.da;e&&Ko(e,r)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),r=n[0];if(n.length>1)return i=null,n;if(!(ys(r)&&(4&r.shapeFlag||128&r.shapeFlag)))return i=null,r;let c=Ar(r);const l=c.type,u=ti(xr(c)?c.type.__asyncResolved||{}:l),{include:a,exclude:f,max:p}=e;if(a&&(!u||!Tr(a,u))||f&&u&&Tr(f,u))return i=c,r;const d=null==c.key?l:c.key,h=o.get(d);return c.el&&(c=Ns(c),128&r.shapeFlag&&(r.ssContent=c)),g=d,h?(c.el=h.el,c.component=h.component,c.transition&&_r(c,c.transition),c.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),c.shapeFlag|=256,i=c,qn(r.type)?r:c}}};function Tr(e,t){return F(e)?e.some((e=>Tr(e,t))):j(e)?e.split(",").includes(t):"[object RegExp]"===z(e)&&e.test(t)}function Nr(e,t){Or(e,"a",t)}function Rr(e,t){Or(e,"da",t)}function Or(e,t,n=js){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Ir(t,r,n),n){let e=n.parent;for(;e&&e.parent;)kr(e.parent.vnode)&&Mr(r,t,n,e),e=e.parent}}function Mr(e,t,n,r){const o=Ir(t,e,r,!0);Dr((()=>{P(r[t],o)}),n)}function Pr(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Ar(e){return 128&e.shapeFlag?e.ssContent:e}function Ir(e,t,n=js,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;Ae(),Us(n);const o=ln(t,n,e,r);return Hs(),Ie(),o});return r?o.unshift(s):o.push(s),s}}const Fr=e=>(t,n=js)=>(!Gs||"sp"===e)&&Ir(e,((...e)=>t(...e)),n),$r=Fr("bm"),Lr=Fr("m"),Vr=Fr("bu"),Br=Fr("u"),jr=Fr("bum"),Dr=Fr("um"),Ur=Fr("sp"),Hr=Fr("rtg"),Wr=Fr("rtc");function zr(e,t=js){Ir("ec",e,t)}function Kr(e,t){const n=Fn;if(null===n)return e;const r=ei(n)||n.proxy,o=e.dirs||(e.dirs=[]);for(let e=0;et(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let r=0,i=n.length;r{const t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function oo(e,t,n={},r,o){if(Fn.isCE||Fn.parent&&xr(Fn.parent)&&Fn.parent.isCE)return"default"!==t&&(n.name=t),ks("slot",n,r&&r());let s=e[t];s&&s._c&&(s._d=!1),as();const i=s&&so(s(n)),c=vs(os,{key:n.key||i&&i.key||`_${t}`},i||(r?r():[]),i&&1===e._?64:-2);return!o&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),s&&s._c&&(s._d=!0),c}function so(e){return e.some((e=>!ys(e)||e.type!==is&&!(e.type===os&&!so(e.children))))?e:null}function io(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:re(r)]=e[r];return n}const co=e=>e?Ws(e)?ei(e)||e.proxy:co(e.parent):null,lo=M(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>co(e.parent),$root:e=>co(e.root),$emit:e=>e.emit,$options:e=>vo(e),$forceUpdate:e=>e.f||(e.f=()=>bn(e.update)),$nextTick:e=>e.n||(e.n=_n.bind(e.proxy)),$watch:e=>ur.bind(e)}),uo=(e,t)=>e!==w&&!e.__isScriptSetup&&I(e,t),ao={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:c,appContext:l}=e;let u;if("$"!==t[0]){const c=i[t];if(void 0!==c)switch(c){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(uo(r,t))return i[t]=1,r[t];if(o!==w&&I(o,t))return i[t]=2,o[t];if((u=e.propsOptions[0])&&I(u,t))return i[t]=3,s[t];if(n!==w&&I(n,t))return i[t]=4,n[t];po&&(i[t]=0)}}const a=lo[t];let f,p;return a?("$attrs"===t&&Fe(e,0,t),a(e)):(f=c.__cssModules)&&(f=f[t])?f:n!==w&&I(n,t)?(i[t]=4,n[t]):(p=l.config.globalProperties,I(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return uo(o,t)?(o[t]=n,!0):r!==w&&I(r,t)?(r[t]=n,!0):!I(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let c;return!!n[i]||e!==w&&I(e,i)||uo(t,i)||(c=s[0])&&I(c,i)||I(r,i)||I(lo,i)||I(o.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:I(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};const fo=M({},ao,{get(e,t){if(t!==Symbol.unscopables)return ao.get(e,t,e)},has(e,t){return"_"!==t[0]&&!i(t)}});let po=!0;function ho(e){const t=vo(e),n=e.proxy,r=e.ctx;po=!1,t.beforeCreate&&mo(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:c,provide:l,inject:u,created:a,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:y,destroyed:_,unmounted:b,render:S,renderTracked:x,renderTriggered:C,errorCaptured:w,serverPrefetch:k,expose:T,inheritAttrs:N,components:R,directives:O,filters:M}=t;if(u&&function(e,t,n=E,r=!1){F(e)&&(e=So(e));for(const n in e){const o=e[n];let s;s=U(o)?"default"in o?nr(o.from||n,o.default,!0):nr(o.from||n):nr(o),Ut(s)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[n]=s}}(u,r,null,e.appContext.config.unwrapInjectedRef),i)for(const e in i){const t=i[e];B(t)&&(r[e]=t.bind(n))}if(o){0;const t=o.call(n,n);0,U(t)&&(e.data=Tt(t))}if(po=!0,s)for(const e in s){const t=s[e],o=B(t)?t.bind(n,n):B(t.get)?t.get.bind(n,n):E;0;const i=!B(t)&&B(t.set)?t.set.bind(n):E,c=ri({get:o,set:i});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)go(c[e],r,n,e);if(l){const e=B(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{tr(t,e[t])}))}function P(e,t){F(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(a&&mo(a,e,"c"),P($r,f),P(Lr,p),P(Vr,d),P(Br,h),P(Nr,m),P(Rr,g),P(zr,w),P(Wr,x),P(Hr,C),P(jr,y),P(Dr,b),P(Ur,k),F(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===E&&(e.render=S),null!=N&&(e.inheritAttrs=N),R&&(e.components=R),O&&(e.directives=O)}function mo(e,t,n){ln(F(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function go(e,t,n,r){const o=r.includes(".")?ar(n,r):()=>n[r];if(j(e)){const n=t[e];B(n)&&cr(o,n)}else if(B(e))cr(o,e.bind(n));else if(U(e))if(F(e))e.forEach((e=>go(e,t,n,r)));else{const r=B(e.handler)?e.handler.bind(n):t[e.handler];B(r)&&cr(o,r,e)}else 0}function vo(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,c=s.get(t);let l;return c?l=c:o.length||n||r?(l={},o.length&&o.forEach((e=>yo(l,e,i,!0))),yo(l,t,i)):l=t,U(t)&&s.set(t,l),l}function yo(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&yo(e,s,n,!0),o&&o.forEach((t=>yo(e,t,n,!0)));for(const o in t)if(r&&"expose"===o);else{const r=_o[o]||n&&n[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const _o={data:bo,props:Co,emits:Co,methods:Co,computed:Co,beforeCreate:xo,created:xo,beforeMount:xo,mounted:xo,beforeUpdate:xo,updated:xo,beforeDestroy:xo,beforeUnmount:xo,destroyed:xo,unmounted:xo,activated:xo,deactivated:xo,errorCaptured:xo,serverPrefetch:xo,components:Co,directives:Co,watch:function(e,t){if(!e)return t;if(!t)return e;const n=M(Object.create(null),e);for(const r in t)n[r]=xo(e[r],t[r]);return n},provide:bo,inject:function(e,t){return Co(So(e),So(t))}};function bo(e,t){return t?e?function(){return M(B(e)?e.call(this,this):e,B(t)?t.call(this,this):t)}:t:e}function So(e){if(F(e)){const t={};for(let n=0;n{l=!0;const[n,r]=Eo(e,t,!0);M(i,n),r&&c.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!l)return U(e)&&r.set(e,k),k;if(F(s))for(let e=0;e-1,r[1]=n<0||e-1||I(r,"default"))&&c.push(t)}}}}const u=[i,c];return U(e)&&r.set(e,u),u}function To(e){return"$"!==e[0]}function No(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function Ro(e,t){return No(e)===No(t)}function Oo(e,t){return F(t)?t.findIndex((t=>Ro(t,e))):B(t)&&Ro(t,e)?0:-1}const Mo=e=>"_"===e[0]||"$stable"===e,Po=e=>F(e)?e.map(Ps):[Ps(e)],Ao=(e,t,n)=>{if(t._n)return t;const r=Dn(((...e)=>Po(t(...e))),n);return r._c=!1,r},Io=(e,t,n)=>{const r=e._ctx;for(const n in e){if(Mo(n))continue;const o=e[n];if(B(o))t[n]=Ao(0,o,r);else if(null!=o){0;const e=Po(o);t[n]=()=>e}}},Fo=(e,t)=>{const n=Po(t);e.slots.default=()=>n},$o=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=$t(t),ie(t,"_",n)):Io(t,e.slots={})}else e.slots={},t&&Fo(e,t);ie(e.slots,Ss,1)},Lo=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=w;if(32&r.shapeFlag){const e=t._;e?n&&1===e?s=!1:(M(o,t),n||1!==e||delete o._):(s=!t.$stable,Io(t,o)),i=t}else t&&(Fo(e,t),i={default:1});if(s)for(const e in o)Mo(e)||e in i||delete o[e]};function Vo(){return{app:null,config:{isNativeTag:T,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Bo=0;function jo(e,t){return function(n,r=null){B(n)||(n=Object.assign({},n)),null==r||U(r)||(r=null);const o=Vo(),s=new Set;let i=!1;const c=o.app={_uid:Bo++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:bi,get config(){return o.config},set config(e){0},use(e,...t){return s.has(e)||(e&&B(e.install)?(s.add(e),e.install(c,...t)):B(e)&&(s.add(e),e(c,...t))),c},mixin(e){return o.mixins.includes(e)||o.mixins.push(e),c},component(e,t){return t?(o.components[e]=t,c):o.components[e]},directive(e,t){return t?(o.directives[e]=t,c):o.directives[e]},mount(s,l,u){if(!i){0;const a=ks(n,r);return a.appContext=o,l&&t?t(a,s):e(a,s,u),i=!0,c._container=s,s.__vue_app__=c,ei(a.component)||a.component.proxy}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return o.provides[e]=t,c}};return c}}function Do(e,t,n,r,o=!1){if(F(e))return void e.forEach(((e,s)=>Do(e,t&&(F(t)?t[s]:t),n,r,o)));if(xr(r)&&!o)return;const s=4&r.shapeFlag?ei(r.component)||r.component.proxy:r.el,i=o?null:s,{i:c,r:l}=e;const u=t&&t.r,a=c.refs===w?c.refs={}:c.refs,f=c.setupState;if(null!=u&&u!==l&&(j(u)?(a[u]=null,I(f,u)&&(f[u]=null)):Ut(u)&&(u.value=null)),B(l))cn(l,c,12,[i,a]);else{const t=j(l),r=Ut(l);if(t||r){const c=()=>{if(e.f){const n=t?I(f,l)?f[l]:a[l]:l.value;o?F(n)&&P(n,s):F(n)?n.includes(s)||n.push(s):t?(a[l]=[s],I(f,l)&&(f[l]=a[l])):(l.value=[s],e.k&&(a[e.k]=l.value))}else t?(a[l]=i,I(f,l)&&(f[l]=i)):r&&(l.value=i,e.k&&(a[e.k]=i))};i?(c.id=-1,Ko(c,n)):c()}else 0}}let Uo=!1;const Ho=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,Wo=e=>8===e.nodeType;function zo(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:s,parentNode:i,remove:c,insert:l,createComment:u}}=e,a=(n,r,c,u,g,v=!1)=>{const y=Wo(n)&&"["===n.data,_=()=>h(n,r,c,u,g,y),{type:b,ref:S,shapeFlag:x,patchFlag:C}=r;let w=n.nodeType;r.el=n,-2===C&&(v=!1,r.dynamicChildren=null);let k=null;switch(b){case ss:3!==w?""===r.children?(l(r.el=o(""),i(n),n),k=n):k=_():(n.data!==r.children&&(Uo=!0,n.data=r.children),k=s(n));break;case is:k=8!==w||y?_():s(n);break;case cs:if(y&&(w=(n=s(n)).nodeType),1===w||3===w){k=n;const e=!r.children.length;for(let t=0;t{i=i||!!t.dynamicChildren;const{type:l,props:u,patchFlag:a,shapeFlag:f,dirs:d}=t,h="input"===l&&d||"option"===l;if(h||-1!==a){if(d&&Gr(t,null,n,"created"),u)if(h||!i||48&a)for(const t in u)(h&&t.endsWith("value")||R(t)&&!J(t))&&r(e,t,null,u[t],!1,void 0,n);else u.onClick&&r(e,"onClick",null,u.onClick,!1,void 0,n);let l;if((l=u&&u.onVnodeBeforeMount)&&$s(l,n,t),d&&Gr(t,null,n,"beforeMount"),((l=u&&u.onVnodeMounted)||d)&&Qn((()=>{l&&$s(l,n,t),d&&Gr(t,null,n,"mounted")}),o),16&f&&(!u||!u.innerHTML&&!u.textContent)){let r=p(e.firstChild,t,e,n,o,s,i);for(;r;){Uo=!0;const e=r;r=r.nextSibling,c(e)}}else 8&f&&e.textContent!==t.children&&(Uo=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,r,o,s,i,c)=>{c=c||!!t.dynamicChildren;const l=t.children,u=l.length;for(let t=0;t{const{slotScopeIds:a}=t;a&&(o=o?o.concat(a):a);const f=i(e),d=p(s(e),t,f,n,r,o,c);return d&&Wo(d)&&"]"===d.data?s(t.anchor=d):(Uo=!0,l(t.anchor=u("]"),f,d),d)},h=(e,t,r,o,l,u)=>{if(Uo=!0,t.el=null,u){const t=m(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const a=s(e),f=i(e);return c(e),n(null,t,f,a,r,o,Ho(f),l),a},m=e=>{let t=0;for(;e;)if((e=s(e))&&Wo(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),wn(),void(t._vnode=e);Uo=!1,a(t.firstChild,e,null,null,null),wn(),t._vnode=e,Uo&&console.error("Hydration completed but contains mismatches.")},a]}const Ko=Qn;function Go(e){return Jo(e)}function qo(e){return Jo(e,zo)}function Jo(e,t){ae().__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:s,createText:i,createComment:c,setText:l,setElementText:u,parentNode:a,nextSibling:f,setScopeId:p=E,insertStaticContent:d}=e,h=(e,t,n,r=null,o=null,s=null,i=!1,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!_s(e,t)&&(r=z(e),j(e,o,s,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:u,ref:a,shapeFlag:f}=t;switch(u){case ss:m(e,t,n,r);break;case is:g(e,t,n,r);break;case cs:null==e&&v(t,n,r,i);break;case os:R(e,t,n,r,o,s,i,c,l);break;default:1&f?_(e,t,n,r,o,s,i,c,l):6&f?O(e,t,n,r,o,s,i,c,l):(64&f||128&f)&&u.process(e,t,n,r,o,s,i,c,l,G)}null!=a&&o&&Do(a,e&&e.ref,s,t||e,!t)},m=(e,t,r,o)=>{if(null==e)n(t.el=i(t.children),r,o);else{const n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},g=(e,t,r,o)=>{null==e?n(t.el=c(t.children||""),r,o):t.el=e.el},v=(e,t,n,r)=>{[e.el,e.anchor]=d(e.children,t,n,r,e.el,e.anchor)},y=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),r(e),e=n;r(t)},_=(e,t,n,r,o,s,i,c,l)=>{i=i||"svg"===t.type,null==e?b(t,n,r,o,s,i,c,l):C(e,t,o,s,i,c,l)},b=(e,t,r,i,c,l,a,f)=>{let p,d;const{type:h,props:m,shapeFlag:g,transition:v,dirs:y}=e;if(p=e.el=s(e.type,l,m&&m.is,m),8&g?u(p,e.children):16&g&&x(e.children,p,null,i,c,l&&"foreignObject"!==h,a,f),y&&Gr(e,null,i,"created"),S(p,e,e.scopeId,a,i),m){for(const t in m)"value"===t||J(t)||o(p,t,null,m[t],l,e.children,i,c,W);"value"in m&&o(p,"value",null,m.value),(d=m.onVnodeBeforeMount)&&$s(d,i,e)}y&&Gr(e,null,i,"beforeMount");const _=(!c||c&&!c.pendingBranch)&&v&&!v.persisted;_&&v.beforeEnter(p),n(p,t,r),((d=m&&m.onVnodeMounted)||_||y)&&Ko((()=>{d&&$s(d,i,e),_&&v.enter(p),y&&Gr(e,null,i,"mounted")}),c)},S=(e,t,n,r,o)=>{if(n&&p(e,n),r)for(let t=0;t{for(let u=l;u{const l=t.el=e.el;let{patchFlag:a,dynamicChildren:f,dirs:p}=t;a|=16&e.patchFlag;const d=e.props||w,h=t.props||w;let m;n&&Yo(n,!1),(m=h.onVnodeBeforeUpdate)&&$s(m,n,t,e),p&&Gr(t,e,n,"beforeUpdate"),n&&Yo(n,!0);const g=s&&"foreignObject"!==t.type;if(f?T(e.dynamicChildren,f,l,n,r,g,i):c||$(e,t,l,null,n,r,g,i,!1),a>0){if(16&a)N(l,t,d,h,n,r,s);else if(2&a&&d.class!==h.class&&o(l,"class",null,h.class,s),4&a&&o(l,"style",d.style,h.style,s),8&a){const i=t.dynamicProps;for(let t=0;t{m&&$s(m,n,t,e),p&&Gr(t,e,n,"updated")}),r)},T=(e,t,n,r,o,s,i)=>{for(let c=0;c{if(n!==r){if(n!==w)for(const l in n)J(l)||l in r||o(e,l,n[l],null,c,t.children,s,i,W);for(const l in r){if(J(l))continue;const u=r[l],a=n[l];u!==a&&"value"!==l&&o(e,l,a,u,c,t.children,s,i,W)}"value"in r&&o(e,"value",n.value,r.value)}},R=(e,t,r,o,s,c,l,u,a)=>{const f=t.el=e?e.el:i(""),p=t.anchor=e?e.anchor:i("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(u=u?u.concat(m):m),null==e?(n(f,r,o),n(p,r,o),x(t.children,r,p,s,c,l,u,a)):d>0&&64&d&&h&&e.dynamicChildren?(T(e.dynamicChildren,h,r,s,c,l,u),(null!=t.key||s&&t===s.subTree)&&Zo(e,t,!0)):$(e,t,r,p,s,c,l,u,a)},O=(e,t,n,r,o,s,i,c,l)=>{t.slotScopeIds=c,null==e?512&t.shapeFlag?o.ctx.activate(t,n,r,i,l):M(t,n,r,o,s,i,l):P(e,t,l)},M=(e,t,n,r,o,s,i)=>{const c=e.component=Bs(e,r,o);if(kr(e)&&(c.ctx.renderer=G),qs(c),c.asyncDep){if(o&&o.registerDep(c,A),!e.el){const e=c.subTree=ks(is);g(null,e,t,n)}}else A(c,e,t,n,o,s,i)},P=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:c,patchFlag:l}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!o&&!c||c&&c.$stable)||r!==i&&(r?!i||Kn(r,i,u):!!i);if(1024&l)return!0;if(16&l)return r?Kn(r,i,u):!!i;if(8&l){const e=t.dynamicProps;for(let t=0;tdn&&pn.splice(t,1)}(r.update),r.update()}else t.el=e.el,r.vnode=t},A=(e,t,n,r,o,s,i)=>{const c=e.effect=new Te((()=>{if(e.isMounted){let t,{next:n,bu:r,u:c,parent:l,vnode:u}=e,f=n;0,Yo(e,!1),n?(n.el=u.el,F(e,n,i)):n=u,r&&se(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&$s(t,l,n,u),Yo(e,!0);const p=Un(e);0;const d=e.subTree;e.subTree=p,h(d,p,a(d.el),z(d),e,o,s),n.el=p.el,null===f&&Gn(e,p.el),c&&Ko(c,o),(t=n.props&&n.props.onVnodeUpdated)&&Ko((()=>$s(t,l,n,u)),o)}else{let i;const{el:c,props:l}=t,{bm:u,m:a,parent:f}=e,p=xr(t);if(Yo(e,!1),u&&se(u),!p&&(i=l&&l.onVnodeBeforeMount)&&$s(i,f,t),Yo(e,!0),c&&Y){const n=()=>{e.subTree=Un(e),Y(c,e.subTree,e,o,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{0;const i=e.subTree=Un(e);0,h(null,i,n,r,e,o,s),t.el=i.el}if(a&&Ko(a,o),!p&&(i=l&&l.onVnodeMounted)){const e=t;Ko((()=>$s(i,f,e)),o)}(256&t.shapeFlag||f&&xr(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&Ko(e.a,o),e.isMounted=!0,t=n=r=null}}),(()=>bn(l)),e.scope),l=e.update=()=>c.run();l.id=e.uid,Yo(e,!0),l()},F=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,c=$t(o),[l]=e.propsOptions;let u=!1;if(!(r||i>0)||16&i){let r;wo(e,t,o,s)&&(u=!0);for(const s in c)t&&(I(t,s)||(r=te(s))!==s&&I(t,r))||(l?!n||void 0===n[s]&&void 0===n[r]||(o[s]=ko(l,c,s,void 0,e,!0)):delete o[s]);if(s!==c)for(const e in s)t&&I(t,e)||(delete s[e],u=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let r=0;r{const a=e&&e.children,f=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void V(a,p,n,r,o,s,i,c,l);if(256&d)return void L(a,p,n,r,o,s,i,c,l)}8&h?(16&f&&W(a,o,s),p!==a&&u(n,p)):16&f?16&h?V(a,p,n,r,o,s,i,c,l):W(a,o,s,!0):(8&f&&u(n,""),16&h&&x(p,n,r,o,s,i,c,l))},L=(e,t,n,r,o,s,i,c,l)=>{t=t||k;const u=(e=e||k).length,a=t.length,f=Math.min(u,a);let p;for(p=0;pa?W(e,o,s,!0,!1,f):x(t,n,r,o,s,i,c,l,f)},V=(e,t,n,r,o,s,i,c,l)=>{let u=0;const a=t.length;let f=e.length-1,p=a-1;for(;u<=f&&u<=p;){const r=e[u],a=t[u]=l?As(t[u]):Ps(t[u]);if(!_s(r,a))break;h(r,a,n,null,o,s,i,c,l),u++}for(;u<=f&&u<=p;){const r=e[f],u=t[p]=l?As(t[p]):Ps(t[p]);if(!_s(r,u))break;h(r,u,n,null,o,s,i,c,l),f--,p--}if(u>f){if(u<=p){const e=p+1,f=ep)for(;u<=f;)j(e[u],o,s,!0),u++;else{const d=u,m=u,g=new Map;for(u=m;u<=p;u++){const e=t[u]=l?As(t[u]):Ps(t[u]);null!=e.key&&g.set(e.key,u)}let v,y=0;const _=p-m+1;let b=!1,S=0;const x=new Array(_);for(u=0;u<_;u++)x[u]=0;for(u=d;u<=f;u++){const r=e[u];if(y>=_){j(r,o,s,!0);continue}let a;if(null!=r.key)a=g.get(r.key);else for(v=m;v<=p;v++)if(0===x[v-m]&&_s(r,t[v])){a=v;break}void 0===a?j(r,o,s,!0):(x[a-m]=u+1,a>=S?S=a:b=!0,h(r,t[a],n,null,o,s,i,c,l),y++)}const C=b?function(e){const t=e.slice(),n=[0];let r,o,s,i,c;const l=e.length;for(r=0;r>1,e[n[c]]0&&(t[r]=n[s-1]),n[s]=r)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(x):k;for(v=C.length-1,u=_-1;u>=0;u--){const e=m+u,f=t[e],p=e+1{const{el:i,type:c,transition:l,children:u,shapeFlag:a}=e;if(6&a)return void B(e.component.subTree,t,r,o);if(128&a)return void e.suspense.move(t,r,o);if(64&a)return void c.move(e,t,r,G);if(c===os){n(i,t,r);for(let e=0;e{let s;for(;e&&e!==t;)s=f(e),n(e,r,o),e=s;n(t,r,o)})(e,t,r);if(2!==o&&1&a&&l)if(0===o)l.beforeEnter(i),n(i,t,r),Ko((()=>l.enter(i)),s);else{const{leave:e,delayLeave:o,afterLeave:s}=l,c=()=>n(i,t,r),u=()=>{e(i,(()=>{c(),s&&s()}))};o?o(i,c,u):u()}else n(i,t,r)},j=(e,t,n,r=!1,o=!1)=>{const{type:s,props:i,ref:c,children:l,dynamicChildren:u,shapeFlag:a,patchFlag:f,dirs:p}=e;if(null!=c&&Do(c,null,n,e,!0),256&a)return void t.ctx.deactivate(e);const d=1&a&&p,h=!xr(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&$s(m,t,e),6&a)H(e.component,n,r);else{if(128&a)return void e.suspense.unmount(n,r);d&&Gr(e,null,t,"beforeUnmount"),64&a?e.type.remove(e,t,n,o,G,r):u&&(s!==os||f>0&&64&f)?W(u,t,n,!1,!0):(s===os&&384&f||!o&&16&a)&&W(l,t,n),r&&D(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&Ko((()=>{m&&$s(m,t,e),d&&Gr(e,null,t,"unmounted")}),n)},D=e=>{const{type:t,el:n,anchor:o,transition:s}=e;if(t===os)return void U(n,o);if(t===cs)return void y(e);const i=()=>{r(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:r}=s,o=()=>t(n,i);r?r(e.el,i,o):o()}else i()},U=(e,t)=>{let n;for(;e!==t;)n=f(e),r(e),e=n;r(t)},H=(e,t,n)=>{const{bum:r,scope:o,update:s,subTree:i,um:c}=e;r&&se(r),o.stop(),s&&(s.active=!1,j(i,e,t,n)),c&&Ko(c,t),Ko((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},W=(e,t,n,r=!1,o=!1,s=0)=>{for(let i=s;i6&e.shapeFlag?z(e.component.subTree):128&e.shapeFlag?e.suspense.next():f(e.anchor||e.el),K=(e,t,n)=>{null==e?t._vnode&&j(t._vnode,null,null,!0):h(t._vnode||null,e,t,null,null,null,n),Cn(),wn(),t._vnode=e},G={p:h,um:j,m:B,r:D,mt:M,mc:x,pc:$,pbc:T,n:z,o:e};let q,Y;return t&&([q,Y]=t(G)),{render:K,hydrate:q,createApp:jo(K,q)}}function Yo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Zo(e,t,n=!1){const r=e.children,o=t.children;if(F(r)&&F(o))for(let e=0;ee&&(e.disabled||""===e.disabled),Qo=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,es=(e,t)=>{const n=e&&e.to;if(j(n)){if(t){const e=t(n);return e}return null}return n};function ts(e,t,n,{o:{insert:r},m:o},s=2){0===s&&r(e.targetAnchor,t,n);const{el:i,anchor:c,shapeFlag:l,children:u,props:a}=e,f=2===s;if(f&&r(i,t,n),(!f||Xo(a))&&16&l)for(let e=0;e{16&y&&a(_,e,t,o,s,i,c,l)};v?g(n,u):f&&g(f,p)}else{t.el=e.el;const r=t.anchor=e.anchor,a=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=Xo(e.props),g=m?n:a,y=m?r:d;if(i=i||Qo(a),b?(p(e.dynamicChildren,b,g,o,s,i,c),Zo(e,t,!0)):l||f(e,t,g,y,o,s,i,c,!1),v)m||ts(t,n,r,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=es(t.props,h);e&&ts(t,e,null,u,0)}else m&&ts(t,a,d,u,1)}rs(t)},remove(e,t,n,r,{um:o,o:{remove:s}},i){const{shapeFlag:c,children:l,anchor:u,targetAnchor:a,target:f,props:p}=e;if(f&&s(a),(i||!Xo(p))&&(s(u),16&c))for(let e=0;e0?us||k:null,fs(),ds>0&&us&&us.push(e),e}function gs(e,t,n,r,o,s){return ms(ws(e,t,n,r,o,s,!0))}function vs(e,t,n,r,o){return ms(ks(e,t,n,r,o,!0))}function ys(e){return!!e&&!0===e.__v_isVNode}function _s(e,t){return e.type===t.type&&e.key===t.key}function bs(e){ps=e}const Ss="__vInternal",xs=({key:e})=>null!=e?e:null,Cs=({ref:e,ref_key:t,ref_for:n})=>null!=e?j(e)||Ut(e)||B(e)?{i:Fn,r:e,k:t,f:!!n}:e:null;function ws(e,t=null,n=null,r=0,o=null,s=(e===os?0:1),i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&xs(t),ref:t&&Cs(t),scopeId:$n,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Fn};return c?(Is(l,n),128&s&&e.normalize(l)):n&&(l.shapeFlag|=j(n)?8:16),ds>0&&!i&&us&&(l.patchFlag>0||6&s)&&32!==l.patchFlag&&us.push(l),l}const ks=Es;function Es(e,t=null,n=null,r=0,o=null,s=!1){if(e&&e!==Zr||(e=is),ys(e)){const r=Ns(e,t,!0);return n&&Is(r,n),ds>0&&!s&&us&&(6&r.shapeFlag?us[us.indexOf(e)]=r:us.push(r)),r.patchFlag|=-2,r}if(ni(e)&&(e=e.__vccOpts),t){t=Ts(t);let{class:e,style:n}=t;e&&!j(e)&&(t.class=p(e)),U(n)&&(Ft(n)&&!F(n)&&(n=M({},n)),t.style=c(n))}return ws(e,t,n,r,o,j(e)?1:qn(e)?128:(e=>e.__isTeleport)(e)?64:U(e)?4:B(e)?2:0,s,!0)}function Ts(e){return e?Ft(e)||Ss in e?M({},e):e:null}function Ns(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:i}=e,c=t?Fs(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&xs(c),ref:t&&t.ref?n&&o?F(o)?o.concat(Cs(t)):[o,Cs(t)]:Cs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==os?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ns(e.ssContent),ssFallback:e.ssFallback&&Ns(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Rs(e=" ",t=0){return ks(ss,null,e,t)}function Os(e,t){const n=ks(cs,null,e);return n.staticCount=t,n}function Ms(e="",t=!1){return t?(as(),vs(is,null,e)):ks(is,null,e)}function Ps(e){return null==e||"boolean"==typeof e?ks(is):F(e)?ks(os,null,e.slice()):"object"==typeof e?As(e):ks(ss,null,String(e))}function As(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Ns(e)}function Is(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(F(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),Is(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||Ss in t?3===r&&Fn&&(1===Fn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Fn}}else B(t)?(t={default:t,_ctx:Fn},n=32):(t=String(t),64&r?(n=16,t=[Rs(t)]):n=8);e.children=t,e.shapeFlag|=n}function Fs(...e){const t={};for(let n=0;njs||Fn,Us=e=>{js=e,e.scope.on()},Hs=()=>{js&&js.scope.off(),js=null};function Ws(e){return 4&e.vnode.shapeFlag}let zs,Ks,Gs=!1;function qs(e,t=!1){Gs=t;const{props:n,children:r}=e.vnode,o=Ws(e);!function(e,t,n,r=!1){const o={},s={};ie(s,Ss,1),e.propsDefaults=Object.create(null),wo(e,t,o,s);for(const t in e.propsOptions[0])t in o||(o[t]=void 0);n?e.props=r?o:Nt(o):e.type.props?e.props=o:e.props=s,e.attrs=s}(e,n,o,t),$o(e,r);const s=o?function(e,t){const n=e.type;0;e.accessCache=Object.create(null),e.proxy=Lt(new Proxy(e.ctx,ao)),!1;const{setup:r}=n;if(r){const n=e.setupContext=r.length>1?Qs(e):null;Us(e),Ae();const o=cn(r,e,0,[e.props,n]);if(Ie(),Hs(),H(o)){if(o.then(Hs,Hs),t)return o.then((n=>{Js(e,n,t)})).catch((t=>{un(t,e,0)}));e.asyncDep=o}else Js(e,o,t)}else Xs(e,t)}(e,t):void 0;return Gs=!1,s}function Js(e,t,n){B(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:U(t)&&(e.setupState=Yt(t)),Xs(e,n)}function Ys(e){zs=e,Ks=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,fo))}}const Zs=()=>!zs;function Xs(e,t,n){const r=e.type;if(!e.render){if(!t&&zs&&!r.render){const t=r.template||vo(e).template;if(t){0;const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:i}=r,c=M(M({isCustomElement:n,delimiters:s},o),i);r.render=zs(t,c)}}e.render=r.render||E,Ks&&Ks(e)}Us(e),Ae(),ho(e),Ie(),Hs()}function Qs(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get(t,n){return Fe(e,0,"$attrs"),t[n]}})}(e))},slots:e.slots,emit:e.emit,expose:t}}function ei(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Yt(Lt(e.exposed)),{get(t,n){return n in t?t[n]:n in lo?lo[n](e):void 0},has(e,t){return t in e||t in lo}}))}function ti(e,t=!0){return B(e)?e.displayName||e.name:e.name||t&&e.__name}function ni(e){return B(e)&&"__vccOpts"in e}const ri=(e,t)=>function(e,t,n=!1){let r,o;const s=B(e);return s?(r=e,o=E):(r=e.get,o=e.set),new rn(r,o,s||!o,n)}(e,0,Gs);function oi(){return null}function si(){return null}function ii(e){0}function ci(e,t){return null}function li(){return ai().slots}function ui(){return ai().attrs}function ai(){const e=Ds();return e.setupContext||(e.setupContext=Qs(e))}function fi(e,t){const n=F(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const e in t){const r=n[e];r?F(r)||B(r)?n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(n[e]={default:t[e]})}return n}function pi(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function di(e){const t=Ds();let n=e();return Hs(),H(n)&&(n=n.catch((e=>{throw Us(t),e}))),[n,()=>Us(t)]}function hi(e,t,n){const r=arguments.length;return 2===r?U(t)&&!F(t)?ys(t)?ks(e,null,[t]):ks(e,t):ks(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&ys(n)&&(n=[n]),ks(e,t,n))}const mi=Symbol(""),gi=()=>{{const e=nr(mi);return e}};function vi(){return void 0}function yi(e,t,n,r){const o=n[r];if(o&&_i(o,e))return o;const s=t();return s.memo=e.slice(),n[r]=s}function _i(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&us&&us.push(e),!0}const bi="3.2.47",Si={createComponentInstance:Bs,setupComponent:qs,renderComponentRoot:Un,setCurrentRenderingInstance:Ln,isVNode:ys,normalizeVNode:Ps},xi=null,Ci=null,wi="undefined"!=typeof document?document:null,ki=wi&&wi.createElement("template"),Ei={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?wi.createElementNS("http://www.w3.org/2000/svg",e):wi.createElement(e,n?{is:n}:void 0);return"select"===e&&r&&null!=r.multiple&&o.setAttribute("multiple",r.multiple),o},createText:e=>wi.createTextNode(e),createComment:e=>wi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==s&&(o=o.nextSibling););else{ki.innerHTML=r?`${e}`:e;const o=ki.content;if(r){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const Ti=/\s*!important$/;function Ni(e,t,n){if(F(n))n.forEach((n=>Ni(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=Oi[t];if(n)return n;let r=Q(t);if("filter"!==r&&r in e)return Oi[t]=r;r=ne(r);for(let n=0;n{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();ln(function(e,t){if(F(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Li(),n}(r,o);Pi(e,n,i,c)}else i&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,i,c),s[t]=void 0)}}const Ii=/(?:Once|Passive|Capture)$/;let Fi=0;const $i=Promise.resolve(),Li=()=>Fi||($i.then((()=>Fi=0)),Fi=Date.now());const Vi=/^on[a-z]/;function Bi(e,t){const n=Sr(e);class r extends Ui{constructor(e){super(n,e,t)}}return r.def=n,r}const ji=e=>Bi(e,zc),Di="undefined"!=typeof HTMLElement?HTMLElement:class{};class Ui extends Di{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,_n((()=>{this._connected||(Wc(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let e=0;e{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:r}=e;let o;if(n&&!F(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=le(this._props[e])),(o||(o=Object.create(null)))[Q(e)]=!0)}this._numberProps=o,t&&this._resolveProps(e),this._applyStyles(r),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=F(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e],!0,!1);for(const e of n.map(Q))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t)}})}_setAttr(e){let t=this.getAttribute(e);const n=Q(e);this._numberProps&&this._numberProps[n]&&(t=le(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!0){t!==this._props[e]&&(this._props[e]=t,r&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(te(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(te(e),t+""):t||this.removeAttribute(te(e))))}_update(){Wc(this._createVNode(),this.shadowRoot)}_createVNode(){const e=ks(this._def,M({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),te(e)!==e&&t(te(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof Ui){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Hi(e="$style"){{const t=Ds();if(!t)return w;const n=t.type.__cssModules;if(!n)return w;const r=n[e];return r||w}}function Wi(e){const t=Ds();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>Ki(e,n)))},r=()=>{const r=e(t.proxy);zi(t.subTree,r),n(r)};or(r),Lr((()=>{const e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),Dr((()=>e.disconnect()))}))}function zi(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{zi(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Ki(e.el,t);else if(e.type===os)e.children.forEach((e=>zi(e,t)));else if(e.type===cs){let{el:n,anchor:r}=e;for(;n&&(Ki(n,t),n!==r);)n=n.nextSibling}}function Ki(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Gi="transition",qi="animation",Ji=(e,{slots:t})=>hi(hr,ec(e),t);Ji.displayName="Transition";const Yi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Zi=Ji.props=M({},hr.props,Yi),Xi=(e,t=[])=>{F(e)?e.forEach((e=>e(...t))):e&&e(...t)},Qi=e=>!!e&&(F(e)?e.some((e=>e.length>1)):e.length>1);function ec(e){const t={};for(const n in e)n in Yi||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:a=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(U(e))return[tc(e.enter),tc(e.leave)];{const t=tc(e);return[t,t]}}(o),m=h&&h[0],g=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:_,onLeave:b,onLeaveCancelled:S,onBeforeAppear:x=v,onAppear:C=y,onAppearCancelled:w=_}=t,k=(e,t,n)=>{rc(e,t?a:c),rc(e,t?u:i),n&&n()},E=(e,t)=>{e._isLeaving=!1,rc(e,f),rc(e,d),rc(e,p),t&&t()},T=e=>(t,n)=>{const o=e?C:y,i=()=>k(t,e,n);Xi(o,[t,i]),oc((()=>{rc(t,e?l:s),nc(t,e?a:c),Qi(o)||ic(t,r,m,i)}))};return M(t,{onBeforeEnter(e){Xi(v,[e]),nc(e,s),nc(e,i)},onBeforeAppear(e){Xi(x,[e]),nc(e,l),nc(e,u)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>E(e,t);nc(e,f),ac(),nc(e,p),oc((()=>{e._isLeaving&&(rc(e,f),nc(e,d),Qi(b)||ic(e,r,g,n))})),Xi(b,[e,n])},onEnterCancelled(e){k(e,!1),Xi(_,[e])},onAppearCancelled(e){k(e,!0),Xi(w,[e])},onLeaveCancelled(e){E(e),Xi(S,[e])}})}function tc(e){return le(e)}function nc(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function rc(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function oc(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let sc=0;function ic(e,t,n,r){const o=e._endId=++sc,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:c,propCount:l}=cc(e,t);if(!i)return r();const u=i+"end";let a=0;const f=()=>{e.removeEventListener(u,p),s()},p=t=>{t.target===e&&++a>=l&&f()};setTimeout((()=>{a(n[e]||"").split(", "),o=r(`${Gi}Delay`),s=r(`${Gi}Duration`),i=lc(o,s),c=r(`${qi}Delay`),l=r(`${qi}Duration`),u=lc(c,l);let a=null,f=0,p=0;t===Gi?i>0&&(a=Gi,f=i,p=s.length):t===qi?u>0&&(a=qi,f=u,p=l.length):(f=Math.max(i,u),a=f>0?i>u?Gi:qi:null,p=a?a===Gi?s.length:l.length:0);return{type:a,timeout:f,propCount:p,hasTransform:a===Gi&&/\b(transform|all)(,|$)/.test(r(`${Gi}Property`).toString())}}function lc(e,t){for(;e.lengthuc(t)+uc(e[n]))))}function uc(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function ac(){return document.body.offsetHeight}const fc=new WeakMap,pc=new WeakMap,dc={name:"TransitionGroup",props:M({},Zi,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ds(),r=pr();let o,s;return Br((()=>{if(!o.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&r.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&r.classList.add(e))),r.style.display="none";const o=1===t.nodeType?t:t.parentNode;o.appendChild(r);const{hasTransform:s}=cc(r);return o.removeChild(r),s}(o[0].el,n.vnode.el,t))return;o.forEach(mc),o.forEach(gc);const r=o.filter(vc);ac(),r.forEach((e=>{const n=e.el,r=n.style;nc(n,t),r.transform=r.webkitTransform=r.transitionDuration="";const o=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",o),n._moveCb=null,rc(n,t))};n.addEventListener("transitionend",o)}))})),()=>{const i=$t(e),c=ec(i);let l=i.tag||os;o=s,s=t.default?br(t.default()):[];for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return F(t)?e=>se(t,e):t};function _c(e){e.target.composing=!0}function bc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sc={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e._assign=yc(o);const s=r||o.props&&"number"===o.props.type;Pi(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),s&&(r=ce(r)),e._assign(r)})),n&&Pi(e,"change",(()=>{e.value=e.value.trim()})),t||(Pi(e,"compositionstart",_c),Pi(e,"compositionend",bc),Pi(e,"change",bc))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},s){if(e._assign=yc(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(r&&e.value.trim()===t)return;if((o||"number"===e.type)&&ce(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},xc={deep:!0,created(e,t,n){e._assign=yc(n),Pi(e,"change",(()=>{const t=e._modelValue,n=Tc(e),r=e.checked,o=e._assign;if(F(t)){const e=S(t,n),s=-1!==e;if(r&&!s)o(t.concat(n));else if(!r&&s){const n=[...t];n.splice(e,1),o(n)}}else if(L(t)){const e=new Set(t);r?e.add(n):e.delete(n),o(e)}else o(Nc(e,r))}))},mounted:Cc,beforeUpdate(e,t,n){e._assign=yc(n),Cc(e,t,n)}};function Cc(e,{value:t,oldValue:n},r){e._modelValue=t,F(t)?e.checked=S(t,r.props.value)>-1:L(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=b(t,Nc(e,!0)))}const wc={created(e,{value:t},n){e.checked=b(t,n.props.value),e._assign=yc(n),Pi(e,"change",(()=>{e._assign(Tc(e))}))},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=yc(r),t!==n&&(e.checked=b(t,r.props.value))}},kc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=L(t);Pi(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?ce(Tc(e)):Tc(e)));e._assign(e.multiple?o?new Set(t):t:t[0])})),e._assign=yc(r)},mounted(e,{value:t}){Ec(e,t)},beforeUpdate(e,t,n){e._assign=yc(n)},updated(e,{value:t}){Ec(e,t)}};function Ec(e,t){const n=e.multiple;if(!n||F(t)||L(t)){for(let r=0,o=e.options.length;r-1:o.selected=t.has(s);else if(b(Tc(o),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Tc(e){return"_value"in e?e._value:e.value}function Nc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Rc={created(e,t,n){Mc(e,t,n,null,"created")},mounted(e,t,n){Mc(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Mc(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Mc(e,t,n,r,"updated")}};function Oc(e,t){switch(e){case"SELECT":return kc;case"TEXTAREA":return Sc;default:switch(t){case"checkbox":return xc;case"radio":return wc;default:return Sc}}}function Mc(e,t,n,r,o){const s=Oc(e.tagName,n.props&&n.props.type)[o];s&&s(e,t,n,r)}const Pc=["ctrl","shift","alt","meta"],Ac={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Pc.some((n=>e[`${n}Key`]&&!t.includes(n)))},Ic=(e,t)=>(n,...r)=>{for(let e=0;en=>{if(!("key"in n))return;const r=te(n.key);return t.some((e=>e===r||Fc[e]===r))?e(n):void 0},Lc={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Vc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Vc(e,!0),r.enter(e)):r.leave(e,(()=>{Vc(e,!1)})):Vc(e,t))},beforeUnmount(e,{value:t}){Vc(e,t)}};function Vc(e,t){e.style.display=t?e._vod:"none"}const Bc=M({patchProp:(e,t,n,r,o=!1,s,i,c,l)=>{"class"===t?function(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,o):"style"===t?function(e,t,n){const r=e.style,o=j(n);if(n&&!o){if(t&&!j(t))for(const e in t)null==n[e]&&Ni(r,e,"");for(const e in n)Ni(r,e,n[e])}else{const s=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}(e,n,r):R(t)?O(t)||Ai(e,t,0,r,i):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&Vi.test(t)&&B(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Vi.test(t)&&j(n))return!1;return t in e}(e,t,r,o))?function(e,t,n,r,o,s,i){if("innerHTML"===t||"textContent"===t)return r&&i(r,o,s),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const r=null==n?"":n;return e.value===r&&"OPTION"!==e.tagName||(e.value=r),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=_(n):null==n&&"string"===r?(n="",c=!0):"number"===r&&(n=0,c=!0)}try{e[t]=n}catch(e){}c&&e.removeAttribute(t)}(e,t,r,s,i,c,l):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r,o){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(Mi,t.slice(6,t.length)):e.setAttributeNS(Mi,t,n);else{const r=y(t);null==n||r&&!_(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,o))}},Ei);let jc,Dc=!1;function Uc(){return jc||(jc=Go(Bc))}function Hc(){return jc=Dc?jc:qo(Bc),Dc=!0,jc}const Wc=(...e)=>{Uc().render(...e)},zc=(...e)=>{Hc().hydrate(...e)},Kc=(...e)=>{const t=Uc().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=qc(e);if(!r)return;const o=t._component;B(o)||o.render||o.template||(o.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t},Gc=(...e)=>{const t=Hc().createApp(...e);const{mount:n}=t;return t.mount=e=>{const t=qc(e);if(t)return n(t,!0,t instanceof SVGElement)},t};function qc(e){if(j(e)){return document.querySelector(e)}return e}let Jc=!1;const Yc=()=>{Jc||(Jc=!0,Sc.getSSRProps=({value:e})=>({value:e}),wc.getSSRProps=({value:e},t)=>{if(t.props&&b(t.props.value,e))return{checked:!0}},xc.getSSRProps=({value:e},t)=>{if(F(e)){if(t.props&&S(e,t.props.value)>-1)return{checked:!0}}else if(L(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Rc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Oc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Lc.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};function Zc(e){throw e}function Xc(e){}function Qc(e,t,n,r){const o=new SyntaxError(String(e));return o.code=e,o.loc=t,o}const el=Symbol(""),tl=Symbol(""),nl=Symbol(""),rl=Symbol(""),ol=Symbol(""),sl=Symbol(""),il=Symbol(""),cl=Symbol(""),ll=Symbol(""),ul=Symbol(""),al=Symbol(""),fl=Symbol(""),pl=Symbol(""),dl=Symbol(""),hl=Symbol(""),ml=Symbol(""),gl=Symbol(""),vl=Symbol(""),yl=Symbol(""),_l=Symbol(""),bl=Symbol(""),Sl=Symbol(""),xl=Symbol(""),Cl=Symbol(""),wl=Symbol(""),kl=Symbol(""),El=Symbol(""),Tl=Symbol(""),Nl=Symbol(""),Rl=Symbol(""),Ol=Symbol(""),Ml=Symbol(""),Pl=Symbol(""),Al=Symbol(""),Il=Symbol(""),Fl=Symbol(""),$l=Symbol(""),Ll=Symbol(""),Vl=Symbol(""),Bl={[el]:"Fragment",[tl]:"Teleport",[nl]:"Suspense",[rl]:"KeepAlive",[ol]:"BaseTransition",[sl]:"openBlock",[il]:"createBlock",[cl]:"createElementBlock",[ll]:"createVNode",[ul]:"createElementVNode",[al]:"createCommentVNode",[fl]:"createTextVNode",[pl]:"createStaticVNode",[dl]:"resolveComponent",[hl]:"resolveDynamicComponent",[ml]:"resolveDirective",[gl]:"resolveFilter",[vl]:"withDirectives",[yl]:"renderList",[_l]:"renderSlot",[bl]:"createSlots",[Sl]:"toDisplayString",[xl]:"mergeProps",[Cl]:"normalizeClass",[wl]:"normalizeStyle",[kl]:"normalizeProps",[El]:"guardReactiveProps",[Tl]:"toHandlers",[Nl]:"camelize",[Rl]:"capitalize",[Ol]:"toHandlerKey",[Ml]:"setBlockTracking",[Pl]:"pushScopeId",[Al]:"popScopeId",[Il]:"withCtx",[Fl]:"unref",[$l]:"isRef",[Ll]:"withMemo",[Vl]:"isMemoSame"};const jl={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function Dl(e,t,n,r,o,s,i,c=!1,l=!1,u=!1,a=jl){return e&&(c?(e.helper(sl),e.helper(gu(e.inSSR,u))):e.helper(mu(e.inSSR,u)),i&&e.helper(vl)),{type:13,tag:t,props:n,children:r,patchFlag:o,dynamicProps:s,directives:i,isBlock:c,disableTracking:l,isComponent:u,loc:a}}function Ul(e,t=jl){return{type:17,loc:t,elements:e}}function Hl(e,t=jl){return{type:15,loc:t,properties:e}}function Wl(e,t){return{type:16,loc:jl,key:j(e)?zl(e,!0):e,value:t}}function zl(e,t=!1,n=jl,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function Kl(e,t=jl){return{type:8,loc:t,children:e}}function Gl(e,t=[],n=jl){return{type:14,loc:n,callee:e,arguments:t}}function ql(e,t=void 0,n=!1,r=!1,o=jl){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:o}}function Jl(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:jl}}const Yl=e=>4===e.type&&e.isStatic,Zl=(e,t)=>e===t||e===te(t);function Xl(e){return Zl(e,"Teleport")?tl:Zl(e,"Suspense")?nl:Zl(e,"KeepAlive")?rl:Zl(e,"BaseTransition")?ol:void 0}const Ql=/^\d|[^\$\w]/,eu=e=>!Ql.test(e),tu=/[A-Za-z_$\xA0-\uFFFF]/,nu=/[\.\?\w$\xA0-\uFFFF]/,ru=/\s+[.[]\s*|\s*[.[]\s+/g,ou=e=>{e=e.trim().replace(ru,(e=>e.trim()));let t=0,n=[],r=0,o=0,s=null;for(let i=0;i4===e.key.type&&e.key.content===r))}return n}function Su(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function xu(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(mu(r,e.isComponent)),t(sl),t(gu(r,e.isComponent)))}function Cu(e,t){const n=t.options?t.options.compatConfig:t.compatConfig,r=n&&n[e];return"MODE"===e?r||3:r}function wu(e,t){const n=Cu("MODE",t),r=Cu(e,t);return 3===n?!0===r:!1!==r}function ku(e,t,n,...r){return wu(e,t)}const Eu=/&(gt|lt|amp|apos|quot);/g,Tu={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},Nu={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:T,isPreTag:T,isCustomElement:T,decodeEntities:e=>e.replace(Eu,((e,t)=>Tu[t])),onError:Zc,onWarn:Xc,comments:!1};function Ru(e,t={}){const n=function(e,t){const n=M({},Nu);let r;for(r in t)n[r]=void 0===t[r]?Nu[r]:t[r];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),r=Hu(n);return function(e,t=jl){return{type:0,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}(Ou(n,0,[]),Wu(n,r))}function Ou(e,t,n){const r=zu(n),o=r?r.ns:0,s=[];for(;!Zu(e,t,n);){const i=e.source;let c;if(0===t||1===t)if(!e.inVPre&&Ku(i,e.options.delimiters[0]))c=ju(e,t);else if(0===t&&"<"===i[0])if(1===i.length)Yu(e,5,1);else if("!"===i[1])Ku(i,"\x3c!--")?c=Au(e):Ku(i,""===i[2]){Yu(e,14,2),Gu(e,3);continue}if(/[a-z]/i.test(i[2])){Yu(e,23),Lu(e,1,r);continue}Yu(e,12,2),c=Iu(e)}else/[a-z]/i.test(i[1])?(c=Fu(e,n),wu("COMPILER_NATIVE_TEMPLATE",e)&&c&&"template"===c.tag&&!c.props.some((e=>7===e.type&&$u(e.name)))&&(c=c.children)):"?"===i[1]?(Yu(e,21,1),c=Iu(e)):Yu(e,12,1);if(c||(c=Du(e,t)),F(c))for(let e=0;e/.exec(e.source);if(r){r.index<=3&&Yu(e,0),r[1]&&Yu(e,10),n=e.source.slice(4,r.index);const t=e.source.slice(0,r.index);let o=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",o));)Gu(e,s-o+1),s+4");return-1===o?(r=e.source.slice(n),Gu(e,e.source.length)):(r=e.source.slice(n,o),Gu(e,o+1)),{type:3,content:r,loc:Wu(e,t)}}function Fu(e,t){const n=e.inPre,r=e.inVPre,o=zu(t),s=Lu(e,0,o),i=e.inPre&&!n,c=e.inVPre&&!r;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),c&&(e.inVPre=!1),s;t.push(s);const l=e.options.getTextMode(s,o),u=Ou(e,l,t);t.pop();{const t=s.props.find((e=>6===e.type&&"inline-template"===e.name));if(t&&ku("COMPILER_INLINE_TEMPLATE",e,t.loc)){const n=Wu(e,s.loc.end);t.value={type:2,content:n.source,loc:n}}}if(s.children=u,Xu(e.source,s.tag))Lu(e,1,o);else if(Yu(e,24,0,s.loc.start),0===e.source.length&&"script"===s.tag.toLowerCase()){const t=u[0];t&&Ku(t.loc.source,"\x3c!--")&&Yu(e,8)}return s.loc=Wu(e,s.loc.start),i&&(e.inPre=!1),c&&(e.inVPre=!1),s}const $u=o("if,else,else-if,for,slot");function Lu(e,t,n){const r=Hu(e),o=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=o[1],i=e.options.getNamespace(s,n);Gu(e,o[0].length),qu(e);const c=Hu(e),l=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let u=Vu(e,t);0===t&&!e.inVPre&&u.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,M(e,c),e.source=l,u=Vu(e,t).filter((e=>"v-pre"!==e.name)));let a=!1;if(0===e.source.length?Yu(e,9):(a=Ku(e.source,"/>"),1===t&&a&&Yu(e,4),Gu(e,a?2:1)),1===t)return;let f=0;return e.inVPre||("slot"===s?f=2:"template"===s?u.some((e=>7===e.type&&$u(e.name)))&&(f=3):function(e,t,n){const r=n.options;if(r.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||Xl(e)||r.isBuiltInComponent&&r.isBuiltInComponent(e)||r.isNativeTag&&!r.isNativeTag(e))return!0;for(let e=0;e0&&!Ku(e.source,">")&&!Ku(e.source,"/>");){if(Ku(e.source,"/")){Yu(e,22),Gu(e,1),qu(e);continue}1===t&&Yu(e,3);const o=Bu(e,r);6===o.type&&o.value&&"class"===o.name&&(o.value.content=o.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(o),/^[^\t\r\n\f />]/.test(e.source)&&Yu(e,15),qu(e)}return n}function Bu(e,t){const n=Hu(e),r=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(r)&&Yu(e,2),t.add(r),"="===r[0]&&Yu(e,19);{const t=/["'<]/g;let n;for(;n=t.exec(r);)Yu(e,17,n.index)}let o;Gu(e,r.length),/^[\t\r\n\f ]*=/.test(e.source)&&(qu(e),Gu(e,1),qu(e),o=function(e){const t=Hu(e);let n;const r=e.source[0],o='"'===r||"'"===r;if(o){Gu(e,1);const t=e.source.indexOf(r);-1===t?n=Uu(e,e.source.length,4):(n=Uu(e,t,4),Gu(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const r=/["'<=`]/g;let o;for(;o=r.exec(t[0]);)Yu(e,18,o.index);n=Uu(e,t[0].length,4)}return{content:n,isQuoted:o,loc:Wu(e,t)}}(e),o||Yu(e,13));const s=Wu(e,n);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(r)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(r);let i,c=Ku(r,"."),l=t[1]||(c||Ku(r,":")?"bind":Ku(r,"@")?"on":"slot");if(t[2]){const o="slot"===l,s=r.lastIndexOf(t[2]),c=Wu(e,Ju(e,n,s),Ju(e,n,s+t[2].length+(o&&t[3]||"").length));let u=t[2],a=!0;u.startsWith("[")?(a=!1,u.endsWith("]")?u=u.slice(1,u.length-1):(Yu(e,27),u=u.slice(1))):o&&(u+=t[3]||""),i={type:4,content:u,isStatic:a,constType:a?3:0,loc:c}}if(o&&o.isQuoted){const e=o.loc;e.start.offset++,e.start.column++,e.end=iu(e.start,o.content),e.source=e.source.slice(1,-1)}const u=t[3]?t[3].slice(1).split("."):[];return c&&u.push("prop"),"bind"===l&&i&&u.includes("sync")&&ku("COMPILER_V_BIND_SYNC",e,0,i.loc.source)&&(l="model",u.splice(u.indexOf("sync"),1)),{type:7,name:l,exp:o&&{type:4,content:o.content,isStatic:!1,constType:0,loc:o.loc},arg:i,modifiers:u,loc:s}}return!e.inVPre&&Ku(r,"v-")&&Yu(e,26),{type:6,name:r,value:o&&{type:2,content:o.content,loc:o.loc},loc:s}}function ju(e,t){const[n,r]=e.options.delimiters,o=e.source.indexOf(r,n.length);if(-1===o)return void Yu(e,25);const s=Hu(e);Gu(e,n.length);const i=Hu(e),c=Hu(e),l=o-n.length,u=e.source.slice(0,l),a=Uu(e,l,t),f=a.trim(),p=a.indexOf(f);p>0&&cu(i,u,p);return cu(c,u,l-(a.length-f.length-p)),Gu(e,r.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:f,loc:Wu(e,i,c)},loc:Wu(e,s)}}function Du(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let r=e.source.length;for(let t=0;to&&(r=o)}const o=Hu(e);return{type:2,content:Uu(e,r,t),loc:Wu(e,o)}}function Uu(e,t,n){const r=e.source.slice(0,t);return Gu(e,t),2!==n&&3!==n&&r.includes("&")?e.options.decodeEntities(r,4===n):r}function Hu(e){const{column:t,line:n,offset:r}=e;return{column:t,line:n,offset:r}}function Wu(e,t,n){return{start:t,end:n=n||Hu(e),source:e.originalSource.slice(t.offset,n.offset)}}function zu(e){return e[e.length-1]}function Ku(e,t){return e.startsWith(t)}function Gu(e,t){const{source:n}=e;cu(e,n,t),e.source=n.slice(t)}function qu(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&Gu(e,t[0].length)}function Ju(e,t,n){return iu(t,e.originalSource.slice(t.offset,n),n)}function Yu(e,t,n,r=Hu(e)){n&&(r.offset+=n,r.column+=n),e.options.onError(Qc(t,{start:r,end:r,source:""}))}function Zu(e,t,n){const r=e.source;switch(t){case 0:if(Ku(r,"=0;--e)if(Xu(r,n[e].tag))return!0;break;case 1:case 2:{const e=zu(n);if(e&&Xu(r,e.tag))return!0;break}case 3:if(Ku(r,"]]>"))return!0}return!r}function Xu(e,t){return Ku(e,"]/.test(e[2+t.length]||">")}function Qu(e,t){ta(e,t,ea(e,e.children[0]))}function ea(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!hu(t)}function ta(e,t,n=!1){const{children:r}=e,o=r.length;let s=0;for(let e=0;e0){if(e>=2){o.codegenNode.patchFlag="-1",o.codegenNode=t.hoist(o.codegenNode),s++;continue}}else{const e=o.codegenNode;if(13===e.type){const n=ca(e);if((!n||512===n||1===n)&&sa(o,t)>=2){const n=ia(o);n&&(e.props=t.hoist(n))}e.dynamicProps&&(e.dynamicProps=t.hoist(e.dynamicProps))}}}if(1===o.type){const e=1===o.tagType;e&&t.scopes.vSlot++,ta(o,t),e&&t.scopes.vSlot--}else if(11===o.type)ta(o,t,1===o.children.length);else if(9===o.type)for(let e=0;e1)for(let o=0;on&&(C.childIndex--,C.onNodeRemoved()):(C.currentNode=null,C.onNodeRemoved()),C.parent.children.splice(n,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){j(e)&&(e=zl(e)),C.hoists.push(e);const t=zl(`_hoisted_${C.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){return function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:jl}}(C.cached++,e,t)}};return C.filters=new Set,C}function ua(e,t){const n=la(e,t);aa(e,n),t.hoistStatic&&Qu(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:r}=e;if(1===r.length){const n=r[0];if(ea(e,n)&&n.codegenNode){const r=n.codegenNode;13===r.type&&xu(r,t),e.codegenNode=r}else e.codegenNode=n}else if(r.length>1){let r=64;s[64];0,e.codegenNode=Dl(t,n(el),void 0,e.children,r+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.filters=[...n.filters]}function aa(e,t){t.currentNode=e;const{nodeTransforms:n}=t,r=[];for(let o=0;o{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(1===e.type){const{props:o}=e;if(3===e.tagType&&o.some(pu))return;const s=[];for(let i=0;i`${Bl[e]}: _${Bl[e]}`;function ha(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:o="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:c="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:a=!1,isTS:f=!1,inSSR:p=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:r,filename:o,scopeId:s,optimizeImports:i,runtimeGlobalName:c,runtimeModuleName:l,ssrRuntimeModuleName:u,ssr:a,isTS:f,inSSR:p,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(e){return`_${Bl[e]}`},push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}function ma(e,t={}){const n=ha(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:r,push:o,prefixIdentifiers:s,indent:i,deindent:c,newline:l,scopeId:u,ssr:a}=n,f=Array.from(e.helpers),p=f.length>0,d=!s&&"module"!==r,h=n;!function(e,t){const{ssr:n,prefixIdentifiers:r,push:o,newline:s,runtimeModuleName:i,runtimeGlobalName:c,ssrRuntimeModuleName:l}=t,u=c,a=Array.from(e.helpers);if(a.length>0&&(o(`const _Vue = ${u}\n`),e.hoists.length)){o(`const { ${[ll,ul,al,fl,pl].filter((e=>a.includes(e))).map(da).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:r,helper:o,scopeId:s,mode:i}=t;r();for(let o=0;o0)&&l()),e.directives.length&&(ga(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),ga(e.filters,"filter",n),l()),e.temps>0){o("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(o("\n"),l()),a||o("return "),e.codegenNode?_a(e.codegenNode,n):o("null"),d&&(c(),o("}")),c(),o("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function ga(e,t,{helper:n,push:r,newline:o,isTS:s}){const i=n("filter"===t?gl:"component"===t?dl:ml);for(let n=0;n3||!1;t.push("["),n&&t.indent(),ya(e,t,n),n&&t.deindent(),t.push("]")}function ya(e,t,n=!1,r=!0){const{push:o,newline:s}=t;for(let i=0;ie||"null"))}([s,i,c,l,u]),t),n(")"),f&&n(")");a&&(n(", "),_a(a,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:r,pure:o}=t,s=j(e.callee)?e.callee:r(e.callee);o&&n(pa);n(s+"(",e),ya(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:r,deindent:o,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const c=i.length>1||!1;n(c?"{":"{ "),c&&r();for(let e=0;e "),(l||c)&&(n("{"),r());i?(l&&n("return "),F(i)?va(i,t):_a(i,t)):c&&_a(c,t);(l||c)&&(o(),n("}"));u&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:r,alternate:o,newline:s}=e,{push:i,indent:c,deindent:l,newline:u}=t;if(4===n.type){const e=!eu(n.content);e&&i("("),ba(n,t),e&&i(")")}else i("("),_a(n,t),i(")");s&&c(),t.indentLevel++,s||i(" "),i("? "),_a(r,t),t.indentLevel--,s&&u(),s||i(" "),i(": ");const a=19===o.type;a||t.indentLevel++;_a(o,t),a||t.indentLevel--;s&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:r,indent:o,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(o(),n(`${r(Ml)}(-1),`),i());n(`_cache[${e.index}] = `),_a(e.value,t),e.isVNode&&(n(","),i(),n(`${r(Ml)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:ya(e.body,t,!0,!1)}}function ba(e,t){const{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,e)}function Sa(e,t){for(let n=0;nfunction(e,t,n,r){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const r=t.exp?t.exp.loc:e.loc;n.onError(Qc(28,t.loc)),t.exp=zl("true",!1,r)}0;if("if"===t.name){const o=wa(e,t),s={type:9,loc:e.loc,branches:[o]};if(n.replaceNode(s),r)return r(s,o,!0)}else{const o=n.parent.children;let s=o.indexOf(e);for(;s-- >=-1;){const i=o[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(Qc(30,e.loc)),n.removeNode();const o=wa(e,t);0,i.branches.push(o);const s=r&&r(i,o,!1);aa(o,n),s&&s(),n.currentNode=null}else n.onError(Qc(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,r)=>{const o=n.parent.children;let s=o.indexOf(e),i=0;for(;s-- >=0;){const e=o[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(r)e.codegenNode=ka(t,i,n);else{const r=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);r.alternate=ka(t,i+e.branches.length-1,n)}}}))));function wa(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!lu(e,"for")?e.children:[e],userKey:uu(e,"key"),isTemplateIf:n}}function ka(e,t,n){return e.condition?Jl(e.condition,Ea(e,t,n),Gl(n.helper(al),['""',"true"])):Ea(e,t,n)}function Ea(e,t,n){const{helper:r}=n,o=Wl("key",zl(`${t}`,!1,jl,2)),{children:i}=e,c=i[0];if(1!==i.length||1!==c.type){if(1===i.length&&11===c.type){const e=c.codegenNode;return _u(e,o,n),e}{let t=64;s[64];return Dl(n,r(el),Hl([o]),i,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=c.codegenNode,t=14===(l=e).type&&l.callee===Ll?l.arguments[1].returns:l;return 13===t.type&&xu(t,n),_u(t,o,n),e}var l}const Ta=fa("for",((e,t,n)=>{const{helper:r,removeHelper:o}=n;return function(e,t,n,r){if(!t.exp)return void n.onError(Qc(31,t.loc));const o=Ma(t.exp,n);if(!o)return void n.onError(Qc(32,t.loc));const{addIdentifiers:s,removeIdentifiers:i,scopes:c}=n,{source:l,value:u,key:a,index:f}=o,p={type:11,loc:t.loc,source:l,valueAlias:u,keyAlias:a,objectIndexAlias:f,parseResult:o,children:du(e)?e.children:[e]};n.replaceNode(p),c.vFor++;const d=r&&r(p);return()=>{c.vFor--,d&&d()}}(e,t,n,(t=>{const s=Gl(r(yl),[t.source]),i=du(e),c=lu(e,"memo"),l=uu(e,"key"),u=l&&(6===l.type?zl(l.value.content,!0):l.exp),a=l?Wl("key",u):null,f=4===t.source.type&&t.source.constType>0,p=f?64:l?128:256;return t.codegenNode=Dl(n,r(el),void 0,s,p+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let l;const{children:p}=t;const d=1!==p.length||1!==p[0].type,h=hu(e)?e:i&&1===e.children.length&&hu(e.children[0])?e.children[0]:null;if(h?(l=h.codegenNode,i&&a&&_u(l,a,n)):d?l=Dl(n,r(el),a?Hl([a]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(l=p[0].codegenNode,i&&a&&_u(l,a,n),l.isBlock!==!f&&(l.isBlock?(o(sl),o(gu(n.inSSR,l.isComponent))):o(mu(n.inSSR,l.isComponent))),l.isBlock=!f,l.isBlock?(r(sl),r(gu(n.inSSR,l.isComponent))):r(mu(n.inSSR,l.isComponent))),c){const e=ql(Aa(t.parseResult,[zl("_cached")]));e.body={type:21,body:[Kl(["const _memo = (",c.exp,")"]),Kl(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(Vl)}(_cached, _memo)) return _cached`]),Kl(["const _item = ",l]),zl("_item.memo = _memo"),zl("return _item")],loc:jl},s.arguments.push(e,zl("_cache"),zl(String(n.cached++)))}else s.arguments.push(ql(Aa(t.parseResult),l,!0))}}))}));const Na=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Ra=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Oa=/^\(|\)$/g;function Ma(e,t){const n=e.loc,r=e.content,o=r.match(Na);if(!o)return;const[,s,i]=o,c={source:Pa(n,i.trim(),r.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let l=s.trim().replace(Oa,"").trim();const u=s.indexOf(l),a=l.match(Ra);if(a){l=l.replace(Ra,"").trim();const e=a[1].trim();let t;if(e&&(t=r.indexOf(e,u+l.length),c.key=Pa(n,e,t)),a[2]){const o=a[2].trim();o&&(c.index=Pa(n,o,r.indexOf(o,c.key?t+e.length:u+l.length)))}}return l&&(c.value=Pa(n,l,u)),c}function Pa(e,t,n){return zl(t,!1,su(e,n,t.length))}function Aa({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||zl("_".repeat(t+1),!1)))}([e,t,n,...r])}const Ia=zl("undefined",!1),Fa=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=lu(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},$a=(e,t,n)=>ql(e,t,!1,!0,t.length?t[0].loc:n);function La(e,t,n=$a){t.helper(Il);const{children:r,loc:o}=e,s=[],i=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const l=lu(e,"slot",!0);if(l){const{arg:e,exp:t}=l;e&&!Yl(e)&&(c=!0),s.push(Wl(e||zl("default",!0),n(t,r,o)))}let u=!1,a=!1;const f=[],p=new Set;let d=0;for(let e=0;e{const s=n(e,r,o);return t.compatConfig&&(s.isNonScopedSlot=!0),Wl("default",s)};u?f.length&&f.some((e=>ja(e)))&&(a?t.onError(Qc(39,f[0].loc)):s.push(e(void 0,f))):s.push(e(void 0,r))}const h=c?2:Ba(e.children)?3:1;let m=Hl(s.concat(Wl("_",zl(h+"",!1))),o);return i.length&&(m=Gl(t.helper(bl),[m,Ul(i)])),{slots:m,hasDynamicSlots:c}}function Va(e,t,n){const r=[Wl("name",e),Wl("fn",t)];return null!=n&&r.push(Wl("key",zl(String(n),!0))),Hl(r)}function Ba(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:r}=e,o=1===e.tagType;let s=o?function(e,t,n=!1){let{tag:r}=e;const o=Ka(r),s=uu(e,"is");if(s)if(o||wu("COMPILER_IS_ON_ELEMENT",t)){const e=6===s.type?s.value&&zl(s.value.content,!0):s.exp;if(e)return Gl(t.helper(hl),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(r=s.value.content.slice(4));const i=!o&&lu(e,"is");if(i&&i.exp)return Gl(t.helper(hl),[i.exp]);const c=Xl(r)||t.isBuiltInComponent(r);if(c)return n||t.helper(c),c;return t.helper(dl),t.components.add(r),Su(r,"component")}(e,t):`"${n}"`;const i=U(s)&&s.callee===hl;let c,l,u,a,f,p,d=0,h=i||s===tl||s===nl||!o&&("svg"===n||"foreignObject"===n);if(r.length>0){const n=Ha(e,t,void 0,o,i);c=n.props,d=n.patchFlag,f=n.dynamicPropNames;const r=n.directives;p=r&&r.length?Ul(r.map((e=>function(e,t){const n=[],r=Da.get(e);r?n.push(t.helperString(r)):(t.helper(ml),t.directives.add(e.name),n.push(Su(e.name,"directive")));const{loc:o}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=zl("true",!1,o);n.push(Hl(e.modifiers.map((e=>Wl(e,t))),o))}return Ul(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===rl&&(h=!0,d|=1024);if(o&&s!==tl&&s!==rl){const{slots:n,hasDynamicSlots:r}=La(e,t);l=n,r&&(d|=1024)}else if(1===e.children.length&&s!==tl){const n=e.children[0],r=n.type,o=5===r||8===r;o&&0===na(n,t)&&(d|=1),l=o||2===r?n:e.children}else l=e.children}0!==d&&(u=String(d),f&&f.length&&(a=function(e){let t="[";for(let n=0,r=e.length;n0;let d=!1,h=0,m=!1,g=!1,v=!1,y=!1,_=!1,b=!1;const S=[],x=e=>{u.length&&(a.push(Hl(Wa(u),c)),u=[]),e&&a.push(e)},C=({key:e,value:n})=>{if(Yl(e)){const s=e.content,i=R(s);if(!i||r&&!o||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||J(s)||(y=!0),i&&J(s)&&(b=!0),20===n.type||(4===n.type||8===n.type)&&na(n,t)>0)return;"ref"===s?m=!0:"class"===s?g=!0:"style"===s?v=!0:"key"===s||S.includes(s)||S.push(s),!r||"class"!==s&&"style"!==s||S.includes(s)||S.push(s)}else _=!0};for(let o=0;o0&&u.push(Wl(zl("ref_for",!0),zl("true")))),"is"===n&&(Ka(i)||r&&r.content.startsWith("vue:")||wu("COMPILER_IS_ON_ELEMENT",t)))continue;u.push(Wl(zl(n,!0,su(e,0,n.length)),zl(r?r.content:"",o,r?r.loc:e)))}else{const{name:n,arg:o,exp:h,loc:m}=l,g="bind"===n,v="on"===n;if("slot"===n){r||t.onError(Qc(40,m));continue}if("once"===n||"memo"===n)continue;if("is"===n||g&&au(o,"is")&&(Ka(i)||wu("COMPILER_IS_ON_ELEMENT",t)))continue;if(v&&s)continue;if((g&&au(o,"key")||v&&p&&au(o,"vue:before-update"))&&(d=!0),g&&au(o,"ref")&&t.scopes.vFor>0&&u.push(Wl(zl("ref_for",!0),zl("true"))),!o&&(g||v)){if(_=!0,h)if(g){if(x(),wu("COMPILER_V_BIND_OBJECT_ORDER",t)){a.unshift(h);continue}a.push(h)}else x({type:14,loc:m,callee:t.helper(Tl),arguments:r?[h]:[h,"true"]});else t.onError(Qc(g?34:35,m));continue}const y=t.directiveTransforms[n];if(y){const{props:n,needRuntime:r}=y(l,e,t);!s&&n.forEach(C),v&&o&&!Yl(o)?x(Hl(n,c)):u.push(...n),r&&(f.push(l),D(r)&&Da.set(l,r))}else Y(n)||(f.push(l),p&&(d=!0))}}let w;if(a.length?(x(),w=a.length>1?Gl(t.helper(xl),a,c):a[0]):u.length&&(w=Hl(Wa(u),c)),_?h|=16:(g&&!r&&(h|=2),v&&!r&&(h|=4),S.length&&(h|=8),y&&(h|=32)),d||0!==h&&32!==h||!(m||b||f.length>0)||(h|=512),!t.inSSR&&w)switch(w.type){case 15:let e=-1,n=-1,r=!1;for(let t=0;t{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))})((e=>e.replace(Ga,((e,t)=>t?t.toUpperCase():"")))),Ja=(e,t)=>{if(hu(e)){const{children:n,loc:r}=e,{slotName:o,slotProps:s}=function(e,t){let n,r='"default"';const o=[];for(let t=0;t0){const{props:r,directives:s}=Ha(e,t,o,!1,!1);n=r,s.length&&t.onError(Qc(36,s[0].loc))}return{slotName:r,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",o,"{}","undefined","true"];let c=2;s&&(i[2]=s,c=3),n.length&&(i[3]=ql([],n,!1,!1,r),c=4),t.scopeId&&!t.slotted&&(c=5),i.splice(c),e.codegenNode=Gl(t.helper(_l),i,r)}};const Ya=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Za=(e,t,n,r)=>{const{loc:o,modifiers:s,arg:i}=e;let c;if(e.exp||s.length||n.onError(Qc(35,o)),4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);c=zl(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?re(Q(e)):`on:${e}`,!0,i.loc)}else c=Kl([`${n.helperString(Ol)}(`,i,")"]);else c=i,c.children.unshift(`${n.helperString(Ol)}(`),c.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let u=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const e=ou(l.content),t=!(e||Ya.test(l.content)),n=l.content.includes(";");0,(t||u&&e)&&(l=Kl([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let a={props:[Wl(c,l||zl("() => {}",!1,o))]};return r&&(a=r(a)),u&&(a.props[0].value=n.cache(a.props[0].value)),a.props.forEach((e=>e.key.isHandlerKey=!0)),a},Xa=(e,t,n)=>{const{exp:r,modifiers:o,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),o.includes("camel")&&(4===i.type?i.isStatic?i.content=Q(i.content):i.content=`${n.helperString(Nl)}(${i.content})`:(i.children.unshift(`${n.helperString(Nl)}(`),i.children.push(")"))),n.inSSR||(o.includes("prop")&&Qa(i,"."),o.includes("attr")&&Qa(i,"^")),!r||4===r.type&&!r.content.trim()?(n.onError(Qc(34,s)),{props:[Wl(i,zl("",!0,s))]}):{props:[Wl(i,r)]}},Qa=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},ef=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let r,o=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e{if(1===e.type&&lu(e,"once",!0)){if(tf.has(e)||t.inVOnce)return;return tf.add(e),t.inVOnce=!0,t.helper(Ml),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},rf=(e,t,n)=>{const{exp:r,arg:o}=e;if(!r)return n.onError(Qc(41,e.loc)),of();const s=r.loc.source,i=4===r.type?r.content:s,c=n.bindingMetadata[s];if("props"===c||"props-aliased"===c)return n.onError(Qc(44,r.loc)),of();if(!i.trim()||!ou(i))return n.onError(Qc(42,r.loc)),of();const l=o||zl("modelValue",!0),u=o?Yl(o)?`onUpdate:${Q(o.content)}`:Kl(['"onUpdate:" + ',o]):"onUpdate:modelValue";let a;a=Kl([`${n.isTS?"($event: any)":"$event"} => ((`,r,") = $event)"]);const f=[Wl(l,e.exp),Wl(u,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(eu(e)?e:JSON.stringify(e))+": true")).join(", "),n=o?Yl(o)?`${o.content}Modifiers`:Kl([o,' + "Modifiers"']):"modelModifiers";f.push(Wl(n,zl(`{ ${t} }`,!1,e.loc,2)))}return of(f)};function of(e=[]){return{props:e}}const sf=/[\w).+\-_$\]]/,cf=(e,t)=>{wu("COMPILER_FILTER",t)&&(5===e.type&&lf(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&lf(e.exp,t)})))};function lf(e,t){if(4===e.type)uf(e,t);else for(let n=0;n=0&&(e=n.charAt(t)," "===e);t--);e&&sf.test(e)||(a=!0)}}else void 0===i?(h=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(h,s).trim()),h=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==h&&g(),m.length){for(s=0;s{if(1===e.type){const n=lu(e,"memo");if(!n||ff.has(e))return;return ff.add(e),()=>{const r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&xu(r,t),e.codegenNode=Gl(t.helper(Ll),[n.exp,ql(void 0,r),"_cache",String(t.cached++)]))}}};function df(e,t={}){const n=t.onError||Zc,r="module"===t.mode;!0===t.prefixIdentifiers?n(Qc(47)):r&&n(Qc(48));t.cacheHandlers&&n(Qc(49)),t.scopeId&&!r&&n(Qc(50));const o=j(e)?Ru(e,t):e,[s,i]=[[nf,Ca,pf,Ta,cf,Ja,Ua,Fa,ef],{on:Za,bind:Xa,model:rf}];return ua(o,M({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:M({},i,t.directiveTransforms||{})})),ma(o,M({},t,{prefixIdentifiers:false}))}const hf=Symbol(""),mf=Symbol(""),gf=Symbol(""),vf=Symbol(""),yf=Symbol(""),_f=Symbol(""),bf=Symbol(""),Sf=Symbol(""),xf=Symbol(""),Cf=Symbol("");var wf;let kf;wf={[hf]:"vModelRadio",[mf]:"vModelCheckbox",[gf]:"vModelText",[vf]:"vModelSelect",[yf]:"vModelDynamic",[_f]:"withModifiers",[bf]:"withKeys",[Sf]:"vShow",[xf]:"Transition",[Cf]:"TransitionGroup"},Object.getOwnPropertySymbols(wf).forEach((e=>{Bl[e]=wf[e]}));const Ef=o("style,iframe,script,noscript",!0),Tf={isVoidTag:g,isNativeTag:e=>h(e)||m(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return kf||(kf=document.createElement("div")),t?(kf.innerHTML=`
`,kf.children[0].getAttribute("foo")):(kf.innerHTML=e,kf.textContent)},isBuiltInComponent:e=>Zl(e,"Transition")?xf:Zl(e,"TransitionGroup")?Cf:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(Ef(e))return 2}return 0}},Nf=(e,t)=>{const n=f(e);return zl(JSON.stringify(n),!1,t,3)};function Rf(e,t){return Qc(e,t)}const Of=o("passive,once,capture"),Mf=o("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Pf=o("left,right"),Af=o("onkeyup,onkeydown,onkeypress",!0),If=(e,t)=>Yl(e)&&"onclick"===e.content.toLowerCase()?zl(t,!0):4!==e.type?Kl(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e;const Ff=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||(t.onError(Rf(61,e.loc)),t.removeNode())},$f=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:zl("style",!0,t.loc),exp:Nf(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],Lf={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(Rf(51,o)),t.children.length&&(n.onError(Rf(52,o)),t.children.length=0),{props:[Wl(zl("innerHTML",!0,o),r||zl("",!0))]}},text:(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(Rf(53,o)),t.children.length&&(n.onError(Rf(54,o)),t.children.length=0),{props:[Wl(zl("textContent",!0),r?na(r,n)>0?r:Gl(n.helperString(Sl),[r],o):zl("",!0))]}},model:(e,t,n)=>{const r=rf(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(Rf(56,e.arg.loc));const{tag:o}=t,s=n.isCustomElement(o);if("input"===o||"textarea"===o||"select"===o||s){let i=gf,c=!1;if("input"===o||s){const r=uu(t,"type");if(r){if(7===r.type)i=yf;else if(r.value)switch(r.value.content){case"radio":i=hf;break;case"checkbox":i=mf;break;case"file":c=!0,n.onError(Rf(57,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=yf)}else"select"===o&&(i=vf);c||(r.needRuntime=n.helper(i))}else n.onError(Rf(55,e.loc));return r.props=r.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),r},on:(e,t,n)=>Za(e,t,n,(t=>{const{modifiers:r}=e;if(!r.length)return t;let{key:o,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:c,eventOptionModifiers:l}=((e,t,n,r)=>{const o=[],s=[],i=[];for(let r=0;r{const{exp:r,loc:o}=e;return r||n.onError(Rf(59,o)),{props:[],needRuntime:n.helper(Sf)}}};const Vf=Object.create(null);function Bf(e,t){if(!j(e)){if(!e.nodeType)return E;e=e.innerHTML}const n=e,o=Vf[n];if(o)return o;if("#"===e[0]){const t=document.querySelector(e);0,e=t?t.innerHTML:""}const s=M({hoistStatic:!0,onError:void 0,onWarn:E},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));const{code:i}=function(e,t={}){return df(e,M({},Tf,t,{nodeTransforms:[Ff,...$f,...t.nodeTransforms||[]],directiveTransforms:M({},Lf,t.directiveTransforms||{}),transformHoist:null}))}(e,s);const c=new Function("Vue",i)(r);return c._rc=!0,Vf[n]=c}Ys(Bf)}}]); \ No newline at end of file diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index fa6fb4c3da..cab3efda71 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -1025,6 +1025,12 @@ public function onRelationButtonLink() return $this->onRelationManageForm(); } + public function onRelationButtonRefresh() + { + $this->beforeAjax(); + return $this->relationRefresh(); + } + public function onRelationButtonUnlink() { return $this->onRelationManageRemove(); @@ -1588,6 +1594,10 @@ protected function evalToolbarButtons() $text = 'backend::lang.relation.add_name'; break; + case 'refresh': + $text = 'backend::lang.relation.refresh'; + break; + case 'remove': $text = 'backend::lang.relation.remove'; break; diff --git a/modules/backend/behaviors/relationcontroller/partials/_button_refresh.php b/modules/backend/behaviors/relationcontroller/partials/_button_refresh.php new file mode 100644 index 0000000000..993533fdb3 --- /dev/null +++ b/modules/backend/behaviors/relationcontroller/partials/_button_refresh.php @@ -0,0 +1,6 @@ + diff --git a/modules/backend/behaviors/relationcontroller/partials/_manage_form.php b/modules/backend/behaviors/relationcontroller/partials/_manage_form.php index b60295bdf9..cab9fec785 100644 --- a/modules/backend/behaviors/relationcontroller/partials/_manage_form.php +++ b/modules/backend/behaviors/relationcontroller/partials/_manage_form.php @@ -25,26 +25,7 @@
@@ -74,17 +55,7 @@ class="btn btn-default"
diff --git a/modules/backend/behaviors/relationcontroller/partials/_manage_form_footer_create.php b/modules/backend/behaviors/relationcontroller/partials/_manage_form_footer_create.php new file mode 100644 index 0000000000..4a612612df --- /dev/null +++ b/modules/backend/behaviors/relationcontroller/partials/_manage_form_footer_create.php @@ -0,0 +1,11 @@ + + diff --git a/modules/backend/behaviors/relationcontroller/partials/_manage_form_footer_update.php b/modules/backend/behaviors/relationcontroller/partials/_manage_form_footer_update.php new file mode 100644 index 0000000000..a96549096f --- /dev/null +++ b/modules/backend/behaviors/relationcontroller/partials/_manage_form_footer_update.php @@ -0,0 +1,20 @@ +readOnly): ?> + + + + + diff --git a/modules/backend/behaviors/relationcontroller/partials/_manage_list.php b/modules/backend/behaviors/relationcontroller/partials/_manage_list.php index d1d10a1b82..f3664c9906 100644 --- a/modules/backend/behaviors/relationcontroller/partials/_manage_list.php +++ b/modules/backend/behaviors/relationcontroller/partials/_manage_list.php @@ -18,23 +18,7 @@ diff --git a/modules/backend/behaviors/relationcontroller/partials/_manage_list_footer.php b/modules/backend/behaviors/relationcontroller/partials/_manage_list_footer.php new file mode 100644 index 0000000000..a2ddafa74b --- /dev/null +++ b/modules/backend/behaviors/relationcontroller/partials/_manage_list_footer.php @@ -0,0 +1,17 @@ +showCheckboxes): ?> + + + diff --git a/modules/backend/behaviors/relationcontroller/partials/_manage_pivot.php b/modules/backend/behaviors/relationcontroller/partials/_manage_pivot.php index 52885f18a8..6ac2419bfc 100644 --- a/modules/backend/behaviors/relationcontroller/partials/_manage_pivot.php +++ b/modules/backend/behaviors/relationcontroller/partials/_manage_pivot.php @@ -20,24 +20,7 @@ diff --git a/modules/backend/behaviors/relationcontroller/partials/_manage_pivot_footer.php b/modules/backend/behaviors/relationcontroller/partials/_manage_pivot_footer.php new file mode 100644 index 0000000000..4402932f3f --- /dev/null +++ b/modules/backend/behaviors/relationcontroller/partials/_manage_pivot_footer.php @@ -0,0 +1,18 @@ +showCheckboxes): ?> + + + diff --git a/modules/backend/behaviors/relationcontroller/partials/_pivot_form.php b/modules/backend/behaviors/relationcontroller/partials/_pivot_form.php index e69e152607..f93cbd7f88 100644 --- a/modules/backend/behaviors/relationcontroller/partials/_pivot_form.php +++ b/modules/backend/behaviors/relationcontroller/partials/_pivot_form.php @@ -14,26 +14,7 @@ render(['preview' => $this->readOnly]) ?> diff --git a/modules/backend/behaviors/relationcontroller/partials/_pivot_form_footer.php b/modules/backend/behaviors/relationcontroller/partials/_pivot_form_footer.php new file mode 100644 index 0000000000..a96549096f --- /dev/null +++ b/modules/backend/behaviors/relationcontroller/partials/_pivot_form_footer.php @@ -0,0 +1,20 @@ +readOnly): ?> + + + + + diff --git a/modules/backend/classes/FormField.php b/modules/backend/classes/FormField.php index 45e09c259d..c9edfe14e2 100644 --- a/modules/backend/classes/FormField.php +++ b/modules/backend/classes/FormField.php @@ -700,18 +700,15 @@ protected function getFieldNameFromData($fieldName, $data, $default = null) if ($result instanceof Model && $result->hasRelation($key)) { if ($key == $lastField) { $result = $result->getRelationValue($key) ?: $default; - } - else { + } else { $result = $result->{$key}; } - } - elseif (is_array($result)) { + } elseif (is_array($result)) { if (!array_key_exists($key, $result)) { return $default; } $result = $result[$key]; - } - else { + } else { if (!isset($result->{$key})) { return $default; } @@ -719,6 +716,10 @@ protected function getFieldNameFromData($fieldName, $data, $default = null) } } + if ($result instanceof BackedEnum) { + $result = $result->value; + } + return $result; } } diff --git a/modules/backend/database/seeds/DatabaseSeeder.php b/modules/backend/database/seeds/DatabaseSeeder.php index 59210f3d32..3a8d6d7468 100644 --- a/modules/backend/database/seeds/DatabaseSeeder.php +++ b/modules/backend/database/seeds/DatabaseSeeder.php @@ -26,7 +26,8 @@ public function run() $this->call($adminSeeder); }); - return $shouldRandomizePassword ? 'The following password has been automatically generated for the "admin" account: ' - . "${adminPassword}" : ''; + return ($shouldRandomizePassword) + ? 'The following password has been automatically generated for the "admin" account: ' . $adminPassword . '' + : ''; } } diff --git a/modules/backend/formwidgets/CodeEditor.php b/modules/backend/formwidgets/CodeEditor.php index d54746660a..2a360e01d3 100644 --- a/modules/backend/formwidgets/CodeEditor.php +++ b/modules/backend/formwidgets/CodeEditor.php @@ -62,6 +62,11 @@ class CodeEditor extends FormWidgetBase */ public $margin = 0; + /** + * @var float Number of screen heights to allow scrolling past the end of the document + */ + public $scrollPastEnd = 0; + /** * @var string Ace Editor theme to use. */ @@ -132,6 +137,7 @@ public function init() 'tabSize', 'fontSize', 'margin', + 'scrollPastEnd', 'theme', 'showInvisibles', 'highlightActiveLine', @@ -169,6 +175,7 @@ public function prepareVars() $this->vars['showGutter'] = $this->showGutter; $this->vars['language'] = $this->language; $this->vars['margin'] = $this->margin; + $this->vars['scrollPastEnd'] = $this->scrollPastEnd; $this->vars['stretch'] = $this->formField->stretch; $this->vars['size'] = $this->formField->size; $this->vars['readOnly'] = $this->readOnly; diff --git a/modules/backend/formwidgets/Repeater.php b/modules/backend/formwidgets/Repeater.php index 6c145ba130..d0d9b41972 100644 --- a/modules/backend/formwidgets/Repeater.php +++ b/modules/backend/formwidgets/Repeater.php @@ -16,7 +16,7 @@ class Repeater extends FormWidgetBase /** * Form field configuration */ - public array $form = []; + public array|string|object $form = []; /** * Repeater mode. Can be either `list` (default) to display items in a vertical list, or `grid` to diff --git a/modules/backend/formwidgets/codeeditor/assets/js/build-min.js b/modules/backend/formwidgets/codeeditor/assets/js/build-min.js index b79f633239..e1dd79a93e 100644 --- a/modules/backend/formwidgets/codeeditor/assets/js/build-min.js +++ b/modules/backend/formwidgets/codeeditor/assets/js/build-min.js @@ -1290,9 +1290,9 @@ getData=function(row){return popup.data[row];};popup.getRow=function(){return se z-index: 2;\ }\ .ace_editor.ace_autocomplete .ace_scroller {\ - background: none;\ - border: none;\ - box-shadow: none;\ + background: none;\ + border: none;\ + box-shadow: none;\ }\ .ace_rightAlignedText {\ color: gray;\ @@ -2235,7 +2235,7 @@ $.wn.foundation.controlUtils.markDisposable(element) this.init();this.$el.trigger('oc.codeEditorReady')} CodeEditor.prototype=Object.create(BaseProto) CodeEditor.prototype.constructor=CodeEditor -CodeEditor.DEFAULTS={fontSize:12,wordWrap:'off',codeFolding:'manual',autocompletion:'manual',tabSize:4,theme:'textmate',showInvisibles:true,highlightActiveLine:true,useSoftTabs:true,autoCloseTags:true,showGutter:true,enableEmmet:true,language:'php',margin:0,vendorPath:'/',showPrintMargin:false,highlightSelectedWord:false,hScrollBarAlwaysVisible:false,readOnly:false} +CodeEditor.DEFAULTS={fontSize:12,wordWrap:'off',codeFolding:'manual',autocompletion:'manual',tabSize:4,theme:'textmate',showInvisibles:true,highlightActiveLine:true,useSoftTabs:true,autoCloseTags:true,showGutter:true,enableEmmet:true,language:'php',margin:0,vendorPath:'/',showPrintMargin:false,highlightSelectedWord:false,hScrollBarAlwaysVisible:false,scrollPastEnd:0,readOnly:false} CodeEditor.prototype.init=function(){var self=this;if(!this.$el.attr('id')){this.$el.attr('id','element-'+Math.random().toString(36).substring(7))}this.$code=$('
').addClass('editor-code').attr('id',this.$el.attr('id')+'-code').css({position:'absolute',top:0,right:0,bottom:0,left:0}).appendTo(this.$el) var editor=this.editor=ace.edit(this.$code.attr('id')),options=this.options,$form=this.$el.closest('form');editor.$blockScrolling=Infinity this.$form=$form @@ -2264,6 +2264,7 @@ editor.getSession().setFoldStyle(options.codeFolding) editor.setFontSize(options.fontSize) editor.on('blur',this.proxy(this.onBlur)) editor.on('focus',this.proxy(this.onFocus)) +editor.setOption("scrollPastEnd",options.scrollPastEnd) this.setWordWrap(options.wordWrap) ace.require('ace/config').set('basePath',this.options.vendorPath) editor.setOptions({enableEmmet:options.enableEmmet,enableBasicAutocompletion:options.autocompletion==='basic',enableSnippets:options.enableSnippets,enableLiveAutocompletion:options.autocompletion==='live'}) diff --git a/modules/backend/formwidgets/codeeditor/assets/js/codeeditor.js b/modules/backend/formwidgets/codeeditor/assets/js/codeeditor.js index 583a25f2da..481ae8337d 100644 --- a/modules/backend/formwidgets/codeeditor/assets/js/codeeditor.js +++ b/modules/backend/formwidgets/codeeditor/assets/js/codeeditor.js @@ -73,6 +73,7 @@ showPrintMargin: false, highlightSelectedWord: false, hScrollBarAlwaysVisible: false, + scrollPastEnd: 0, readOnly: false } @@ -156,6 +157,7 @@ editor.setFontSize(options.fontSize) editor.on('blur', this.proxy(this.onBlur)) editor.on('focus', this.proxy(this.onFocus)) + editor.setOption("scrollPastEnd", options.scrollPastEnd) this.setWordWrap(options.wordWrap) // Set the vendor path for Ace's require path diff --git a/modules/backend/formwidgets/codeeditor/partials/_codeeditor.php b/modules/backend/formwidgets/codeeditor/partials/_codeeditor.php index 33d1c9721d..f01dc78ee4 100644 --- a/modules/backend/formwidgets/codeeditor/partials/_codeeditor.php +++ b/modules/backend/formwidgets/codeeditor/partials/_codeeditor.php @@ -24,6 +24,7 @@ class="field-codeeditor size- " data-read-only="" data-language="" data-margin="" + data-scroll-past-end="" data-vendor-path="" formField->getAttributes() ?>>
diff --git a/modules/backend/formwidgets/fileupload/assets/css/fileupload.css b/modules/backend/formwidgets/fileupload/assets/css/fileupload.css index 2fc811c4e5..e9da8b4b11 100644 --- a/modules/backend/formwidgets/fileupload/assets/css/fileupload.css +++ b/modules/backend/formwidgets/fileupload/assets/css/fileupload.css @@ -65,7 +65,7 @@ .field-fileupload.style-image-multi .upload-object .progress-bar .upload-progress{float:left;width:0%;height:100%;line-height:5px;color:#fff;background-color:#5fb6f5;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:width 0.6s ease;transition:width 0.6s ease} .field-fileupload.style-image-multi .upload-object .icon-container{border-right:1px solid #f6f8f9;float:left;display:inline-block;overflow:hidden;width:75px;height:75px} .field-fileupload.style-image-multi .upload-object .icon-container i{font-size:35px} -.field-fileupload.style-image-multi .upload-object .icon-container.image img{border-bottom-left-radius:3px;border-top-left-radius:3px;width:auto} +.field-fileupload.style-image-multi .upload-object .icon-container.image img{border-bottom-left-radius:3px;border-top-left-radius:3px;width:100%;height:100%;object-fit:cover} .field-fileupload.style-image-multi .upload-object .info{margin-left:90px} .field-fileupload.style-image-multi .upload-object .info h4{padding-right:15px} .field-fileupload.style-image-multi .upload-object .info h4 a{right:15px} @@ -154,4 +154,4 @@ .field-fileupload.style-file-single .upload-object .meta{position:absolute;top:50%;margin-top:-44px;height:88px;right:0;width:15%} .field-fileupload.style-file-single .upload-object .meta .upload-remove-button{position:absolute;top:50%;right:0;height:20px;margin-top:-10px;margin-right:10px;z-index:100} .field-fileupload.style-file-single .upload-object .icon-container:after{width:20px;height:20px;margin-top:-10px;margin-left:-10px;background-size:20px 20px} -.field-fileupload.style-file-single .upload-object.is-error .icon-container:after{font-size:20px} \ No newline at end of file +.field-fileupload.style-file-single .upload-object.is-error .icon-container:after{font-size:20px} diff --git a/modules/backend/formwidgets/fileupload/assets/less/fileupload.imagemulti.less b/modules/backend/formwidgets/fileupload/assets/less/fileupload.imagemulti.less index 79c2eb32e7..734b8b87d1 100644 --- a/modules/backend/formwidgets/fileupload/assets/less/fileupload.imagemulti.less +++ b/modules/backend/formwidgets/fileupload/assets/less/fileupload.imagemulti.less @@ -45,7 +45,9 @@ &.image img { .border-left-radius(3px); - width: auto; + width: 100%; + height: 100%; + object-fit: cover; } } @@ -131,4 +133,4 @@ width: auto; } } -} \ No newline at end of file +} diff --git a/modules/backend/formwidgets/repeater/assets/css/repeater.css b/modules/backend/formwidgets/repeater/assets/css/repeater.css index 7de5800bd2..fddab40d60 100644 --- a/modules/backend/formwidgets/repeater/assets/css/repeater.css +++ b/modules/backend/formwidgets/repeater/assets/css/repeater.css @@ -52,11 +52,11 @@ .field-repeater .field-repeater-add-item:active{background:#3498db;border-color:transparent} .field-repeater .field-repeater-add-item:active>a{color:#fff} .field-repeater .field-repeater-add-item.in-progress{border-color:#e0e0e0 !important;background:transparent !important} -.field-repeater[data-mode="grid"] ul.field-repeater-items{display:grid;gap:20px} -.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-item{margin-bottom:0 !important} -.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item{margin-top:0} -.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item a{display:flex;flex-direction:column;justify-content:center;height:100%} -.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item:before{display:none} +.field-repeater[data-mode="grid"]>ul.field-repeater-items{display:grid;gap:20px} +.field-repeater[data-mode="grid"]>ul.field-repeater-items>.field-repeater-item{margin-bottom:0 !important} +.field-repeater[data-mode="grid"]>ul.field-repeater-items>.field-repeater-add-item{margin-top:0} +.field-repeater[data-mode="grid"]>ul.field-repeater-items>.field-repeater-add-item>a{display:flex;flex-direction:column;justify-content:center;height:100%} +.field-repeater[data-mode="grid"]>ul.field-repeater-items>.field-repeater-add-item:before{display:none} .field-repeater[data-mode="grid"][data-columns="2"] ul.field-repeater-items{grid-template-columns:repeat(2,1fr)} .field-repeater[data-mode="grid"][data-columns="3"] ul.field-repeater-items{grid-template-columns:repeat(3,1fr)} .field-repeater[data-mode="grid"][data-columns="4"] ul.field-repeater-items{grid-template-columns:repeat(4,1fr)} @@ -65,5 +65,5 @@ @media (max-width:1600px){.field-repeater[data-mode="grid"][data-columns="5"] ul.field-repeater-items{grid-template-columns:repeat(4,1fr)}} .field-repeater[data-mode="grid"][data-columns="6"] ul.field-repeater-items{grid-template-columns:repeat(6,1fr)} @media (max-width:1600px){.field-repeater[data-mode="grid"][data-columns="6"] ul.field-repeater-items{grid-template-columns:repeat(4,1fr)}} -@media (min-width:768px) and (max-width:1199px){.field-repeater[data-mode="grid"] ul.field-repeater-items{grid-template-columns:repeat(2,1fr) !important}} -@media (max-width:767px){.field-repeater[data-mode="grid"] ul.field-repeater-items{grid-template-columns:1fr !important}.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-item,.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item{min-height:0 !important}.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item{margin-top:10px}.field-repeater[data-mode="grid"] ul.field-repeater-items .field-repeater-add-item::before{display:block}} \ No newline at end of file +@media (min-width:768px) and (max-width:1199px){.field-repeater[data-mode="grid"]>ul.field-repeater-items{grid-template-columns:repeat(2,1fr) !important}} +@media (max-width:767px){.field-repeater[data-mode="grid"]>ul.field-repeater-items{grid-template-columns:1fr !important}.field-repeater[data-mode="grid"]>ul.field-repeater-items>.field-repeater-item,.field-repeater[data-mode="grid"]>ul.field-repeater-items>.field-repeater-add-item{min-height:0 !important}.field-repeater[data-mode="grid"]>ul.field-repeater-items>.field-repeater-add-item{margin-top:10px}.field-repeater[data-mode="grid"]>ul.field-repeater-items>.field-repeater-add-item::before{display:block}} \ No newline at end of file diff --git a/modules/backend/formwidgets/repeater/assets/less/repeater.less b/modules/backend/formwidgets/repeater/assets/less/repeater.less index e390e3ba53..ec20f3c438 100644 --- a/modules/backend/formwidgets/repeater/assets/less/repeater.less +++ b/modules/backend/formwidgets/repeater/assets/less/repeater.less @@ -243,18 +243,18 @@ } &[data-mode="grid"] { - ul.field-repeater-items { + > ul.field-repeater-items { display: grid; gap: 20px; - .field-repeater-item { + > .field-repeater-item { margin-bottom: 0 !important; } - .field-repeater-add-item { + > .field-repeater-add-item { margin-top: 0; - a { + > a { display: flex; flex-direction: column; justify-content: center; @@ -296,21 +296,21 @@ } @media (min-width: @screen-sm-min) and (max-width: @screen-md-max) { - ul.field-repeater-items { + > ul.field-repeater-items { grid-template-columns: repeat(2, 1fr) !important;; } } @media (max-width: @screen-xs-max) { - ul.field-repeater-items { + > ul.field-repeater-items { grid-template-columns: 1fr !important; - .field-repeater-item, - .field-repeater-add-item { + > .field-repeater-item, + > .field-repeater-add-item { min-height: 0 !important; } - .field-repeater-add-item { + > .field-repeater-add-item { margin-top: 10px; &::before { diff --git a/modules/backend/formwidgets/richeditor/assets/js/build-plugins-min.js b/modules/backend/formwidgets/richeditor/assets/js/build-plugins-min.js index 85556851b3..eb0ac276d4 100644 --- a/modules/backend/formwidgets/richeditor/assets/js/build-plugins-min.js +++ b/modules/backend/formwidgets/richeditor/assets/js/build-plugins-min.js @@ -145,7 +145,7 @@ this.$textarea.on('froalaEditor.paste.beforeCleanup',this.proxy(this.beforeClean this.$form.on('oc.beforeRequest',this.proxy(this.onFormBeforeRequest)) this.$textarea.froalaEditor(froalaOptions) this.editor=this.$textarea.data('froala.editor') -if(this.options.readOnly){this.editor.edit.off()}this.$el.on('keydown','.fr-view figure',this.proxy(this.onFigureKeydown)) +this.editor.$box.on('change',function(e){e.stopPropagation()});if(this.options.readOnly){this.editor.edit.off()}this.$el.on('keydown','.fr-view figure',this.proxy(this.onFigureKeydown)) Snowboard.globalEvent("formwidgets.richeditor.init",this)} RichEditor.prototype.dispose=function(){this.unregisterHandlers() this.$textarea.froalaEditor('destroy') diff --git a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js index e1ef2d77c7..60aaff1755 100755 --- a/modules/backend/formwidgets/richeditor/assets/js/richeditor.js +++ b/modules/backend/formwidgets/richeditor/assets/js/richeditor.js @@ -233,6 +233,12 @@ this.editor = this.$textarea.data('froala.editor') + // Stop unnecessary "change" events from making it to the field element; + // only the textarea should be able to trigger the change event. + this.editor.$box.on('change', function (e) { + e.stopPropagation() + }); + if (this.options.readOnly) { this.editor.edit.off() } diff --git a/modules/backend/lang/en/lang.php b/modules/backend/lang/en/lang.php index a23509f1d1..6d57657dbf 100644 --- a/modules/backend/lang/en/lang.php +++ b/modules/backend/lang/en/lang.php @@ -327,6 +327,7 @@ 'relationwidget_unsupported_type' => 'The ":type" relation type is unsupported by the Relation widget.', 'help' => 'Click on an item to add', 'related_data' => 'Related :name data', + 'refresh' => 'Refresh', 'add' => 'Add', 'add_selected' => 'Add selected', 'add_a_new' => 'Add a new :name', diff --git a/modules/backend/lang/lv/lang.php b/modules/backend/lang/lv/lang.php index e751c10d46..a005939e6c 100644 --- a/modules/backend/lang/lv/lang.php +++ b/modules/backend/lang/lv/lang.php @@ -327,6 +327,7 @@ 'relationwidget_unsupported_type' => 'Relāciju logrīks neatbalsta relāciju veidu ":type".', 'help' => 'Noklikšķiniet uz vienuma, lai pievienotu', 'related_data' => 'Saistītie :name dati', + 'refresh' => 'Atsvaidzināt', 'add' => 'Pievienot', 'add_selected' => 'Pievienot izvēlētos', 'add_a_new' => 'Pievienot jaunu :name', diff --git a/modules/backend/layouts/_head.php b/modules/backend/layouts/_head.php index bcaaa29154..f1b4526c21 100644 --- a/modules/backend/layouts/_head.php +++ b/modules/backend/layouts/_head.php @@ -29,7 +29,7 @@ Url::asset('modules/system/assets/js/build/manifest.js'), Url::asset('modules/system/assets/js/snowboard/build/snowboard.vendor.js'), Url::asset( - (Config::get('develop.debugSnowboard', Config::get('app.debug', false)) === true) + (Config::get('develop.debugSnowboard', false) === true) ? 'modules/system/assets/js/build/system.debug.js' : 'modules/system/assets/js/build/system.js' ), diff --git a/modules/backend/widgets/Form.php b/modules/backend/widgets/Form.php index d182570a63..6aed0c2834 100644 --- a/modules/backend/widgets/Form.php +++ b/modules/backend/widgets/Form.php @@ -1177,6 +1177,7 @@ protected function showFieldLabels($field) public function getSaveData() { $this->defineFormFields(); + $this->applyFiltersFromModel(); $result = []; @@ -1342,6 +1343,11 @@ public function getOptionsFromModel($field, $fieldOptions) ])); } return $result; + } else { + // Handle localization keys that return arrays + if (is_array($options = Lang::get($fieldOptions))) { + return $options; + } } } diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index 0b78b483c0..65b8d742ce 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -510,7 +510,9 @@ public function prepareQuery() $relationObj = $this->model->{$column->relation}(); $countQuery = $relationObj->getRelationExistenceQuery($relationObj->getRelated()->newQueryWithoutScopes(), $query); - $joinSql = $this->isColumnRelated($column, true) + $limit = $column->config['limit'] ?? false; + + $joinSql = $this->isColumnRelated($column, true) && $limit !== 1 ? DbDongle::raw("group_concat(" . $sqlSelect . " separator ', ')") : DbDongle::raw($sqlSelect); @@ -520,6 +522,10 @@ public function prepareQuery() $joinQuery->whereRaw(DbDongle::parse($column->config['conditions'])); } + if ($limit) { + $joinQuery->limit($column->config['limit']); + } + $joinSql = $joinQuery->toSql(); $selects[] = Db::raw("(".$joinSql.") as ".$alias); @@ -1053,6 +1059,10 @@ public function getColumnValueRaw($record, $column) } } + if ($value instanceof \BackedEnum) { + $value = $value->value; + } + /** * @event backend.list.overrideColumnValueRaw * Overrides the raw column value in a list widget. diff --git a/modules/backend/widgets/MediaManager.php b/modules/backend/widgets/MediaManager.php index 8bb5b6fee0..067d53a50d 100644 --- a/modules/backend/widgets/MediaManager.php +++ b/modules/backend/widgets/MediaManager.php @@ -21,6 +21,7 @@ class MediaManager extends WidgetBase { use \Backend\Traits\UploadableWidget; + use \Backend\Traits\PreferenceMaker; const FOLDER_ROOT = '/'; @@ -86,9 +87,8 @@ protected function loadAssets() /** * Abort the request with an access-denied code if readOnly mode is active - * @return void */ - protected function abortIfReadOnly() + protected function abortIfReadOnly(): void { if ($this->readOnly) { abort(403); @@ -97,9 +97,8 @@ protected function abortIfReadOnly() /** * Renders the widget. - * @return string */ - public function render() + public function render(): string { $this->prepareVars(); @@ -111,7 +110,7 @@ public function render() // /** - * Perform search AJAX handler + * Perform a search with the query specified in the request ("search") */ public function onSearch(): array { @@ -126,7 +125,7 @@ public function onSearch(): array } /** - * Change view AJAX handler + * Go to the path specified in the request ("path") */ public function onGoToFolder(): array { @@ -150,7 +149,7 @@ public function onGoToFolder(): array } /** - * Generate thumbnail AJAX handler + * Generate thumbnails for the provided array of thumbnail info ("batch") */ public function onGenerateThumbnails(): array { @@ -170,7 +169,7 @@ public function onGenerateThumbnails(): array } /** - * Get thumbnail AJAX handler + * Get the thumbnail for the provided path ("path") and lastModified date ("lastModified") * * @throws ApplicationException if the lastModified date is invalid */ @@ -197,7 +196,7 @@ public function onGetSidebarThumbnail(): array } /** - * Set view preference AJAX handler + * Render the view for the provided "path" and "view" mode from the request */ public function onChangeView(): array { @@ -217,7 +216,7 @@ public function onChangeView(): array } /** - * Set filter preference AJAX handler + * Set the current filter from the request ("filter") */ public function onSetFilter(): array { @@ -237,7 +236,7 @@ public function onSetFilter(): array } /** - * Set sorting preference AJAX handler + * Set the current sorting configuration from the request ("sortBy", "sortDirection") */ public function onSetSorting(): array { @@ -258,7 +257,7 @@ public function onSetSorting(): array } /** - * Delete library item AJAX handler + * Deletes the provided paths from the request ("paths") * * @throws ApplicationException if the paths input is invalid * @todo Move media events to the MediaLibary class instead. @@ -356,7 +355,7 @@ public function onDeleteItem(): array } /** - * Show rename item popup AJAX handler + * Render the rename popup for the provided "path" from the request */ public function onLoadRenamePopup(): string { @@ -374,7 +373,7 @@ public function onLoadRenamePopup(): string } /** - * Rename library item AJAX handler + * Rename the provided path from the request ("originalPath") to the new name ("name") * * @throws ApplicationException if the new name is invalid * @todo Move media events to the MediaLibary class instead. @@ -458,7 +457,7 @@ public function onApplyName(): void } /** - * Create library folder AJAX handler + * Create a new folder ("name") in the provided "path" from the request * * @throws ApplicationException If the requested folder already exists or is otherwise invalid */ @@ -522,7 +521,7 @@ public function onCreateFolder(): array } /** - * Show move item popup AJAX handler + * Render the move popup with a list of folders to move the selected items to excluding the provided paths in the request ("exclude") * * @throws ApplicationException If the exclude input data is not an array */ @@ -558,7 +557,7 @@ public function onLoadMovePopup(): string } /** - * Move library item AJAX handler + * Move the selected items ("files", "folders") to the provided destination path from the request ("dest") * * @throws ApplicationException if the input data is invalid */ @@ -650,7 +649,7 @@ public function onMoveItems(): array } /** - * Sidebar visibility AJAX handler + * Sets the sidebar visibility state from the request ("visible") */ public function onSetSidebarVisible(): void { @@ -660,7 +659,7 @@ public function onSetSidebarVisible(): void } /** - * Renders the widget in a popup body + * Renders the widget in a popup body (options include "bottomToolbar" and "cropAndInsertButton") */ public function onLoadPopup(): string { @@ -905,11 +904,9 @@ protected function findFiles($searchTerm, $filter, $sortBy) } /** - * Sets the user current folder from the session state - * - * @param string $path + * Sets the provided path as the current folder in the session */ - protected function setCurrentFolder($path): void + protected function setCurrentFolder(string $path): void { $path = MediaLibrary::validatePath($path); @@ -917,21 +914,17 @@ protected function setCurrentFolder($path): void } /** - * Gets the user current folder from the session state - * - * @return string + * Gets the user's current folder from the session */ - protected function getCurrentFolder() + protected function getCurrentFolder(): string { return $this->getSession('media_folder', self::FOLDER_ROOT); } /** - * Sets the user filter from the session state - * - * @param string $filter + * Sets the user filter from the session */ - protected function setFilter($filter): void + protected function setFilter(string $filter): void { if (!in_array($filter, [ self::FILTER_ALL, @@ -984,20 +977,16 @@ protected function setSearchTerm($searchTerm): void /** * Gets the user search term from the session state - * - * @return string */ - protected function getSearchTerm() + protected function getSearchTerm(): ?string { return $this->getSession('media_search', null); } /** - * Sets the user sort column from the session state - * - * @param string $sortBy + * Sets the sort column */ - protected function setSortBy($sortBy): void + protected function setSortBy(string $sortBy): void { if (!in_array($sortBy, [ MediaLibrary::SORT_BY_TITLE, @@ -1007,21 +996,22 @@ protected function setSortBy($sortBy): void throw new ApplicationException('Invalid input data'); } - $this->putSession('media_sort_by', $sortBy); + $key = 'media_sort_by'; + $this->putUserPreference($key, $sortBy); + $this->putSession($key, $sortBy); } /** - * Gets the user sort column from the session state - * - * @return string + * Gets the current column to sort by */ - protected function getSortBy() + protected function getSortBy(): string { - return $this->getSession('media_sort_by', MediaLibrary::SORT_BY_TITLE); + $key = 'media_sort_by'; + return $this->getSession($key, $this->getUserPreference($key, MediaLibrary::SORT_BY_TITLE)); } /** - * Sets the user sort direction from the session state + * Sets the sort direction from the session state * * @param string $sortDirection */ @@ -1034,17 +1024,18 @@ protected function setSortDirection($sortDirection): void throw new ApplicationException('Invalid input data'); } - $this->putSession('media_sort_direction', $sortDirection); + $key = 'media_sort_direction'; + $this->putUserPreference($key, $sortDirection); + $this->putSession($key, $sortDirection); } /** * Gets the user sort direction from the session state - * - * @return string */ - protected function getSortDirection() + protected function getSortDirection(): string { - return $this->getSession('media_sort_direction', MediaLibrary::SORT_DIRECTION_ASC); + $key = 'media_sort_direction'; + return $this->getSession($key, $this->getUserPreference($key, MediaLibrary::SORT_DIRECTION_ASC)); } /** @@ -1184,7 +1175,9 @@ protected function setViewMode(string $viewMode): void throw new ApplicationException('Invalid input data'); } - $this->putSession('view_mode', $viewMode); + $key = 'view_mode'; + $this->putUserPreference($key, $viewMode); + $this->putSession($key, $viewMode); } /** @@ -1192,7 +1185,8 @@ protected function setViewMode(string $viewMode): void */ protected function getViewMode(): string { - return $this->getSession('view_mode', self::VIEW_MODE_GRID); + $key = 'view_mode'; + return $this->getSession($key, $this->getUserPreference($key, self::VIEW_MODE_GRID)); } /** @@ -1371,4 +1365,15 @@ protected function isVector(string $path): bool { return (pathinfo($path, PATHINFO_EXTENSION) == 'svg'); } + + /** + * Returns a unique identifier for this widget and controller action for preference storage. + * + * @return string + */ + protected function getPreferenceKey() + { + // User preferences should persist across controller usages for the MediaManager + return "backend::widgets.media_manager." . strtolower($this->getId()); + } } diff --git a/modules/backend/widgets/toolbar/partials/_toolbar.php b/modules/backend/widgets/toolbar/partials/_toolbar.php index bf43b9d710..662a478820 100644 --- a/modules/backend/widgets/toolbar/partials/_toolbar.php +++ b/modules/backend/widgets/toolbar/partials/_toolbar.php @@ -1,17 +1,21 @@ +
+
- +
+ + - -
- -
- +
+ +
+
-
\ No newline at end of file +
+ diff --git a/modules/cms/classes/AutoDatasource.php b/modules/cms/classes/AutoDatasource.php index c554b2f9ee..f68fb1861c 100644 --- a/modules/cms/classes/AutoDatasource.php +++ b/modules/cms/classes/AutoDatasource.php @@ -1,13 +1,15 @@ -postProcessor = new Processor; } + /** + * Append a datasource to the end of the list of datasources + */ + public function appendDatasource(string $key, DatasourceInterface $datasource): void + { + $this->datasources[$key] = $datasource; + $this->pathCache[] = Cache::rememberForever($datasource->getPathsCacheKey(), function () use ($datasource) { + return $datasource->getAvailablePaths(); + }); + } + + /** + * Prepend a datasource to the beginning of the list of datasources + */ + public function prependDatasource(string $key, DatasourceInterface $datasource): void + { + $this->datasources = array_prepend($this->datasources, $datasource, $key); + $this->pathCache = array_prepend($this->pathCache, Cache::rememberForever($datasource->getPathsCacheKey(), function () use ($datasource) { + return $datasource->getAvailablePaths(); + }), $key); + } + /** * Returns the in memory path cache map */ @@ -80,9 +104,8 @@ public function getPathCache(): array * Populate the local cache of paths available in each datasource * * @param boolean $refresh Default false, set to true to force the cache to be rebuilt - * @return void */ - public function populateCache($refresh = false) + public function populateCache(bool $refresh = false): void { $pathCache = []; foreach ($this->datasources as $datasource) { @@ -108,12 +131,8 @@ public function populateCache($refresh = false) /** * Check to see if the specified datasource has the provided Halcyon Model - * - * @param string $source The string key of the datasource to check - * @param Model $model The Halcyon Model to check for - * @return boolean */ - public function sourceHasModel(string $source, Model $model) + public function sourceHasModel(string $source, Model $model): bool { if (!$model->exists) { return false; @@ -141,11 +160,8 @@ public function sourceHasModel(string $source, Model $model) /** * Get the available paths for the specified datasource key - * - * @param string $source The string key of the datasource to check - * @return void */ - public function getSourcePaths(string $source) + public function getSourcePaths(string $source): array { $result = []; @@ -164,11 +180,9 @@ public function getSourcePaths(string $source) /** * Forces all operations in a provided closure to run within a selected datasource. * - * @param string $source - * @param \Closure $closure - * @return mixed + * @throws ApplicationException if the provided datasource key doesn't exist */ - public function usingSource(string $source, \Closure $closure) + public function usingSource(string $source, \Closure $closure): mixed { if (!array_key_exists($source, $this->datasources)) { throw new ApplicationException('Invalid datasource specified.'); @@ -191,12 +205,8 @@ public function usingSource(string $source, \Closure $closure) /** * Push the provided model to the specified datasource - * - * @param Model $model The Halcyon Model to push - * @param string $source The string key of the datasource to use - * @return void */ - public function pushToSource(Model $model, string $source) + public function pushToSource(Model $model, string $source): void { $this->usingSource($source, function () use ($model) { $datasource = $this->getActiveDatasource(); @@ -215,12 +225,8 @@ public function pushToSource(Model $model, string $source) /** * Remove the provided model from the specified datasource - * - * @param Model $model The Halcyon model to remove - * @param string $source The string key of the datasource to use - * @return void */ - public function removeFromSource(Model $model, string $source) + public function removeFromSource(Model $model, string $source): void { $this->usingSource($source, function () use ($model) { $datasource = $this->getActiveDatasource(); @@ -236,11 +242,8 @@ public function removeFromSource(Model $model, string $source) /** * Get the appropriate datasource for the provided path - * - * @param string $path - * @return Datasource */ - protected function getDatasourceForPath(string $path) + protected function getDatasourceForPath(string $path): DatasourceInterface { // Always return the active datasource when singleDatasourceMode is enabled if ($this->singleDatasourceMode) { @@ -283,7 +286,7 @@ protected function getDatasourceForPath(string $path) * ]; * @return array $paths ["$dirName/path/1.md", "$dirName/path/2.md"] */ - protected function getValidPaths(string $dirName, array $options = []) + protected function getValidPaths(string $dirName, array $options = []): array { // Initialize result set $paths = []; @@ -325,23 +328,16 @@ protected function getValidPaths(string $dirName, array $options = []) /** * Helper to make file path. - * - * @param string $dirName - * @param string $fileName - * @param string $extension - * @return string */ - protected function makeFilePath(string $dirName, string $fileName, string $extension) + protected function makeFilePath(string $dirName, string $fileName, string $extension): string { return ltrim($dirName . '/' . $fileName . '.' . $extension, '/'); } /** * Get the datasource for use with CRUD operations - * - * @return DatasourceInterface */ - protected function getActiveDatasource() + protected function getActiveDatasource(): DatasourceInterface { return $this->datasources[$this->activeDatasourceKey]; } diff --git a/modules/cms/classes/CmsObject.php b/modules/cms/classes/CmsObject.php index c2600a505a..e1ce327278 100644 --- a/modules/cms/classes/CmsObject.php +++ b/modules/cms/classes/CmsObject.php @@ -138,7 +138,11 @@ public static function listInTheme($theme, $skipCache = false) $loadedItems = []; foreach ($items as $item) { - $loadedItems[] = static::loadCached($theme, $item); + $loaded = static::loadCached($theme, $item); + if ($loaded) { + $loadedItems[] = $loaded; + } + unset($loaded); } $result = $instance->newCollection($loadedItems); diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index 7753db63d9..dd67cc728c 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -319,6 +319,19 @@ public function runPage($page, $useAjax = true) 'session' => App::make('session'), ]); + /* + * Add global vars defined by View::share() into Twig, only if they have yet to be specified. + */ + $globalVars = ViewHelper::getGlobalVars(); + if (!empty($globalVars)) { + $existingGlobals = array_keys($this->getTwig()->getGlobals()); + foreach ($globalVars as $key => $value) { + if (!in_array($key, $existingGlobals)) { + $this->getTwig()->addGlobal($key, $value); + } + } + } + /* * Check for the presence of validation errors in the session. */ diff --git a/modules/cms/classes/Theme.php b/modules/cms/classes/Theme.php index 335e7833ee..bdd199ae0d 100644 --- a/modules/cms/classes/Theme.php +++ b/modules/cms/classes/Theme.php @@ -419,7 +419,8 @@ public function getFormConfig(): array public function assetUrl(?string $path): string { $expiresAt = now()->addMinutes(Config::get('cms.urlCacheTtl', 10)); - return Cache::remember("winter.cms.{$this->dirName}.assetUrl.$path", $expiresAt, function () use ($path) { + $key = sprintf('winter.cms.%s.assetUrl.%s.%s', $this->dirName, request()->getSchemeAndHttpHost(), $path); + return Cache::remember($key, $expiresAt, function () use ($path) { // Handle symbolized paths if ($path && File::isPathSymbol($path)) { return Url::asset(File::localToPublic(File::symbolizePath($path))); diff --git a/modules/cms/lang/lv/lang.php b/modules/cms/lang/lv/lang.php index 76e6a95375..d903336b79 100644 --- a/modules/cms/lang/lv/lang.php +++ b/modules/cms/lang/lv/lang.php @@ -93,6 +93,13 @@ 'find_more_themes' => 'Atrast citas tēmas', 'saving' => 'Saglabā tēmu...', 'return' => 'Atgriezties tēmu sarakstā', + 'default_description' => 'Pielāgotā tēma, kas ģenerēta priekš :url', + 'scaffold' => [ + 'label' => 'Tēmas sagatave', + 'empty' => 'Tukša', + 'less' => 'Pamata (LESS)', + 'tailwind' => 'Tailwind CSS', + ], ], 'maintenance' => [ 'settings_menu' => 'Uzturēšanas režīms', diff --git a/modules/cms/tests/classes/CmsObjectQueryTest.php b/modules/cms/tests/classes/CmsObjectQueryTest.php index 73c06939bb..4f1ca68947 100644 --- a/modules/cms/tests/classes/CmsObjectQueryTest.php +++ b/modules/cms/tests/classes/CmsObjectQueryTest.php @@ -84,6 +84,8 @@ public function testLists() "no-soft-component-class", "optional-full-php-tags", "optional-short-php-tags", + "shared-variable", + "shared-variable-override", "throw-php", "with-component", "with-components", diff --git a/modules/cms/tests/classes/ControllerTest.php b/modules/cms/tests/classes/ControllerTest.php index 8899ef5c54..16d72cb9ce 100644 --- a/modules/cms/tests/classes/ControllerTest.php +++ b/modules/cms/tests/classes/ControllerTest.php @@ -3,10 +3,11 @@ namespace Cms\Tests\Classes; use Cms; +use Request; use System\Tests\Bootstrap\TestCase; use Cms\Classes\Theme; use Cms\Classes\Controller; -use Request; +use System\Helpers\View; use Winter\Storm\Halcyon\Model; use Winter\Storm\Support\Facades\Config; @@ -25,6 +26,8 @@ public function setUp(): void Model::clearBootedModels(); Model::flushEventListeners(); + View::clearVarCache(); + include_once base_path() . '/modules/system/tests/fixtures/plugins/winter/tester/components/Archive.php'; include_once base_path() . '/modules/system/tests/fixtures/plugins/winter/tester/components/Post.php'; include_once base_path() . '/modules/system/tests/fixtures/plugins/winter/tester/components/MainMenu.php'; @@ -682,4 +685,68 @@ public function testMacro() $response ); } + + public function testSharedVariable() + { + $this->app['view']->share('winterStatus', 'Is Awesome'); + + $theme = Theme::load('test'); + $controller = new Controller($theme); + $response = $controller->run('/shared-variable')->getContent(); + + $this->assertStringContainsString( + '

Winter Is Awesome

', + $response + ); + + $this->assertStringContainsString( + '

/shared-variable

', + $response + ); + } + + public function testSharedVariableCannotOverrideSystemGlobals() + { + $this->app['view']->share('winterStatus', 'Is Awesome'); + + // This override should not apply and change the page URL in the fixture template + $this->app['view']->share('this', [ + 'page' => [ + 'url' => '/overriden', + ], + ]); + + $theme = Theme::load('test'); + $controller = new Controller($theme); + $response = $controller->run('/shared-variable')->getContent(); + + $this->assertStringContainsString( + '

Winter Is Awesome

', + $response + ); + + $this->assertStringContainsString( + '

/shared-variable

', + $response + ); + } + + public function testSharedVariableCanBeOverriddenLocally() + { + $this->app['view']->share('winterStatus', 'Is Awesome'); + + $theme = Theme::load('test'); + $controller = new Controller($theme); + $response = $controller->run('/shared-variable-override')->getContent(); + + $this->assertStringContainsString( + '

Winter Is Coming

', + $response + ); + + $this->assertStringContainsString( + '

/shared-variable-override

', + $response + ); + } } diff --git a/modules/cms/tests/fixtures/themes/test/pages/shared-variable-override.htm b/modules/cms/tests/fixtures/themes/test/pages/shared-variable-override.htm new file mode 100644 index 0000000000..38c692f09c --- /dev/null +++ b/modules/cms/tests/fixtures/themes/test/pages/shared-variable-override.htm @@ -0,0 +1,10 @@ +url = '/shared-variable-override' +== +Winter {{ winterStatus }}

+ +

{{ this.page.url }}

diff --git a/modules/cms/tests/fixtures/themes/test/pages/shared-variable.htm b/modules/cms/tests/fixtures/themes/test/pages/shared-variable.htm new file mode 100644 index 0000000000..2bad763902 --- /dev/null +++ b/modules/cms/tests/fixtures/themes/test/pages/shared-variable.htm @@ -0,0 +1,5 @@ +url = '/shared-variable' +== +

Winter {{ winterStatus }}

+ +

{{ this.page.url }}

diff --git a/modules/cms/twig/SnowboardNode.php b/modules/cms/twig/SnowboardNode.php index 2acf40a026..0471f9d6ab 100644 --- a/modules/cms/twig/SnowboardNode.php +++ b/modules/cms/twig/SnowboardNode.php @@ -1,12 +1,11 @@ write("\$_minify = ".CombineAssets::class."::instance()->useMinify;" . PHP_EOL); $moduleMap = [ - 'base' => (Config::get('develop.debugSnowboard', Config::get('app.debug', false)) === true) + 'base' => (Config::get('develop.debugSnowboard', false) === true) ? 'snowboard.base.debug' : 'snowboard.base', 'vendor' => 'snowboard.vendor', @@ -56,16 +55,17 @@ public function compile(TwigCompiler $compiler) if (!static::$baseLoaded) { // Add manifest and vendor files $compiler - ->write("echo ''.PHP_EOL;" . PHP_EOL); + ->write("echo ''.PHP_EOL;" . PHP_EOL); $vendorJs = $moduleMap['vendor']; $compiler - ->write("echo ''.PHP_EOL;" . PHP_EOL); + ->write("echo ''.PHP_EOL;" . PHP_EOL); // Add base script $baseJs = $moduleMap['base']; $baseUrl = Url::to('/'); + $assetUrl = Url::asset('/'); $compiler - ->write("echo ''.PHP_EOL;" . PHP_EOL); + ->write("echo ''.PHP_EOL;" . PHP_EOL); static::$baseLoaded = true; } @@ -73,7 +73,7 @@ public function compile(TwigCompiler $compiler) foreach ($modules as $module) { $moduleJs = $moduleMap[$module]; $compiler - ->write("echo ''.PHP_EOL;" . PHP_EOL); + ->write("echo ''.PHP_EOL;" . PHP_EOL); } } } diff --git a/modules/system/assets/js/build/system.debug.js b/modules/system/assets/js/build/system.debug.js index 6295880f04..00e4106c93 100644 --- a/modules/system/assets/js/build/system.debug.js +++ b/modules/system/assets/js/build/system.debug.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[714,450,988],{579:function(e,t,s){s.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ajaxLoadAssets:"load"}}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,n),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(n)}))}loadStyle(e){return new Promise(((t,s)=>{if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,n),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(n)}))}loadImage(e){return new Promise(((t,s)=>{const n=new Image;n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,n),s(new Error(`Unable to load image file: "${e}"`))})),n.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(e instanceof n.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s,n,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=n?this.parseDuration(n):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,n]=e;-1!==t.indexOf(s)&&i.push(n)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},662:function(e,t){t.Z={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}}},286:function(e,t,s){s.d(t,{Z:function(){return g}});var n=s(579),i=s(281),r={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,s){this.name=e,this.snowboard=new Proxy(t,r),this.instance=s,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),s=0;s!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...s),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instances[0][t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instances[0][s]=function(){for(var t=arguments.length,s=new Array(t),i=0;i0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instance.prototype[t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instance.prototype[s]=function(){for(var t=arguments.length,s=new Array(t),i=0;ithis.instances.splice(this.instances.indexOf(i),1),i.construct(...s),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof n.Z==!1}isSingleton(){return this.instance.prototype instanceof i.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),s=0;sthis.instances.splice(this.instances.indexOf(n),1),n.construct(...t),this.instances.push(n),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var s=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,n=new Array(e),i=0;i{const[t,s]=e;void 0!==this.defaults[t]&&(this.defaults[t]=s)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[s,n]=t;null!==this.defaults[s]&&(e[s]=n)})),e}get(e){if(void 0===e){const e=a.Z.get();return Object.entries(e).forEach((t=>{const[s,n]=t;this.snowboard.globalEvent("cookie.get",s,n,(t=>{e[s]=t}))})),e}let t=a.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,s){let n=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{n=e})),a.Z.set(e,n,h(h({},this.getDefaults()),s))}remove(e,t){a.Z.remove(e,h(h({},this.getDefaults()),t))}}class u extends i.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let s="",n=null,i=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){s="";for(let n=t;n="0"&&e[n]<="9"))return{originLength:s.length,body:s};s+=e[n]}throw new Error(`Broken JSON number body near ${s}`)}if("{"===e[t]||"["===e[t]){const n=[e[t]];s=e[t];for(let i=t+1;i=0?t-5:0,50)}`)}parseKey(e,t,s){let n="";for(let i=t;i="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class f extends i.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const s=(new DOMParser).parseFromString(e,"text/html"),n=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(s.getRootNode()),n?s.body.innerHTML:s.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const s=e.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof n.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new o(s,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((s=>{const[n,i]=s;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;const r=i.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(n)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].indexOf(t);-1!==s&&this.listeners[e].splice(s,1)}globalEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if(!r)if("function"==typeof i)try{!1===i.apply(n,s)&&(r=!0)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{!1===n[i](...s)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...s)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if("function"==typeof i)try{const e=i.apply(n,s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{const e=n[i](...s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...s);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,s){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,s);for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{const t=new Proxy(new n.Z(!0,!0),i.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)},640:function(e,t,s){var n=s(579);function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,n)}return s}function r(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(r(r({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void s();const n={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(n[t]=s)})),0===Object.keys(n).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(n).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{s()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,n]=e;let i=this.options.update&&this.options.update[t]?this.options.update[t]:t,r="replace";"@"===i.substr(0,1)?(r="append",i=i.substr(1)):"^"===i.substr(0,1)?(r="prepend",i=i.substr(1)):"#"!==i.substr(0,1)&&"."!==i.substr(0,1)&&(r="noop");const o=document.querySelectorAll(i);o.length>0&&o.forEach((e=>{switch(r){case"append":e.innerHTML+=n;break;case"prepend":e.innerHTML=n+e.innerHTML;break;case"noop":break;default:e.innerHTML=n}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,n,this);const t=new Event("ajaxUpdate");t.content=n,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,n]=e;t.append(s,n)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,n,i){const r=new Error(e);return r.exception=t||null,r.file=s||null,r.line=n||null,r.trace=i||[],r}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[109],(function(){return t(165),t(640),t(136)}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[714,450,988],{579:function(e,t,s){s.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ajaxLoadAssets:"load"}}dependencies(){return["url"]}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,n),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(n)}))}loadStyle(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,n),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(n)}))}loadImage(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);const n=new Image;n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,n),s(new Error(`Unable to load image file: "${e}"`))})),n.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(e instanceof n.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e,t){!1!==t.options.stripe&&(this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()})))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().asset("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s,n,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=n?this.parseDuration(n):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,n]=e;-1!==t.indexOf(s)&&i.push(n)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},662:function(e,t){t.Z={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}}},286:function(e,t,s){s.d(t,{Z:function(){return g}});var n=s(579),i=s(281),r={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,s){this.name=e,this.snowboard=new Proxy(t,r),this.instance=s,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),s=0;s!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...s),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instances[0][t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instances[0][s]=function(){for(var t=arguments.length,s=new Array(t),i=0;i0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instance.prototype[t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instance.prototype[s]=function(){for(var t=arguments.length,s=new Array(t),i=0;ithis.instances.splice(this.instances.indexOf(i),1),i.construct(...s),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof n.Z==!1}isSingleton(){return this.instance.prototype instanceof i.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),s=0;sthis.instances.splice(this.instances.indexOf(n),1),n.construct(...t),this.instances.push(n),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var s=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,n=new Array(e),i=0;i{const[t,s]=e;void 0!==this.defaults[t]&&(this.defaults[t]=s)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[s,n]=t;null!==this.defaults[s]&&(e[s]=n)})),e}get(e){if(void 0===e){const e=a.Z.get();return Object.entries(e).forEach((t=>{const[s,n]=t;this.snowboard.globalEvent("cookie.get",s,n,(t=>{e[s]=t}))})),e}let t=a.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,s){let n=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{n=e})),a.Z.set(e,n,h(h({},this.getDefaults()),s))}remove(e,t){a.Z.remove(e,h(h({},this.getDefaults()),t))}}class u extends i.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let s="",n=null,i=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){s="";for(let n=t;n="0"&&e[n]<="9"))return{originLength:s.length,body:s};s+=e[n]}throw new Error(`Broken JSON number body near ${s}`)}if("{"===e[t]||"["===e[t]){const n=[e[t]];s=e[t];for(let i=t+1;i=0?t-5:0,50)}`)}parseKey(e,t,s){let n="";for(let i=t;i="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class f extends i.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const s=(new DOMParser).parseFromString(e,"text/html"),n=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(s.getRootNode()),n?s.body.innerHTML:s.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const s=e.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof n.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new o(s,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((s=>{const[n,i]=s;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;const r=i.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(n)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].indexOf(t);-1!==s&&this.listeners[e].splice(s,1)}globalEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if(!r)if("function"==typeof i)try{!1===i.apply(n,s)&&(r=!0)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{!1===n[i](...s)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...s)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if("function"==typeof i)try{const e=i.apply(n,s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{const e=n[i](...s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...s);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,s){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,s);for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{const t=new Proxy(new n.Z(!0,!0),i.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)},640:function(e,t,s){var n=s(579);function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,n)}return s}function r(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(r(r({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void t();const n={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(n[t]=s)})),0===Object.keys(n).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(n).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{t()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,n]=e;let i=this.options.update&&this.options.update[t]?this.options.update[t]:t,r="replace";"@"===i.substr(0,1)?(r="append",i=i.substr(1)):"^"===i.substr(0,1)?(r="prepend",i=i.substr(1)):"#"!==i.substr(0,1)&&"."!==i.substr(0,1)&&(r="noop");const o=document.querySelectorAll(i);o.length>0&&o.forEach((e=>{switch(r){case"append":e.innerHTML+=n;break;case"prepend":e.innerHTML=n+e.innerHTML;break;case"noop":break;default:e.innerHTML=n}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,n,this);const t=new Event("ajaxUpdate");t.content=n,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,n]=e;t.append(s,n)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,n,i){const r=new Error(e);return r.exception=t||null,r.file=s||null,r.line=n||null,r.trace=i||[],r}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[109],(function(){return t(165),t(640),t(136)}));e.O()}]); \ No newline at end of file diff --git a/modules/system/assets/js/build/system.js b/modules/system/assets/js/build/system.js index 2ec7a07bb2..a60492e24d 100644 --- a/modules/system/assets/js/build/system.js +++ b/modules/system/assets/js/build/system.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[290,243,988],{579:function(e,t,s){s.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ajaxLoadAssets:"load"}}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,n),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(n)}))}loadStyle(e){return new Promise(((t,s)=>{if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,n),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(n)}))}loadImage(e){return new Promise(((t,s)=>{const n=new Image;n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,n),s(new Error(`Unable to load image file: "${e}"`))})),n.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(e instanceof n.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s,n,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=n?this.parseDuration(n):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,n]=e;-1!==t.indexOf(s)&&i.push(n)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},662:function(e,t){t.Z={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}}},286:function(e,t,s){s.d(t,{Z:function(){return g}});var n=s(579),i=s(281),r={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,s){this.name=e,this.snowboard=new Proxy(t,r),this.instance=s,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),s=0;s!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...s),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instances[0][t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instances[0][s]=function(){for(var t=arguments.length,s=new Array(t),i=0;i0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instance.prototype[t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instance.prototype[s]=function(){for(var t=arguments.length,s=new Array(t),i=0;ithis.instances.splice(this.instances.indexOf(i),1),i.construct(...s),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof n.Z==!1}isSingleton(){return this.instance.prototype instanceof i.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),s=0;sthis.instances.splice(this.instances.indexOf(n),1),n.construct(...t),this.instances.push(n),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var s=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,n=new Array(e),i=0;i{const[t,s]=e;void 0!==this.defaults[t]&&(this.defaults[t]=s)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[s,n]=t;null!==this.defaults[s]&&(e[s]=n)})),e}get(e){if(void 0===e){const e=a.Z.get();return Object.entries(e).forEach((t=>{const[s,n]=t;this.snowboard.globalEvent("cookie.get",s,n,(t=>{e[s]=t}))})),e}let t=a.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,s){let n=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{n=e})),a.Z.set(e,n,h(h({},this.getDefaults()),s))}remove(e,t){a.Z.remove(e,h(h({},this.getDefaults()),t))}}class u extends i.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let s="",n=null,i=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){s="";for(let n=t;n="0"&&e[n]<="9"))return{originLength:s.length,body:s};s+=e[n]}throw new Error(`Broken JSON number body near ${s}`)}if("{"===e[t]||"["===e[t]){const n=[e[t]];s=e[t];for(let i=t+1;i=0?t-5:0,50)}`)}parseKey(e,t,s){let n="";for(let i=t;i="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class f extends i.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const s=(new DOMParser).parseFromString(e,"text/html"),n=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(s.getRootNode()),n?s.body.innerHTML:s.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const s=e.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof n.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new o(s,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((s=>{const[n,i]=s;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;const r=i.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(n)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].indexOf(t);-1!==s&&this.listeners[e].splice(s,1)}globalEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if(!r)if("function"==typeof i)try{!1===i.apply(n,s)&&(r=!0)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{!1===n[i](...s)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...s)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if("function"==typeof i)try{const e=i.apply(n,s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{const e=n[i](...s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...s);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,s){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,s);for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{const t=new Proxy(new n.Z,i.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)},640:function(e,t,s){var n=s(579);function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,n)}return s}function r(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(r(r({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void s();const n={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(n[t]=s)})),0===Object.keys(n).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(n).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{s()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,n]=e;let i=this.options.update&&this.options.update[t]?this.options.update[t]:t,r="replace";"@"===i.substr(0,1)?(r="append",i=i.substr(1)):"^"===i.substr(0,1)?(r="prepend",i=i.substr(1)):"#"!==i.substr(0,1)&&"."!==i.substr(0,1)&&(r="noop");const o=document.querySelectorAll(i);o.length>0&&o.forEach((e=>{switch(r){case"append":e.innerHTML+=n;break;case"prepend":e.innerHTML=n+e.innerHTML;break;case"noop":break;default:e.innerHTML=n}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,n,this);const t=new Event("ajaxUpdate");t.content=n,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,n]=e;t.append(s,n)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,n,i){const r=new Error(e);return r.exception=t||null,r.file=s||null,r.line=n||null,r.trace=i||[],r}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[109],(function(){return t(236),t(640),t(136)}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[290,243,988],{579:function(e,t,s){s.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ajaxLoadAssets:"load"}}dependencies(){return["url"]}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,n),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(n)}))}loadStyle(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,n),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(n)}))}loadImage(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);const n=new Image;n.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,n),t()})),n.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,n),s(new Error(`Unable to load image file: "${e}"`))})),n.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(e instanceof n.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e,t){!1!==t.options.stripe&&(this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()})))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(281);class i extends n.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().asset("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var n=s(579);class i extends n.Z{construct(e,t,s,n,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=n?this.parseDuration(n):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,n]=e;-1!==t.indexOf(s)&&i.push(n)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},662:function(e,t){t.Z={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}}},286:function(e,t,s){s.d(t,{Z:function(){return g}});var n=s(579),i=s(281),r={get(e,t,s){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(s))return function(){return Reflect.get(e,"plugins")[s].getInstance(...arguments)}}return Reflect.get(e,t,s)},has(e,t){if("string"==typeof t){const s=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(s))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,s){this.name=e,this.snowboard=new Proxy(t,r),this.instance=s,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),s=0;s!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...s),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instances[0][t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instances[0][s]=function(){for(var t=arguments.length,s=new Array(t),i=0;i0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,s]=e;this.instance.prototype[t]=s})),Object.entries(this.mocks).forEach((t=>{const[s,n]=t;this.instance.prototype[s]=function(){for(var t=arguments.length,s=new Array(t),i=0;ithis.instances.splice(this.instances.indexOf(i),1),i.construct(...s),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof n.Z==!1}isSingleton(){return this.instance.prototype instanceof i.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),s=0;sthis.instances.splice(this.instances.indexOf(n),1),n.construct(...t),this.instances.push(n),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var s=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,n=new Array(e),i=0;i{const[t,s]=e;void 0!==this.defaults[t]&&(this.defaults[t]=s)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[s,n]=t;null!==this.defaults[s]&&(e[s]=n)})),e}get(e){if(void 0===e){const e=a.Z.get();return Object.entries(e).forEach((t=>{const[s,n]=t;this.snowboard.globalEvent("cookie.get",s,n,(t=>{e[s]=t}))})),e}let t=a.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,s){let n=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{n=e})),a.Z.set(e,n,h(h({},this.getDefaults()),s))}remove(e,t){a.Z.remove(e,h(h({},this.getDefaults()),t))}}class u extends i.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let s="",n=null,i=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){s="";for(let n=t;n="0"&&e[n]<="9"))return{originLength:s.length,body:s};s+=e[n]}throw new Error(`Broken JSON number body near ${s}`)}if("{"===e[t]||"["===e[t]){const n=[e[t]];s=e[t];for(let i=t+1;i=0?t-5:0,50)}`)}parseKey(e,t,s){let n="";for(let i=t;i="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class f extends i.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const s=(new DOMParser).parseFromString(e,"text/html"),n=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(s.getRootNode()),n?s.body.innerHTML:s.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const s=e.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof n.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new o(s,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((s=>{const[n,i]=s;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;const r=i.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(n)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].indexOf(t);-1!==s&&this.listeners[e].splice(s,1)}globalEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if(!r)if("function"==typeof i)try{!1===i.apply(n,s)&&(r=!0)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{!1===n[i](...s)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...s)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n{const n=this.getPlugin(t);if(n.isFunction())return;n.isSingleton()&&0===n.getInstances().length&&n.initialiseSingleton();const i=n.callMethod("listens")[e];n.getInstances().forEach((n=>{if("function"==typeof i)try{const e=i.apply(n,s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,s)}else if("string"==typeof i){if(!n[i])throw new Error(`Missing "${i}" method in "${t}" plugin`);try{const e=n[i](...s);if(e instanceof Promise==!1)return;r.push(e)}catch(s){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,s)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...s);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,s){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,s);for(var n=arguments.length,i=new Array(n>3?n-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n{const t=new Proxy(new n.Z,i.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)},640:function(e,t,s){var n=s(579);function i(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,n)}return s}function r(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(r(r({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void t();const n={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(n[t]=s)})),0===Object.keys(n).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(n).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{t()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,n]=e;let i=this.options.update&&this.options.update[t]?this.options.update[t]:t,r="replace";"@"===i.substr(0,1)?(r="append",i=i.substr(1)):"^"===i.substr(0,1)?(r="prepend",i=i.substr(1)):"#"!==i.substr(0,1)&&"."!==i.substr(0,1)&&(r="noop");const o=document.querySelectorAll(i);o.length>0&&o.forEach((e=>{switch(r){case"append":e.innerHTML+=n;break;case"prepend":e.innerHTML=n+e.innerHTML;break;case"noop":break;default:e.innerHTML=n}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,n,this);const t=new Event("ajaxUpdate");t.content=n,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,n]=e;t.append(s,n)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,n,i){const r=new Error(e);return r.exception=t||null,r.file=s||null,r.line=n||null,r.trace=i||[],r}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[109],(function(){return t(236),t(640),t(136)}));e.O()}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/ajax/Request.js b/modules/system/assets/js/snowboard/ajax/Request.js index 1f5670634f..b098719047 100644 --- a/modules/system/assets/js/snowboard/ajax/Request.js +++ b/modules/system/assets/js/snowboard/ajax/Request.js @@ -301,7 +301,7 @@ export default class Request extends PluginBase { return new Promise((resolve, reject) => { if (typeof this.options.beforeUpdate === 'function') { if (this.options.beforeUpdate.apply(this, [response]) === false) { - reject(); + resolve(); return; } } @@ -350,7 +350,7 @@ export default class Request extends PluginBase { ); }, () => { - reject(); + resolve(); }, ); }); diff --git a/modules/system/assets/js/snowboard/ajax/handlers/AttributeRequest.js b/modules/system/assets/js/snowboard/ajax/handlers/AttributeRequest.js index 24e01a64fc..eebe1a2585 100644 --- a/modules/system/assets/js/snowboard/ajax/handlers/AttributeRequest.js +++ b/modules/system/assets/js/snowboard/ajax/handlers/AttributeRequest.js @@ -111,7 +111,7 @@ export default class AttributeRequest extends Singleton { clickHandler(event) { let currentElement = event.target; - while (currentElement.tagName !== 'HTML') { + while (currentElement && currentElement.tagName !== 'HTML') { if (!currentElement.matches( 'a[data-request], button[data-request], input[type=button][data-request], input[type=submit][data-request]', )) { diff --git a/modules/system/assets/js/snowboard/build/snowboard.base.debug.js b/modules/system/assets/js/snowboard/build/snowboard.base.debug.js index b8211d7999..513538bfdf 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.base.debug.js +++ b/modules/system/assets/js/snowboard/build/snowboard.base.debug.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[450],{579:function(e,t,n){n.d(t,{Z:function(){return i}});class i{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,n){n.d(t,{Z:function(){return r}});var i=n(579);class r extends i.Z{}},662:function(e,t){t.Z={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}}},286:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(579),r=n(281),s={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,n){this.name=e,this.snowboard=new Proxy(t,s),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),n=0;n!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instances[0][t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instances[0][n]=function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instance.prototype[t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instance.prototype[n]=function(){for(var t=arguments.length,n=new Array(t),r=0;rthis.instances.splice(this.instances.indexOf(r),1),r.construct(...n),this.instances.push(r),r}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof i.Z==!1}isSingleton(){return this.instance.prototype instanceof r.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),n=0;nthis.instances.splice(this.instances.indexOf(i),1),i.construct(...t),this.instances.push(i),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var n=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,i=new Array(e),r=0;r{const[t,n]=e;void 0!==this.defaults[t]&&(this.defaults[t]=n)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[n,i]=t;null!==this.defaults[n]&&(e[n]=i)})),e}get(e){if(void 0===e){const e=l.Z.get();return Object.entries(e).forEach((t=>{const[n,i]=t;this.snowboard.globalEvent("cookie.get",n,i,(t=>{e[n]=t}))})),e}let t=l.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,n){let i=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{i=e})),l.Z.set(e,i,h(h({},this.getDefaults()),n))}remove(e,t){l.Z.remove(e,h(h({},this.getDefaults()),t))}}class f extends r.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let n="",i=null,r=null,s="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");s='"';for(let e=1;e="0"&&e[t]<="9"){n="";for(let i=t;i="0"&&e[i]<="9"))return{originLength:n.length,body:n};n+=e[i]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===e[t]||"["===e[t]){const i=[e[t]];n=e[t];for(let r=t+1;r=0?t-5:0,50)}`)}parseKey(e,t,n){let i="";for(let r=t;r="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class g extends r.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const n=(new DOMParser).parseFromString(e,"text/html"),i=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(n.getRootNode()),i?n.body.innerHTML:n.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const n=e.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof i.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((n=>{const[i,r]=n;if(r.isFunction())return;if(!r.dependenciesFulfilled())return;if(!r.hasMethod("listens"))return;const s=r.callMethod("listens");"string"!=typeof s[e]&&"function"!=typeof s[e]||t.push(i)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}globalEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const r=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if(!s)if("function"==typeof r)try{!1===r.apply(i,n)&&(s=!0)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof r){if(!i[r])throw new Error(`Missing "${r}" method in "${t}" plugin`);try{!1===i[r](...n)&&(s=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!s&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!s)try{!1===t(...n)&&(s=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!s}globalPromiseEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const r=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if("function"==typeof r)try{const e=r.apply(i,n);if(e instanceof Promise==!1)return;s.push(e)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof r){if(!i[r])throw new Error(`Missing "${r}" method in "${t}" plugin`);try{const e=i[r](...n);if(e instanceof Promise==!1)return;s.push(e)}catch(n){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...n);if(e instanceof Promise==!1)return;s.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===s.length?Promise.resolve():Promise.all(s)}logMessage(e,t,n){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,n);for(var i=arguments.length,r=new Array(i>3?i-3:0),s=3;s{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i{const t=new Proxy(new i.Z(!0,!0),r.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)}},function(e){e.O(0,[109],(function(){return t=165,e(e.s=t);var t}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[450],{579:function(e,t,n){n.d(t,{Z:function(){return i}});class i{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,n){n.d(t,{Z:function(){return s}});var i=n(579);class s extends i.Z{}},662:function(e,t){t.Z={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}}},286:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(579),s=n(281),r={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,n){this.name=e,this.snowboard=new Proxy(t,r),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),n=0;n!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instances[0][t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instances[0][n]=function(){for(var t=arguments.length,n=new Array(t),s=0;s0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instance.prototype[t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instance.prototype[n]=function(){for(var t=arguments.length,n=new Array(t),s=0;sthis.instances.splice(this.instances.indexOf(s),1),s.construct(...n),this.instances.push(s),s}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof i.Z==!1}isSingleton(){return this.instance.prototype instanceof s.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),n=0;nthis.instances.splice(this.instances.indexOf(i),1),i.construct(...t),this.instances.push(i),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var n=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,i=new Array(e),s=0;s{const[t,n]=e;void 0!==this.defaults[t]&&(this.defaults[t]=n)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[n,i]=t;null!==this.defaults[n]&&(e[n]=i)})),e}get(e){if(void 0===e){const e=l.Z.get();return Object.entries(e).forEach((t=>{const[n,i]=t;this.snowboard.globalEvent("cookie.get",n,i,(t=>{e[n]=t}))})),e}let t=l.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,n){let i=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{i=e})),l.Z.set(e,i,h(h({},this.getDefaults()),n))}remove(e,t){l.Z.remove(e,h(h({},this.getDefaults()),t))}}class f extends s.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let n="",i=null,s=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){n="";for(let i=t;i="0"&&e[i]<="9"))return{originLength:n.length,body:n};n+=e[i]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===e[t]||"["===e[t]){const i=[e[t]];n=e[t];for(let s=t+1;s=0?t-5:0,50)}`)}parseKey(e,t,n){let i="";for(let s=t;s="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class d extends s.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const n=(new DOMParser).parseFromString(e,"text/html"),i=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(n.getRootNode()),i?n.body.innerHTML:n.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const n=e.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof i.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((n=>{const[i,s]=n;if(s.isFunction())return;if(!s.dependenciesFulfilled())return;if(!s.hasMethod("listens"))return;const r=s.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(i)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}globalEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const s=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if(!r)if("function"==typeof s)try{!1===s.apply(i,n)&&(r=!0)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof s){if(!i[s])throw new Error(`Missing "${s}" method in "${t}" plugin`);try{!1===i[s](...n)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...n)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const s=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if("function"==typeof s)try{const e=s.apply(i,n);if(e instanceof Promise==!1)return;r.push(e)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof s){if(!i[s])throw new Error(`Missing "${s}" method in "${t}" plugin`);try{const e=i[s](...n);if(e instanceof Promise==!1)return;r.push(e)}catch(n){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...n);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,n){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,n);for(var i=arguments.length,s=new Array(i>3?i-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i{const t=new Proxy(new i.Z(!0,!0),s.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)}},function(e){e.O(0,[109],(function(){return t=165,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.base.js b/modules/system/assets/js/snowboard/build/snowboard.base.js index a94056e5cb..e92fb327a1 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.base.js +++ b/modules/system/assets/js/snowboard/build/snowboard.base.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[243],{579:function(e,t,n){n.d(t,{Z:function(){return i}});class i{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,n){n.d(t,{Z:function(){return r}});var i=n(579);class r extends i.Z{}},662:function(e,t){t.Z={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}}},286:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(579),r=n(281),s={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,n){this.name=e,this.snowboard=new Proxy(t,s),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),n=0;n!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instances[0][t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instances[0][n]=function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instance.prototype[t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instance.prototype[n]=function(){for(var t=arguments.length,n=new Array(t),r=0;rthis.instances.splice(this.instances.indexOf(r),1),r.construct(...n),this.instances.push(r),r}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof i.Z==!1}isSingleton(){return this.instance.prototype instanceof r.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),n=0;nthis.instances.splice(this.instances.indexOf(i),1),i.construct(...t),this.instances.push(i),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var n=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,i=new Array(e),r=0;r{const[t,n]=e;void 0!==this.defaults[t]&&(this.defaults[t]=n)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[n,i]=t;null!==this.defaults[n]&&(e[n]=i)})),e}get(e){if(void 0===e){const e=l.Z.get();return Object.entries(e).forEach((t=>{const[n,i]=t;this.snowboard.globalEvent("cookie.get",n,i,(t=>{e[n]=t}))})),e}let t=l.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,n){let i=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{i=e})),l.Z.set(e,i,h(h({},this.getDefaults()),n))}remove(e,t){l.Z.remove(e,h(h({},this.getDefaults()),t))}}class f extends r.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let n="",i=null,r=null,s="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");s='"';for(let e=1;e="0"&&e[t]<="9"){n="";for(let i=t;i="0"&&e[i]<="9"))return{originLength:n.length,body:n};n+=e[i]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===e[t]||"["===e[t]){const i=[e[t]];n=e[t];for(let r=t+1;r=0?t-5:0,50)}`)}parseKey(e,t,n){let i="";for(let r=t;r="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class g extends r.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const n=(new DOMParser).parseFromString(e,"text/html"),i=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(n.getRootNode()),i?n.body.innerHTML:n.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const n=e.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof i.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((n=>{const[i,r]=n;if(r.isFunction())return;if(!r.dependenciesFulfilled())return;if(!r.hasMethod("listens"))return;const s=r.callMethod("listens");"string"!=typeof s[e]&&"function"!=typeof s[e]||t.push(i)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}globalEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const r=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if(!s)if("function"==typeof r)try{!1===r.apply(i,n)&&(s=!0)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof r){if(!i[r])throw new Error(`Missing "${r}" method in "${t}" plugin`);try{!1===i[r](...n)&&(s=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!s&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!s)try{!1===t(...n)&&(s=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!s}globalPromiseEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const r=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if("function"==typeof r)try{const e=r.apply(i,n);if(e instanceof Promise==!1)return;s.push(e)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof r){if(!i[r])throw new Error(`Missing "${r}" method in "${t}" plugin`);try{const e=i[r](...n);if(e instanceof Promise==!1)return;s.push(e)}catch(n){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...n);if(e instanceof Promise==!1)return;s.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===s.length?Promise.resolve():Promise.all(s)}logMessage(e,t,n){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,n);for(var i=arguments.length,r=new Array(i>3?i-3:0),s=3;s{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i{const t=new Proxy(new i.Z,r.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)}},function(e){e.O(0,[109],(function(){return t=236,e(e.s=t);var t}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[243],{579:function(e,t,n){n.d(t,{Z:function(){return i}});class i{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,n){n.d(t,{Z:function(){return s}});var i=n(579);class s extends i.Z{}},662:function(e,t){t.Z={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}}},286:function(e,t,n){n.d(t,{Z:function(){return b}});var i=n(579),s=n(281),r={get(e,t,n){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))throw new Error(`You cannot use the "${t}" Snowboard method within a plugin.`);if(e.hasPlugin(n))return function(){return Reflect.get(e,"plugins")[n].getInstance(...arguments)}}return Reflect.get(e,t,n)},has(e,t){if("string"==typeof t){const n=t.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(t))return!1;if(e.hasPlugin(n))return!0}return Reflect.has(e,t)}};class o{constructor(e,t,n){this.name=e,this.snowboard=new Proxy(t,r),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(e){return!this.isFunction()&&"function"==typeof this.instance.prototype[e]}callMethod(){if(this.isFunction())return null;for(var e=arguments.length,t=new Array(e),n=0;n!this.snowboard.getPluginNames().includes(e)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${e.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instances[0][t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instances[0][n]=function(){for(var t=arguments.length,n=new Array(t),s=0;s0&&(Object.entries(this.originalFunctions).forEach((e=>{const[t,n]=e;this.instance.prototype[t]=n})),Object.entries(this.mocks).forEach((t=>{const[n,i]=t;this.instance.prototype[n]=function(){for(var t=arguments.length,n=new Array(t),s=0;sthis.instances.splice(this.instances.indexOf(s),1),s.construct(...n),this.instances.push(s),s}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof i.Z==!1}isSingleton(){return this.instance.prototype instanceof s.Z==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var e=arguments.length,t=new Array(e),n=0;nthis.instances.splice(this.instances.indexOf(i),1),i.construct(...t),this.instances.push(i),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((e=>e.toLowerCase()))}dependenciesFulfilled(){const e=this.getDependencies();let t=!0;return e.forEach((e=>{this.snowboard.hasPlugin(e)||(t=!1)})),t}mock(e,t){var n=this;if(!this.isFunction()){if(!this.instance.prototype[e])throw new Error(`Function "${e}" does not exist and cannot be mocked`);this.mocks[e]=t,this.originalFunctions[e]=this.instance.prototype[e],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][e]=function(){for(var e=arguments.length,i=new Array(e),s=0;s{const[t,n]=e;void 0!==this.defaults[t]&&(this.defaults[t]=n)}))}getDefaults(){const e={};return Object.entries(this.defaults).forEach((t=>{const[n,i]=t;null!==this.defaults[n]&&(e[n]=i)})),e}get(e){if(void 0===e){const e=l.Z.get();return Object.entries(e).forEach((t=>{const[n,i]=t;this.snowboard.globalEvent("cookie.get",n,i,(t=>{e[n]=t}))})),e}let t=l.Z.get(e);return this.snowboard.globalEvent("cookie.get",e,t,(e=>{t=e})),t}set(e,t,n){let i=t;return this.snowboard.globalEvent("cookie.set",e,t,(e=>{i=e})),l.Z.set(e,i,h(h({},this.getDefaults()),n))}remove(e,t){l.Z.remove(e,h(h({},this.getDefaults()),t))}}class f extends s.Z{construct(){window.wnJSON=e=>this.parse(e),window.ocJSON=window.wnJSON}parse(e){const t=this.parseString(e);return JSON.parse(t)}parseString(e){let t=e.trim();if(!t.length)throw new Error("Broken JSON object.");let n="",i=null,s=null,r="";for(;t&&","===t[0];)t=t.substr(1);if('"'===t[0]||"'"===t[0]){if(t[t.length-1]!==t[0])throw new Error("Invalid string JSON object.");r='"';for(let e=1;e="0"&&e[t]<="9"){n="";for(let i=t;i="0"&&e[i]<="9"))return{originLength:n.length,body:n};n+=e[i]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===e[t]||"["===e[t]){const i=[e[t]];n=e[t];for(let s=t+1;s=0?t-5:0,50)}`)}parseKey(e,t,n){let i="";for(let s=t;s="a"&&e[0]<="z"||e[0]>="A"&&e[0]<="Z"||"_"===e[0]||(e[0]>="0"&&e[0]<="9"||("$"===e[0]||e.charCodeAt(0)>255)))}isBlankChar(e){return" "===e||"\n"===e||"\t"===e}}class d extends s.Z{construct(){window.wnSanitize=e=>this.sanitize(e),window.ocSanitize=window.wnSanitize}sanitize(e,t){const n=(new DOMParser).parseFromString(e,"text/html"),i=void 0===t||"boolean"!=typeof t||t;return this.sanitizeNode(n.getRootNode()),i?n.body.innerHTML:n.innerHTML}sanitizeNode(e){if("SCRIPT"===e.tagName)return void e.remove();this.trimAttributes(e);Array.from(e.children).forEach((e=>{this.sanitizeNode(e)}))}trimAttributes(e){if(e.attributes)for(let t=0;t{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((e=>{e.isSingleton()&&e.dependenciesFulfilled()&&e.initialiseSingleton()}))}addPlugin(e,t){const n=e.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${e}" is already registered.`);if("function"!=typeof t&&t instanceof i.Z==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[e]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,t),this.debug(`Plugin "${e}" registered`),Object.values(this.getPlugins()).forEach((e=>{if(e.isSingleton()&&!e.isInitialised()&&e.dependenciesFulfilled()&&e.hasMethod("listens")&&Object.keys(e.callMethod("listens")).includes("ready")&&this.readiness.dom){const t=e.callMethod("listens").ready;e.callMethod(t)}}))}removePlugin(e){const t=e.toLowerCase();this.hasPlugin(t)?(this.plugins[t].getInstances().forEach((e=>{e.destruct()})),delete this.plugins[t],delete this[t],delete this[e],this.debug(`Plugin "${e}" removed`)):this.debug(`Plugin "${e}" already removed`)}hasPlugin(e){const t=e.toLowerCase();return void 0!==this.plugins[t]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(e){const t=e.toLowerCase();if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(e){const t=[];return Object.entries(this.plugins).forEach((n=>{const[i,s]=n;if(s.isFunction())return;if(!s.dependenciesFulfilled())return;if(!s.hasMethod("listens"))return;const r=s.callMethod("listens");"string"!=typeof r[e]&&"function"!=typeof r[e]||t.push(i)})),t}ready(e){this.readiness.dom&&e(),this.on("ready",e)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].includes(t)||this.listeners[e].push(t)}off(e,t){if(!this.listeners[e])return;const n=this.listeners[e].indexOf(t);-1!==n&&this.listeners[e].splice(n,1)}globalEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const s=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if(!r)if("function"==typeof s)try{!1===s.apply(i,n)&&(r=!0)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof s){if(!i[s])throw new Error(`Missing "${s}" method in "${t}" plugin`);try{!1===i[s](...n)&&(r=!0,this.debug(`Global event "${e}" cancelled by "${t}" plugin`))}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),!r&&this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global event "${e}"`),this.listeners[e].forEach((t=>{if(!r)try{!1===t(...n)&&(r=!0,this.debug(`Global event "${e} cancelled by an ad-hoc listener.`))}catch(t){this.error(`Error thrown in "${e}" event by an ad-hoc listener.`,t)}}))),!r}globalPromiseEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const i=this.getPlugin(t);if(i.isFunction())return;i.isSingleton()&&0===i.getInstances().length&&i.initialiseSingleton();const s=i.callMethod("listens")[e];i.getInstances().forEach((i=>{if("function"==typeof s)try{const e=s.apply(i,n);if(e instanceof Promise==!1)return;r.push(e)}catch(n){this.error(`Error thrown in "${e}" event by "${t}" plugin.`,n)}else if("string"==typeof s){if(!i[s])throw new Error(`Missing "${s}" method in "${t}" plugin`);try{const e=i[s](...n);if(e instanceof Promise==!1)return;r.push(e)}catch(n){this.error(`Error thrown in "${e}" promise event by "${t}" plugin.`,n)}}else this.error(`Listen method for "${e}" event in "${t}" plugin is not a function or string.`)}))})),this.listeners[e]&&this.listeners[e].length>0&&(this.debug(`Found ${this.listeners[e].length} ad-hoc listener(s) for global promise event "${e}"`),this.listeners[e].forEach((t=>{try{const e=t(...n);if(e instanceof Promise==!1)return;r.push(e)}catch(t){this.error(`Error thrown in "${e}" promise event by an ad-hoc listener.`,t)}}))),0===r.length?Promise.resolve():Promise.all(r)}logMessage(e,t,n){console.groupCollapsed("%c[Snowboard]",`color: ${e}; font-weight: ${t?"bold":"normal"};`,n);for(var i=arguments.length,s=new Array(i>3?i-3:0),r=3;r{e+=1,console.log(`%c${e}:`,"color: rgb(88, 88, 88); font-weight: normal;",t)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),i=1;i1?t-1:0),i=1;i{const t=new Proxy(new i.Z,s.Z);e.snowboard=t,e.Snowboard=t,e.SnowBoard=t})(window)}},function(e){e.O(0,[109],(function(){return t=236,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.data-attr.js b/modules/system/assets/js/snowboard/build/snowboard.data-attr.js index 41fe7fbf97..39059da802 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.data-attr.js +++ b/modules/system/assets/js/snowboard/build/snowboard.data-attr.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[806],{579:function(e,t,r){r.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,r){r.d(t,{Z:function(){return a}});var n=r(579);class a extends n.Z{}},974:function(e,t,r){var n=r(281);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;tthis.changeHandler(e))),window.addEventListener("click",(e=>this.clickHandler(e))),window.addEventListener("keydown",(e=>this.keyDownHandler(e))),window.addEventListener("submit",(e=>this.submitHandler(e)))}disableDefaultFormValidation(){document.querySelectorAll("form[data-request]:not([data-browser-validate])").forEach((e=>{e.setAttribute("novalidate",!0)}))}detachHandlers(){window.removeEventListener("change",(e=>this.changeHandler(e))),window.removeEventListener("click",(e=>this.clickHandler(e))),window.removeEventListener("keydown",(e=>this.keyDownHandler(e))),window.removeEventListener("submit",(e=>this.submitHandler(e)))}changeHandler(e){e.target.matches("select[data-request], input[type=radio][data-request], input[type=checkbox][data-request], input[type=file][data-request]")&&this.processRequestOnElement(e.target)}clickHandler(e){let t=e.target;for(;"HTML"!==t.tagName;){if(t.matches("a[data-request], button[data-request], input[type=button][data-request], input[type=submit][data-request]")){e.preventDefault(),this.processRequestOnElement(t);break}t=t.parentElement}}keyDownHandler(e){if(!e.target.matches("input"))return;-1!==["checkbox","color","date","datetime","datetime-local","email","image","month","number","password","radio","range","search","tel","text","time","url","week"].indexOf(e.target.getAttribute("type"))&&("Enter"===e.key&&e.target.matches("*[data-request]")?(this.processRequestOnElement(e.target),e.preventDefault(),e.stopImmediatePropagation()):e.target.matches("*[data-track-input]")&&this.trackInput(e.target))}submitHandler(e){e.target.matches("form[data-request]")&&(e.preventDefault(),this.processRequestOnElement(e.target))}processRequestOnElement(e){const t=e.dataset,r=String(t.request),n={confirm:"requestConfirm"in t?String(t.requestConfirm):null,redirect:"requestRedirect"in t?String(t.requestRedirect):null,loading:"requestLoading"in t?String(t.requestLoading):null,flash:"requestFlash"in t,files:"requestFiles"in t,browserValidate:"requestBrowserValidate"in t,form:"requestForm"in t?String(t.requestForm):null,url:"requestUrl"in t?String(t.requestUrl):null,update:"requestUpdate"in t?this.parseData(String(t.requestUpdate)):[],data:"requestData"in t?this.parseData(String(t.requestData)):[]};this.snowboard.request(e,r,n)}onAjaxSetup(e){if(!e.element)return;const t=e.element.getAttribute("name"),r=s(s({},this.getParentRequestData(e.element)),e.options.data);e.element&&e.element.matches("input, textarea, select, button")&&!e.form&&t&&!e.options.data[t]&&(r[t]=e.element.value),e.options.data=r}getParentRequestData(e){const t=[];let r={},n=e;for(;n.parentElement&&"HTML"!==n.parentElement.tagName;)t.push(n.parentElement),n=n.parentElement;return t.reverse(),t.forEach((e=>{const t=e.dataset;"requestData"in t&&(r=s(s({},r),this.parseData(t.requestData)))})),r}parseData(e){let t;if(void 0===e&&(t=""),"object"==typeof t)return t;try{return this.snowboard.jsonparser().parse(`{${e}}`)}catch(e){throw new Error(`Error parsing the data attribute on element: ${e.message}`)}}trackInput(e){const{lastValue:t}=e.dataset,r=e.dataset.trackInput||300;void 0!==t&&t===e.value||(this.resetTrackInputTimer(e),e.dataset.inputTimer=window.setTimeout((()=>{if(e.dataset.request)return void this.processRequestOnElement(e);let t=e;for(;t.parentElement&&"HTML"!==t.parentElement.tagName;)if(t=t.parentElement,"FORM"===t.tagName&&t.dataset.request){this.processRequestOnElement(t);break}}),r))}resetTrackInputTimer(e){e.dataset.inputTimer&&(window.clearTimeout(e.dataset.inputTimer),e.dataset.inputTimer=null)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the HTML data attribute AJAX request feature.");window.Snowboard.addPlugin("attributeRequest",o)}},function(e){var t;t=974,e(e.s=t)}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[806],{579:function(e,t,r){r.d(t,{Z:function(){return n}});class n{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,r){r.d(t,{Z:function(){return a}});var n=r(579);class a extends n.Z{}},974:function(e,t,r){var n=r(281);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;tthis.changeHandler(e))),window.addEventListener("click",(e=>this.clickHandler(e))),window.addEventListener("keydown",(e=>this.keyDownHandler(e))),window.addEventListener("submit",(e=>this.submitHandler(e)))}disableDefaultFormValidation(){document.querySelectorAll("form[data-request]:not([data-browser-validate])").forEach((e=>{e.setAttribute("novalidate",!0)}))}detachHandlers(){window.removeEventListener("change",(e=>this.changeHandler(e))),window.removeEventListener("click",(e=>this.clickHandler(e))),window.removeEventListener("keydown",(e=>this.keyDownHandler(e))),window.removeEventListener("submit",(e=>this.submitHandler(e)))}changeHandler(e){e.target.matches("select[data-request], input[type=radio][data-request], input[type=checkbox][data-request], input[type=file][data-request]")&&this.processRequestOnElement(e.target)}clickHandler(e){let t=e.target;for(;t&&"HTML"!==t.tagName;){if(t.matches("a[data-request], button[data-request], input[type=button][data-request], input[type=submit][data-request]")){e.preventDefault(),this.processRequestOnElement(t);break}t=t.parentElement}}keyDownHandler(e){if(!e.target.matches("input"))return;-1!==["checkbox","color","date","datetime","datetime-local","email","image","month","number","password","radio","range","search","tel","text","time","url","week"].indexOf(e.target.getAttribute("type"))&&("Enter"===e.key&&e.target.matches("*[data-request]")?(this.processRequestOnElement(e.target),e.preventDefault(),e.stopImmediatePropagation()):e.target.matches("*[data-track-input]")&&this.trackInput(e.target))}submitHandler(e){e.target.matches("form[data-request]")&&(e.preventDefault(),this.processRequestOnElement(e.target))}processRequestOnElement(e){const t=e.dataset,r=String(t.request),n={confirm:"requestConfirm"in t?String(t.requestConfirm):null,redirect:"requestRedirect"in t?String(t.requestRedirect):null,loading:"requestLoading"in t?String(t.requestLoading):null,flash:"requestFlash"in t,files:"requestFiles"in t,browserValidate:"requestBrowserValidate"in t,form:"requestForm"in t?String(t.requestForm):null,url:"requestUrl"in t?String(t.requestUrl):null,update:"requestUpdate"in t?this.parseData(String(t.requestUpdate)):[],data:"requestData"in t?this.parseData(String(t.requestData)):[]};this.snowboard.request(e,r,n)}onAjaxSetup(e){if(!e.element)return;const t=e.element.getAttribute("name"),r=s(s({},this.getParentRequestData(e.element)),e.options.data);e.element&&e.element.matches("input, textarea, select, button")&&!e.form&&t&&!e.options.data[t]&&(r[t]=e.element.value),e.options.data=r}getParentRequestData(e){const t=[];let r={},n=e;for(;n.parentElement&&"HTML"!==n.parentElement.tagName;)t.push(n.parentElement),n=n.parentElement;return t.reverse(),t.forEach((e=>{const t=e.dataset;"requestData"in t&&(r=s(s({},r),this.parseData(t.requestData)))})),r}parseData(e){let t;if(void 0===e&&(t=""),"object"==typeof t)return t;try{return this.snowboard.jsonparser().parse(`{${e}}`)}catch(e){throw new Error(`Error parsing the data attribute on element: ${e.message}`)}}trackInput(e){const{lastValue:t}=e.dataset,r=e.dataset.trackInput||300;void 0!==t&&t===e.value||(this.resetTrackInputTimer(e),e.dataset.inputTimer=window.setTimeout((()=>{if(e.dataset.request)return void this.processRequestOnElement(e);let t=e;for(;t.parentElement&&"HTML"!==t.parentElement.tagName;)if(t=t.parentElement,"FORM"===t.tagName&&t.dataset.request){this.processRequestOnElement(t);break}}),r))}resetTrackInputTimer(e){e.dataset.inputTimer&&(window.clearTimeout(e.dataset.inputTimer),e.dataset.inputTimer=null)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the HTML data attribute AJAX request feature.");window.Snowboard.addPlugin("attributeRequest",o)}},function(e){var t;t=974,e(e.s=t)}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.extras.js b/modules/system/assets/js/snowboard/build/snowboard.extras.js index a3025fd871..5a447a9111 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.extras.js +++ b/modules/system/assets/js/snowboard/build/snowboard.extras.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[459],{579:function(e,t,s){s.d(t,{Z:function(){return a}});class a{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{listens(){return{ajaxLoadAssets:"load"}}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{if(document.querySelector(`script[src="${e}"]`))return void t();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,a),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(a)}))}loadStyle(e){return new Promise(((t,s)=>{if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("href",e),a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,a),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(a)}))}loadImage(e){return new Promise(((t,s)=>{const a=new Image;a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,a),s(new Error(`Unable to load image file: "${e}"`))})),a.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s){if(e instanceof a.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e){this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s,a,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=a?this.parseDuration(a):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,a]=e;-1!==t.indexOf(s)&&i.push(a)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},820:function(e,t,s){var a=s(270),i=s(281);class r extends i.Z{dependencies(){return["flash"]}listens(){return{ready:"ready",ajaxErrorMessage:"ajaxErrorMessage",ajaxFlashMessages:"ajaxFlashMessages"}}ready(){document.querySelectorAll('[data-control="flash-message"]').forEach((e=>{this.snowboard.flash(e.innerHTML,e.dataset.flashType,e.dataset.flashDuration),e.remove()}))}ajaxErrorMessage(e){return this.snowboard.flash(e,"error"),!1}ajaxFlashMessages(e){return Object.entries(e).forEach((e=>{const[t,s]=e;this.snowboard.flash(s,t)})),!1}}class n extends i.Z{construct(){this.errorBags=[]}listens(){return{ready:"ready",ajaxStart:"clearValidation",ajaxValidationErrors:"doValidation"}}ready(){this.collectErrorBags(document)}doValidation(e,t,s){if(void 0===s.element.dataset.requestValidate)return null;if(!e)return null;return this.errorBags.filter((t=>t.form===e)).forEach((e=>{this.showErrorBag(e,t)})),!1}clearValidation(e,t){if(void 0===t.element.dataset.requestValidate)return;if(!t.form)return;this.errorBags.filter((e=>e.form===t.form)).forEach((e=>{this.hideErrorBag(e)}))}collectErrorBags(e){e.querySelectorAll("[data-validate-error], [data-validate-for]").forEach((e=>{const t=e.closest("form[data-request-validate]");if(!t)return void e.parentNode.removeChild(e);let s=null;e.matches("[data-validate-error]")&&(s=e.querySelector("[data-message]"));const a=document.createComment(""),i={element:e,form:t,validateFor:e.dataset.validateFor?e.dataset.validateFor.split(/\s*,\s*/):"*",placeholder:a,messageListElement:s?s.cloneNode(!0):null,messageListAnchor:null,customMessage:!!e.dataset.validateFor&&(""!==e.textContent||e.childNodes.length>0)};if(s){const e=document.createComment("");s.parentNode.replaceChild(e,s),i.messageListAnchor=e}e.parentNode.replaceChild(a,e),this.errorBags.push(i)}))}hideErrorBag(e){e.element.isConnected&&e.element.parentNode.replaceChild(e.placeholder,e.element)}showErrorBag(e,t){if(this.errorBagValidatesField(e,t))if(e.element.isConnected||e.placeholder.parentNode.replaceChild(e.element,e.placeholder),"*"!==e.validateFor){if(!e.customMessage){const s=Object.keys(t).filter((t=>e.validateFor.includes(t))).shift();[e.element.innerHTML]=t[s]}}else e.messageListElement?(e.element.querySelectorAll("[data-validation-message]").forEach((e=>{e.parentNode.removeChild(e)})),Object.entries(t).forEach((t=>{const[,s]=t;s.forEach((t=>{const s=e.messageListElement.cloneNode(!0);s.dataset.validationMessage="",s.innerHTML=t,e.messageListAnchor.after(s)}))}))):[e.element.innerHTML]=t[Object.keys(t).shift()]}errorBagValidatesField(e,t){return"*"===e.validateFor||Object.keys(t).filter((t=>e.validateFor.includes(t))).length>0}}var o,l=s(269),d=s(553),c=s(277),h=s(32),u=s(809),m=s(763);if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the extra plugins.");(o=window.Snowboard).addPlugin("assetLoader",u.Z),o.addPlugin("dataConfig",m.Z),o.addPlugin("extrasStyles",h.Z),o.addPlugin("transition",l.Z),o.addPlugin("flash",a.Z),o.addPlugin("flashListener",r),o.addPlugin("formValidation",n),o.addPlugin("attachLoading",d.Z),o.addPlugin("stripeLoader",c.Z)}},function(e){var t;t=820,e(e.s=t)}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[459],{579:function(e,t,s){s.d(t,{Z:function(){return a}});class a{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},281:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{}},809:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{listens(){return{ajaxLoadAssets:"load"}}dependencies(){return["url"]}async load(e){if(e.js&&e.js.length>0)for(const t of e.js)try{await this.loadScript(t)}catch(e){return Promise.reject(e)}if(e.css&&e.css.length>0)for(const t of e.css)try{await this.loadStyle(t)}catch(e){return Promise.reject(e)}if(e.img&&e.img.length>0)for(const t of e.img)try{await this.loadImage(t)}catch(e){return Promise.reject(e)}return Promise.resolve()}loadScript(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`script[src="${e}"]`))return void t();const a=document.createElement("script");a.setAttribute("type","text/javascript"),a.setAttribute("src",e),a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",e,a),s(new Error(`Unable to load script file: "${e}"`))})),document.body.append(a)}))}loadStyle(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t();const a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("href",e),a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",e,a),s(new Error(`Unable to load stylesheet file: "${e}"`))})),document.head.append(a)}))}loadImage(e){return new Promise(((t,s)=>{e=this.snowboard.url().asset(e);const a=new Image;a.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",e,a),t()})),a.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",e,a),s(new Error(`Unable to load image file: "${e}"`))})),a.src=e}))}}},553:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.add(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.add(this.getLoadingClass(t.element))}ajaxDone(e,t){if(t.element)if("FORM"===t.element.tagName){const e=t.element.querySelectorAll("[data-attach-loading]");e.length>0&&e.forEach((e=>{e.classList.remove(this.getLoadingClass(e))}))}else void 0!==t.element.dataset.attachLoading&&t.element.classList.remove(this.getLoadingClass(t.element))}getLoadingClass(e){return void 0!==e.dataset.attachLoading&&""!==e.dataset.attachLoading?e.dataset.attachLoading:"wn-loading"}}},763:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s){if(e instanceof a.Z==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(t instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=e,this.element=t,this.localConfig=s||{},this.instanceConfig={},this.acceptedConfigs={},this.refresh()}get(e){return void 0===e?this.instanceConfig:void 0!==this.instanceConfig[e]?this.instanceConfig[e]:void 0}set(e,t,s){if(void 0===e)throw new Error("You must provide a configuration key to set");this.instanceConfig[e]=t,!0===s&&(this.element.dataset[e]=t,this.localConfig[e]=t)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const e=this.getDefaults();if(!1===this.acceptedConfigs)return e;for(const t in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.coerceValue(this.element.dataset[t]));for(const t in this.localConfig)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(t))&&(e[t]=this.localConfig[t]);return e}coerceValue(e){const t=String(e);if("null"===t)return null;if("undefined"!==t){if(t.startsWith("base64:")){const e=t.replace(/^base64:/,""),s=atob(e);return this.coerceValue(s)}if(["true","yes"].includes(t.toLowerCase()))return!0;if(["false","no"].includes(t.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(t))return Number(t);try{return this.snowboard.jsonParser().parse(t)}catch(e){return""===t||t}}}}},270:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s){if(this.message=e,this.type=t||"default",this.duration=Number(s||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((e=>e.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},277:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(e,t){!1!==t.options.stripe&&(this.show(),e.then((()=>{this.hide()})).catch((()=>{this.hide()})))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const e=this.stripe.cloneNode(!0);this.indicator.appendChild(e),this.stripe.remove(),this.stripe=e,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(e){this.counter-=1,!0===e&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},32:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(281);class i extends a.Z{listens(){return{ready:"ready"}}ready(){let e=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(e=!0)})),!e){const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",this.snowboard.url().asset("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(e)}}}},269:function(e,t,s){s.d(t,{Z:function(){return i}});var a=s(579);class i extends a.Z{construct(e,t,s,a,i){if(e instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=e,"string"!=typeof t)throw new Error("Transition name must be specified as a string");if(this.transition=t,s&&"function"!=typeof s)throw new Error("Callback must be a valid function");this.callback=s,this.duration=a?this.parseDuration(a):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var e=arguments.length,t=new Array(e),s=0;s{const[s,a]=e;-1!==t.indexOf(s)&&i.push(a)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((e=>{this.element.classList.add(e)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((e=>{this.element.classList.remove(e)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((e=>{this.element.classList.remove(e)}))}parseDuration(e){const t=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(e),s=Number(t[1]);return"sec"===("s"===t[3]?"sec":"msec")?1e3*s+"ms":`${Math.floor(s)}ms`}}},820:function(e,t,s){var a=s(270),i=s(281);class r extends i.Z{dependencies(){return["flash"]}listens(){return{ready:"ready",ajaxErrorMessage:"ajaxErrorMessage",ajaxFlashMessages:"ajaxFlashMessages"}}ready(){document.querySelectorAll('[data-control="flash-message"]').forEach((e=>{this.snowboard.flash(e.innerHTML,e.dataset.flashType,e.dataset.flashDuration),e.remove()}))}ajaxErrorMessage(e){return this.snowboard.flash(e,"error"),!1}ajaxFlashMessages(e){return Object.entries(e).forEach((e=>{const[t,s]=e;this.snowboard.flash(s,t)})),!1}}class n extends i.Z{construct(){this.errorBags=[]}listens(){return{ready:"ready",ajaxStart:"clearValidation",ajaxValidationErrors:"doValidation"}}ready(){this.collectErrorBags(document)}doValidation(e,t,s){if(s.element&&void 0===s.element.dataset.requestValidate)return null;if(!e)return null;return this.errorBags.filter((t=>t.form===e)).forEach((e=>{this.showErrorBag(e,t)})),!1}clearValidation(e,t){if(t.element&&void 0===t.element.dataset.requestValidate)return;if(!t.form)return;this.errorBags.filter((e=>e.form===t.form)).forEach((e=>{this.hideErrorBag(e)}))}collectErrorBags(e){e.querySelectorAll("[data-validate-error], [data-validate-for]").forEach((e=>{const t=e.closest("form[data-request-validate]");if(!t)return void e.parentNode.removeChild(e);let s=null;e.matches("[data-validate-error]")&&(s=e.querySelector("[data-message]"));const a=document.createComment(""),i={element:e,form:t,validateFor:e.dataset.validateFor?e.dataset.validateFor.split(/\s*,\s*/):"*",placeholder:a,messageListElement:s?s.cloneNode(!0):null,messageListAnchor:null,customMessage:!!e.dataset.validateFor&&(""!==e.textContent||e.childNodes.length>0)};if(s){const e=document.createComment("");s.parentNode.replaceChild(e,s),i.messageListAnchor=e}e.parentNode.replaceChild(a,e),this.errorBags.push(i)}))}hideErrorBag(e){e.element.isConnected&&e.element.parentNode.replaceChild(e.placeholder,e.element)}showErrorBag(e,t){if(this.errorBagValidatesField(e,t))if(e.element.isConnected||e.placeholder.parentNode.replaceChild(e.element,e.placeholder),"*"!==e.validateFor){if(!e.customMessage){const s=Object.keys(t).filter((t=>e.validateFor.includes(t))).shift();[e.element.innerHTML]=t[s]}}else e.messageListElement?(e.element.querySelectorAll("[data-validation-message]").forEach((e=>{e.parentNode.removeChild(e)})),Object.entries(t).forEach((t=>{const[,s]=t;s.forEach((t=>{const s=e.messageListElement.cloneNode(!0);s.dataset.validationMessage="",s.innerHTML=t,e.messageListAnchor.after(s)}))}))):[e.element.innerHTML]=t[Object.keys(t).shift()]}errorBagValidatesField(e,t){return"*"===e.validateFor||Object.keys(t).filter((t=>e.validateFor.includes(t))).length>0}}var o,l=s(269),d=s(553),c=s(277),h=s(32),u=s(809),m=s(763);if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the extra plugins.");(o=window.Snowboard).addPlugin("assetLoader",u.Z),o.addPlugin("dataConfig",m.Z),o.addPlugin("extrasStyles",h.Z),o.addPlugin("transition",l.Z),o.addPlugin("flash",a.Z),o.addPlugin("flashListener",r),o.addPlugin("formValidation",n),o.addPlugin("attachLoading",d.Z),o.addPlugin("stripeLoader",c.Z)}},function(e){var t;t=820,e(e.s=t)}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.request.js b/modules/system/assets/js/snowboard/build/snowboard.request.js index eceb5b7e04..8522d2a05d 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.request.js +++ b/modules/system/assets/js/snowboard/build/snowboard.request.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[988],{579:function(e,t,s){s.d(t,{Z:function(){return r}});class r{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},640:function(e,t,s){var r=s(579);function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function n(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(n(n({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void s();const r={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(r[t]=s)})),0===Object.keys(r).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(r).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{s()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,r]=e;let o=this.options.update&&this.options.update[t]?this.options.update[t]:t,n="replace";"@"===o.substr(0,1)?(n="append",o=o.substr(1)):"^"===o.substr(0,1)?(n="prepend",o=o.substr(1)):"#"!==o.substr(0,1)&&"."!==o.substr(0,1)&&(n="noop");const i=document.querySelectorAll(o);i.length>0&&i.forEach((e=>{switch(n){case"append":e.innerHTML+=r;break;case"prepend":e.innerHTML=r+e.innerHTML;break;case"noop":break;default:e.innerHTML=r}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,r,this);const t=new Event("ajaxUpdate");t.content=r,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,r]=e;t.append(s,r)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,r,o){const n=new Error(e);return n.exception=t||null,n.file=s||null,n.line=r||null,n.trace=o||[],n}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t;t=640,e(e.s=t)}]); \ No newline at end of file +"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[988],{579:function(e,t,s){s.d(t,{Z:function(){return r}});class r{constructor(e){this.snowboard=e}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}},640:function(e,t,s){var r=s(579);function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function n(e){for(var t=1;t{e&&this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)}))})):this.doAjax().then((e=>{if(e.cancelled)return this.cancelled=!0,void this.complete();this.responseData=e,this.processUpdate(e).then((()=>{!1===e.X_WINTER_SUCCESS?this.processError(e):this.processResponse(e)}))}),(e=>{this.responseError=e,this.processError(e)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.isHandlerName(this.handler))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const e=new Promise(((e,t)=>{this.getFetch().then((s=>{s.ok||406===s.status?s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((t=>{e(n(n({},t),{},{X_WINTER_SUCCESS:406!==s.status,X_WINTER_RESPONSE_CODE:s.status}))}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((t=>{e(t)}),(e=>{t(this.renderError(`Unable to process response: ${e}`))})):s.headers.has("Content-Type")&&s.headers.get("Content-Type").includes("/json")?s.json().then((e=>{e.message&&e.exception?t(this.renderError(e.message,e.exception,e.file,e.line,e.trace)):t(e)}),(e=>{t(this.renderError(`Unable to parse JSON response: ${e}`))})):s.text().then((e=>{t(this.renderError(e))}),(e=>{t(this.renderError(`Unable to process response: ${e}`))}))}),(e=>{t(this.renderError(`Unable to retrieve a response from the server: ${e}`))}))}));if(this.snowboard.globalEvent("ajaxStart",e,this),this.element){const t=new Event("ajaxPromise");t.promise=e,this.element.dispatchEvent(t)}return e}processUpdate(e){return new Promise(((t,s)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[e]))return void t();const r={};if(Object.entries(e).forEach((e=>{const[t,s]=e;"X_WINTER"!==t.substr(0,8)&&(r[t]=s)})),0===Object.keys(r).length)return void(e.X_WINTER_ASSETS?this.processAssets(e.X_WINTER_ASSETS).then((()=>{t()}),(()=>{s()})):t());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",e,this).then((async()=>{e.X_WINTER_ASSETS&&await this.processAssets(e.X_WINTER_ASSETS),this.doUpdate(r).then((()=>{window.requestAnimationFrame((()=>t()))}),(()=>{s()}))}),(()=>{t()}))}))}doUpdate(e){return new Promise((t=>{const s=[];Object.entries(e).forEach((e=>{const[t,r]=e;let o=this.options.update&&this.options.update[t]?this.options.update[t]:t,n="replace";"@"===o.substr(0,1)?(n="append",o=o.substr(1)):"^"===o.substr(0,1)?(n="prepend",o=o.substr(1)):"#"!==o.substr(0,1)&&"."!==o.substr(0,1)&&(n="noop");const i=document.querySelectorAll(o);i.length>0&&i.forEach((e=>{switch(n){case"append":e.innerHTML+=r;break;case"prepend":e.innerHTML=r+e.innerHTML;break;case"noop":break;default:e.innerHTML=r}s.push(e),this.snowboard.globalEvent("ajaxUpdate",e,r,this);const t=new Event("ajaxUpdate");t.content=r,e.dispatchEvent(t)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",s,this),t()}))}processResponse(e){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const e=new Event("ajaxDone",{cancelable:!0});if(e.responseData=this.responseData,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}this.flash&&e.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(e.X_WINTER_FLASH_MESSAGES),this.redirect||e.X_WINTER_REDIRECT?this.processRedirect(this.redirect||e.X_WINTER_REDIRECT):this.complete()}}processError(e){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const e=new Event("ajaxFail",{cancelable:!0});if(e.responseError=this.responseError,e.request=this,this.element.dispatchEvent(e),e.defaultPrevented)return}if(e instanceof Error)this.processErrorMessage(e.message);else{let t=!1;e.X_WINTER_ERROR_FIELDS&&(t=this.processValidationErrors(e.X_WINTER_ERROR_FIELDS)),e.X_WINTER_ERROR_MESSAGE&&!t&&this.processErrorMessage(e.X_WINTER_ERROR_MESSAGE)}this.complete()}}processRedirect(e){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxRedirect",e,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const e=document.createEvent("CustomEvent");e.eventName="ajaxRedirected",this.element.dispatchEvent(e)}}),{once:!0}),window.location.assign(e))}processErrorMessage(e){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[e])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",e,this)&&window.alert(e)}processFlashMessages(e){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[e])||this.snowboard.globalEvent("ajaxFlashMessages",e,this)}processValidationErrors(e){return"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,e])||!1===this.snowboard.globalEvent("ajaxValidationErrors",this.form,e,this)}processAssets(e){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",e)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const e=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await e)return!0}catch(e){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const e=new Event("ajaxAlways");e.request=this,e.responseData=this.responseData,e.responseError=this.responseError,this.element.dispatchEvent(e)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(e["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(e["X-XSRF-TOKEN"]=this.xsrfToken),e}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const e="object"==typeof this.options.data?this.options.data:{},t=new FormData(this.form||void 0);return Object.keys(e).length>0&&Object.entries(e).forEach((e=>{const[s,r]=e;t.append(s,r)})),t}get confirm(){return this.options.confirm||!1}extractPartials(e){return Object.keys(e).join("&")}renderError(e,t,s,r,o){const n=new Error(e);return n.exception=t||null,n.file=s||null,n.line=r||null,n.trace=o||[],n}isHandlerName(e){return/^(?:\w+:{2})?on[A-Z0-9]/.test(e)}}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Javascript AJAX request feature.");window.Snowboard.addPlugin("request",a)}},function(e){var t;t=640,e(e.s=t)}]); \ No newline at end of file diff --git a/modules/system/assets/js/snowboard/build/snowboard.vendor.js b/modules/system/assets/js/snowboard/build/snowboard.vendor.js index f331cbe693..7038746c39 100644 --- a/modules/system/assets/js/snowboard/build/snowboard.vendor.js +++ b/modules/system/assets/js/snowboard/build/snowboard.vendor.js @@ -1,3 +1,3 @@ -"use strict";(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[109],{805:function(e,t){ -/*! js-cookie v3.0.1 | MIT */ -function n(e){for(var t=1;t { + // Resolve script URL + script = this.snowboard.url().asset(script); + // Check that script is not already loaded const loaded = document.querySelector(`script[src="${script}"]`); if (loaded) { @@ -123,11 +137,14 @@ export default class AssetLoader extends Singleton { * * The stylesheet will be appended before the closing `` tag. * - * @param {String} script + * @param {String} style * @returns {Promise} */ loadStyle(style) { return new Promise((resolve, reject) => { + // Resolve style URL + style = this.snowboard.url().asset(style); + // Check that stylesheet is not already loaded const loaded = document.querySelector(`link[rel="stylesheet"][href="${style}"]`); if (loaded) { @@ -161,6 +178,9 @@ export default class AssetLoader extends Singleton { */ loadImage(image) { return new Promise((resolve, reject) => { + // Resolve script URL + image = this.snowboard.url().asset(image); + const img = new Image(); img.addEventListener('load', () => { this.snowboard.globalEvent('assetLoader.loaded', 'image', image, img); diff --git a/modules/system/assets/js/snowboard/extras/FormValidation.js b/modules/system/assets/js/snowboard/extras/FormValidation.js index f84ec37e31..52f424a357 100644 --- a/modules/system/assets/js/snowboard/extras/FormValidation.js +++ b/modules/system/assets/js/snowboard/extras/FormValidation.js @@ -49,7 +49,7 @@ export default class FormValidation extends Singleton { * @returns {Boolean} */ doValidation(form, invalidFields, request) { - if (request.element.dataset.requestValidate === undefined) { + if (request.element && request.element.dataset.requestValidate === undefined) { return null; } if (!form) { @@ -72,7 +72,7 @@ export default class FormValidation extends Singleton { * @returns {void} */ clearValidation(promise, request) { - if (request.element.dataset.requestValidate === undefined) { + if (request.element && request.element.dataset.requestValidate === undefined) { return; } if (!request.form) { diff --git a/modules/system/assets/js/snowboard/extras/StripeLoader.js b/modules/system/assets/js/snowboard/extras/StripeLoader.js index 70be75d3e9..e6d2d91064 100644 --- a/modules/system/assets/js/snowboard/extras/StripeLoader.js +++ b/modules/system/assets/js/snowboard/extras/StripeLoader.js @@ -34,7 +34,11 @@ export default class StripeLoader extends Singleton { this.createStripe(); } - ajaxStart(promise) { + ajaxStart(promise, request) { + if (request.options.stripe === false) { + return; + } + this.show(); promise.then(() => { diff --git a/modules/system/assets/js/snowboard/extras/StylesheetLoader.js b/modules/system/assets/js/snowboard/extras/StylesheetLoader.js index c5bc912c15..ffe14c4461 100644 --- a/modules/system/assets/js/snowboard/extras/StylesheetLoader.js +++ b/modules/system/assets/js/snowboard/extras/StylesheetLoader.js @@ -31,7 +31,7 @@ export default class StylesheetLoader extends Singleton { if (!stylesLoaded) { const stylesheet = document.createElement('link'); stylesheet.setAttribute('rel', 'stylesheet'); - stylesheet.setAttribute('href', this.snowboard.url().to('/modules/system/assets/css/snowboard.extras.css')); + stylesheet.setAttribute('href', this.snowboard.url().asset('/modules/system/assets/css/snowboard.extras.css')); document.head.appendChild(stylesheet); } } diff --git a/modules/system/assets/js/snowboard/utilities/Url.js b/modules/system/assets/js/snowboard/utilities/Url.js index 3dce11ab0b..76f6331b31 100644 --- a/modules/system/assets/js/snowboard/utilities/Url.js +++ b/modules/system/assets/js/snowboard/utilities/Url.js @@ -11,7 +11,9 @@ import Singleton from '../abstracts/Singleton'; export default class Url extends Singleton { construct() { this.foundBaseUrl = null; + this.foundAssetUrl = null; this.baseUrl(); + this.assetUrl(); } /** @@ -23,7 +25,7 @@ export default class Url extends Singleton { * @returns {string} */ to(url) { - const urlRegex = /[-a-z0-9_+:]+:\/\/[-a-z0-9@:%._+~#=]{1,256}\.[a-z0-9()]{1,6}\b([-a-z0-9()@:%_+.~#?&//=]*)/i; + const urlRegex = /^(?:[^:]+:\/\/)[-a-z0-9@:%._+~#=]{1,256}\b([-a-z0-9()@:%_+.~#?&//=]*)/i; if (url.match(urlRegex)) { return url; @@ -34,6 +36,26 @@ export default class Url extends Singleton { return `${this.baseUrl()}${theUrl}`; } + /** + * Gets an Asset URL based on a relative path. + * + * If an absolute URL is provided, it will be returned unchanged. + * + * @param {string} url + * @returns {string} + */ + asset(url) { + const urlRegex = /^(?:[^:]+:\/\/)[-a-z0-9@:%._+~#=]{1,256}\b([-a-z0-9()@:%_+.~#?&//=]*)/i; + + if (url.match(urlRegex)) { + return url; + } + + const theUrl = url.replace(/^\/+/, ''); + + return `${this.assetUrl()}${theUrl}`; + } + /** * Helper method to get the base URL of this install. * @@ -74,6 +96,46 @@ export default class Url extends Singleton { return this.foundBaseUrl; } + /** + * Helper method to get the asset URL of this install. + * + * This determines the base URL from three sources, in order: + * - If Snowboard is loaded via the `{% snowboard %}` tag, it will retrieve the asset URL that + * is automatically included there. + * - If a `` tag is available, it will use the URL specified in the link tag. + * - Finally, it will take a guess from the current location. This will likely not work for sites + * that reside in subdirectories. + * + * The asset URL will always contain a trailing backslash. + * + * @returns {string} + */ + assetUrl() { + if (this.foundAssetUrl !== null) { + return this.foundAssetUrl; + } + + if (document.querySelector('script[data-module="snowboard-base"]') !== null) { + this.foundAssetUrl = this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.assetUrl); + return this.foundAssetUrl; + } + + if (document.querySelector('link[rel="asset_url"]') !== null) { + this.foundAssetUrl = this.validateBaseUrl(document.querySelector('link[rel="asset_url"]').getAttribute('href')); + return this.foundAssetUrl; + } + + const urlParts = [ + window.location.protocol, + '//', + window.location.host, + '/', + ]; + this.foundAssetUrl = urlParts.join(''); + + return this.foundAssetUrl; + } + /** * Validates the base URL, ensuring it is a HTTP/HTTPs URL. * @@ -83,7 +145,7 @@ export default class Url extends Singleton { * @param {string} url * @returns {string} */ - validateBaseUrl(url) { + validateBaseUrl(url) { const urlRegex = /^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i; const urlParts = urlRegex.exec(url); const protocol = urlParts[2]; diff --git a/modules/system/classes/CombineAssets.php b/modules/system/classes/CombineAssets.php index 4d65654a28..acf3c7ece1 100644 --- a/modules/system/classes/CombineAssets.php +++ b/modules/system/classes/CombineAssets.php @@ -162,7 +162,7 @@ public function init() $this->registerAlias('framework.extras', '~/modules/system/assets/css/framework.extras.css'); $this->registerAlias('framework.extras.css', '~/modules/system/assets/css/framework.extras.css'); - $snowboardBase = (Config::get('develop.debugSnowboard', Config::get('app.debug', false)) === true) + $snowboardBase = (Config::get('develop.debugSnowboard', false) === true) ? 'snowboard.base.debug.js' : 'snowboard.base.js'; $this->registerAlias('snowboard.base', '~/modules/system/assets/js/snowboard/build/' . $snowboardBase); diff --git a/modules/system/classes/MarkupManager.php b/modules/system/classes/MarkupManager.php index 95831351b4..63c580aac1 100644 --- a/modules/system/classes/MarkupManager.php +++ b/modules/system/classes/MarkupManager.php @@ -1,17 +1,16 @@ index(['last_activity']); + $table->index(['user_id']); + }); + } + + public function down() + { + Schema::table('sessions', function ($table) { + $table->dropIndex(['last_activity']); + $table->dropIndex(['user_id']); + }); + } +}; diff --git a/modules/system/helpers/View.php b/modules/system/helpers/View.php index 21195bec8e..5be25b2d69 100644 --- a/modules/system/helpers/View.php +++ b/modules/system/helpers/View.php @@ -37,4 +37,14 @@ public static function getGlobalVars() return static::$globalVarCache = $vars; } + + /** + * Clears the static cache for global variables. + * + * @return void + */ + public static function clearVarCache() + { + static::$globalVarCache = null; + } } diff --git a/modules/system/lang/lv/lang.php b/modules/system/lang/lv/lang.php index fdd6a58638..f7e33a3e1b 100644 --- a/modules/system/lang/lv/lang.php +++ b/modules/system/lang/lv/lang.php @@ -191,7 +191,7 @@ 'smtp_encryption_tls' => 'TLS', 'smtp_encryption_ssl' => 'SSL', 'sendmail' => 'Sendmail', - 'sendmail_path' => 'Sendmail ceļs', + 'sendmail_path' => 'Sendmail ceļš', 'sendmail_path_comment' => 'Lūdzu, norādiet ceļu uz sendmail programmu.', 'drivers_hint_content' => 'Apskatiet dokumentāciju, lai uzzinātu vairāk par atbalstītajām pasta metodēm un kā tās ieslēgt.', ], @@ -449,7 +449,7 @@ ], 'media' => [ 'invalid_path' => "Norādīts nederīgs faila ceļš: ':path'.", - 'folder_size_items' => 'vienums(-i)', + 'folder_size_items' => 'vienumu|vienums|vienumi', ], 'page' => [ 'custom_error' => [ diff --git a/modules/system/views/mail/layout-default.php b/modules/system/views/mail/layout-default.php index 171fa62fc3..10e970326e 100644 --- a/modules/system/views/mail/layout-default.php +++ b/modules/system/views/mail/layout-default.php @@ -7,13 +7,12 @@ - - - + +
diff --git a/modules/system/views/mail/layout-system.php b/modules/system/views/mail/layout-system.php index 7c6d1ef09c..0d67c3aa50 100644 --- a/modules/system/views/mail/layout-system.php +++ b/modules/system/views/mail/layout-system.php @@ -11,13 +11,12 @@ - - - + +