@livx.cc/bare-v3 0.1.0-alpha.90 → 0.1.0-alpha.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/board.js +25 -25
- package/dist/manifest.json +1 -1
- package/dist/references/board.md +3 -0
- package/package.json +1 -1
package/dist/components/board.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var{defineProperty:at,getOwnPropertyNames:
|
|
1
|
+
var{defineProperty:at,getOwnPropertyNames:gi,getOwnPropertyDescriptor:xi}=Object,vi=Object.prototype.hasOwnProperty;function yi(e){return this[e]}var wi=(e)=>{var t=(fr??=new WeakMap).get(e),r;if(t)return t;if(t=at({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of gi(e))if(!vi.call(t,n))at(t,n,{get:yi.bind(e,n),enumerable:!(r=xi(e,n))||r.enumerable})}return fr.set(e,t),t},fr;var _i=(e)=>e;function Ei(e,t){this[e]=_i.bind(null,t)}var ki=(e,t)=>{for(var r in t)at(e,r,{get:t[r],enumerable:!0,configurable:!0,set:Ei.bind(t,r)})};var Ai=(e,t)=>()=>(e&&(t=e(e=0)),t);var Jn={};ki(Jn,{Alpine:()=>Yn,default:()=>ia});function Ci(e){Ii(e)}function Ti(){Pt=!0}function Oi(){Pt=!1,Tr()}function Ii(e){if(!P.includes(e)){if(P.push(e),e._x_schedulerPriority!==void 0)He=!0}Tr()}function $t(e){let t=P.indexOf(e);if(t!==-1&&t>xt)P.splice(t,1)}function Tr(){if(!gt&&!mt){if(Pt)return;mt=!0,queueMicrotask(Mi)}}function Mi(){mt=!1,gt=!0;for(let e=0;e<P.length;e++){if(He)Li(e);P[e](),xt=e}P.length=0,xt=-1,He=!1,gt=!1}function Li(e){let t=new Map,r=P.slice(e).sort((n,i)=>Di(n,i,t));for(let n=0;n<r.length;n++)P[e+n]=r[n];He=!1}function Di(e,t,r){if(!lt(e))return lt(t)?1:0;if(!lt(t))return-1;return br(e._x_schedulerPriority.el,r)-br(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function lt(e){return e._x_schedulerPriority!==void 0}function br(e,t){if(t.has(e))return t.get(e);let r=0,n=e;while(e)if(r++,e._x_teleportBack)e=e._x_teleportBack;else if(typeof ShadowRoot==="function"&&e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else e=e.parentElement;return t.set(n,r),r}function Bi(e){vt=!1,e(),vt=!0}function Pi(e){le=e.reactive,ce=e.release,re=(t)=>e.effect(t,{scheduler:(r)=>{if(vt)Ci(r);else r()}}),Or=e.raw}function mr(e){re=e}function $i(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?Ni++:void 0,s=re(n);if(o!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:o};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((a)=>a())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),ce(s)},s},()=>{t()}]}function Ir(e,t){let r=!0,n,i,o=re(()=>{let s=e(),a=JSON.stringify(s);if(!r){if(typeof s==="object"||s!==n){let l=typeof n==="object"?JSON.parse(i):n;queueMicrotask(()=>{t(s,l)})}}n=s,i=a,r=!1});return()=>{$t(o),ce(o)}}async function Ri(e){Ti();try{await e(),await Promise.resolve()}finally{Oi()}}function zi(e){Dr.push(e)}function Rt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Lr.push(t)}function Nr(e){Mr.push(e)}function Br(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function Pr(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{if(t===void 0||t.includes(r))n.forEach((i)=>i()),delete e._x_attributeCleanups[r]})}function Hi(e){e._x_effects?.forEach($t);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Ht(){We.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),zt=!0}function $r(){Ui(),We.disconnect(),zt=!1}function Ui(){let e=We.takeRecords();F.push(()=>e.length>0&&Ye(e));let t=F.length;queueMicrotask(()=>{if(F.length===t)while(F.length>0)F.shift()()})}function ji(){while(F.length>0)F.shift()();let e=We.takeRecords();if(e.length>0)Ye(e)}function _(e){if(!zt)return e();$r();try{return e()}finally{Ht()}}function qi(){Ut=!0}function Fi(){Ut=!1,Ye(Ue),Ue=[]}function Ye(e){if(Ut){Ue=Ue.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let o=0;o<e.length;o++){if(e[o].target._x_ignoreMutationObserver)continue;if(e[o].type==="childList")e[o].removedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[o].addedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(r.has(s)){r.delete(s);return}if(s._x_marker)return;t.push(s)});if(e[o].type==="attributes"){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,c=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:a,value:s.getAttribute(a)})},d=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(a)};if(s.hasAttribute(a)&&l===null)c();else if(s.hasAttribute(a))d(),c();else d()}}i.forEach((o,s)=>{Pr(s,o)}),n.forEach((o,s)=>{Mr.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;Lr.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;Dr.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function Rr(e){return G(ae(e))}function Ce(e,t,r){return e._x_dataStack=[t,...ae(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function ae(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return ae(e.host);if(!e.parentNode)return[];return ae(e.parentNode)}function G(e){return new Proxy({objects:e},Ki)}function zr(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return zr(Object.getPrototypeOf(e),t)}function Vi(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function jt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,o="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:a,enumerable:l}])=>{if(l===!1||a===void 0)return;if(typeof a==="object"&&a!==null&&a.__v_skip)return;let c=o===""?s:`${o}.${s}`;if(typeof a==="object"&&a!==null&&a._x_interceptor)i[s]=a.initialize(e,c,s,t);else if(r(a)&&a!==i&&!(a instanceof Element))n(a,c)})};return n(e)}function Hr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>Wi(n,i),(a)=>yt(n,i,a),i,o,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a,l)=>{let c=n.initialize(o,s,a,l);return r.initialValue=c,i(o,s,a,l)}}else r.initialValue=n;return r}}function Wi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function yt(e,t,r){if(typeof t==="string")t=t.split(".");if(t.length===1)e[t[0]]=r;else if(t.length===0)throw error;else if(e[t[0]])return yt(e[t[0]],t.slice(1),r);else return e[t[0]]={},yt(e[t[0]],t.slice(1),r)}function I(e,t){Ur[e]=t}function je(e,t){let r=Yi(t);return Object.entries(Ur).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Yi(e){let[t,r]=Yr(e),n={interceptor:Hr,...t};return Rt(e,r),n}function Ji(e,t,r,...n){try{return r(...n)}catch(i){Je(i,e,t)}}function Je(...e){return jr(...e)}function Gi(e){jr=e}function Xi(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
|
|
2
2
|
|
|
3
3
|
${r?'Expression: "'+r+`"
|
|
4
4
|
|
|
5
|
-
`:""}`,t),setTimeout(()=>{throw e},0)}function jr(e){let t=W;W=!1;let r=e();return W=t,r}function Y(e,t,r={}){let n;return S(e,t)((i)=>n=i,r),n}function S(...e){return qr(...e)}function Gi(e){qr=e}function Xi(e){Fr=e}function Zi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!W){wt(r,t,G([n,...e]),i);return}let s=t.apply(G([n,...e]),i);wt(r,s)}}function wt(e,t,r,n,i){if(W&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>wt(e,s,r,n)).catch((s)=>Je(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Qi(...e){return Fr(...e)}function de(e=""){return qt+e}function es(e){qt=e}function E(e,t){return qe[e]=t,{before(r){if(!qe[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=V.indexOf(r);V.splice(n>=0?n:V.indexOf("DEFAULT"),0,e)}}}function ts(e){return Object.keys(qe).includes(e)}function Ge(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=Kr(o);o=o.map((a)=>{if(s.find((l)=>l.name===a.name))return{name:`x-bind:${a.name}`,value:`"${a.value}"`};return a}),t=t.concat(o)}let n={};return t.map(Gr((o,s)=>n[o]=s)).filter(Zr).map(is(n,r)).sort(ss).map((o)=>ns(e,o))}function Kr(e){return Array.from(e).map(Gr()).filter((t)=>!Zr(t))}function rs(e){_t=!0;let t=Symbol();Vr=t,me.set(t,[]);let r=()=>{while(me.get(t).length)me.get(t).shift()();me.delete(t)},n=()=>{_t=!1,r()};e(r),n()}function Wr(e){let t=[],r=(a)=>t.push(a),[n,i]=Bi(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:S.bind(S,e),evaluate:Y.bind(Y,e)},()=>t.forEach((a)=>a())]}function ns(e,t){let r=()=>{},n=qe[t.type]||r,[i,o]=Wr(e);Nr(e,t.original,o);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),_t?me.get(Vr).push(n):n()};return s.runCleanups=o,s}function Gr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Xr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ft(e){Xr.push(e)}function Zr({name:e}){return Qr().test(e)}function is(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Qr()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map((l)=>l.replace(".","")),expression:n,original:a}}}function ss(e,t){let r=V.indexOf(e.type)===-1?Et:e.type,n=V.indexOf(t.type)===-1?Et:t.type;return V.indexOf(r)-V.indexOf(n)}function X(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>X(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)X(n,t,!1),n=n.nextElementSibling}function R(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function os(e){return(...t)=>j&&e(...t)}function Te(e){en.push(e)}function as(e,t){en.forEach((r)=>r(e,t)),j=!0,tn(()=>{D(t,(r,n)=>{n(r,()=>{})})}),j=!1}function ls(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,kt=!0,tn(()=>{cs(t)}),j=!1,kt=!1}function cs(e){let t=!1;D(e,(n,i)=>{X(n,(o,s)=>{if(t&&bs(o))return s();t=!0,i(o,s)})})}function tn(e){let t=re;br((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),br(t)}function ds(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Xe++}r.pending++,Promise.resolve(t).catch((n)=>{try{Je(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>us(e,r))}function us(e,t){if(t.pending--,t.pending>0)return;if(Hi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Xe--,!e.isConnected)return;hs(t),D(e)}function fs(e,t){if(Xe===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return rn(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function rn(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function hs(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=T(r,(o)=>o._x_deferInit);if(n){rn(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((o)=>r.hasAttribute(o)).map((o)=>({name:o,value:r.getAttribute(o)}));if(i.length===0)return;Ge(r,i).forEach((o)=>o())})}function ge(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function ps(){if(mr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(mr=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");ge(document,"alpine:init"),ge(document,"alpine:initializing"),Ht(),$i((t)=>D(t,X)),Rt((t)=>ne(t)),Dr((t,r)=>{if(fs(t,r))return;Ge(t,r).forEach((n)=>n())});let e=(t)=>!Ze(t.parentElement,!0);Array.from(document.querySelectorAll(on().join(","))).filter(e).forEach((t)=>{D(t)}),ge(document,"alpine:initialized"),setTimeout(()=>{xs()})}function sn(){return Kt.map((e)=>e())}function on(){return Kt.concat(nn).map((e)=>e())}function an(e){Kt.push(e)}function ln(e){nn.push(e)}function Ze(e,t=!1){return T(e,(r)=>{if((t?on():sn()).some((i)=>r.matches(i)))return!0})}function T(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return T(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return T(e.parentNode.host,t);if(!e.parentElement)return;return T(e.parentElement,t)}function bs(e){return sn().some((t)=>e.matches(t))}function ms(e){cn.push(e)}function D(e,t=X,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;rs(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),cn.forEach((o)=>o(n,i)),Ge(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=gs++;n._x_ignore&&i()})})}function ne(e,t=X){t(e,(r)=>{Ri(r),Br(r),delete r._x_marker})}function xs(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(ts(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Wt(e=()=>{}){return queueMicrotask(()=>{Vt||setTimeout(()=>{St()})}),new Promise((t)=>{At.push(()=>{e(),t()})})}function St(){Vt=!1;while(At.length)At.shift()()}function vs(){Vt=!0}function Yt(e,t){if(Array.isArray(t))return gr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return ys(e,t);else if(typeof t==="function")return Yt(e,t());return gr(e,t)}function Ct(e){return e.split(/\s/).filter(Boolean)}function gr(e,t){let r=(i)=>Ct(i).filter((o)=>!e.classList.contains(o)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function ys(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?Ct(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?Ct(s):!1).filter(Boolean),i=[],o=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),o.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{o.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Qe(e,t){if(typeof t==="object"&&t!==null)return ws(e,t);return _s(e,t)}function ws(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=Es(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Qe(e,r)}}function _s(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Es(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Tt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function ks(e,t,r){dn(e,Yt,""),{enter:(i)=>{e._x_transition.enter.during=i},"enter-start":(i)=>{e._x_transition.enter.start=i},"enter-end":(i)=>{e._x_transition.enter.end=i},leave:(i)=>{e._x_transition.leave.during=i},"leave-start":(i)=>{e._x_transition.leave.start=i},"leave-end":(i)=>{e._x_transition.leave.end=i}}[r](t)}function As(e,t,r){dn(e,Qe);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((f,v)=>v<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((f,v)=>v>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,d=l?pe(t,"scale",95)/100:1,u=pe(t,"delay",0)/1000,p=pe(t,"origin","center"),b="opacity, transform",m=pe(t,"duration",150)/1000,h=pe(t,"duration",75)/1000,g="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${m}s`,transitionTimingFunction:g},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${h}s`,transitionTimingFunction:g},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function dn(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Ot(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Ot(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function un(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:un(t)}function Ot(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,c;Ss(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function Ss(e,t){let r,n,i,o=Tt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),St();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Tt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),vs(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),St(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function pe(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function fn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Ns(t):t,t){case"value":Cs(e,r);break;case"style":Os(e,r);break;case"class":Ts(e,r);break;case"selected":case"checked":Ms(e,t,r);break;default:Jt(e,t,r);break}}function Cs(e,t){if(Gt(e)){if(e.attributes.value===void 0)e.value=t}else if(Fe(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>Bs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Ds(e,t);else if(e.tagName==="OPTION")Jt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Ts(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Yt(e,t)}function Os(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Qe(e,t)}function Ms(e,t,r){Jt(e,t,r),Ls(e,t,r)}function Jt(e,t,r){if([null,void 0,!1].includes(r)&&$s(t))e.removeAttribute(t);else{if(hn(t))r=t;if(Rs(r))r=JSON.stringify(r);Is(e,t,r)}}function Is(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Ls(e,t,r){if(e[t]!==r)e[t]=r}function Ds(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Ns(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Bs(e,t){return e==t}function ze(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function hn(e){return Ps.has(e)}function $s(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Rs(e){return typeof e==="object"&&e!==null}function zs(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return pn(e,t,r)}function Hs(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,jr(()=>Y(e,i.expression))}return pn(e,t,r)}function pn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(hn(t))return!![t,"true"].includes(n);return n}function Fe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Gt(e){return e.type==="radio"||e.localName==="ui-radio"}function bn(e,t){let r;return function(){let n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function mn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function gn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=re(()=>{let l=e(),c=r();if(i)n(ct(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==o)n(ct(l));else if(d!==u)t(ct(c))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{$t(a),ce(a)}}function ct(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Us(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function js(e,t){if(!xr)B=le(B),xr=!0;if(t===void 0)return B[e];if(B[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)B[e]=t.initialize(B,e,e,()=>{});else jt(B[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")B[e].init()}function qs(){return B}function Fs(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return vn(e,r());else xn[e]=r;return()=>{}}function Ks(e){return Object.entries(xn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function vn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Kr(i);return i=i.map((s)=>{if(o.find((a)=>a.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),Ge(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Vs(e,t){yn[e]=t}function Ws(e,t){return Object.entries(yn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function _n(e){try{let r=new Gs(e).tokenize(),i=new Xs(r).parse(),o=new Zs;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Qs(e,t,r={}){let n=En(e),i=G([r.scope??{},...n]),o=r.params??[],a=_n(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&W)return a.apply(i,o);return a}function eo(e,t){let r=En(e);if(typeof t==="function")return Zi(r,t);let n=to(e,t,r);return Wi.bind(null,e,t,n)}function En(e){let t={};return je(t,e),[t,...ae(e)]}function to(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:o=[]}={})=>{let s=G([i,...r]),l=_n(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(W&&typeof l==="function"){let c=l.apply(l,o);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function kn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function Z(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function lo(e,t=!1){if(e.flags|=8,t){e.next=ye,ye=e;return}e.next=ve,ve=e}function Zt(){Tn++}function Qt(){if(--Tn>0)return;if(ye){let t=ye;ye=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(ve){let t=ve;ve=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function On(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Mn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;er(n),uo(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function It(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(co(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function co(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Ke)return;if(e.globalVersion=Ke,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!It(e)))return;e.flags|=2;let t=e.dep,r=y,n=O;y=e,O=!0;try{On(e);let i=e.fn(e._value);if(t.version===0||K(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{y=r,O=n,Mn(e),e.flags&=-3}}function er(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let o=r.computed.deps;o;o=o.nextDep)er(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function uo(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function fo(e,t){if(e.effect instanceof yr)e=e.effect.fn;let r=new yr(e);if(t)_e(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function ho(e){e.effect.stop()}function po(){In.push(O),O=!1}function bo(){let e=In.pop();O=e===void 0?!0:e}function wr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=y;y=void 0;try{t()}finally{y=r}}}function Ln(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Ln(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function C(e,t,r){if(O&&y){let n=Lt.get(e);if(!n)Lt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new go),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function U(e,t,r,n,i,o){let s=Lt.get(e);if(!s){Ke++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Zt(),t==="clear")s.forEach(a);else{let l=Ee(e),c=l&&Xt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,p)=>{if(p==="length"||p===Ae||!Oe(p)&&p>=d)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(c)a(s.get(Ae));switch(t){case"add":if(!l){if(a(s.get(J)),xe(e))a(s.get(Dt))}else if(c)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),xe(e))a(s.get(Dt))}break;case"set":if(xe(e))a(s.get(J));break}}}Qt()}function se(e){let t=w(e);if(t===e)return t;return C(t,"iterate",Ae),ee(e)?t:t.map(te)}function tr(e){return C(e=w(e),"iterate",Ae),e}function I(e,t){if(Q(e))return zn(e)?Se(te(t)):Se(t);return te(t)}function ft(e,t,r){let n=tr(e),i=n[t]();if(n!==e&&!ee(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function N(e,t,r,n,i,o){let s=tr(e),a=s!==e&&!ee(e),l=s[t];if(l!==vo[t]){let u=l.apply(e,o);return a?te(u):u}let c=r;if(s!==e){if(a)c=function(u,p){return r.call(this,I(e,u),p,e)};else if(r.length>2)c=function(u,p){return r.call(this,u,p,e)}}let d=l.call(s,c,n);return a&&i?i(d):d}function _r(e,t,r,n){let i=tr(e),o=i!==e&&!ee(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(c,d,u){if(a)a=!1,c=I(e,c);return r.call(this,c,I(e,d),u,e)};else if(r.length>3)s=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function ht(e,t,r){let n=w(e);C(n,"iterate",Ae);let i=n[t](...r);if((i===-1||i===!1)&&Do(r[0]))return r[0]=w(r[0]),n[t](...r);return i}function be(e,t,r=[]){po(),Zt();let n=w(e)[t].apply(e,r);return Qt(),bo(),n}function wo(e){if(!Oe(e))e=String(e);let t=w(this);return C(t,"has",e),t.hasOwnProperty(e)}function So(e,t,r){return function(...n){let i=this.__v_raw,o=w(i),s=xe(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Nt:t?Se:te;return!t&&C(o,"iterate",l?Dt:J),_e(Object.create(c),{next(){let{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:a?[d(u[0]),d(u[1])]:d(u),done:p}}})}}function $e(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";Z(`${Cn(e)} operation ${r}failed: target is readonly.`,w(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Co(e,t){let r={get(i){let o=this.__v_raw,s=w(o),a=w(i);if(!e){if(K(i,a))C(s,"get",i);C(s,"get",a)}let{has:l}=Pe(s),c=t?Nt:e?Se:te;if(l.call(s,i))return c(o.get(i));else if(l.call(s,a))return c(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&C(w(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=w(o),a=w(i);if(!e){if(K(i,a))C(s,"has",i);C(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=w(a),c=t?Nt:e?Se:te;return!e&&C(l,"iterate",J),a.forEach((d,u)=>i.call(o,c(d),c(u),s))}};return _e(r,e?{add:$e("add"),set:$e("set"),delete:$e("delete"),clear:$e("clear")}:{add(i){let o=w(this),s=Pe(o),a=w(i),l=!t&&!ee(i)&&!Q(i)?a:i;if(!(s.has.call(o,l)||K(i,l)&&s.has.call(o,i)||K(a,l)&&s.has.call(o,a)))o.add(l),U(o,"add",l,l);return this},set(i,o){if(!t&&!ee(o)&&!Q(o))o=w(o);let s=w(this),{has:a,get:l}=Pe(s),c=a.call(s,i);if(!c)i=w(i),c=a.call(s,i);else Er(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)U(s,"add",i,o);else if(K(o,d))U(s,"set",i,o,d);return this},delete(i){let o=w(this),{has:s,get:a}=Pe(o),l=s.call(o,i);if(!l)i=w(i),l=s.call(o,i);else Er(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)U(o,"delete",i,void 0,c);return d},clear(){let i=w(this),o=i.size!==0,s=xe(i)?new Map(i):new Set(i),a=i.clear();if(o)U(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=So(i,e,t)}),r}function Bn(e,t){let r=Co(e,t);return(n,i,o)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(Mt(r,i)&&i in n?r:n,i,o)}}function Er(e,t,r){let n=w(r);if(n!==r&&t.call(e,n)){let i=Sn(e);Z(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}function Lo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rr(e){if(Q(e))return e;return Rn(e,!1,ko,To,Pn)}function Bt(e){return Rn(e,!0,Ao,Oo,$n)}function Rn(e,t,r,n,i){if(!ke(e))return Z(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let o=i.get(e);if(o)return o;let s=Lo(Sn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function zn(e){if(Q(e))return zn(e.__v_raw);return!!(e&&e.__v_isReactive)}function Q(e){return!!(e&&e.__v_isReadonly)}function ee(e){return!!(e&&e.__v_isShallow)}function Do(e){return e?!!e.__v_raw:!1}function w(e){let t=e&&e.__v_raw;return t?w(t):e}function we(e){return e?e.__v_isRef===!0:!1}function No(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Hn(e){if(!pt[e])pt[e]=0;return++pt[e]}function Bo(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Po(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Hn(t)}function $o(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function Un(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function kr(e){let t=R(()=>document.querySelector(e),()=>Ro)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=zo(t);if(r.includes("camel"))t=Ho(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(o=qn(r,o),r.includes("prevent"))o=a(o,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))o=a(o,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))o=a(o,(l,c)=>{l(c),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,c)=>{if(e.contains(c.target))return;if(c.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(c)});if(r.includes("self"))o=a(o,(l,c)=>{c.target===e&&l(c)});if(t==="submit")o=a(o,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(jo(t)||Fn(t))o=a(o,(l,c)=>{if(Fo(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function qn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ve(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=bn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ve(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=mn(t,n)}return t}function zo(e){return e.replace(/-/g,".")}function Ho(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ve(e){return!Array.isArray(e)&&!isNaN(e)}function Uo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function jo(e){return["keydown","keyup"].includes(e)}function Fn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Fo(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!qo.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ve((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Ve((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&Ar(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((o)=>r.includes(o));if(r=r.filter((o)=>!i.includes(o)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(Fn(e.type))return!1;if(Ar(e.key).includes(r[0]))return!1}}return!0}function Ar(e){if(!e)return[];e=Uo(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function Re(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Fe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=bt(r.target.value);else if(t.includes("boolean"))i=ze(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Ko(o,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return bt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return ze(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Gt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return bt(i);else if(t.includes("boolean"))return ze(i);else if(t.includes("trim"))return i.trim();else return i}})}function bt(e){let t=e?parseFloat(e):null;return Vo(t)?t:e}function Ko(e,t){return e==t}function Vo(e){return!Array.isArray(e)&&!isNaN(e)}function Sr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Wo(e,t){e._x_keyExpression=t}function Yo(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function Jo(e){if(!j)return!1;if(kt)return!0;return e.hasAttribute("data-has-alpine-state")}function Go(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Xo(e,t,r,n){r((i)=>{if(ea(i))i=Array.from({length:i},(c,d)=>d+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let o=e._x_lookup,s=new Map;e._x_lookup=s;let a=ta(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=Qo(t,d,c,i),p;return n((b)=>{if(typeof b==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(b))s.set(b,o.get(b)),o.delete(b);p=b},{scope:{index:c,...u}}),[p,u]});_(()=>{o.forEach((u)=>{ne(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,p])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(p),d.nextElementSibling!==h){if(d.nextElementSibling)h.replaceWith(d.nextElementSibling);d.after(h)}if(d=h,h._x_currentIfEl){if(h.nextElementSibling!==h._x_currentIfEl)d.after(h._x_currentIfEl);d=h._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let b=document.importNode(e.content,!0).firstElementChild,m=le(p);Ce(b,m,e),b._x_refreshXForScope=Go(m),s.set(u,b),c.add(b),d.after(b),d=b}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Zo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(t);if(a){if(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2])o.collection=a[2].trim()}else o.item=s;return o}function Qo(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,a)=>{i[s]=t[a]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function ea(e){return typeof e!=="object"&&!isNaN(e)}function ta(e){return typeof e==="object"&&!Array.isArray(e)}function Vn(){}function tt(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var mt=!1,gt=!1,P,xt=-1,He=!1,Pt=!1,le,re,ce,Tr,Li=0,vt=!0,Mr,Ir,Lr,We,zt=!1,F,Ut=!1,Ue,qi,Hr,Ur,W=!0,qr=()=>{},Fr,qt="x-",qe,_t=!1,me,Vr,Yr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Jr=(e)=>e,Xr,Qr=()=>new RegExp(`^${qt}([^:^.]+)\\b`),Et="DEFAULT",V,j=!1,en,kt=!1,Xe=0,mr=!1,Kt,nn,cn,gs=1,At,Vt=!1,Ps,B,xr=!1,xn,yn,Ys,ue,vr,wn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Js,Gs=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new k("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
|
|
5
|
+
`:""}`,t),setTimeout(()=>{throw e},0)}function qr(e){let t=W;W=!1;let r=e();return W=t,r}function Y(e,t,r={}){let n;return S(e,t)((i)=>n=i,r),n}function S(...e){return Fr(...e)}function Zi(e){Fr=e}function Qi(e){Kr=e}function es(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!W){wt(r,t,G([n,...e]),i);return}let s=t.apply(G([n,...e]),i);wt(r,s)}}function wt(e,t,r,n,i){if(W&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>wt(e,s,r,n)).catch((s)=>Je(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function ts(...e){return Kr(...e)}function de(e=""){return qt+e}function rs(e){qt=e}function E(e,t){return qe[e]=t,{before(r){if(!qe[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=V.indexOf(r);V.splice(n>=0?n:V.indexOf("DEFAULT"),0,e)}}}function ns(e){return Object.keys(qe).includes(e)}function Ge(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=Vr(o);o=o.map((a)=>{if(s.find((l)=>l.name===a.name))return{name:`x-bind:${a.name}`,value:`"${a.value}"`};return a}),t=t.concat(o)}let n={};return t.map(Xr((o,s)=>n[o]=s)).filter(Qr).map(os(n,r)).sort(as).map((o)=>ss(e,o))}function Vr(e){return Array.from(e).map(Xr()).filter((t)=>!Qr(t))}function is(e){_t=!0;let t=Symbol();Wr=t,me.set(t,[]);let r=()=>{while(me.get(t).length)me.get(t).shift()();me.delete(t)},n=()=>{_t=!1,r()};e(r),n()}function Yr(e){let t=[],r=(a)=>t.push(a),[n,i]=$i(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:S.bind(S,e),evaluate:Y.bind(Y,e)},()=>t.forEach((a)=>a())]}function ss(e,t){let r=()=>{},n=qe[t.type]||r,[i,o]=Yr(e);Br(e,t.original,o);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),_t?me.get(Wr).push(n):n()};return s.runCleanups=o,s}function Xr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Zr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ft(e){Zr.push(e)}function Qr({name:e}){return en().test(e)}function os(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(en()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map((l)=>l.replace(".","")),expression:n,original:a}}}function as(e,t){let r=V.indexOf(e.type)===-1?Et:e.type,n=V.indexOf(t.type)===-1?Et:t.type;return V.indexOf(r)-V.indexOf(n)}function X(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>X(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)X(n,t,!1),n=n.nextElementSibling}function R(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function ls(e){return(...t)=>j&&e(...t)}function Te(e){tn.push(e)}function cs(e,t){tn.forEach((r)=>r(e,t)),j=!0,rn(()=>{D(t,(r,n)=>{n(r,()=>{})})}),j=!1}function ds(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,kt=!0,rn(()=>{us(t)}),j=!1,kt=!1}function us(e){let t=!1;D(e,(n,i)=>{X(n,(o,s)=>{if(t&&gs(o))return s();t=!0,i(o,s)})})}function rn(e){let t=re;mr((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),mr(t)}function fs(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Xe++}r.pending++,Promise.resolve(t).catch((n)=>{try{Je(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>hs(e,r))}function hs(e,t){if(t.pending--,t.pending>0)return;if(ji(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Xe--,!e.isConnected)return;bs(t),D(e)}function ps(e,t){if(Xe===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return nn(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function nn(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function bs(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=T(r,(o)=>o._x_deferInit);if(n){nn(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((o)=>r.hasAttribute(o)).map((o)=>({name:o,value:r.getAttribute(o)}));if(i.length===0)return;Ge(r,i).forEach((o)=>o())})}function ge(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function ms(){if(gr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(gr=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");ge(document,"alpine:init"),ge(document,"alpine:initializing"),Ht(),zi((t)=>D(t,X)),Rt((t)=>ne(t)),Nr((t,r)=>{if(ps(t,r))return;Ge(t,r).forEach((n)=>n())});let e=(t)=>!Ze(t.parentElement,!0);Array.from(document.querySelectorAll(an().join(","))).filter(e).forEach((t)=>{D(t)}),ge(document,"alpine:initialized"),setTimeout(()=>{ys()})}function on(){return Kt.map((e)=>e())}function an(){return Kt.concat(sn).map((e)=>e())}function ln(e){Kt.push(e)}function cn(e){sn.push(e)}function Ze(e,t=!1){return T(e,(r)=>{if((t?an():on()).some((i)=>r.matches(i)))return!0})}function T(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return T(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return T(e.parentNode.host,t);if(!e.parentElement)return;return T(e.parentElement,t)}function gs(e){return on().some((t)=>e.matches(t))}function xs(e){dn.push(e)}function D(e,t=X,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;is(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),dn.forEach((o)=>o(n,i)),Ge(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=vs++;n._x_ignore&&i()})})}function ne(e,t=X){t(e,(r)=>{Hi(r),Pr(r),delete r._x_marker})}function ys(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(ns(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Wt(e=()=>{}){return queueMicrotask(()=>{Vt||setTimeout(()=>{St()})}),new Promise((t)=>{At.push(()=>{e(),t()})})}function St(){Vt=!1;while(At.length)At.shift()()}function ws(){Vt=!0}function Yt(e,t){if(Array.isArray(t))return xr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return _s(e,t);else if(typeof t==="function")return Yt(e,t());return xr(e,t)}function Ct(e){return e.split(/\s/).filter(Boolean)}function xr(e,t){let r=(i)=>Ct(i).filter((o)=>!e.classList.contains(o)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function _s(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?Ct(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?Ct(s):!1).filter(Boolean),i=[],o=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),o.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{o.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Qe(e,t){if(typeof t==="object"&&t!==null)return Es(e,t);return ks(e,t)}function Es(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=As(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Qe(e,r)}}function ks(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function As(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Tt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function Ss(e,t,r){un(e,Yt,""),{enter:(i)=>{e._x_transition.enter.during=i},"enter-start":(i)=>{e._x_transition.enter.start=i},"enter-end":(i)=>{e._x_transition.enter.end=i},leave:(i)=>{e._x_transition.leave.during=i},"leave-start":(i)=>{e._x_transition.leave.start=i},"leave-end":(i)=>{e._x_transition.leave.end=i}}[r](t)}function Cs(e,t,r){un(e,Qe);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((f,v)=>v<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((f,v)=>v>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,d=l?pe(t,"scale",95)/100:1,u=pe(t,"delay",0)/1000,p=pe(t,"origin","center"),b="opacity, transform",m=pe(t,"duration",150)/1000,h=pe(t,"duration",75)/1000,g="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${m}s`,transitionTimingFunction:g},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${h}s`,transitionTimingFunction:g},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function un(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Ot(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Ot(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function fn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:fn(t)}function Ot(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,c;Ts(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function Ts(e,t){let r,n,i,o=Tt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),St();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Tt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),ws(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),St(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function pe(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function hn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Ps(t):t,t){case"value":Os(e,r);break;case"style":Ms(e,r);break;case"class":Is(e,r);break;case"selected":case"checked":Ls(e,t,r);break;default:Jt(e,t,r);break}}function Os(e,t){if(Gt(e)){if(e.attributes.value===void 0)e.value=t}else if(Fe(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>$s(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Bs(e,t);else if(e.tagName==="OPTION")Jt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Is(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Yt(e,t)}function Ms(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Qe(e,t)}function Ls(e,t,r){Jt(e,t,r),Ns(e,t,r)}function Jt(e,t,r){if([null,void 0,!1].includes(r)&&zs(t))e.removeAttribute(t);else{if(pn(t))r=t;if(Hs(r))r=JSON.stringify(r);Ds(e,t,r)}}function Ds(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Ns(e,t,r){if(e[t]!==r)e[t]=r}function Bs(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Ps(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function $s(e,t){return e==t}function ze(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function pn(e){return Rs.has(e)}function zs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Hs(e){return typeof e==="object"&&e!==null}function Us(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return bn(e,t,r)}function js(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,qr(()=>Y(e,i.expression))}return bn(e,t,r)}function bn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(pn(t))return!![t,"true"].includes(n);return n}function Fe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Gt(e){return e.type==="radio"||e.localName==="ui-radio"}function mn(e,t){let r;return function(){let n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function gn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function xn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=re(()=>{let l=e(),c=r();if(i)n(ct(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==o)n(ct(l));else if(d!==u)t(ct(c))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{$t(a),ce(a)}}function ct(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function qs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function Fs(e,t){if(!vr)B=le(B),vr=!0;if(t===void 0)return B[e];if(B[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)B[e]=t.initialize(B,e,e,()=>{});else jt(B[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")B[e].init()}function Ks(){return B}function Vs(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return yn(e,r());else vn[e]=r;return()=>{}}function Ws(e){return Object.entries(vn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function yn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Vr(i);return i=i.map((s)=>{if(o.find((a)=>a.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),Ge(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Ys(e,t){wn[e]=t}function Js(e,t){return Object.entries(wn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function En(e){try{let r=new Zs(e).tokenize(),i=new Qs(r).parse(),o=new eo;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function to(e,t,r={}){let n=kn(e),i=G([r.scope??{},...n]),o=r.params??[],a=En(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&W)return a.apply(i,o);return a}function ro(e,t){let r=kn(e);if(typeof t==="function")return es(r,t);let n=no(e,t,r);return Ji.bind(null,e,t,n)}function kn(e){let t={};return je(t,e),[t,...ae(e)]}function no(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:o=[]}={})=>{let s=G([i,...r]),l=En(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(W&&typeof l==="function"){let c=l.apply(l,o);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function An(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function Z(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function uo(e,t=!1){if(e.flags|=8,t){e.next=ye,ye=e;return}e.next=ve,ve=e}function Zt(){On++}function Qt(){if(--On>0)return;if(ye){let t=ye;ye=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(ve){let t=ve;ve=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function In(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Mn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;er(n),ho(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function Mt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function fo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Ke)return;if(e.globalVersion=Ke,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Mt(e)))return;e.flags|=2;let t=e.dep,r=y,n=O;y=e,O=!0;try{In(e);let i=e.fn(e._value);if(t.version===0||K(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{y=r,O=n,Mn(e),e.flags&=-3}}function er(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let o=r.computed.deps;o;o=o.nextDep)er(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function ho(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function po(e,t){if(e.effect instanceof wr)e=e.effect.fn;let r=new wr(e);if(t)_e(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function bo(e){e.effect.stop()}function mo(){Ln.push(O),O=!1}function go(){let e=Ln.pop();O=e===void 0?!0:e}function _r(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=y;y=void 0;try{t()}finally{y=r}}}function Dn(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Dn(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function C(e,t,r){if(O&&y){let n=Lt.get(e);if(!n)Lt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new vo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function U(e,t,r,n,i,o){let s=Lt.get(e);if(!s){Ke++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Zt(),t==="clear")s.forEach(a);else{let l=Ee(e),c=l&&Xt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,p)=>{if(p==="length"||p===Ae||!Oe(p)&&p>=d)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(c)a(s.get(Ae));switch(t){case"add":if(!l){if(a(s.get(J)),xe(e))a(s.get(Dt))}else if(c)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),xe(e))a(s.get(Dt))}break;case"set":if(xe(e))a(s.get(J));break}}}Qt()}function se(e){let t=w(e);if(t===e)return t;return C(t,"iterate",Ae),ee(e)?t:t.map(te)}function tr(e){return C(e=w(e),"iterate",Ae),e}function M(e,t){if(Q(e))return Hn(e)?Se(te(t)):Se(t);return te(t)}function ft(e,t,r){let n=tr(e),i=n[t]();if(n!==e&&!ee(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function N(e,t,r,n,i,o){let s=tr(e),a=s!==e&&!ee(e),l=s[t];if(l!==wo[t]){let u=l.apply(e,o);return a?te(u):u}let c=r;if(s!==e){if(a)c=function(u,p){return r.call(this,M(e,u),p,e)};else if(r.length>2)c=function(u,p){return r.call(this,u,p,e)}}let d=l.call(s,c,n);return a&&i?i(d):d}function Er(e,t,r,n){let i=tr(e),o=i!==e&&!ee(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(c,d,u){if(a)a=!1,c=M(e,c);return r.call(this,c,M(e,d),u,e)};else if(r.length>3)s=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](s,...n);return a?M(e,l):l}function ht(e,t,r){let n=w(e);C(n,"iterate",Ae);let i=n[t](...r);if((i===-1||i===!1)&&Bo(r[0]))return r[0]=w(r[0]),n[t](...r);return i}function be(e,t,r=[]){mo(),Zt();let n=w(e)[t].apply(e,r);return Qt(),go(),n}function Eo(e){if(!Oe(e))e=String(e);let t=w(this);return C(t,"has",e),t.hasOwnProperty(e)}function To(e,t,r){return function(...n){let i=this.__v_raw,o=w(i),s=xe(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Nt:t?Se:te;return!t&&C(o,"iterate",l?Dt:J),_e(Object.create(c),{next(){let{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:a?[d(u[0]),d(u[1])]:d(u),done:p}}})}}function $e(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";Z(`${Tn(e)} operation ${r}failed: target is readonly.`,w(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Oo(e,t){let r={get(i){let o=this.__v_raw,s=w(o),a=w(i);if(!e){if(K(i,a))C(s,"get",i);C(s,"get",a)}let{has:l}=Pe(s),c=t?Nt:e?Se:te;if(l.call(s,i))return c(o.get(i));else if(l.call(s,a))return c(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&C(w(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=w(o),a=w(i);if(!e){if(K(i,a))C(s,"has",i);C(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=w(a),c=t?Nt:e?Se:te;return!e&&C(l,"iterate",J),a.forEach((d,u)=>i.call(o,c(d),c(u),s))}};return _e(r,e?{add:$e("add"),set:$e("set"),delete:$e("delete"),clear:$e("clear")}:{add(i){let o=w(this),s=Pe(o),a=w(i),l=!t&&!ee(i)&&!Q(i)?a:i;if(!(s.has.call(o,l)||K(i,l)&&s.has.call(o,i)||K(a,l)&&s.has.call(o,a)))o.add(l),U(o,"add",l,l);return this},set(i,o){if(!t&&!ee(o)&&!Q(o))o=w(o);let s=w(this),{has:a,get:l}=Pe(s),c=a.call(s,i);if(!c)i=w(i),c=a.call(s,i);else kr(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)U(s,"add",i,o);else if(K(o,d))U(s,"set",i,o,d);return this},delete(i){let o=w(this),{has:s,get:a}=Pe(o),l=s.call(o,i);if(!l)i=w(i),l=s.call(o,i);else kr(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)U(o,"delete",i,void 0,c);return d},clear(){let i=w(this),o=i.size!==0,s=xe(i)?new Map(i):new Set(i),a=i.clear();if(o)U(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=To(i,e,t)}),r}function Pn(e,t){let r=Oo(e,t);return(n,i,o)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(It(r,i)&&i in n?r:n,i,o)}}function kr(e,t,r){let n=w(r);if(n!==r&&t.call(e,n)){let i=Cn(e);Z(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}function No(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rr(e){if(Q(e))return e;return zn(e,!1,So,Io,$n)}function Bt(e){return zn(e,!0,Co,Mo,Rn)}function zn(e,t,r,n,i){if(!ke(e))return Z(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let o=i.get(e);if(o)return o;let s=No(Cn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Hn(e){if(Q(e))return Hn(e.__v_raw);return!!(e&&e.__v_isReactive)}function Q(e){return!!(e&&e.__v_isReadonly)}function ee(e){return!!(e&&e.__v_isShallow)}function Bo(e){return e?!!e.__v_raw:!1}function w(e){let t=e&&e.__v_raw;return t?w(t):e}function we(e){return e?e.__v_isRef===!0:!1}function Po(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Un(e){if(!pt[e])pt[e]=0;return++pt[e]}function $o(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Ro(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Un(t)}function zo(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function jn(e,t,r){I(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function Ar(e){let t=R(()=>document.querySelector(e),()=>Ho)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=Uo(t);if(r.includes("camel"))t=jo(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(o=Fn(r,o),r.includes("prevent"))o=a(o,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))o=a(o,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))o=a(o,(l,c)=>{l(c),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,c)=>{if(e.contains(c.target))return;if(c.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(c)});if(r.includes("self"))o=a(o,(l,c)=>{c.target===e&&l(c)});if(t==="submit")o=a(o,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(Fo(t)||Kn(t))o=a(o,(l,c)=>{if(Vo(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Fn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ve(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=mn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ve(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=gn(t,n)}return t}function Uo(e){return e.replace(/-/g,".")}function jo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ve(e){return!Array.isArray(e)&&!isNaN(e)}function qo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Fo(e){return["keydown","keyup"].includes(e)}function Kn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Vo(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Ko.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ve((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Ve((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&Sr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((o)=>r.includes(o));if(r=r.filter((o)=>!i.includes(o)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(Kn(e.type))return!1;if(Sr(e.key).includes(r[0]))return!1}}return!0}function Sr(e){if(!e)return[];e=qo(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function Re(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Fe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=bt(r.target.value);else if(t.includes("boolean"))i=ze(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Wo(o,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return bt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return ze(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Gt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return bt(i);else if(t.includes("boolean"))return ze(i);else if(t.includes("trim"))return i.trim();else return i}})}function bt(e){let t=e?parseFloat(e):null;return Yo(t)?t:e}function Wo(e,t){return e==t}function Yo(e){return!Array.isArray(e)&&!isNaN(e)}function Cr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Jo(e,t){e._x_keyExpression=t}function Go(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function Xo(e){if(!j)return!1;if(kt)return!0;return e.hasAttribute("data-has-alpine-state")}function Zo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Qo(e,t,r,n){r((i)=>{if(ra(i))i=Array.from({length:i},(c,d)=>d+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let o=e._x_lookup,s=new Map;e._x_lookup=s;let a=na(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=ta(t,d,c,i),p;return n((b)=>{if(typeof b==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(b))s.set(b,o.get(b)),o.delete(b);p=b},{scope:{index:c,...u}}),[p,u]});_(()=>{o.forEach((u)=>{ne(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,p])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(p),d.nextElementSibling!==h){if(d.nextElementSibling)h.replaceWith(d.nextElementSibling);d.after(h)}if(d=h,h._x_currentIfEl){if(h.nextElementSibling!==h._x_currentIfEl)d.after(h._x_currentIfEl);d=h._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let b=document.importNode(e.content,!0).firstElementChild,m=le(p);Ce(b,m,e),b._x_refreshXForScope=Zo(m),s.set(u,b),c.add(b),d.after(b),d=b}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function ea(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(t);if(a){if(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2])o.collection=a[2].trim()}else o.item=s;return o}function ta(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,a)=>{i[s]=t[a]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function ra(e){return typeof e!=="object"&&!isNaN(e)}function na(e){return typeof e==="object"&&!Array.isArray(e)}function Wn(){}function tt(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var mt=!1,gt=!1,P,xt=-1,He=!1,Pt=!1,le,re,ce,Or,Ni=0,vt=!0,Mr,Lr,Dr,We,zt=!1,F,Ut=!1,Ue,Ki,Ur,jr,W=!0,Fr=()=>{},Kr,qt="x-",qe,_t=!1,me,Wr,Jr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Gr=(e)=>e,Zr,en=()=>new RegExp(`^${qt}([^:^.]+)\\b`),Et="DEFAULT",V,j=!1,tn,kt=!1,Xe=0,gr=!1,Kt,sn,dn,vs=1,At,Vt=!1,Rs,B,vr=!1,vn,wn,Gs,ue,yr,_n,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Xs,Zs=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new k("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
|
|
6
6
|
`)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,t=!1;while(this.position<this.input.length){let n=this.input[this.position];if(this.isDigit(n))this.position++;else if(n==="."&&!t)t=!0,this.position++;else break}let r=this.input.slice(e,this.position);this.tokens.push(new k("NUMBER",parseFloat(r),e,this.position))}readIdentifierOrKeyword(){let e=this.position;while(this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]))this.position++;let t=this.input.slice(e,this.position);if(["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t))if(t==="true"||t==="false")this.tokens.push(new k("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new k("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new k("UNDEFINED",void 0,e,this.position));else this.tokens.push(new k("KEYWORD",t,e,this.position));else this.tokens.push(new k("IDENTIFIER",t,e,this.position))}readString(){let e=this.position,t=this.input[this.position];this.position++;let r="",n=!1;while(this.position<this.input.length){let i=this.input[this.position];if(n){switch(i){case"n":r+=`
|
|
7
|
-
`;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new k("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},Xs=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return Js.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},Zs=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let g=t[e.name];if(this.checkForDangerousValues(g),typeof g==="function")return g.bind(t);return g}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let o;if(e.computed)o=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else o=e.property.name;this.checkForDangerousKeywords(o);let s=i[o];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let a=e.arguments.map((g)=>this.evaluate({node:g,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let g=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f;if(e.callee.computed)f=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else f=e.callee.property.name;this.checkForDangerousKeywords(f);let v=g[f];if(typeof v!=="function")throw Error("Value is not a function");l=v.apply(g,a)}else if(e.callee.type==="Identifier"){let g=e.callee.name,f;if(g in t)f=t[g];else throw Error(`Undefined variable: ${g}`);if(typeof f!=="function")throw Error("Value is not a function");let v=r!==null?r:t;l=f.apply(v,a)}else{let g=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof g!=="function")throw Error("Value is not a function");l=g.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let g=e.argument.name;if(!(g in t))throw Error(`Undefined variable: ${g}`);let f=t[g];if(e.operator==="++")t[g]=f+1;else if(e.operator==="--")t[g]=f-1;return e.prefix?t[g]:f}else if(e.argument.type==="MemberExpression"){let g=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(g))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(f);let v=g[f];if(e.operator==="++")g[f]=v+1;else if(e.operator==="--")g[f]=v-1;return e.prefix?g[f]:v}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let p=u();switch(e.operator){case"+":return d+p;case"-":return d-p;case"*":return d*p;case"/":return d/p;case"%":return d%p;case"==":return d==p;case"!=":return d!=p;case"===":return d===p;case"!==":return d!==p;case"<":return d<p;case">":return d>p;case"<=":return d<=p;case">=":return d>=p;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let m=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=m,m;else if(e.left.type==="MemberExpression"){let g=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(g))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(f),g[f]=m,m}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((g)=>this.evaluate({node:g,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let h={};for(let g of e.properties){let f=g.computed?this.evaluate({node:g.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):g.key.type==="Identifier"?g.key.name:this.evaluate({node:g.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),v=this.evaluate({node:g.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});h[f]=v}return h;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(vr.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(wn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return vr.set(e,!0),!0}},Ia,La,_e,ro,Mt=(e,t)=>ro.call(e,t),Ee,xe=(e)=>An(e)==="[object Map]",no=(e)=>typeof e==="string",Oe=(e)=>typeof e==="symbol",ke=(e)=>e!==null&&typeof e==="object",io,An=(e)=>io.call(e),Sn=(e)=>An(e).slice(8,-1),Xt=(e)=>no(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,et=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},so,Da,oo,Na,Cn,Ba,K=(e,t)=>!Object.is(e,t),ao="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pa,dt,y,ut,yr=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,dt)if(dt.active)dt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ut.has(this))ut.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))lo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,wr(this),On(this);let e=y,t=O;y=this,O=!0;try{return this.fn()}finally{if(y!==this)Z("Active effect was not restored correctly - this is likely a Vue internal bug.");Mn(this),y=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)er(e);this.deps=this.depsTail=void 0,wr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ut.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(It(this))this.run()}get dirty(){return It(this)}},Tn=0,ve,ye,O=!0,In,Ke=0,mo=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},go=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!y||!O||y===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==y){if(t=this.activeLink=new mo(y,this),!y.deps)y.deps=y.depsTail=t;else t.prevDep=y.depsTail,y.depsTail.nextDep=t,y.depsTail=t;Ln(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=y.depsTail,t.nextDep=void 0,y.depsTail.nextDep=t,y.depsTail=t,y.deps===t)y.deps=r}}if(y.onTrack)y.onTrack(_e({effect:y},e));return t}trigger(e){this.version++,Ke++,this.notify(e)}notify(e){Zt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(_e({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Qt()}}},Lt,J,Dt,Ae,xo,vo,yo,Dn,Nn=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?Io:$n:i?Mo:Pn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=Ee(e);if(!n){let a;if(o&&(a=xo[t]))return a;if(t==="hasOwnProperty")return wo}let s=Reflect.get(e,t,we(e)?e:r);if(Oe(t)?Dn.has(t):yo(t))return s;if(!n)C(e,"get",t);if(i)return s;if(we(s)){let a=o&&Xt(t)?s:s.value;return n&&ke(a)?Bt(a):a}if(ke(s))return n?Bt(s):rr(s);return s}},_o,Eo,ko,Ao,Nt=(e)=>e,Pe=(e)=>Reflect.getPrototypeOf(e),To,Oo,Pn,Mo,$n,Io,te=(e)=>ke(e)?rr(e):e,Se=(e)=>ke(e)?Bt(e):e,pt,Ro,jn=()=>{},qo,Kn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Ks(l),S(e,n)((d)=>{vn(e,d,i)},{scope:l});return}if(t==="key")return Wo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=S(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>fn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},q,Wn,ra;var Jn=Ei(()=>{P=[];Mr=[],Ir=[],Lr=[];We=new MutationObserver(Ye);F=[];Ue=[];qi={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return Fi;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=Rr(s,t),i)break;if(!i)i=e[e.length-1];let o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};Hr={};Ur=Ji;qe={};me=new Map,Vr=Symbol();Xr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",Et,"teleport"];en=[];Te((e,t)=>{if(Xe===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});Kt=[],nn=[];cn=[];At=[];E("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")As(e,r,t);else ks(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){if(e._x_transition&&(e._x_transition.enter||e._x_transition.leave))e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):o();else e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=un(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Ps=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);B={};xn={};yn={};Ys={get reactive(){return le},get release(){return ce},get effect(){return re},get raw(){return Tr},get transaction(){return Pi},version:"3.17.4",flushAndStopDeferringMutations:ji,dontAutoEvaluateFunctions:jr,disableEffectScheduling:Di,startObservingMutations:Ht,stopObservingMutations:Pr,setReactivityEngine:Ni,onAttributeRemoved:Nr,onAttributesAdded:Dr,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:os,addRootSelector:an,addInitSelector:ln,setErrorHandler:Yi,interceptClone:Te,addScopeToNode:Ce,deferMutations:Ui,mapAttributes:Ft,evaluateLater:S,interceptInit:ms,initInterceptors:jt,injectMagics:je,setEvaluator:Gi,setRawEvaluator:Xi,mergeProxies:G,extractProp:Hs,findClosest:T,onElRemoved:Rt,closestRoot:Ze,destroyTree:ne,interceptor:zr,transition:Ot,setStyles:Qe,mutateDom:_,deferInit:ds,directive:E,entangle:gn,throttle:mn,debounce:bn,evaluate:Y,evaluateRaw:Qi,initTree:D,nextTick:Wt,prefixed:de,prefix:es,plugin:Us,magic:M,store:js,start:ps,clone:ls,cloneNode:as,bound:zs,$data:$r,watch:Or,walk:X,data:Vs,bind:Fs},ue=Ys,vr=new WeakMap,wn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}wn.add(t)});Js=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Ia=Object.freeze({}),La=Object.freeze([]),_e=Object.assign,ro=Object.prototype.hasOwnProperty,Ee=Array.isArray,io=Object.prototype.toString,so=/-\w/g,Da=et((e)=>e.replace(so,(t)=>t.slice(1).toUpperCase())),oo=/\B([A-Z])/g,Na=et((e)=>e.replace(oo,"-$1").toLowerCase()),Cn=et((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Ba=et((e)=>e?`on${Cn(e)}`:""),Pa=kn(ao+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ut=new WeakSet;In=[];Lt=new WeakMap,J=Symbol("Object iterate"),Dt=Symbol("Map keys iterate"),Ae=Symbol("Array iterate");xo={__proto__:null,[Symbol.iterator](){return ft(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>Ee(t)?se(t):t))},entries(){return ft(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return ht(this,"includes",e)},indexOf(...e){return ht(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ht(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return be(this,"pop")},push(...e){return be(this,"push",e)},reduce(e,...t){return _r(this,"reduce",e,t)},reduceRight(e,...t){return _r(this,"reduceRight",e,t)},shift(){return be(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return be(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return be(this,"unshift",e)},values(){return ft(this,"values",(e)=>I(this,e))}};vo=Array.prototype;yo=kn("__proto__,__v_isRef,__isVue"),Dn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Oe));_o=class extends Nn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=Ee(e)&&Xt(t);if(!this._isShallow){let l=Q(i);if(!ee(r)&&!Q(r))i=w(i),r=w(r);if(!o&&we(i)&&!we(r))if(l)return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=o?Number(t)<e.length:Mt(e,t),a=Reflect.set(e,t,r,we(e)?e:n);if(e===w(n)&&a){if(!s)U(e,"add",t,r);else if(K(r,i))U(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Mt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)U(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Oe(t)||!Dn.has(t))C(e,"has",t);return r}ownKeys(e){return C(e,"iterate",Ee(e)?"length":J),Reflect.ownKeys(e)}},Eo=class extends Nn{constructor(e=!1){super(!0,e)}set(e,t){return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return Z(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},ko=new _o,Ao=new Eo;To={get:Bn(!1,!1)},Oo={get:Bn(!0,!1)};Pn=new WeakMap,Mo=new WeakMap,$n=new WeakMap,Io=new WeakMap;M("nextTick",()=>Wt);M("dispatch",(e)=>ge.bind(ge,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=Or(()=>{let l;return o((c)=>l=c),l},i);r(a)});M("store",qs);M("data",(e)=>$r(e));M("root",(e)=>Ze(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=G(No(e)),e._x_refs_proxy});pt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return $o(e,i,t,()=>{let o=Bo(e,r),s=o?o._x_ids[r]:Hn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Te((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Un("Focus","focus","focus");Un("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let d;return o((u)=>d=u),d},a=n(`${t} = __placeholder`),l=(d)=>a(()=>{},{scope:{__placeholder:d}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,p=gn({get(){return d()},set(b){u(b)}},{get(){return s()},set(b){l(b)}});i(p)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=kr(r),o=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((a)=>{o.addEventListener(a,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Ce(o,{},e);let s=(a,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(a,l);else if(c.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{R(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=kr(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),ne(o)}))});Ro=document.createElement("div");jn.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};E("ignore",jn);E("effect",R((e,{expression:t},{effect:r})=>{r(S(e,t))}));qo=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=T(e,(h)=>h!==e);let s=S(o,r),a;if(typeof r==="string")a=S(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=S(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let h;return s((g)=>h=g),Sr(h)?h.get():h},c=(h)=>{let g;if(s((f)=>g=f),Sr(g))g.set(h);else a(()=>{},{scope:{__placeholder:h}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),p=t.includes("enter"),b=d||u||p,m;if(j)m=()=>{};else if(b){let h=[],g=(f)=>c(Re(e,t,f,l()));if(d)h.push(oe(e,"change",t,g));if(u){if(h.push(oe(e,"blur",t,g)),e.form){let f=e.form,v=()=>g({target:e});if(!f._x_pendingModelUpdates)f._x_pendingModelUpdates=[];f._x_pendingModelUpdates.push(v),i(()=>{if(f._x_pendingModelUpdates)f._x_pendingModelUpdates.splice(f._x_pendingModelUpdates.indexOf(v),1)})}}if(p)h.push(oe(e,"keydown",t,(f)=>{if(f.key==="Enter")g(f)}));m=()=>h.forEach((f)=>f())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=oe(e,h,t,(g)=>{c(Re(e,t,g,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Fe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(Re(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=m,i(()=>e._x_removeModelListeners.default()),e.form){let h=oe(e.form,"reset",[],(g)=>{Wt(()=>e._x_model&&e._x_model.set(Re(e,t,{target:e},l())))});i(()=>h())}if(e._x_model={get(){return l()},set(h){c(h)},setWithModifiers:qn(t,c)},e._x_forceModelUpdate=(h)=>{if(h===void 0&&typeof r==="string"&&r.match(/\./))h="";_(()=>{if(Fe(e))if(Array.isArray(h))e.checked=h.some((g)=>g==e.value);else e.checked=!!h;else if(Gt(e))if(typeof h==="boolean")e.checked=ze(e.value)===h;else e.checked=e.value==h;else fn(e,"value",h)})},e.tagName==="SELECT"){let h=new MutationObserver(()=>{e._x_forceModelUpdate(l())});h.observe(e,{childList:!0}),i(()=>h.disconnect())}n(()=>{let h=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(h)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));ln(()=>`[${de("init")}]`);E("init",R((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>ne(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Ft(Yr(":",Jr(de("bind:"))));Kn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};E("bind",Kn);an(()=>`[${de("data")}]`);q=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Jo(e))return;let n=e[q];if(n?.expression===t)return;t=t===""?"{}":t;let i={};je(i,e);let o={};Ws(o,i);let s=Y(e,t,{scope:o});if(s===void 0||s===!0)s={};je(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Yo(a,s);let c={expression:t};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})}else a=le(s);jt(a,r);let l=Ce(e,a);R(()=>{a.init&&Y(e,a.init)})(),r(()=>{a.destroy&&Y(e,a.destroy),l();let c={reactiveData:a};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})})});Te((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=S(e,r);if(!e._x_doHide)e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{_(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else e.style.removeProperty("display")})};let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=Tt((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?a():o();l(u),c=u,d=!1}))});E("for",R((e,{expression:t},{effect:r,cleanup:n})=>{let i=Zo(t),o=S(e,i.items),s=S(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Xo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{ne(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Vn.inline=(e,{expression:t},{cleanup:r})=>{let n=Ze(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Vn);E("if",R((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=S(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Ce(a,{},e),_(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{ne(a),a.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},a},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((a)=>{a?o():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Po(e,i))});Te((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ft(Yr("@",Jr(de("on:"))));E("on",R((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?S(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=oe(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));tt("Collapse","collapse","collapse");tt("Intersect","intersect","intersect");tt("Focus","trap","focus");tt("Mask","mask","mask");E("html",(e,{expression:t})=>{Je(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(eo);ue.setRawEvaluator(Qs);ue.setReactivityEngine({reactive:rr,effect:(e,t={})=>{let r;return r=fo(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:ho,raw:w});Wn=ue,ra=Wn;/*! Bundled license information:
|
|
7
|
+
`;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new k("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},Qs=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return Xs.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},eo=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let g=t[e.name];if(this.checkForDangerousValues(g),typeof g==="function")return g.bind(t);return g}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let o;if(e.computed)o=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else o=e.property.name;this.checkForDangerousKeywords(o);let s=i[o];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let a=e.arguments.map((g)=>this.evaluate({node:g,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let g=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f;if(e.callee.computed)f=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else f=e.callee.property.name;this.checkForDangerousKeywords(f);let v=g[f];if(typeof v!=="function")throw Error("Value is not a function");l=v.apply(g,a)}else if(e.callee.type==="Identifier"){let g=e.callee.name,f;if(g in t)f=t[g];else throw Error(`Undefined variable: ${g}`);if(typeof f!=="function")throw Error("Value is not a function");let v=r!==null?r:t;l=f.apply(v,a)}else{let g=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof g!=="function")throw Error("Value is not a function");l=g.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let g=e.argument.name;if(!(g in t))throw Error(`Undefined variable: ${g}`);let f=t[g];if(e.operator==="++")t[g]=f+1;else if(e.operator==="--")t[g]=f-1;return e.prefix?t[g]:f}else if(e.argument.type==="MemberExpression"){let g=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(g))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(f);let v=g[f];if(e.operator==="++")g[f]=v+1;else if(e.operator==="--")g[f]=v-1;return e.prefix?g[f]:v}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let p=u();switch(e.operator){case"+":return d+p;case"-":return d-p;case"*":return d*p;case"/":return d/p;case"%":return d%p;case"==":return d==p;case"!=":return d!=p;case"===":return d===p;case"!==":return d!==p;case"<":return d<p;case">":return d>p;case"<=":return d<=p;case">=":return d>=p;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let m=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=m,m;else if(e.left.type==="MemberExpression"){let g=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(g))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(f),g[f]=m,m}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((g)=>this.evaluate({node:g,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let h={};for(let g of e.properties){let f=g.computed?this.evaluate({node:g.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):g.key.type==="Identifier"?g.key.name:this.evaluate({node:g.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),v=this.evaluate({node:g.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});h[f]=v}return h;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(yr.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(_n.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return yr.set(e,!0),!0}},Da,Na,_e,io,It=(e,t)=>io.call(e,t),Ee,xe=(e)=>Sn(e)==="[object Map]",so=(e)=>typeof e==="string",Oe=(e)=>typeof e==="symbol",ke=(e)=>e!==null&&typeof e==="object",oo,Sn=(e)=>oo.call(e),Cn=(e)=>Sn(e).slice(8,-1),Xt=(e)=>so(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,et=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},ao,Ba,lo,Pa,Tn,$a,K=(e,t)=>!Object.is(e,t),co="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ra,dt,y,ut,wr=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,dt)if(dt.active)dt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ut.has(this))ut.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))uo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_r(this),In(this);let e=y,t=O;y=this,O=!0;try{return this.fn()}finally{if(y!==this)Z("Active effect was not restored correctly - this is likely a Vue internal bug.");Mn(this),y=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)er(e);this.deps=this.depsTail=void 0,_r(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ut.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(Mt(this))this.run()}get dirty(){return Mt(this)}},On=0,ve,ye,O=!0,Ln,Ke=0,xo=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},vo=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!y||!O||y===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==y){if(t=this.activeLink=new xo(y,this),!y.deps)y.deps=y.depsTail=t;else t.prevDep=y.depsTail,y.depsTail.nextDep=t,y.depsTail=t;Dn(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=y.depsTail,t.nextDep=void 0,y.depsTail.nextDep=t,y.depsTail=t,y.deps===t)y.deps=r}}if(y.onTrack)y.onTrack(_e({effect:y},e));return t}trigger(e){this.version++,Ke++,this.notify(e)}notify(e){Zt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(_e({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Qt()}}},Lt,J,Dt,Ae,yo,wo,_o,Nn,Bn=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?Do:Rn:i?Lo:$n).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=Ee(e);if(!n){let a;if(o&&(a=yo[t]))return a;if(t==="hasOwnProperty")return Eo}let s=Reflect.get(e,t,we(e)?e:r);if(Oe(t)?Nn.has(t):_o(t))return s;if(!n)C(e,"get",t);if(i)return s;if(we(s)){let a=o&&Xt(t)?s:s.value;return n&&ke(a)?Bt(a):a}if(ke(s))return n?Bt(s):rr(s);return s}},ko,Ao,So,Co,Nt=(e)=>e,Pe=(e)=>Reflect.getPrototypeOf(e),Io,Mo,$n,Lo,Rn,Do,te=(e)=>ke(e)?rr(e):e,Se=(e)=>ke(e)?Bt(e):e,pt,Ho,qn=()=>{},Ko,Vn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Ws(l),S(e,n)((d)=>{yn(e,d,i)},{scope:l});return}if(t==="key")return Jo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=S(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>hn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},q,Yn,ia;var Gn=Ai(()=>{P=[];Mr=[],Lr=[],Dr=[];We=new MutationObserver(Ye);F=[];Ue=[];Ki={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return Vi;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=zr(s,t),i)break;if(!i)i=e[e.length-1];let o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};Ur={};jr=Xi;qe={};me=new Map,Wr=Symbol();Zr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",Et,"teleport"];tn=[];Te((e,t)=>{if(Xe===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});Kt=[],sn=[];dn=[];At=[];E("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")Cs(e,r,t);else Ss(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){if(e._x_transition&&(e._x_transition.enter||e._x_transition.leave))e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):o();else e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=fn(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Rs=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);B={};vn={};wn={};Gs={get reactive(){return le},get release(){return ce},get effect(){return re},get raw(){return Or},get transaction(){return Ri},version:"3.17.4",flushAndStopDeferringMutations:Fi,dontAutoEvaluateFunctions:qr,disableEffectScheduling:Bi,startObservingMutations:Ht,stopObservingMutations:$r,setReactivityEngine:Pi,onAttributeRemoved:Br,onAttributesAdded:Nr,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:ls,addRootSelector:ln,addInitSelector:cn,setErrorHandler:Gi,interceptClone:Te,addScopeToNode:Ce,deferMutations:qi,mapAttributes:Ft,evaluateLater:S,interceptInit:xs,initInterceptors:jt,injectMagics:je,setEvaluator:Zi,setRawEvaluator:Qi,mergeProxies:G,extractProp:js,findClosest:T,onElRemoved:Rt,closestRoot:Ze,destroyTree:ne,interceptor:Hr,transition:Ot,setStyles:Qe,mutateDom:_,deferInit:fs,directive:E,entangle:xn,throttle:gn,debounce:mn,evaluate:Y,evaluateRaw:ts,initTree:D,nextTick:Wt,prefixed:de,prefix:rs,plugin:qs,magic:I,store:Fs,start:ms,clone:ds,cloneNode:cs,bound:Us,$data:Rr,watch:Ir,walk:X,data:Ys,bind:Vs},ue=Gs,yr=new WeakMap,_n=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}_n.add(t)});Xs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Da=Object.freeze({}),Na=Object.freeze([]),_e=Object.assign,io=Object.prototype.hasOwnProperty,Ee=Array.isArray,oo=Object.prototype.toString,ao=/-\w/g,Ba=et((e)=>e.replace(ao,(t)=>t.slice(1).toUpperCase())),lo=/\B([A-Z])/g,Pa=et((e)=>e.replace(lo,"-$1").toLowerCase()),Tn=et((e)=>e.charAt(0).toUpperCase()+e.slice(1)),$a=et((e)=>e?`on${Tn(e)}`:""),Ra=An(co+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ut=new WeakSet;Ln=[];Lt=new WeakMap,J=Symbol("Object iterate"),Dt=Symbol("Map keys iterate"),Ae=Symbol("Array iterate");yo={__proto__:null,[Symbol.iterator](){return ft(this,Symbol.iterator,(e)=>M(this,e))},concat(...e){return se(this).concat(...e.map((t)=>Ee(t)?se(t):t))},entries(){return ft(this,"entries",(e)=>(e[1]=M(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>M(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>M(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>M(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return ht(this,"includes",e)},indexOf(...e){return ht(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ht(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return be(this,"pop")},push(...e){return be(this,"push",e)},reduce(e,...t){return Er(this,"reduce",e,t)},reduceRight(e,...t){return Er(this,"reduceRight",e,t)},shift(){return be(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return be(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return be(this,"unshift",e)},values(){return ft(this,"values",(e)=>M(this,e))}};wo=Array.prototype;_o=An("__proto__,__v_isRef,__isVue"),Nn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Oe));ko=class extends Bn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=Ee(e)&&Xt(t);if(!this._isShallow){let l=Q(i);if(!ee(r)&&!Q(r))i=w(i),r=w(r);if(!o&&we(i)&&!we(r))if(l)return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=o?Number(t)<e.length:It(e,t),a=Reflect.set(e,t,r,we(e)?e:n);if(e===w(n)&&a){if(!s)U(e,"add",t,r);else if(K(r,i))U(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=It(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)U(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Oe(t)||!Nn.has(t))C(e,"has",t);return r}ownKeys(e){return C(e,"iterate",Ee(e)?"length":J),Reflect.ownKeys(e)}},Ao=class extends Bn{constructor(e=!1){super(!0,e)}set(e,t){return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return Z(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},So=new ko,Co=new Ao;Io={get:Pn(!1,!1)},Mo={get:Pn(!0,!1)};$n=new WeakMap,Lo=new WeakMap,Rn=new WeakMap,Do=new WeakMap;I("nextTick",()=>Wt);I("dispatch",(e)=>ge.bind(ge,e));I("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=Ir(()=>{let l;return o((c)=>l=c),l},i);r(a)});I("store",Ks);I("data",(e)=>Rr(e));I("root",(e)=>Ze(e));I("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=G(Po(e)),e._x_refs_proxy});pt={};I("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return zo(e,i,t,()=>{let o=$o(e,r),s=o?o._x_ids[r]:Un(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Te((e,t)=>{if(e._x_id)t._x_id=e._x_id});I("el",(e)=>e);jn("Focus","focus","focus");jn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let d;return o((u)=>d=u),d},a=n(`${t} = __placeholder`),l=(d)=>a(()=>{},{scope:{__placeholder:d}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,p=xn({get(){return d()},set(b){u(b)}},{get(){return s()},set(b){l(b)}});i(p)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=Ar(r),o=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((a)=>{o.addEventListener(a,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Ce(o,{},e);let s=(a,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(a,l);else if(c.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{R(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=Ar(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),ne(o)}))});Ho=document.createElement("div");qn.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};E("ignore",qn);E("effect",R((e,{expression:t},{effect:r})=>{r(S(e,t))}));Ko=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=T(e,(h)=>h!==e);let s=S(o,r),a;if(typeof r==="string")a=S(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=S(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let h;return s((g)=>h=g),Cr(h)?h.get():h},c=(h)=>{let g;if(s((f)=>g=f),Cr(g))g.set(h);else a(()=>{},{scope:{__placeholder:h}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),p=t.includes("enter"),b=d||u||p,m;if(j)m=()=>{};else if(b){let h=[],g=(f)=>c(Re(e,t,f,l()));if(d)h.push(oe(e,"change",t,g));if(u){if(h.push(oe(e,"blur",t,g)),e.form){let f=e.form,v=()=>g({target:e});if(!f._x_pendingModelUpdates)f._x_pendingModelUpdates=[];f._x_pendingModelUpdates.push(v),i(()=>{if(f._x_pendingModelUpdates)f._x_pendingModelUpdates.splice(f._x_pendingModelUpdates.indexOf(v),1)})}}if(p)h.push(oe(e,"keydown",t,(f)=>{if(f.key==="Enter")g(f)}));m=()=>h.forEach((f)=>f())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=oe(e,h,t,(g)=>{c(Re(e,t,g,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Fe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(Re(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=m,i(()=>e._x_removeModelListeners.default()),e.form){let h=oe(e.form,"reset",[],(g)=>{Wt(()=>e._x_model&&e._x_model.set(Re(e,t,{target:e},l())))});i(()=>h())}if(e._x_model={get(){return l()},set(h){c(h)},setWithModifiers:Fn(t,c)},e._x_forceModelUpdate=(h)=>{if(h===void 0&&typeof r==="string"&&r.match(/\./))h="";_(()=>{if(Fe(e))if(Array.isArray(h))e.checked=h.some((g)=>g==e.value);else e.checked=!!h;else if(Gt(e))if(typeof h==="boolean")e.checked=ze(e.value)===h;else e.checked=e.value==h;else hn(e,"value",h)})},e.tagName==="SELECT"){let h=new MutationObserver(()=>{e._x_forceModelUpdate(l())});h.observe(e,{childList:!0}),i(()=>h.disconnect())}n(()=>{let h=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(h)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));cn(()=>`[${de("init")}]`);E("init",R((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>ne(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Ft(Jr(":",Gr(de("bind:"))));Vn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};E("bind",Vn);ln(()=>`[${de("data")}]`);q=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Xo(e))return;let n=e[q];if(n?.expression===t)return;t=t===""?"{}":t;let i={};je(i,e);let o={};Js(o,i);let s=Y(e,t,{scope:o});if(s===void 0||s===!0)s={};je(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Go(a,s);let c={expression:t};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})}else a=le(s);jt(a,r);let l=Ce(e,a);R(()=>{a.init&&Y(e,a.init)})(),r(()=>{a.destroy&&Y(e,a.destroy),l();let c={reactiveData:a};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})})});Te((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=S(e,r);if(!e._x_doHide)e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{_(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else e.style.removeProperty("display")})};let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=Tt((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?a():o();l(u),c=u,d=!1}))});E("for",R((e,{expression:t},{effect:r,cleanup:n})=>{let i=ea(t),o=S(e,i.items),s=S(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Qo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{ne(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Wn.inline=(e,{expression:t},{cleanup:r})=>{let n=Ze(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Wn);E("if",R((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=S(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Ce(a,{},e),_(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{ne(a),a.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},a},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((a)=>{a?o():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Ro(e,i))});Te((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ft(Jr("@",Gr(de("on:"))));E("on",R((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?S(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=oe(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));tt("Collapse","collapse","collapse");tt("Intersect","intersect","intersect");tt("Focus","trap","focus");tt("Mask","mask","mask");E("html",(e,{expression:t})=>{Je(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(ro);ue.setRawEvaluator(to);ue.setReactivityEngine({reactive:rr,effect:(e,t={})=>{let r;return r=po(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:bo,raw:w});Yn=ue,ia=Yn;/*! Bundled license information:
|
|
8
8
|
|
|
9
9
|
@vue/shared/dist/shared.esm-bundler.js:
|
|
10
10
|
(**
|
|
@@ -19,7 +19,7 @@ ${r?'Expression: "'+r+`"
|
|
|
19
19
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
20
20
|
* @license MIT
|
|
21
21
|
**)
|
|
22
|
-
*/});var Ne=typeof HTMLElement==="function"?HTMLElement:class{};function
|
|
22
|
+
*/});var Ne=typeof HTMLElement==="function"?HTMLElement:class{};function hr(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function pr(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,a]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,a)};i();let o=new MutationObserver(i);o.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>o.disconnect(),{once:!0})}var Si=Symbol.for("bare-v3.styles");function Be(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[Si]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let s=new i.CSSStyleSheet;s.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,s],n.add(t);return}let o=e.createElement("style");o.id=t,o.textContent=r,e.head.append(o)}var Ie=null;function Xn(){if(Ie)return Ie;let e=(Gn(),wi(Jn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Ie=e}var Zn=(e)=>Xn().reactive(e),nr=(e)=>Ie?Ie.raw(e):e;function Qn(e,t,r){let n=Xn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function sa(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},o=null,s=null,a=0,l=null,c=0,d=null,u=new n.MutationObserver((m)=>{if(!o.isConnected||m.some(({target:h})=>s.contains(h)&&!d.contains(h)))p()});function p(){if(!o)return;n.clearTimeout(c),u.disconnect();let m=o.dataset.b3Confirm;if(l&&m&&o.textContent===m)o.replaceChildren(...l);o.removeAttribute("data-b3-armed"),o=s=l=null,d.textContent=""}function b(m){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let h=d;o=m,a=n.performance.now(),s=m.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||m.parentElement;let g=m.dataset.b3Confirm;if(g)l=[...m.childNodes],m.replaceChildren(g);m.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),c=n.setTimeout(p,4000),n.requestAnimationFrame(()=>{if(o===m)h.textContent=g||"Press again to confirm"})}e.addEventListener("click",(m)=>{let h=m.target.closest?.("[data-b3-confirm]");if(o&&h!==o)p();if(!h||h.disabled||!e.contains(h))return;if(h===o&&n.performance.now()-a>=350)return p();if(m.preventDefault(),m.stopImmediatePropagation(),h!==o)b(h)},{...i,capture:!0}),e.addEventListener("focusout",({target:m})=>{if(m===o)n.queueMicrotask(()=>m===o&&p())},i),e.addEventListener("keydown",(m)=>{let h=m;if(h.key==="Escape")p();else if(h.repeat&&(h.key==="Enter"||h.key===" ")&&h.target.closest?.("[data-b3-confirm]"))h.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{p(),d?.remove()},{once:!0})}var ei=Symbol.for("bare-v3.confirm");function ti(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[ei])return;e[ei]=!0,sa(document)}var fe=1.001,oa=320,aa=30,la=350,ca="b3-image-viewer-style",da=`
|
|
23
23
|
.b3-image-viewer{position:relative;display:block;overflow:hidden;touch-action:pan-y;
|
|
24
24
|
background:var(--b3-color-canvas,#f6f5f0);color:var(--b3-color-text,#202923);
|
|
25
25
|
border-radius:var(--b3-radius,.75rem);-webkit-user-select:none;user-select:none;}
|
|
@@ -38,9 +38,9 @@ ${r?'Expression: "'+r+`"
|
|
|
38
38
|
min-height:44px;min-width:44px;}
|
|
39
39
|
.b3-image-viewer>.b3-image-viewer-close{inset-inline-end:var(--b3-space,1rem);}
|
|
40
40
|
.b3-image-viewer>.b3-image-viewer-fit{inset-inline-start:var(--b3-space,1rem);}
|
|
41
|
-
`;class ir extends Ne{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#o=!1;#s=null;#i=new Map;#a=!1;#b=0;#r=0;#x=0;#v=0;#E=!1;#y=null;#m=null;#k=new WeakSet;#l=null;get scale(){return this.#t}get fitted(){return this.#t<=fe}get src(){return this.#l??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#l=e.src??e.default??String(e);else if(this.#l=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#w()}get alt(){return this.getAttribute("alt")??""}set alt(e){this.setAttribute("alt",e??"")}get maxScale(){let e=Number(this.getAttribute("max-scale"));return e>=1?e:8}set maxScale(e){this.setAttribute("max-scale",String(e))}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",Boolean(e))}connectedCallback(){if(this.#E)return;if(this.#E=!0,Be(this.ownerDocument,aa,la),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#_(),this.#w(),this.#M(),this.#m=new MutationObserver(()=>{this.#A(),this.#f()}),this.#m.observe(this,{childList:!0}),this.#A(),this.#f()}disconnectedCallback(){this.#y?.abort(),this.#y=null,this.#m?.disconnect(),this.#m=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#s=null,this.#a=!1,this.#E=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#w(),this.reset();if(e==="alt"){let n=this.#h();if(n)n.alt=this.alt;this.#_()}if(e==="open"){if(this.#A(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#h(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#w(){let e=this.#h(),t=this.src,r=!1;if(!e&&t)e=this.ownerDocument.createElement("img"),r=!0,this.prepend(e);if(!e)return;if(t&&e.tagName==="IMG"&&e.getAttribute("src")!==t)e.setAttribute("src",t);if(e.tagName==="IMG"&&(r||this.hasAttribute("alt")))e.alt=this.alt;if(this.#_(),e.tagName==="IMG")this.#c(e)}#_(){if(this.hasAttribute("aria-labelledby"))return;let e=this.getAttribute("alt");if(e)this.setAttribute("aria-label",e);else if(!this.hasAttribute("aria-label"))this.setAttribute("aria-label","Zoomable image")}#c(e){if(this.#k.has(e))return;if(this.#k.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#g(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#g(e)},0)}#g(e){if(this.hasAttribute("data-b3-error"))return;this.setAttribute("data-b3-error",""),this.dispatchEvent(new CustomEvent("b3-error",{bubbles:!0,composed:!0,detail:{src:e.getAttribute("src")??this.src??null}}))}#A(){if(!this.open){for(let t of this.querySelectorAll(":scope > .b3-image-viewer-close"))t.remove();return}if(this.querySelector(":scope > .b3-image-viewer-close"))return;let e=this.ownerDocument.createElement("button");e.type="button",e.className="b3-image-viewer-close",e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",(t)=>{t.preventDefault(),t.stopPropagation(),this.requestClose()}),e.addEventListener("pointerdown",(t)=>t.stopPropagation()),this.append(e)}#d(){let e=this.#h();if(!e)return null;let t=e.style.transform;e.style.transform="none";let r=this.getBoundingClientRect(),n=e.getBoundingClientRect();return e.style.transform=t,this.#o=n.width>r.width+1||n.height>r.height+1,{element:e,vw:r.width,vh:r.height,x:n.left-r.left,y:n.top-r.top,w:n.width,h:n.height}}#u(e){if(this.#t<=fe&&!this.#o){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#f(e){let t=e?.element??this.#h();if(!t)return;let r=this.#t<=fe,n=!r||this.#o;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#S(e,t,r,n=this.#d()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let o=(t-this.#e)/this.#t,s=(r-this.#n)/this.#t;if(this.#e=t-o*e,this.#n=r-s*e,this.#t=e,this.#u(n),this.#f(n),i!==this.#t)this.#C()}#C(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#d();if(t)this.#u(t);if(this.#f(t),e)this.#C()}zoomTo(e){let t=this.#d();if(t)this.#S(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#T(){let e=0,t=0;for(let r of this.#i.values())e+=r.x,t+=r.y;return{x:e/this.#i.size,y:t/this.#i.size}}#O(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#y=new AbortController;let e={signal:this.#y.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#h())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#d(),this.#i.size>1||this.#t>fe||this.#o)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=fe&&!this.#o){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#s??=this.#d(),!this.#s)return;n.preventDefault();let o=this.#T(),s=i?this.#O():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let a=this.#T(),l=i?this.#O():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/s))):this.#t,p=(o.x-c.left-this.#e)/this.#t,b=(o.y-c.top-this.#n)/this.#t;if(this.#e=a.x-c.left-p*u,this.#n=a.y-c.top-b*u,this.#t=u,this.#u(this.#s),this.#f(this.#s),this.#a=!0,d!==this.#t)this.#C()},t);let r=(n)=>{if(!this.#i.delete(n.pointerId))return;if(this.hasPointerCapture?.(n.pointerId))this.releasePointerCapture(n.pointerId);if(this.#i.size){this.#s=this.#d();return}if(this.#s=null,this.#a){this.#b=performance.now(),this.#a=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),o=Math.hypot(n.clientX-this.#x,n.clientY-this.#v)<sa;if(i-this.#r<ia&&o){this.#r=0;let s=this.getBoundingClientRect();this.#S(this.#t>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#b=i}else this.#r=i,this.#x=n.clientX,this.#v=n.clientY};this.addEventListener("pointerup",r,e),this.addEventListener("pointercancel",r,e),this.addEventListener("click",(n)=>{if(n.target.closest?.(".b3-image-viewer-close, .b3-image-viewer-fit"))return;if(performance.now()-this.#b<oa){n.preventDefault(),n.stopPropagation();return}if(this.open&&this.fitted&&n.target===this)this.requestClose()},{...e,capture:!0}),this.addEventListener("wheel",(n)=>{let i=this.getBoundingClientRect();if(n.ctrlKey){n.preventDefault(),this.#S(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let o=this.#d();if(!o||o.h*this.#t<=o.vh&&!this.#o)return;let s=this.#n;if(this.#n-=n.deltaY,this.#u(o),this.#n===s)return;n.preventDefault(),this.#f(o)},t);for(let n of["gesturestart","gesturechange","gestureend"])this.addEventListener(n,(i)=>i.preventDefault(),t);this.addEventListener("keydown",(n)=>{if(n.metaKey||n.altKey)return;let i=n.shiftKey?80:40,o=(s,a)=>{let l=this.#d();if(!l||this.fitted)return!1;return this.#e+=s,this.#n+=a,this.#u(l),this.#f(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!o(i,0))return;break;case"ArrowRight":if(!o(-i,0))return;break;case"ArrowUp":if(!o(0,i))return;break;case"ArrowDown":if(!o(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#d();if(n)this.#u(n),this.#f(n)},e)}}var ti=ir;function sr(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ti;return ti=class extends ir{},customElements.define(e,r),r}sr();var ca=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,da=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,ua=350,Le=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),or=(e)=>JSON.parse(JSON.stringify(nr(e))),x=(e,t)=>e!=null&&String(e)===String(t),rt=(e)=>!!e&&typeof e==="object",A=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],he=(e)=>Array.isArray(e.comments)?e.comments:[];function fa(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,o]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=o)return`${Math.floor(n/o)}${i} ago`;return`${n}m ago`}var ci=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function ar(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Le();t.add(String(n.id))};return e.filter(rt).map((n)=>{r(n),n.cards=ci(Array.isArray(n.cards)?n.cards.filter(rt):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(rt(o))r(o)}if(Array.isArray(i.comments)){for(let o of i.comments)if(rt(o))r(o)}}return n})}function ri(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>x(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>x(o.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let o of n.cards){let s=A(o),a=s.findIndex((l)=>x(l.id,r));if(a>=0)return void s.splice(a,1)}}}function ha(e,t,r){let{field:n,id:i}=r,o=(s,a,l)=>s.splice(Math.min(l,s.length),0,nr(a));if(n==="name"){let s=e.findIndex((a)=>x(a.id,i));if(s>=0&&!t.some((a)=>x(a.id,i)))o(t,e[s],s);return}for(let s of e){let a=s.cards.findIndex((l)=>x(l.id,i));if(n==="title"&&a>=0){let l=t.find((c)=>x(c.id,s.id));if(l&&!l.cards.some((c)=>x(c.id,i)))o(l.cards,s.cards[a],a);return}if(n==="subtask")for(let l of s.cards){let c=A(l).findIndex((u)=>x(u.id,i));if(c<0)continue;let d=t.flatMap((u)=>u.cards).find((u)=>x(u.id,l.id));if(d&&!A(d).some((u)=>x(u.id,i))){if(!Array.isArray(d.subtasks))d.subtasks=[];o(d.subtasks,A(l)[c],c)}return}}}var di=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function pa(e){return[e.title??"",e.description??"",...A(e).map((t)=>t.title??""),...st(e),...he(e).map((t)=>t.text??"")].join(`
|
|
42
|
-
`).toLowerCase()}var
|
|
43
|
-
`);for(let[,,n]of r.matchAll(
|
|
41
|
+
`;class ir extends Ne{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#o=!1;#s=null;#i=new Map;#a=!1;#b=0;#r=0;#x=0;#v=0;#E=!1;#y=null;#m=null;#k=new WeakSet;#l=null;get scale(){return this.#t}get fitted(){return this.#t<=fe}get src(){return this.#l??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#l=e.src??e.default??String(e);else if(this.#l=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#w()}get alt(){return this.getAttribute("alt")??""}set alt(e){this.setAttribute("alt",e??"")}get maxScale(){let e=Number(this.getAttribute("max-scale"));return e>=1?e:8}set maxScale(e){this.setAttribute("max-scale",String(e))}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",Boolean(e))}connectedCallback(){if(this.#E)return;if(this.#E=!0,Be(this.ownerDocument,ca,da),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#_(),this.#w(),this.#I(),this.#m=new MutationObserver(()=>{this.#A(),this.#f()}),this.#m.observe(this,{childList:!0}),this.#A(),this.#f()}disconnectedCallback(){this.#y?.abort(),this.#y=null,this.#m?.disconnect(),this.#m=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#s=null,this.#a=!1,this.#E=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#w(),this.reset();if(e==="alt"){let n=this.#h();if(n)n.alt=this.alt;this.#_()}if(e==="open"){if(this.#A(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#h(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#w(){let e=this.#h(),t=this.src,r=!1;if(!e&&t)e=this.ownerDocument.createElement("img"),r=!0,this.prepend(e);if(!e)return;if(t&&e.tagName==="IMG"&&e.getAttribute("src")!==t)e.setAttribute("src",t);if(e.tagName==="IMG"&&(r||this.hasAttribute("alt")))e.alt=this.alt;if(this.#_(),e.tagName==="IMG")this.#c(e)}#_(){if(this.hasAttribute("aria-labelledby"))return;let e=this.getAttribute("alt");if(e)this.setAttribute("aria-label",e);else if(!this.hasAttribute("aria-label"))this.setAttribute("aria-label","Zoomable image")}#c(e){if(this.#k.has(e))return;if(this.#k.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#g(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#g(e)},0)}#g(e){if(this.hasAttribute("data-b3-error"))return;this.setAttribute("data-b3-error",""),this.dispatchEvent(new CustomEvent("b3-error",{bubbles:!0,composed:!0,detail:{src:e.getAttribute("src")??this.src??null}}))}#A(){if(!this.open){for(let t of this.querySelectorAll(":scope > .b3-image-viewer-close"))t.remove();return}if(this.querySelector(":scope > .b3-image-viewer-close"))return;let e=this.ownerDocument.createElement("button");e.type="button",e.className="b3-image-viewer-close",e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",(t)=>{t.preventDefault(),t.stopPropagation(),this.requestClose()}),e.addEventListener("pointerdown",(t)=>t.stopPropagation()),this.append(e)}#d(){let e=this.#h();if(!e)return null;let t=e.style.transform;e.style.transform="none";let r=this.getBoundingClientRect(),n=e.getBoundingClientRect();return e.style.transform=t,this.#o=n.width>r.width+1||n.height>r.height+1,{element:e,vw:r.width,vh:r.height,x:n.left-r.left,y:n.top-r.top,w:n.width,h:n.height}}#u(e){if(this.#t<=fe&&!this.#o){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#f(e){let t=e?.element??this.#h();if(!t)return;let r=this.#t<=fe,n=!r||this.#o;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#S(e,t,r,n=this.#d()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let o=(t-this.#e)/this.#t,s=(r-this.#n)/this.#t;if(this.#e=t-o*e,this.#n=r-s*e,this.#t=e,this.#u(n),this.#f(n),i!==this.#t)this.#C()}#C(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#d();if(t)this.#u(t);if(this.#f(t),e)this.#C()}zoomTo(e){let t=this.#d();if(t)this.#S(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#T(){let e=0,t=0;for(let r of this.#i.values())e+=r.x,t+=r.y;return{x:e/this.#i.size,y:t/this.#i.size}}#O(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#I(){this.#y=new AbortController;let e={signal:this.#y.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#h())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#d(),this.#i.size>1||this.#t>fe||this.#o)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=fe&&!this.#o){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#s??=this.#d(),!this.#s)return;n.preventDefault();let o=this.#T(),s=i?this.#O():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let a=this.#T(),l=i?this.#O():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/s))):this.#t,p=(o.x-c.left-this.#e)/this.#t,b=(o.y-c.top-this.#n)/this.#t;if(this.#e=a.x-c.left-p*u,this.#n=a.y-c.top-b*u,this.#t=u,this.#u(this.#s),this.#f(this.#s),this.#a=!0,d!==this.#t)this.#C()},t);let r=(n)=>{if(!this.#i.delete(n.pointerId))return;if(this.hasPointerCapture?.(n.pointerId))this.releasePointerCapture(n.pointerId);if(this.#i.size){this.#s=this.#d();return}if(this.#s=null,this.#a){this.#b=performance.now(),this.#a=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),o=Math.hypot(n.clientX-this.#x,n.clientY-this.#v)<aa;if(i-this.#r<oa&&o){this.#r=0;let s=this.getBoundingClientRect();this.#S(this.#t>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#b=i}else this.#r=i,this.#x=n.clientX,this.#v=n.clientY};this.addEventListener("pointerup",r,e),this.addEventListener("pointercancel",r,e),this.addEventListener("click",(n)=>{if(n.target.closest?.(".b3-image-viewer-close, .b3-image-viewer-fit"))return;if(performance.now()-this.#b<la){n.preventDefault(),n.stopPropagation();return}if(this.open&&this.fitted&&n.target===this)this.requestClose()},{...e,capture:!0}),this.addEventListener("wheel",(n)=>{let i=this.getBoundingClientRect();if(n.ctrlKey){n.preventDefault(),this.#S(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let o=this.#d();if(!o||o.h*this.#t<=o.vh&&!this.#o)return;let s=this.#n;if(this.#n-=n.deltaY,this.#u(o),this.#n===s)return;n.preventDefault(),this.#f(o)},t);for(let n of["gesturestart","gesturechange","gestureend"])this.addEventListener(n,(i)=>i.preventDefault(),t);this.addEventListener("keydown",(n)=>{if(n.metaKey||n.altKey)return;let i=n.shiftKey?80:40,o=(s,a)=>{let l=this.#d();if(!l||this.fitted)return!1;return this.#e+=s,this.#n+=a,this.#u(l),this.#f(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!o(i,0))return;break;case"ArrowRight":if(!o(-i,0))return;break;case"ArrowUp":if(!o(0,i))return;break;case"ArrowDown":if(!o(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#d();if(n)this.#u(n),this.#f(n)},e)}}var ri=ir;function sr(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ri;return ri=class extends ir{},customElements.define(e,r),r}sr();var ua=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,fa=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,ha=350,Le=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),or=(e)=>JSON.parse(JSON.stringify(nr(e))),x=(e,t)=>e!=null&&String(e)===String(t),rt=(e)=>!!e&&typeof e==="object",A=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],he=(e)=>Array.isArray(e.comments)?e.comments:[];function pa(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,o]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=o)return`${Math.floor(n/o)}${i} ago`;return`${n}m ago`}var ui=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function ar(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Le();t.add(String(n.id))};return e.filter(rt).map((n)=>{r(n),n.cards=ui(Array.isArray(n.cards)?n.cards.filter(rt):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(rt(o))r(o)}if(Array.isArray(i.comments)){for(let o of i.comments)if(rt(o))r(o)}}return n})}function ni(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>x(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>x(o.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let o of n.cards){let s=A(o),a=s.findIndex((l)=>x(l.id,r));if(a>=0)return void s.splice(a,1)}}}function ba(e,t,r){let{field:n,id:i}=r,o=(s,a,l)=>s.splice(Math.min(l,s.length),0,nr(a));if(n==="name"){let s=e.findIndex((a)=>x(a.id,i));if(s>=0&&!t.some((a)=>x(a.id,i)))o(t,e[s],s);return}for(let s of e){let a=s.cards.findIndex((l)=>x(l.id,i));if(n==="title"&&a>=0){let l=t.find((c)=>x(c.id,s.id));if(l&&!l.cards.some((c)=>x(c.id,i)))o(l.cards,s.cards[a],a);return}if(n==="subtask")for(let l of s.cards){let c=A(l).findIndex((u)=>x(u.id,i));if(c<0)continue;let d=t.flatMap((u)=>u.cards).find((u)=>x(u.id,l.id));if(d&&!A(d).some((u)=>x(u.id,i))){if(!Array.isArray(d.subtasks))d.subtasks=[];o(d.subtasks,A(l)[c],c)}return}}}var fi=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function ma(e){return[e.title??"",e.description??"",...A(e).map((t)=>t.title??""),...st(e),...he(e).map((t)=>t.text??"")].join(`
|
|
42
|
+
`).toLowerCase()}var ii=(e,t)=>{let r=String(t.text??"").toLowerCase();return fi(e).some((n)=>r.includes(n))};function st(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...A(e).map((n)=>n.title??"")].join(`
|
|
43
|
+
`);for(let[,,n]of r.matchAll(ua))t.add(n.toLowerCase());return[...t]}var si=String.raw`(<[^<>\n]+>|(?:[^()\n]|\([^()\n]*\))+)`,ga=new RegExp(String.raw`!\[([^\]\n]*)\]\(${si}\)|\[([^\]\n]+)\]\(${si}\)|\bhttps?:\/\/[^\s<>]+`,"giu"),xa=new Set(["javascript","data","vbscript","file","blob","about"]),va=(e)=>{let t=e.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t.replace(/\s+"[^"\n]*"$/,"")};function ya(e,t=[]){if(/[\u0000-\u001f\u007f\\]/.test(e)||/\s/.test(e.replaceAll(" ",""))||e!==e.trim()||!e)return null;let r=/^([a-z][a-z\d+.-]*):/i.exec(e)?.[1].toLowerCase();if(r==="http"||r==="https"||r==="mailto")return{href:e,file:!1};if(r)return!xa.has(r)&&t.includes(r)?{href:e,file:!1}:null;return e.startsWith("//")?null:{href:e,file:!0}}var oi=(e)=>(e??"").toLowerCase().split(/[\s,]+/).map((t)=>t.replace(/:$/,"")).filter(Boolean),ai=(e)=>(e??"").toLowerCase().split(",").map((t)=>t.trim()).filter(Boolean),lr=(e,t)=>!!t&&e.includes(String(t.name??"").trim().toLowerCase());function dr(e,t=[]){let r=[],n=0;for(let i of e.matchAll(ga)){let o=i[2]!==void 0,[s]=i,a=o?i[1]:i[3],l=o?i[2]:i[4],c=i.index+s.length;if(!l){let u=s;for(;;){if(u=u.replace(/[.,;:!?'"\]]+$/u,""),!u.endsWith(")")||u.split("(").length>=u.split(")").length)break;u=u.slice(0,-1)}c-=s.length-u.length,s=a=l=u}else l=va(l);let d=ya(l,t);if(!d||o&&!d.file&&!/^https?:/i.test(d.href))continue;if(i.index>n)r.push(e.slice(n,i.index));r.push({text:a,...d,...o?{image:o}:{}}),n=c}if(n<e.length)r.push(e.slice(n));return r}var li=(e,t=[])=>dr(e,t).map((r)=>typeof r==="string"?r:r.text).join(""),cr=null;function wa(e,t,r=[]){let n=e.ownerDocument;e.replaceChildren(...dr(t,r).map((i)=>{if(typeof i==="string")return n.createTextNode(i);let o=n.createElement("a");if(o.className="b3-board-ref",o.href=i.href,o.dataset.href=i.href,o.draggable=!1,i.image){let s=n.createElement("img");if(s.src=i.href,s.alt=i.text,s.loading="lazy",s.draggable=!1,o.classList.add("b3-board-image"),o.append(s),i.file)o.dataset.file="";else o.target="_blank",o.rel="noopener noreferrer";return o}if(i.file){if(o.dataset.file="",!cr){let s=n.createElement("template");s.innerHTML=Aa,cr=s.content.firstElementChild}o.append(cr.cloneNode(!0))}else if(/^https?:/i.test(i.href))o.target="_blank",o.rel="noopener noreferrer";return o.append(i.text),o}))}var _a="b3-board-style",Ea=`
|
|
44
44
|
:where(b3-board){--b3-board-hit:var(--b3-d-control,var(--b3-touch,2.75rem));--b3-board-chip:var(--b3-d-control-small,2rem);
|
|
45
45
|
--b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
|
|
46
46
|
--b3-board-line:color-mix(in srgb,var(--b3-color-border) 70%,transparent);--b3-board-soft:color-mix(in srgb,var(--b3-color-text) 5%,var(--b3-color-surface));}
|
|
@@ -209,9 +209,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
209
209
|
:is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
|
|
210
210
|
.b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
|
|
211
211
|
@media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
|
|
212
|
-
`,z=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,
|
|
212
|
+
`,z=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,ci=z('<circle cx="9" cy="5" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="19" r="1"/>'),nt=z('<path d="M5 12h14M12 5v14"/>'),it=z('<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/>'),ka=z('<path d="m9 18 6-6-6-6"/>'),Aa=z('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8"/>'),di=z('<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>'),Sa=z('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),Ca=z('<circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/>'),Ta=z('<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>'),Me=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
|
|
213
213
|
<textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
|
|
214
|
-
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,
|
|
214
|
+
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,Oa=`
|
|
215
215
|
<div class="b3-board-filters" b3x-bind:hidden="!tokens().length && !searchable" role="group" aria-label="Filter">
|
|
216
216
|
<span class="b3-board-caption" aria-hidden="true" b3x-show="tokens().length">Filter</span>
|
|
217
217
|
<template b3x-for="token in tokens()" b3x-bind:key="token">
|
|
@@ -219,7 +219,7 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
219
219
|
</template>
|
|
220
220
|
<button type="button" class="b3-board-link" b3x-show="filter.length" b3x-on:click="setFilter([])">Clear</button>
|
|
221
221
|
<span class="b3-board-search" b3x-show="searchable" b3x-bind:data-open="searchShown() ? '' : null">
|
|
222
|
-
<button type="button" class="b3-board-quiet" b3x-bind:hidden="searchShown()" b3x-on:click="openSearch()" aria-label="Search cards" title="Search cards (/)">${
|
|
222
|
+
<button type="button" class="b3-board-quiet" b3x-bind:hidden="searchShown()" b3x-on:click="openSearch()" aria-label="Search cards" title="Search cards (/)">${Ca}</button>
|
|
223
223
|
<input type="search" class="b3-board-search-input" b3x-bind:hidden="!searchShown()" b3x-bind:value="search" placeholder="Search" aria-label="Search cards"
|
|
224
224
|
spellcheck="false" autocomplete="off" enterkeyhint="search" b3x-on:input="typeSearch($event)" b3x-on:keydown="keySearch($event)" b3x-on:blur="blurSearch()">
|
|
225
225
|
</span>
|
|
@@ -228,7 +228,7 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
228
228
|
<template b3x-for="column in columns" b3x-bind:key="column.id">
|
|
229
229
|
<section class="b3-board-column" b3x-bind:data-column="column.id" b3x-bind:data-kind="column.kind || null" b3x-bind:aria-label="column.name">
|
|
230
230
|
<header class="b3-board-column-header">
|
|
231
|
-
${
|
|
231
|
+
${Me("name","column.id",!1)}
|
|
232
232
|
<button type="button" class="b3-board-column-name" b3x-show="!isEditing('name', column.id)"
|
|
233
233
|
b3x-on:click="edit('name', column.id, column.name)" b3x-on:keydown="keyColumn($event, column)" b3x-text="column.name || 'Untitled'"></button>
|
|
234
234
|
<span class="b3-board-count" b3x-text="count(column)"></span>
|
|
@@ -240,18 +240,18 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
240
240
|
<ol class="b3-board-cards">
|
|
241
241
|
<template b3x-for="card in visible(column)" b3x-bind:key="card.id">
|
|
242
242
|
<li class="b3-board-card" tabindex="0" b3x-bind:data-card="card.id" b3x-bind:data-starred="card.starred ? '' : null" b3x-on:keydown="keyCard($event, card)">
|
|
243
|
-
<span class="b3-board-grip" b3x-show="!readonly">${
|
|
243
|
+
<span class="b3-board-grip" b3x-show="!readonly">${ci}</span>
|
|
244
244
|
<div class="b3-board-card-head">
|
|
245
|
-
${
|
|
245
|
+
${Me("title","card.id")}
|
|
246
246
|
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
|
|
247
247
|
b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
|
|
248
248
|
<span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
|
|
249
249
|
<button type="button" class="b3-board-quiet b3-board-details" b3x-show="!readonly && !hasDetails(card) && !isOpen(card)" b3x-bind:aria-label="'Add details to ' + plain(card.title)"
|
|
250
|
-
b3x-on:click="addDetails(card)">${
|
|
250
|
+
b3x-on:click="addDetails(card)">${Sa}</button>
|
|
251
251
|
<button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(card.title)"
|
|
252
252
|
b3x-on:click="removeCard(column, card)">${it}</button>
|
|
253
253
|
<button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
|
|
254
|
-
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${
|
|
254
|
+
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${Ta}</button>
|
|
255
255
|
</span>
|
|
256
256
|
</div>
|
|
257
257
|
<div class="b3-board-tags" b3x-show="tokensOf(card).length">
|
|
@@ -262,9 +262,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
262
262
|
<div class="b3-board-foot" b3x-show="(disclosable(card) && (hasDetails(card) || isOpen(card))) || ago(card.updated)">
|
|
263
263
|
<button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
|
|
264
264
|
b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
|
|
265
|
-
${
|
|
265
|
+
${ka}
|
|
266
266
|
<span class="b3-board-progress" b3x-show="subtasksOf(card).length" b3x-bind:data-complete="complete(card) ? '' : null" b3x-text="done(card) + '/' + subtasksOf(card).length"></span>
|
|
267
|
-
<span class="b3-board-talk" b3x-bind:data-match="said(card) ? '' : null" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${
|
|
267
|
+
<span class="b3-board-talk" b3x-bind:data-match="said(card) ? '' : null" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${di}<span b3x-text="commentsOf(card).length"></span></span>
|
|
268
268
|
<span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
|
|
269
269
|
<span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length && !commentsOf(card).length">Hide details</span>
|
|
270
270
|
</button>
|
|
@@ -272,16 +272,16 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
272
272
|
</div>
|
|
273
273
|
<template b3x-if="isOpen(card)">
|
|
274
274
|
<div class="b3-board-body">
|
|
275
|
-
${
|
|
275
|
+
${Me("description","card.id")}
|
|
276
276
|
<div class="b3-board-description" role="button" tabindex="0" b3x-show="card.description && !isEditing('description', card.id)"
|
|
277
277
|
b3x-on:click="edit('description', card.id, card.description)" b3x-on:keydown="keyText($event, 'description', card.id, card.description)"
|
|
278
278
|
b3x-effect="rich($el, card.description)"></div>
|
|
279
279
|
<ul class="b3-board-subtasks" b3x-show="subtasksOf(card).length">
|
|
280
280
|
<template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
|
|
281
281
|
<li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
|
|
282
|
-
<span class="b3-board-subtask-grip" b3x-show="!readonly">${
|
|
282
|
+
<span class="b3-board-subtask-grip" b3x-show="!readonly">${ci}</span>
|
|
283
283
|
<input type="checkbox" b3x-bind:checked="!!sub.done" b3x-bind:disabled="readonly" b3x-on:change="check(card, sub, $event.target.checked)" b3x-bind:aria-label="plain(sub.title)">
|
|
284
|
-
${
|
|
284
|
+
${Me("subtask","sub.id",!1)}
|
|
285
285
|
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
|
|
286
286
|
b3x-on:click="edit('subtask', sub.id, sub.title)" b3x-on:keydown="keySubtask($event, card, sub)" b3x-effect="rich($el, sub.title)"></span>
|
|
287
287
|
<button type="button" class="b3-board-quiet b3-board-remove" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(sub.title)" b3x-on:click="removeSubtask(card, sub)">${it}</button>
|
|
@@ -297,11 +297,11 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
297
297
|
</li>
|
|
298
298
|
</template>
|
|
299
299
|
</ul>
|
|
300
|
-
${
|
|
300
|
+
${Me("comment","card.id")}
|
|
301
301
|
<div class="b3-board-actions" b3x-show="!readonly">
|
|
302
302
|
<button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${nt}<span>Add details</span></button>
|
|
303
303
|
<button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${nt}<span>Add subtask</span></button>
|
|
304
|
-
<button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${
|
|
304
|
+
<button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${di}<span>Comment</span></button>
|
|
305
305
|
</div>
|
|
306
306
|
</div>
|
|
307
307
|
</template>
|
|
@@ -312,8 +312,8 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
312
312
|
</template>
|
|
313
313
|
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${nt}<span>Add column</span></button>
|
|
314
314
|
</div>
|
|
315
|
-
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class
|
|
316
|
-
`).map((d)=>
|
|
315
|
+
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class hi extends Ne{static observedAttributes=["readonly","search","link-schemes","searchable","expand-in"];#t=null;#e=null;#n=null;#o=null;#s=null;#i=!1;#a=null;#b=null;#r=null;#x=!1;#v=null;#E=0;#y=Math.random().toString(36).slice(2,8);#m=!1;#k=[];#l={past:[],future:[],now:null,key:"",at:0};#h=!1;get columns(){let e=or(this.#e?.columns??this.#n??[]),t=this.#e?.editing;if(t?.fresh)ni(e,t);return e}set columns(e){let t=ar(or(e));if(!this.#e){this.#n=t;return}this.#p();let r=this.#e;if(r.editing?.fresh)ba(r.columns,t,r.editing);if(r.columns=t,r.editing&&!this.#c(r.editing.id))r.editing=null;if(!this.#h)this.#l={past:[],future:[],now:null,key:"",at:0};this.#l.now=this.columns}undo(){return this.#w(-1)}openSearch(){if(!this.#e?.searchable)return!1;return this.#e.openSearch(),!0}redo(){return this.#w(1)}get canUndo(){return!this.readonly&&(this.#l.past.length>0||!!this.#e?.editing)}get canRedo(){return!this.readonly&&this.#l.future.length>0}#w(e){let t=this.#e;if(!t||this.readonly)return!1;t.settle();let r=this.#l,i=(e<0?r.past:r.future).pop();if(!i||!r.now)return!1;(e<0?r.future:r.past).push(r.now),r.key="";let o=new Map(t.columns.flatMap((a)=>a.cards.map((l)=>[String(l.id),l.expanded]))),s=ar(or(i));for(let a of s)for(let l of a.cards){let c=o.get(String(l.id));if(o.has(String(l.id)))if(c===void 0)delete l.expanded;else l.expanded=c}return this.#p(),t.columns=s,r.now=this.columns,this.#u(e<0?"Undone":"Redone"),this.#_({type:e<0?"undo":"redo"}),!0}#_(e){this.#h=!0;try{this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}finally{this.#h=!1}}get filter(){return[...this.#e?.filter??this.#o??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e){if(t.join(" ")!==this.#e.filter.join(" "))this.#e.kept=[];this.#e.filter=t}else this.#o=t}get search(){return this.#e?.search??this.#s??""}set search(e){let t=String(e??"");if(this.#e){if(t!==this.#e.search)this.#e.kept=[];this.#e.search=t}else this.#s=t}get defaultColumn(){return this.getAttribute("default-column")??""}set defaultColumn(e){if(e)this.setAttribute("default-column",String(e));else this.removeAttribute("default-column")}addCard(e){let t=this.#e;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((o)=>x(o.id,r))??t.columns.find((o)=>String(o.name??"").trim().toLowerCase()===n))||(e===void 0?t.columns[0]:void 0);if(!i)return!1;return t.addCard(i),!0}get upload(){return this.#v}set upload(e){this.#v=typeof e==="function"?e:null}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","search","defaultColumn","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#t&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(Be(e,_a,Ea),ti(),!this.#t){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=ar(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#t=e.createElement("div"),this.#t.className="b3-board-ui",this.append(this.#t),this.#e=Qn(this.#t,Oa,this.#A(r??[],this.#o??[],this.#s??this.getAttribute("search")??"")),this.#n=this.#o=this.#s=null,this.#l.now=this.columns}else if(this.#t.parentNode!==this)this.append(this.#t);this.#b=new MutationObserver(()=>{if(this.#t&&this.#t.parentNode!==this)this.append(this.#t)}),this.#b.observe(this,{childList:!0}),this.#I(),pr(this,this.#a.signal,{role:"region"})}disconnectedCallback(){this.#p(),this.#a?.abort(),this.#a=null,this.#M(),this.#b?.disconnect(),this.#b=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#e)return;if(e==="link-schemes")return void(this.#e.schemes=oi(r));if(e==="searchable")return void(this.#e.searchable=r!==null);if(e==="expand-in")return void(this.#e.expandIn=ai(r));if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#p(),this.#e.editing=null}#c(e){for(let t of this.#e?.columns??[]){if(x(t.id,e))return t;for(let r of t.cards)if(x(r.id,e)||A(r).some((n)=>x(n.id,e)))return r}return null}#g(e){let t="card"in e&&e.card!=null&&e.type!=="toggle"&&e.type!=="remove"?this.#c(e.card):null;if(t){if(t.updated=new Date().toISOString(),e.type==="add")t.created=t.updated}let r=this.#l,n=Date.now();if(e.type!=="toggle"){let i=e.type==="edit"?JSON.stringify([e.card,e.column,e.field,e.subtask]):"";if(r.now&&!(i&&i===r.key&&n-r.at<1000)){if(r.past.push(r.now),r.past.length>100)r.past.shift()}r.future=[],r.key=i,r.at=n}r.now=this.columns,this.#_(e)}#A(e,t,r){let n=this,i=(a)=>this.#g(a),o=(a)=>{for(let l of s.columns){let c=l.cards.findIndex((d)=>x(d.id,a));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},s=Zn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,searchable:n.hasAttribute("searchable"),expandIn:ai(n.getAttribute("expand-in")),searching:!1,schemes:oi(n.getAttribute("link-schemes")),viewed:{},tokensOf:st,subtasksOf:A,commentsOf:he,hits:ii,said(a){return he(a).some((l)=>ii(s.search,l))},now:Date.now(),ago(a){return pa(a,s.now)},label(a){let l=String(a??"");return l.replace(fa,"").trim()||l},pressed(a){return String(s.filter.includes(a))},mention(a){return a.startsWith("@")?"":null},starred(a){return String(!!a.starred)},hasDetails(a){return!!(a.description||A(a).length||he(a).length)},complete(a){let l=A(a).length;return l>0&&s.done(a)===l},preview(a){let l=String(a.description??"");return l.split(`
|
|
316
|
+
`).map((d)=>li(d,s.schemes)).find((d)=>d.trim())?.trim()??(dr(l,s.schemes).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(a){return li(s.label(a),s.schemes)},rich(a,l){wa(a,String(l??""),s.schemes)},keyText(a,l,c,d){if(a.target!==a.currentTarget||a.key!=="Enter"&&a.key!==" ")return;a.preventDefault(),a.stopPropagation(),s.edit(l,c,d)},isOpen(a){let l=s.viewed[String(a.id)];return s.readonly&&l!==void 0?l:a.expanded??(s.hasDetails(a)&&lr(s.expandIn,s.columns.find((c)=>c.cards.some((d)=>x(d.id,a.id)))))},expanded(a){return String(s.isOpen(a))},isEditing(a,l){return!!s.editing&&s.editing.field===a&&s.editing.id===l},focusEditor(a){queueMicrotask(()=>n.#S(a))},blurEditor(a,l){if(s.isEditing(a,l))s.commit()},tokens(){let a=new Set;for(let l of s.columns)for(let c of l.cards)for(let d of st(c))a.add(d);return[...a].sort()},visible(a){let l=fi(s.search);if(!s.filter.length&&!l.length)return a.cards;let c=s.editing&&n.#c(s.editing.id);return a.cards.filter((d)=>{if(d===c||s.kept.some((b)=>x(d.id,b)))return!0;let u=st(d),p=l.length?ma(d):"";return s.filter.every((b)=>u.includes(b))&&l.every((b)=>p.includes(b))})},count(a){let l=s.visible(a).length;return l===a.cards.length?String(l):`${l}/${a.cards.length}`},done(a){return A(a).filter((l)=>l.done).length},disclosable(a){return!!(s.hasDetails(a)||!s.readonly)},toggleFilter(a){s.kept=[],s.filter=s.filter.includes(a)?s.filter.filter((l)=>l!==a):[...s.filter,a]},setFilter(a){s.kept=[],s.filter=a},searchShown(){return s.searching||!!s.search},openSearch(){s.searching=!0;let a=n.querySelector(".b3-board-search-input");if(!a)return;a.hidden=!1,a.closest(".b3-board-filters").hidden=!1,a.focus(),a.select()},typeSearch(a){n.search=a.target.value},keySearch(a){if(a.isComposing||a.keyCode===229)return;if(a.key!=="Escape"&&a.key!=="Enter")return;a.preventDefault(),a.stopPropagation();let l=a.target;if(a.key==="Escape")l.value="",n.search="";l.blur()},blurSearch(){s.searching=!1},toggleStar(a){let l=o(a.id);if(s.readonly||!l)return;if(a.starred)delete a.starred;else a.starred=!0;l.column.cards=ui(l.column.cards);let c=!!a.starred;s.announcement=`${a.title??""} ${c?"starred":"unstarred"}`,i({type:"star",card:a.id,starred:c}),n.#T(a.id)},toggle(a){if(s.readonly){s.viewed={...s.viewed,[String(a.id)]:!s.isOpen(a)};return}a.expanded=!s.isOpen(a),i({type:"toggle",card:a.id,expanded:a.expanded})},edit(a,l,c,d=!1,u=!1,p=!1){if(s.readonly||n.#r?.started)return;if(s.editing&&!s.isEditing(a,l))s.commit();s.editing={field:a,id:l,draft:c??"",fresh:d,opened:u,atEnd:p},n.#C()},addDetails(a,l=!1){if(s.readonly)return;let c=!s.isOpen(a);a.expanded=!0,s.edit("description",a.id,String(a.description??""),!1,c,l)},keyEditor(a,l){if(a.stopPropagation(),a.key==="Escape")a.preventDefault(),s.cancel();else if(a.key==="Enter"&&!(l&&a.shiftKey)&&!a.isComposing)a.preventDefault(),s.commit(!0)},pasteEditor(a,l,c){let d=[...a.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||l!=="title"&&l!=="description"||!d.length)return;if(a.clipboardData?.getData("text/plain").trim())return;a.preventDefault();for(let u of d)n.#d(c,u,l==="description"?a.target:null)},cancel(){let a=s.editing;if(s.editing=null,a?.fresh)s.discard(a);if(a?.opened)s.close(a);n.#O(a)},close(a){let l=n.#c(a.id);if(l&&!s.hasDetails(l))l.expanded=!1},commit(a=!1){let l=s.editing;if(!l)return;if(s.editing=null,s.readonly)return;let c=l.field==="description"||l.field==="comment"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#c(l.id);if(!d)return;if(!c&&l.fresh)return s.discard(l);if(!c&&l.opened)s.close(l);let u=null;if(l.field==="comment"){let b=d;if(c){let m={id:Le(),at:new Date().toISOString(),by:n.getAttribute("author")||"you",text:c};b.comments=[...he(b),m],u={type:"comment",card:b.id,comment:m.id,op:"add"}}}else if(l.field==="name"){let b=d;if(c&&c!==b.name)b.name=c,u={type:"edit",column:b.id,field:"name"};if(l.fresh)u={type:"add",column:b.id}}else if(l.field==="subtask"){let b=d,m=A(b).find((h)=>x(h.id,l.id));if(!c)return s.removeSubtask(b,m);if(c!==m.title)m.title=c,u={type:"edit",card:b.id,field:"subtask",subtask:m.id};if(l.fresh)u={type:"subtask",card:b.id,subtask:m.id,op:"add"}}else{let b=d,m=l.field;if((c||m==="description")&&c!==(b[m]??""))b[m]=c,u={type:"edit",card:b.id,field:m};if(l.fresh)u={type:"add",card:b.id,column:o(b.id).column.id},s.kept=[...s.kept,b.id]}if(u)i(u);let p=n.#c(l.id)??d;if(l.fresh&&l.field==="subtask"&&a)s.addSubtask(p);else if(l.fresh&&l.field==="title"&&a&&!n.hasAttribute("compact"))s.addDetails(p,!0);else n.#O(l)},discard(a){ni(s.columns,a)},settle(){if(s.editing)s.commit()},addCard(a){if(s.readonly)return;s.settle();let l={id:Le(),title:""};a.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let a={id:Le(),name:"",cards:[]};s.columns.push(a),s.edit("name",a.id,"",!0)},addSubtask(a){if(s.readonly)return;s.settle();let l={id:Le(),title:"",done:!1};if(a.expanded=!0,!Array.isArray(a.subtasks))a.subtasks=[];a.subtasks.push(l),s.edit("subtask",l.id,"",!0)},removeCard(a,l){if(s.readonly)return;a.cards=a.cards.filter((c)=>c!==l),i({type:"remove",card:l.id,column:a.id})},removeColumn(a){if(s.readonly)return;s.columns=s.columns.filter((l)=>l!==a),i({type:"remove",column:a.id})},removeSubtask(a,l){if(s.readonly)return;a.subtasks=A(a).filter((c)=>c!==l),i({type:"subtask",card:a.id,subtask:l.id,op:"remove"})},removeComment(a,l){if(s.readonly)return;a.comments=he(a).filter((c)=>c!==l),i({type:"comment",card:a.id,comment:l.id,op:"remove"})},check(a,l,c){if(s.readonly)return;l.done=c,i({type:"check",card:a.id,subtask:l.id,done:c})},keyCard(a,l){if(a.target!==a.currentTarget)return;if(a.key==="Enter")return a.preventDefault(),s.edit("title",l.id,l.title);if(!a.altKey||s.readonly)return;let c=o(l.id);if(!c)return;let d=getComputedStyle(n).direction==="rtl",u={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[a.key];if(!u)return;if(a.preventDefault(),a.key==="ArrowUp"||a.key==="ArrowDown"){let b=s.visible(c.column),m=b[b.indexOf(c.card)+u];if(m&&!m.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(m));return}let p=s.columns[s.columns.indexOf(c.column)+u];if(p)n.moveCard(l.id,p.id,Math.min(c.index,p.cards.length))},keySubtask(a,l,c){s.keyText(a,"subtask",c.id,c.title);let d=a.key==="ArrowUp"?-1:a.key==="ArrowDown"?1:0;if(!a.altKey||!d||s.readonly)return;a.preventDefault(),a.stopPropagation(),n.#f(l,c.id,A(l).indexOf(c)+d)},keyColumn(a,l){if(!a.altKey||s.readonly)return;let c=getComputedStyle(n).direction==="rtl",d=a.key==="ArrowLeft"?c?1:-1:a.key==="ArrowRight"?c?-1:1:0;if(!d)return;a.preventDefault();let u=s.columns.indexOf(l)+d;if(u>=0&&u<s.columns.length)n.moveColumn(l.id,u)}});return s}async#d(e,t,r){let n=this.#e,i=()=>n.editing?.field==="description"&&x(n.editing.id,e)?n.editing:null,o=`![Uploading image ${this.#y}-${++this.#E}…]()`,s="",a=i();if(a&&r){let{selectionStart:f,selectionEnd:v}=r;s=f&&r.value[f-1]!==`
|
|
317
317
|
`?`
|
|
318
318
|
${o}`:o,a.draft=r.value=r.value.slice(0,f)+s+r.value.slice(v),r.setSelectionRange(f+s.length,f+s.length)}let l=n.columns.find((f)=>f.cards.some((v)=>x(v.id,e))),c=null;try{c=await this.#v?.(t,{card:e,column:l?.id})}catch(f){console.warn("b3-board: image upload failed",f)}let d=c?`.replace(/[\s()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!d)this.#u("Image not added");while(this.#m)await new Promise((f)=>this.#k.push(f));let u=(f)=>{if(!s)return null;let v=f.indexOf(s),H=v>=0?v:f.indexOf(o);if(H<0)return null;let ie=v>=0?s:o;return[H,H+ie.length,d?ie.replace(o,d):""]},p=(f)=>{if(!s)return d?f.trim()?`${f.replace(/\s+$/,"")}
|
|
319
|
-
${d}`:d:f;let v=u(f);return v?f.slice(0,v[0])+v[2]+f.slice(v[1]):f},b=i();if(b){let f=this.querySelector("textarea.b3-board-editor"),v=f?.value===b.draft&&u(f.value);if(f&&v){let[H,ie,ot]=v,{selectionStart:fi,selectionEnd:hi,selectionDirection:pi}=f,dr=(De)=>De>=ie?De+ot.length-(ie-H):De>H?H+ot.length:De;f.setRangeText(ot,H,ie),f.setSelectionRange(dr(fi),dr(hi),pi??void 0),b.draft=f.value}else if(p(b.draft)!==b.draft)b.draft=p(b.draft);else if(d)this.#u("Image not added");return}let m=this.#c(e);if(s&&!String(m?.description??"").includes(o))m=n.columns.flatMap((f)=>f.cards).find((f)=>String(f.description??"").includes(o))??m;let h=String(m?.description??""),g=p(h).trim();if(!m||this.readonly||g===h.trim()){if(d)this.#u("Image not added");return}m.description=g,m.expanded=!0,this.#g({type:"edit",card:m.id,field:"description"})}#u(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((p)=>x(p.id,e))),o=n.columns.find((u)=>x(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>x(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(o.cards.length,r)),d=a.starred?Math.min(c,l):Math.max(c,l);if(o.cards.splice(d,0,a),i===o&&s===d)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${d+1} of ${o.cards.length}`,this.#g({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#T(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>x(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),o=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(o,0,i),n===o)return!1;return r.announcement=`${i.name??""} moved to position ${o+1} of ${r.columns.length}`,this.#g({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#f(e,t,r){let n=this.#e,i=A(e),o=i.findIndex((l)=>x(l.id,t));if(!n||this.readonly||o<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(o===s)return!1;let[a]=i.splice(o,1);return i.splice(s,0,a),n.announcement=`${a.title??""} moved to position ${s+1} of ${i.length}`,this.#g({type:"subtask",card:e.id,subtask:a.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(a.id))}"] .b3-board-title`)?.focus()),!0}#S(e){if(!e.isConnected)return;if(e.focus({preventScroll:!0}),this.#e?.editing?.atEnd)e.setSelectionRange(e.value.length,e.value.length);else e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,o=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),s=o(),a=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=o(),c=l.scale===s.scale&&l.height<s.height;if(s=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",a,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#C(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#T(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#O(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#M(){this.#a?.abort(),this.#a=new AbortController;let e=this.#a.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(o)=>this.#$(o),{signal:e}),t.addEventListener("pointermove",(o)=>this.#R(o),{signal:e}),t.addEventListener("pointerup",(o)=>this.#z(o),{signal:e}),t.addEventListener("pointercancel",(o)=>{if(o.pointerId===this.#r?.pointerId)this.#p()},{signal:e}),t.addEventListener("keydown",(o)=>{if(o.key==="Escape"&&this.#r?.started)o.preventDefault(),this.#p()},{signal:e}),this.addEventListener("touchmove",(o)=>{if(this.#r?.started)o.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(o)=>{if(this.#r)o.preventDefault()},{signal:e}),this.addEventListener("click",(o)=>{if(!this.#x)return;this.#x=!1,o.preventDefault(),o.stopImmediatePropagation()},{signal:e,capture:!0}),this.addEventListener("keydown",(o)=>{if(o.defaultPrevented||o.altKey||!(o.metaKey||o.ctrlKey))return;if(o.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let s=o.key.toLowerCase(),a=s==="y"||s==="z"&&o.shiftKey;if(s!=="z"&&s!=="y")return;if(o.preventDefault(),a)this.redo();else this.undo()},{signal:e});let n=(o)=>this.#B(o);this.addEventListener("click",n,{signal:e,capture:!0}),this.addEventListener("auxclick",(o)=>{if(o.button===1)n(o)},{signal:e,capture:!0});let i=()=>this.#I();this.addEventListener("compositionstart",()=>{this.#m=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#I(){this.#m=!1;for(let e of this.#k.splice(0))e()}#B(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>x(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>x(c.id,r("[data-card]")?.dataset.card)),o=i&&A(i).find((c)=>x(c.id,r("[data-subtask]")?.dataset.subtask)),s={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(o)s.subtask=o.id;let a=t.querySelector("img");if(a&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#P(t,a,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#P(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),sr();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let o=n.createElement("img");o.src=t.currentSrc||t.src,o.alt=t.alt;let s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(o,s);let a=n.activeElement,l=[...n.body.children].filter((d)=>d instanceof HTMLElement&&!d.inert),c=()=>{i.remove();for(let d of l)d.inert=!1;if(e.isConnected)e.focus({preventScroll:!0});else a?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),s.addEventListener("pointerdown",(d)=>d.stopPropagation()),s.addEventListener("click",(d)=>{if(d.stopPropagation(),c(),e.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:{...r}}))&&!r.file)this.ownerDocument.defaultView?.open(r.href,"_blank","noopener")}),n.body.append(i);for(let d of l)d.inert=!0;i.setAttribute("open",""),i.focus({preventScroll:!0})}#$(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#L(e.clientX,e.clientY)},ua)}#L(e,t){let r=this.#r;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let s of[i,...i.querySelectorAll("[id]")])s.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#t.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#r!==r)return;this.#U(r.px,r.py),this.#H(this.#D(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#R(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#p();return}if(r<5)return;this.#L(e.clientX,e.clientY)}e.preventDefault(),t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#z(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#p();let r=this.#D(e.clientX,e.clientY);if(this.#p(),this.#x=!0,setTimeout(()=>{this.#x=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>x(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((c)=>x(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>x(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>x(l.id,t.id));if(o===i&&a<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#c(t.card);if(!i)return;let o=A(i),s=r.before?o.findIndex((a)=>x(a.id,r.before)):o.length;if(o.findIndex((a)=>x(a.id,t.id))<s)s-=1;this.#f(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>x(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>x(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#D(e,t){let r=this.#r,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#N(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((b)=>{let m=b.getBoundingClientRect();return t<m.top+m.height/2}),p=(b)=>!!(b!=null&&this.#c(b)?.starred);if(p(u?.dataset.card)!==p(r.id)&&(u||p(r.id)))u=d.find((b)=>!p(b.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let p=u.getBoundingClientRect();return t<p.top+p.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let c=l.getBoundingClientRect();return s?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#H(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#r.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#N(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#U(e,t){let r=(s,a,l)=>s<a+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#r?.kind==="card"?this.#N(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let o=this.ownerDocument.defaultView;o.scrollBy(0,r(t,0,o.innerHeight))}#p(){let e=this.#r;if(!e)return;this.#r=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}fr("b3-board",ui);export{ui as B3Board};
|
|
319
|
+
${d}`:d:f;let v=u(f);return v?f.slice(0,v[0])+v[2]+f.slice(v[1]):f},b=i();if(b){let f=this.querySelector("textarea.b3-board-editor"),v=f?.value===b.draft&&u(f.value);if(f&&v){let[H,ie,ot]=v,{selectionStart:pi,selectionEnd:bi,selectionDirection:mi}=f,ur=(De)=>De>=ie?De+ot.length-(ie-H):De>H?H+ot.length:De;f.setRangeText(ot,H,ie),f.setSelectionRange(ur(pi),ur(bi),mi??void 0),b.draft=f.value}else if(p(b.draft)!==b.draft)b.draft=p(b.draft);else if(d)this.#u("Image not added");return}let m=this.#c(e);if(s&&!String(m?.description??"").includes(o))m=n.columns.flatMap((f)=>f.cards).find((f)=>String(f.description??"").includes(o))??m;let h=String(m?.description??""),g=p(h).trim();if(!m||this.readonly||g===h.trim()){if(d)this.#u("Image not added");return}m.description=g,m.expanded=!0,this.#g({type:"edit",card:m.id,field:"description"})}#u(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((p)=>x(p.id,e))),o=n.columns.find((u)=>x(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>x(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(o.cards.length,r)),d=a.starred?Math.min(c,l):Math.max(c,l);if(o.cards.splice(d,0,a),i===o&&s===d)return!1;if(lr(n.expandIn,i)!==lr(n.expandIn,o))delete a.expanded;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${d+1} of ${o.cards.length}`,this.#g({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#T(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>x(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),o=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(o,0,i),n===o)return!1;return r.announcement=`${i.name??""} moved to position ${o+1} of ${r.columns.length}`,this.#g({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#f(e,t,r){let n=this.#e,i=A(e),o=i.findIndex((l)=>x(l.id,t));if(!n||this.readonly||o<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(o===s)return!1;let[a]=i.splice(o,1);return i.splice(s,0,a),n.announcement=`${a.title??""} moved to position ${s+1} of ${i.length}`,this.#g({type:"subtask",card:e.id,subtask:a.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(a.id))}"] .b3-board-title`)?.focus()),!0}#S(e){if(!e.isConnected)return;if(e.focus({preventScroll:!0}),this.#e?.editing?.atEnd)e.setSelectionRange(e.value.length,e.value.length);else e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,o=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),s=o(),a=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=o(),c=l.scale===s.scale&&l.height<s.height;if(s=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",a,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#C(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#T(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#O(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#I(){this.#a?.abort(),this.#a=new AbortController;let e=this.#a.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(o)=>this.#$(o),{signal:e}),t.addEventListener("pointermove",(o)=>this.#R(o),{signal:e}),t.addEventListener("pointerup",(o)=>this.#z(o),{signal:e}),t.addEventListener("pointercancel",(o)=>{if(o.pointerId===this.#r?.pointerId)this.#p()},{signal:e}),t.addEventListener("keydown",(o)=>{if(o.key==="Escape"&&this.#r?.started)o.preventDefault(),this.#p()},{signal:e}),this.addEventListener("touchmove",(o)=>{if(this.#r?.started)o.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(o)=>{if(this.#r)o.preventDefault()},{signal:e}),this.addEventListener("focusin",(o)=>{let s=o.target,a=s.parentElement;if(!a?.matches(".b3-board-filters"))return;a.style.scrollPaddingInlineEnd=`${a.querySelector(":scope > .b3-board-search")?.offsetWidth??0}px`,s.scrollIntoView({inline:"nearest",block:"nearest"})},{signal:e}),this.addEventListener("click",(o)=>{if(!this.#x)return;this.#x=!1,o.preventDefault(),o.stopImmediatePropagation()},{signal:e,capture:!0}),this.addEventListener("keydown",(o)=>{if(o.defaultPrevented||o.altKey||!(o.metaKey||o.ctrlKey))return;if(o.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let s=o.key.toLowerCase(),a=s==="y"||s==="z"&&o.shiftKey;if(s!=="z"&&s!=="y")return;if(o.preventDefault(),a)this.redo();else this.undo()},{signal:e});let n=(o)=>this.#B(o);this.addEventListener("click",n,{signal:e,capture:!0}),this.addEventListener("auxclick",(o)=>{if(o.button===1)n(o)},{signal:e,capture:!0});let i=()=>this.#M();this.addEventListener("compositionstart",()=>{this.#m=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#M(){this.#m=!1;for(let e of this.#k.splice(0))e()}#B(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>x(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>x(c.id,r("[data-card]")?.dataset.card)),o=i&&A(i).find((c)=>x(c.id,r("[data-subtask]")?.dataset.subtask)),s={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(o)s.subtask=o.id;let a=t.querySelector("img");if(a&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#P(t,a,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#P(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),sr();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let o=n.createElement("img");o.src=t.currentSrc||t.src,o.alt=t.alt;let s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(o,s);let a=n.activeElement,l=[...n.body.children].filter((d)=>d instanceof HTMLElement&&!d.inert),c=()=>{i.remove();for(let d of l)d.inert=!1;if(e.isConnected)e.focus({preventScroll:!0});else a?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),s.addEventListener("pointerdown",(d)=>d.stopPropagation()),s.addEventListener("click",(d)=>{if(d.stopPropagation(),c(),e.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:{...r}}))&&!r.file)this.ownerDocument.defaultView?.open(r.href,"_blank","noopener")}),n.body.append(i);for(let d of l)d.inert=!0;i.setAttribute("open",""),i.focus({preventScroll:!0})}#$(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#L(e.clientX,e.clientY)},ha)}#L(e,t){let r=this.#r;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let s of[i,...i.querySelectorAll("[id]")])s.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#t.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#r!==r)return;this.#U(r.px,r.py),this.#H(this.#D(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#R(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#p();return}if(r<5)return;this.#L(e.clientX,e.clientY)}e.preventDefault(),t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#z(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#p();let r=this.#D(e.clientX,e.clientY);if(this.#p(),this.#x=!0,setTimeout(()=>{this.#x=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>x(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((c)=>x(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>x(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>x(l.id,t.id));if(o===i&&a<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#c(t.card);if(!i)return;let o=A(i),s=r.before?o.findIndex((a)=>x(a.id,r.before)):o.length;if(o.findIndex((a)=>x(a.id,t.id))<s)s-=1;this.#f(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>x(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>x(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#D(e,t){let r=this.#r,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#N(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((b)=>{let m=b.getBoundingClientRect();return t<m.top+m.height/2}),p=(b)=>!!(b!=null&&this.#c(b)?.starred);if(p(u?.dataset.card)!==p(r.id)&&(u||p(r.id)))u=d.find((b)=>!p(b.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let p=u.getBoundingClientRect();return t<p.top+p.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let c=l.getBoundingClientRect();return s?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#H(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#r.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#N(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#U(e,t){let r=(s,a,l)=>s<a+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#r?.kind==="card"?this.#N(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let o=this.ownerDocument.defaultView;o.scrollBy(0,r(t,0,o.innerHeight))}#p(){let e=this.#r;if(!e)return;this.#r=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}hr("b3-board",hi);export{hi as B3Board};
|
package/dist/manifest.json
CHANGED
package/dist/references/board.md
CHANGED
|
@@ -144,6 +144,9 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
144
144
|
## Attributes and styling
|
|
145
145
|
|
|
146
146
|
- `search`, `searchable`, `default-column`, `link-schemes`: see Search, Add and Links above.
|
|
147
|
+
- `expand-in="Doing"`: column names (comma separated, any case) whose cards with details show them open by default.
|
|
148
|
+
A card's own `expanded` (`true` or `false`) still wins; moving a card into or out of such a column clears it, so it
|
|
149
|
+
takes the new column's default.
|
|
147
150
|
- `readonly`: no editing, adding, deleting, checking or dragging — enforced by the component, not
|
|
148
151
|
only hidden; a starred card still shows its star. `compact`: hides card details and the chevron, narrows columns (two side by side on a phone) and shrinks card tools to the chip size; on touch it also hides the delete buttons and unstarred stars so column names and titles keep the width (they are back out of compact). `aria-label` names the board region.
|
|
149
152
|
- **Height**: unbounded, the board grows with its cards. Give it a height (e.g. `flex: 1;
|