(()=>{var mt=Object.defineProperty;var gt=(i,e,t)=>e in i?mt(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var g=(i,e,t)=>gt(i,typeof e!="symbol"?e+"":e,t);function h(i,{target:e=document,detail:t={},bubbles:r=!0,cancelable:s=!0}={}){let n=new CustomEvent(i,{detail:t,bubbles:r,cancelable:s});return e.dispatchEvent(n),n}function ze(i){setTimeout(i,1)}function F(i,...e){let t=yt(vt(i,e)).split(`
`),r=t[0].match(/^\s+/),s=r?r[0].length:0;return t.map(n=>n.slice(s)).join(`
`)}function yt(i){return i.replace(/^\n/,"")}function vt(i,e){return i.reduce((t,r,s)=>{let n=e[s]==null?"":e[s];return t+r+n},"")}function x(i){return Array.prototype.slice.call(i)}function q(){return Array.apply(null,{length:36}).map((i,e)=>e==8||e==13||e==18||e==23?"-":e==14?"4":e==19?(Math.floor(Math.random()*4)+8).toString(16):Math.floor(Math.random()*15).toString(16)).join("")}var Et=/[^.]*(?=\..*)\.|.*/,bt=/\..*/,wt=/::\d+$/,De={},Xe=1,Qe={mouseenter:"mouseover",mouseleave:"mouseout"},At=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]),c=class{static on(e,t,r,s,n){et(e,t,r,s,n,!1)}static one(e,t,r,s,n){et(e,t,r,s,n,!0)}static off(e,t,r,s,n){if(typeof t!="string"||!e)return;let[o,a,l,d]=_e(t,r,s,n),f=l!==t,u=Ge(e),b=u[l]||{},A=t.startsWith(".");if(typeof a<"u"){if(!b)return;Ue(e,u,l,a,o?r:null,d);return}if(A)for(let m of Object.keys(u))Lt(e,u,m,t.slice(1));for(let m of Object.keys(b)){let Ke=m.replace(wt,"");if(!f||t.includes(Ke)){let Y=b[m];Ue(e,u,l,Y.callable,Y.delegationSelector,d)}}}static dispatch(e,{target:t=document,detail:r={},bubbles:s=!0,cancelable:n=!0}={}){return h(e,{target:t,detail:r,bubbles:s,cancelable:n})}static trigger(e,t,{detail:r={},bubbles:s=!0,cancelable:n=!0}={}){return h(t,{target:e,detail:r,bubbles:s,cancelable:n})}};function Ze(i,e){return e&&`${e}::${Xe++}`||i.uidEvent||Xe++}function Ge(i){let e=Ze(i);return i.uidEvent=e,De[e]=De[e]||{},De[e]}function Ye(i,e,t=null){return Object.values(i).find(r=>r.callable===e&&r.delegationSelector===t)}function _e(i,e,t,r){let s=typeof e=="string",n=s?t:e,o=s?r:t,a=Tt(i);return At.has(a)||(a=i),[s,n,a,o]}function et(i,e,t,r,s,n){if(typeof e!="string"||!i)return;let[o,a,l,d]=_e(e,t,r,s);e in Qe&&(a=(Y=>function(C){if(!C.relatedTarget||C.relatedTarget!==C.delegateTarget&&!C.delegateTarget.contains(C.relatedTarget))return Y.call(this,C)})(a));let f=Ge(i),u=f[l]||(f[l]={}),b=Ye(u,a,o?t:null);if(b){b.oneOff=b.oneOff&&n;return}let A=Ze(a,e.replace(Et,"")),m=o?St(i,t,a):xt(i,a);m.delegationSelector=o?t:null,m.callable=a,m.oneOff=n,m.uidEvent=A,u[A]=m,i.addEventListener(l,m,d)}function Ue(i,e,t,r,s,n){let o=Ye(e[t],r,s);o&&(i.removeEventListener(t,o,n),delete e[t][o.uidEvent])}function xt(i,e){return function t(r){return r.delegateTarget=i,t.oneOff&&c.off(i,r.type,e),e.apply(i,[r])}}function St(i,e,t){return function r(s){let n=i.querySelectorAll(e);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(let a of n)if(a===o)return s.delegateTarget=o,r.oneOff&&c.off(i,s.type,e,t),t.apply(o,[s])}}function Lt(i,e,t,r){let s=e[t]||{};for(let n of Object.keys(s))if(n.includes(r)){let o=s[n];Ue(i,e,t,o.callable,o.delegationSelector)}}function Tt(i){return i=i.replace(bt,""),Qe[i]||i}var _=class{constructor(e={},t=200){let{__ajax:r,...s}=e;this.ok=!!r.ok,this.severity=r.severity||"info",this.message=r.message??null,this.data=s||{},this.invalid=r.invalid||{},this.ops=Array.isArray(r.ops)?r.ops:[],this.redirect=null,this.status=t}isFatal(){return this.severity==="fatal"||this.status>=500&&this.status<=599}isError(){return this.severity==="error"||this.isFatal()||this.ok===!1}getMessage(){return this.message}getInvalid(){return this.invalid||{}}getData(){return this.data||{}}getStatus(){return this.status}getSeverity(){return this.severity}getOps(e){return e?this.ops.filter(t=>t?.op===e):this.ops}getFlash(){return this.getOps("flash").map(({level:e="info",text:t=""})=>({level:e,text:t}))}getBrowserEvents(){return this.getOps("dispatch").map(({selector:e=null,event:t,detail:r,async:s})=>({selector:e,event:t,detail:r,async:s}))}getDomPatches(){return this.getOps("patchDom").map(({selector:e,html:t="",swap:r="update"})=>({selector:e,html:t,swap:r}))}getPartials(){return this.getOps("partial").map(({name:e,html:t=""})=>({name:e,html:t}))}getAssets(){let e={js:[],css:[],img:[]},t={js:new Set,css:new Set,img:new Set};for(let{type:r,assets:s=[]}of this.getOps("loadAssets"))if(e[r])for(let n of s){if(n.inline){e[r].push(n);continue}let o=typeof n=="string"?n:n.url;t[r].has(o)||(t[r].add(o),e[r
This file has been truncated. show original