@livx.cc/bare-v3 0.1.0-alpha.74 → 0.1.0-alpha.76
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/README.md +3 -3
- package/dist/bare.css +8 -0
- package/dist/bare.min.css +1 -1
- package/dist/components/base.d.ts +36 -0
- package/dist/components/board.d.ts +136 -0
- package/dist/components/board.js +240 -0
- package/dist/components/date-picker.d.ts +60 -0
- package/dist/components/date-picker.js +43 -0
- package/dist/components/image-viewer.d.ts +41 -0
- package/dist/components/image-viewer.js +20 -0
- package/dist/components.d.ts +79 -0
- package/dist/components.js +1 -0
- package/dist/interactions/motion.d.ts +17 -0
- package/dist/manifest.json +19 -18
- package/dist/markdown-stream.d.ts +115 -0
- package/dist/markdown-stream.js +41 -0
- package/dist/references/board.md +114 -0
- package/dist/references/command.md +2 -2
- package/dist/references/confirm.md +1 -1
- package/dist/references/date-picker.md +6 -6
- package/dist/references/dialog.md +2 -2
- package/dist/references/disclosure.md +2 -2
- package/dist/references/feedback.md +2 -2
- package/dist/references/image-viewer.md +5 -5
- package/dist/references/markdown-stream-prompt.md +1 -1
- package/dist/references/markdown-stream.md +4 -3
- package/dist/references/mobile.md +1 -1
- package/dist/references/motion.md +3 -3
- package/dist/references/page-layout.md +2 -2
- package/dist/references/reading.md +2 -2
- package/dist/references/start.md +3 -3
- package/dist/references/tabs.md +2 -2
- package/package.json +23 -6
- package/dist/elements/date-picker.js +0 -518
- package/dist/elements/image-viewer.js +0 -516
- package/dist/elements/markdown-stream.js +0 -388
- package/dist/ui.js +0 -858
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
var{defineProperty:Ge,getOwnPropertyNames:Xn,getOwnPropertyDescriptor:Zn}=Object,Qn=Object.prototype.hasOwnProperty;function ei(e){return this[e]}var ti=(e)=>{var t=(Gt??=new WeakMap).get(e),r;if(t)return t;if(t=Ge({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of Xn(e))if(!Qn.call(t,n))Ge(t,n,{get:ei.bind(e,n),enumerable:!(r=Zn(e,n))||r.enumerable})}return Gt.set(e,t),t},Gt;var ri=(e)=>e;function ni(e,t){this[e]=ri.bind(null,t)}var ii=(e,t)=>{for(var r in t)Ge(e,r,{get:t[r],enumerable:!0,configurable:!0,set:ni.bind(t,r)})};var si=(e,t)=>()=>(e&&(t=e(e=0)),t);var Pn={};ii(Pn,{Alpine:()=>Dn,default:()=>$o});function ai(e){ci(e)}function li(){At=!0}function di(){At=!1,hr()}function ci(e){if(!R.includes(e)){if(R.push(e),e._x_schedulerPriority!==void 0)Ie=!0}hr()}function St(e){let t=R.indexOf(e);if(t!==-1&&t>at)R.splice(t,1)}function hr(){if(!ot&&!st){if(At)return;st=!0,queueMicrotask(ui)}}function ui(){st=!1,ot=!0;for(let e=0;e<R.length;e++){if(Ie)fi(e);R[e](),at=e}R.length=0,at=-1,Ie=!1,ot=!1}function fi(e){let t=new Map,r=R.slice(e).sort((n,i)=>pi(n,i,t));for(let n=0;n<r.length;n++)R[e+n]=r[n];Ie=!1}function pi(e,t,r){if(!Xe(e))return Xe(t)?1:0;if(!Xe(t))return-1;return tr(e._x_schedulerPriority.el,r)-tr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function Xe(e){return e._x_schedulerPriority!==void 0}function tr(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){lt=!1,e(),lt=!0}function mi(e){oe=e.reactive,ae=e.release,ee=(t)=>e.effect(t,{scheduler:(r)=>{if(lt)ai(r);else r()}}),br=e.raw}function rr(e){ee=e}function gi(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?hi++:void 0,s=ee(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),ae(s)},s},()=>{t()}]}function mr(e,t){let r=!0,n,i,o=ee(()=>{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()=>{St(o),ae(o)}}async function xi(e){li();try{await e(),await Promise.resolve()}finally{di()}}function vi(e){vr.push(e)}function Ct(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,xr.push(t)}function yr(e){gr.push(e)}function _r(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 wr(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 yi(e){e._x_effects?.forEach(St);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Tt(){$e.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Ot=!0}function Er(){_i(),$e.disconnect(),Ot=!1}function _i(){let e=$e.takeRecords();z.push(()=>e.length>0&&Ue(e));let t=z.length;queueMicrotask(()=>{if(z.length===t)while(z.length>0)z.shift()()})}function wi(){while(z.length>0)z.shift()();let e=$e.takeRecords();if(e.length>0)Ue(e)}function _(e){if(!Ot)return e();Er();try{return e()}finally{Tt()}}function Ei(){Mt=!0}function ki(){Mt=!1,Ue(Le),Le=[]}function Ue(e){if(Mt){Le=Le.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,d=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:a,value:s.getAttribute(a)})},c=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(a)};if(s.hasAttribute(a)&&l===null)d();else if(s.hasAttribute(a))c(),d();else c()}}i.forEach((o,s)=>{wr(s,o)}),n.forEach((o,s)=>{gr.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;xr.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;vr.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function kr(e){return J(se(e))}function Ee(e,t,r){return e._x_dataStack=[t,...se(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function se(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return se(e.host);if(!e.parentNode)return[];return se(e.parentNode)}function J(e){return new Proxy({objects:e},Ai)}function Ar(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Ar(Object.getPrototypeOf(e),t)}function Si(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function It(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 d=o===""?s:`${o}.${s}`;if(typeof a==="object"&&a!==null&&a._x_interceptor)i[s]=a.initialize(e,d,s,t);else if(r(a)&&a!==i&&!(a instanceof Element))n(a,d)})};return n(e)}function Sr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>Ci(n,i),(a)=>dt(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 d=n.initialize(o,s,a,l);return r.initialValue=d,i(o,s,a,l)}}else r.initialValue=n;return r}}function Ci(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function dt(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 dt(e[t[0]],t.slice(1),r);else return e[t[0]]={},dt(e[t[0]],t.slice(1),r)}function M(e,t){Cr[e]=t}function Ne(e,t){let r=Oi(t);return Object.entries(Cr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Oi(e){let[t,r]=Dr(e),n={interceptor:Sr,...t};return Ct(e,r),n}function Ti(e,t,r,...n){try{return r(...n)}catch(i){je(i,e,t)}}function je(...e){return Or(...e)}function Mi(e){Or=e}function Ii(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
|
+
|
|
3
|
+
${r?'Expression: "'+r+`"
|
|
4
|
+
|
|
5
|
+
`:""}`,t),setTimeout(()=>{throw e},0)}function Tr(e){let t=K;K=!1;let r=e();return K=t,r}function V(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return Mr(...e)}function Li(e){Mr=e}function Ni(e){Ir=e}function Di(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!K){ct(r,t,J([n,...e]),i);return}let s=t.apply(J([n,...e]),i);ct(r,s)}}function ct(e,t,r,n,i){if(K&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>ct(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 Pi(...e){return Ir(...e)}function le(e=""){return Lt+e}function Ri(e){Lt=e}function w(e,t){return De[e]=t,{before(r){if(!De[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=F.indexOf(r);F.splice(n>=0?n:F.indexOf("DEFAULT"),0,e)}}}function Bi(e){return Object.keys(De).includes(e)}function He(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=Lr(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(Br((o,s)=>n[o]=s)).filter(Ur).map(ji(n,r)).sort(Hi).map((o)=>Ui(e,o))}function Lr(e){return Array.from(e).map(Br()).filter((t)=>!Ur(t))}function $i(e){ut=!0;let t=Symbol();Nr=t,fe.set(t,[]);let r=()=>{while(fe.get(t).length)fe.get(t).shift()();fe.delete(t)},n=()=>{ut=!1,r()};e(r),n()}function Dr(e){let t=[],r=(a)=>t.push(a),[n,i]=gi(e);return t.push(i),[{Alpine:de,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:V.bind(V,e)},()=>t.forEach((a)=>a())]}function Ui(e,t){let r=()=>{},n=De[t.type]||r,[i,o]=Dr(e);_r(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),ut?fe.get(Nr).push(n):n()};return s.runCleanups=o,s}function Br(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=$r.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Nt(e){$r.push(e)}function Ur({name:e}){return jr().test(e)}function ji(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(jr()),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 Hi(e,t){let r=F.indexOf(e.type)===-1?ft:e.type,n=F.indexOf(t.type)===-1?ft:t.type;return F.indexOf(r)-F.indexOf(n)}function Y(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>Y(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)Y(n,t,!1),n=n.nextElementSibling}function B(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function zi(e){return(...t)=>j&&e(...t)}function ke(e){Hr.push(e)}function qi(e,t){Hr.forEach((r)=>r(e,t)),j=!0,zr(()=>{N(t,(r,n)=>{n(r,()=>{})})}),j=!1}function Fi(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,pt=!0,zr(()=>{Ki(t)}),j=!1,pt=!1}function Ki(e){let t=!1;N(e,(n,i)=>{Y(n,(o,s)=>{if(t&&Xi(o))return s();t=!0,i(o,s)})})}function zr(e){let t=ee;rr((r,n)=>{let i=t(r);return ae(i),()=>{}}),e(),rr(t)}function Vi(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;ze++}r.pending++,Promise.resolve(t).catch((n)=>{try{je(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>Wi(e,r))}function Wi(e,t){if(t.pending--,t.pending>0)return;if(wi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(ze--,!e.isConnected)return;Yi(t),N(e)}function Ji(e,t){if(ze===0)return!1;let r=O(e,(n)=>n._x_deferInit);if(!r)return!1;return qr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function qr(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 Yi(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=O(r,(o)=>o._x_deferInit);if(n){qr(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;He(r,i).forEach((o)=>o())})}function pe(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 Gi(){if(nr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(nr=!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?");pe(document,"alpine:init"),pe(document,"alpine:initializing"),Tt(),vi((t)=>N(t,Y)),Ct((t)=>te(t)),yr((t,r)=>{if(Ji(t,r))return;He(t,r).forEach((n)=>n())});let e=(t)=>!qe(t.parentElement,!0);Array.from(document.querySelectorAll(Vr().join(","))).filter(e).forEach((t)=>{N(t)}),pe(document,"alpine:initialized"),setTimeout(()=>{es()})}function Kr(){return Dt.map((e)=>e())}function Vr(){return Dt.concat(Fr).map((e)=>e())}function Wr(e){Dt.push(e)}function Jr(e){Fr.push(e)}function qe(e,t=!1){return O(e,(r)=>{if((t?Vr():Kr()).some((i)=>r.matches(i)))return!0})}function O(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return O(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return O(e.parentNode.host,t);if(!e.parentElement)return;return O(e.parentElement,t)}function Xi(e){return Kr().some((t)=>e.matches(t))}function Zi(e){Yr.push(e)}function N(e,t=Y,r=()=>{}){if(O(e,(n)=>n._x_ignore))return;$i(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),Yr.forEach((o)=>o(n,i)),He(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=Qi++;n._x_ignore&&i()})})}function te(e,t=Y){t(e,(r)=>{yi(r),wr(r),delete r._x_marker})}function es(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Bi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Rt(e=()=>{}){return queueMicrotask(()=>{Pt||setTimeout(()=>{bt()})}),new Promise((t)=>{ht.push(()=>{e(),t()})})}function bt(){Pt=!1;while(ht.length)ht.shift()()}function ts(){Pt=!0}function Bt(e,t){if(Array.isArray(t))return ir(e,t.join(" "));else if(typeof t==="object"&&t!==null)return rs(e,t);else if(typeof t==="function")return Bt(e,t());return ir(e,t)}function mt(e){return e.split(/\s/).filter(Boolean)}function ir(e,t){let r=(i)=>mt(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 rs(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?mt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?mt(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 Fe(e,t){if(typeof t==="object"&&t!==null)return ns(e,t);return is(e,t)}function ns(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=ss(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Fe(e,r)}}function is(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function ss(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function gt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function os(e,t,r){Gr(e,Bt,""),{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){Gr(e,Fe);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((b,k)=>k<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((b,k)=>k>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),d=a?0:1,c=l?ce(t,"scale",95)/100:1,u=ce(t,"delay",0)/1000,f=ce(t,"origin","center"),g="opacity, transform",m=ce(t,"duration",150)/1000,p=ce(t,"duration",75)/1000,h="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${m}s`,transitionTimingFunction:h},e._x_transition.enter.start={opacity:d,transform:`scale(${c})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${p}s`,transitionTimingFunction:h},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:d,transform:`scale(${c})`}}function Gr(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=()=>{}){xt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){xt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function Xr(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:Xr(t)}function xt(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,d;ls(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),d=t(e,i)},after:s,cleanup(){l(),d()}})}function ls(e,t){let r,n,i,o=gt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),bt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:gt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),ts(),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()}),bt(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function ce(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 Zr(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=oe({});switch(e._x_bindings[t]=r,t=n.includes("camel")?ms(t):t,t){case"value":ds(e,r);break;case"style":us(e,r);break;case"class":cs(e,r);break;case"selected":case"checked":fs(e,t,r);break;default:$t(e,t,r);break}}function ds(e,t){if(Ut(e)){if(e.attributes.value===void 0)e.value=t}else if(Pe(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)=>gs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")bs(e,t);else if(e.tagName==="OPTION")$t(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function cs(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Bt(e,t)}function us(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Fe(e,t)}function fs(e,t,r){$t(e,t,r),hs(e,t,r)}function $t(e,t,r){if([null,void 0,!1].includes(r)&&vs(t))e.removeAttribute(t);else{if(Qr(t))r=t;if(ys(r))r=JSON.stringify(r);ps(e,t,r)}}function ps(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function hs(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 ms(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function gs(e,t){return e==t}function Me(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 Qr(e){return xs.has(e)}function vs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function ys(e){return typeof e==="object"&&e!==null}function _s(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return en(e,t,r)}function ws(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,Tr(()=>V(e,i.expression))}return en(e,t,r)}function en(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(Qr(t))return!![t,"true"].includes(n);return n}function Pe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Ut(e){return e.type==="radio"||e.localName==="ui-radio"}function tn(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 rn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function nn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=ee(()=>{let l=e(),d=r();if(i)n(Ze(l)),i=!1;else{let c=JSON.stringify(l),u=JSON.stringify(d);if(c!==o)n(Ze(l));else if(c!==u)t(Ze(d))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{St(a),ae(a)}}function Ze(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Es(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(de))}function ks(e,t){if(!sr)P=oe(P),sr=!0;if(t===void 0)return P[e];if(P[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)P[e]=t.initialize(P,e,e,()=>{});else It(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function As(){return P}function Ss(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return on(e,r());else sn[e]=r;return()=>{}}function Cs(e){return Object.entries(sn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function on(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Lr(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}),He(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Os(e,t){an[e]=t}function Ts(e,t){return Object.entries(an).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function dn(e){try{let r=new Ls(e).tokenize(),i=new Ns(r).parse(),o=new Ds;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:d=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:d})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Ps(e,t,r={}){let n=cn(e),i=J([r.scope??{},...n]),o=r.params??[],a=dn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&K)return a.apply(i,o);return a}function Rs(e,t){let r=cn(e);if(typeof t==="function")return Di(r,t);let n=Bs(e,t,r);return Ti.bind(null,e,t,n)}function cn(e){let t={};return Ne(t,e),[t,...se(e)]}function Bs(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=J([i,...r]),l=dn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(K&&typeof l==="function"){let d=l.apply(l,o);if(d instanceof Promise)d.then((c)=>n(c));else n(d)}else if(typeof l==="object"&&l instanceof Promise)l.then((d)=>n(d));else n(l)}}function un(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function G(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function Fs(e,t=!1){if(e.flags|=8,t){e.next=me,me=e;return}e.next=be,be=e}function Ht(){bn++}function zt(){if(--bn>0)return;if(me){let t=me;me=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(be){let t=be;be=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 mn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function gn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;qt(n),Vs(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function yt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ks(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Ks(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Re)return;if(e.globalVersion=Re,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!yt(e)))return;e.flags|=2;let t=e.dep,r=x,n=T;x=e,T=!0;try{mn(e);let i=e.fn(e._value);if(t.version===0||q(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{x=r,T=n,gn(e),e.flags&=-3}}function qt(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)qt(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function Vs(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 Ws(e,t){if(e.effect instanceof ar)e=e.effect.fn;let r=new ar(e);if(t)xe(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function Js(e){e.effect.stop()}function Ys(){xn.push(T),T=!1}function Gs(){let e=xn.pop();T=e===void 0?!0:e}function lr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=x;x=void 0;try{t()}finally{x=r}}}function vn(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)vn(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 S(e,t,r){if(T&&x){let n=_t.get(e);if(!n)_t.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new Zs),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function U(e,t,r,n,i,o){let s=_t.get(e);if(!s){Re++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Ht(),t==="clear")s.forEach(a);else{let l=ve(e),d=l&&jt(r);if(l&&r==="length"){let c=Number(n);s.forEach((u,f)=>{if(f==="length"||f===_e||!Ae(f)&&f>=c)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(d)a(s.get(_e));switch(t){case"add":if(!l){if(a(s.get(W)),he(e))a(s.get(wt))}else if(d)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(W)),he(e))a(s.get(wt))}break;case"set":if(he(e))a(s.get(W));break}}}zt()}function ne(e){let t=v(e);if(t===e)return t;return S(t,"iterate",_e),Z(e)?t:t.map(Q)}function Ft(e){return S(e=v(e),"iterate",_e),e}function I(e,t){if(X(e))return Sn(e)?we(Q(t)):we(t);return Q(t)}function tt(e,t,r){let n=Ft(e),i=n[t]();if(n!==e&&!Z(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function D(e,t,r,n,i,o){let s=Ft(e),a=s!==e&&!Z(e),l=s[t];if(l!==eo[t]){let u=l.apply(e,o);return a?Q(u):u}let d=r;if(s!==e){if(a)d=function(u,f){return r.call(this,I(e,u),f,e)};else if(r.length>2)d=function(u,f){return r.call(this,u,f,e)}}let c=l.call(s,d,n);return a&&i?i(c):c}function dr(e,t,r,n){let i=Ft(e),o=i!==e&&!Z(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(d,c,u){if(a)a=!1,d=I(e,d);return r.call(this,d,I(e,c),u,e)};else if(r.length>3)s=function(d,c,u){return r.call(this,d,c,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function rt(e,t,r){let n=v(e);S(n,"iterate",_e);let i=n[t](...r);if((i===-1||i===!1)&&bo(r[0]))return r[0]=v(r[0]),n[t](...r);return i}function ue(e,t,r=[]){Ys(),Ht();let n=v(e)[t].apply(e,r);return zt(),Gs(),n}function ro(e){if(!Ae(e))e=String(e);let t=v(this);return S(t,"has",e),t.hasOwnProperty(e)}function ao(e,t,r){return function(...n){let i=this.__v_raw,o=v(i),s=he(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,d=i[e](...n),c=r?Et:t?we:Q;return!t&&S(o,"iterate",l?wt:W),xe(Object.create(d),{next(){let{value:u,done:f}=d.next();return f?{value:u,done:f}:{value:a?[c(u[0]),c(u[1])]:c(u),done:f}}})}}function Oe(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";G(`${hn(e)} operation ${r}failed: target is readonly.`,v(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function lo(e,t){let r={get(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(q(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Ce(s),d=t?Et:e?we:Q;if(l.call(s,i))return d(o.get(i));else if(l.call(s,a))return d(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&S(v(i),"iterate",W),i.size},has(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(q(i,a))S(s,"has",i);S(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=v(a),d=t?Et:e?we:Q;return!e&&S(l,"iterate",W),a.forEach((c,u)=>i.call(o,d(c),d(u),s))}};return xe(r,e?{add:Oe("add"),set:Oe("set"),delete:Oe("delete"),clear:Oe("clear")}:{add(i){let o=v(this),s=Ce(o),a=v(i),l=!t&&!Z(i)&&!X(i)?a:i;if(!(s.has.call(o,l)||q(i,l)&&s.has.call(o,i)||q(a,l)&&s.has.call(o,a)))o.add(l),U(o,"add",l,l);return this},set(i,o){if(!t&&!Z(o)&&!X(o))o=v(o);let s=v(this),{has:a,get:l}=Ce(s),d=a.call(s,i);if(!d)i=v(i),d=a.call(s,i);else cr(s,a,i);let c=l.call(s,i);if(s.set(i,o),!d)U(s,"add",i,o);else if(q(o,c))U(s,"set",i,o,c);return this},delete(i){let o=v(this),{has:s,get:a}=Ce(o),l=s.call(o,i);if(!l)i=v(i),l=s.call(o,i);else cr(o,s,i);let d=a?a.call(o,i):void 0,c=o.delete(i);if(l)U(o,"delete",i,void 0,d);return c},clear(){let i=v(this),o=i.size!==0,s=he(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]=ao(i,e,t)}),r}function wn(e,t){let r=lo(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(vt(r,i)&&i in n?r:n,i,o)}}function cr(e,t,r){let n=v(r);if(n!==r&&t.call(e,n)){let i=pn(e);G(`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 ho(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Kt(e){if(X(e))return e;return An(e,!1,so,co,En)}function kt(e){return An(e,!0,oo,uo,kn)}function An(e,t,r,n,i){if(!ye(e))return G(`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=ho(pn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Sn(e){if(X(e))return Sn(e.__v_raw);return!!(e&&e.__v_isReactive)}function X(e){return!!(e&&e.__v_isReadonly)}function Z(e){return!!(e&&e.__v_isShallow)}function bo(e){return e?!!e.__v_raw:!1}function v(e){let t=e&&e.__v_raw;return t?v(t):e}function ge(e){return e?e.__v_isRef===!0:!1}function mo(e){let t=[];return O(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Cn(e){if(!nt[e])nt[e]=0;return++nt[e]}function go(e,t){return O(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function xo(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Cn(t)}function vo(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 On(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 ur(e){let t=B(()=>document.querySelector(e),()=>yo)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function ie(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,d)=>(c)=>d(l,c);if(r.includes("dot"))t=_o(t);if(r.includes("camel"))t=wo(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=Mn(r,o),r.includes("prevent"))o=a(o,(l,d)=>{d.preventDefault(),l(d)});if(r.includes("stop"))o=a(o,(l,d)=>{d.stopPropagation(),l(d)});if(r.includes("once"))o=a(o,(l,d)=>{l(d),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,d)=>{if(e.contains(d.target))return;if(d.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(d)});if(r.includes("self"))o=a(o,(l,d)=>{d.target===e&&l(d)});if(t==="submit")o=a(o,(l,d)=>{if(d.target._x_pendingModelUpdates)d.target._x_pendingModelUpdates.forEach((c)=>c());l(d)});if(ko(t)||In(t))o=a(o,(l,d)=>{if(So(d,r))return;l(d)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Mn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Be(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=tn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Be(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=rn(t,n)}return t}function _o(e){return e.replace(/-/g,".")}function wo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Be(e){return!Array.isArray(e)&&!isNaN(e)}function Eo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function ko(e){return["keydown","keyup"].includes(e)}function In(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function So(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Ao.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Be((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Be((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&fr(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(In(e.type))return!1;if(fr(e.key).includes(r[0]))return!1}}return!0}function fr(e){if(!e)return[];e=Eo(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 Te(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(Pe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=it(r.target.value);else if(t.includes("boolean"))i=Me(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Co(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 it(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return Me(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Ut(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return it(i);else if(t.includes("boolean"))return Me(i);else if(t.includes("trim"))return i.trim();else return i}})}function it(e){let t=e?parseFloat(e):null;return Oo(t)?t:e}function Co(e,t){return e==t}function Oo(e){return!Array.isArray(e)&&!isNaN(e)}function pr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function To(e,t){e._x_keyExpression=t}function Mo(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 Io(e){if(!j)return!1;if(pt)return!0;return e.hasAttribute("data-has-alpine-state")}function Lo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function No(e,t,r,n){r((i)=>{if(Ro(i))i=Array.from({length:i},(d,c)=>c+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=Bo(i),l=Object.entries(i).map(([d,c])=>{if(!a)d=parseInt(d);let u=Po(t,c,d,i),f;return n((g)=>{if(typeof g==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(g))s.set(g,o.get(g)),o.delete(g);f=g},{scope:{index:d,...u}}),[f,u]});_(()=>{o.forEach((u)=>{te(u),u.remove()});let d=new Set,c=e;if(l.forEach(([u,f])=>{if(s.has(u)){let p=s.get(u);if(p._x_refreshXForScope(f),c.nextElementSibling!==p){if(c.nextElementSibling)p.replaceWith(c.nextElementSibling);c.after(p)}if(c=p,p._x_currentIfEl){if(p.nextElementSibling!==p._x_currentIfEl)c.after(p._x_currentIfEl);c=p._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 g=document.importNode(e.content,!0).firstElementChild,m=oe(f);Ee(g,m,e),g._x_refreshXForScope=Lo(m),s.set(u,g),d.add(g),c.after(g),c=g}),d.forEach((u)=>N(u)),c!==e)e._x_lastRenderedEl=c;else delete e._x_lastRenderedEl})})}function Do(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 Po(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 Ro(e){return typeof e!=="object"&&!isNaN(e)}function Bo(e){return typeof e==="object"&&!Array.isArray(e)}function Nn(){}function Ve(e,t,r){w(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var st=!1,ot=!1,R,at=-1,Ie=!1,At=!1,oe,ee,ae,br,hi=0,lt=!0,gr,xr,vr,$e,Ot=!1,z,Mt=!1,Le,Ai,Cr,Or,K=!0,Mr=()=>{},Ir,Lt="x-",De,ut=!1,fe,Nr,Pr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Rr=(e)=>e,$r,jr=()=>new RegExp(`^${Lt}([^:^.]+)\\b`),ft="DEFAULT",F,j=!1,Hr,pt=!1,ze=0,nr=!1,Dt,Fr,Yr,Qi=1,ht,Pt=!1,xs,P,sr=!1,sn,an,Ms,de,or,ln,E=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Is,Ls=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 E("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
|
+
`)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 E("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 E("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new E("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new E("UNDEFINED",void 0,e,this.position));else this.tokens.push(new E("KEYWORD",t,e,this.position));else this.tokens.push(new E("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 E("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 E("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new E("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new E("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new E("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new E("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new E("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new E(i,t,e,this.position))}}},Ns=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 Is.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}}},Ds=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 h=t[e.name];if(this.checkForDangerousValues(h),typeof h==="function")return h.bind(t);return h}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((h)=>this.evaluate({node:h,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let h=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b;if(e.callee.computed)b=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else b=e.callee.property.name;this.checkForDangerousKeywords(b);let k=h[b];if(typeof k!=="function")throw Error("Value is not a function");l=k.apply(h,a)}else if(e.callee.type==="Identifier"){let h=e.callee.name,b;if(h in t)b=t[h];else throw Error(`Undefined variable: ${h}`);if(typeof b!=="function")throw Error("Value is not a function");let k=r!==null?r:t;l=b.apply(k,a)}else{let h=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof h!=="function")throw Error("Value is not a function");l=h.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let d=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!d;case"-":return-d;case"+":return+d;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let h=e.argument.name;if(!(h in t))throw Error(`Undefined variable: ${h}`);let b=t[h];if(e.operator==="++")t[h]=b+1;else if(e.operator==="--")t[h]=b-1;return e.prefix?t[h]:b}else if(e.argument.type==="MemberExpression"){let h=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(h))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(b);let k=h[b];if(e.operator==="++")h[b]=k+1;else if(e.operator==="--")h[b]=k-1;return e.prefix?h[b]:k}throw Error("Invalid update expression target");case"BinaryExpression":let c=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 c&&u();if(e.operator==="||")return c||u();let f=u();switch(e.operator){case"+":return c+f;case"-":return c-f;case"*":return c*f;case"/":return c/f;case"%":return c%f;case"==":return c==f;case"!=":return c!=f;case"===":return c===f;case"!==":return c!==f;case"<":return c<f;case">":return c>f;case"<=":return c<=f;case">=":return c>=f;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 h=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(h))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(b),h[b]=m,m}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((h)=>this.evaluate({node:h,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let h of e.properties){let b=h.computed?this.evaluate({node:h.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):h.key.type==="Identifier"?h.key.name:this.evaluate({node:h.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),k=this.evaluate({node:h.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[b]=k}return p;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(or.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(ln.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return or.set(e,!0),!0}},ra,na,xe,$s,vt=(e,t)=>$s.call(e,t),ve,he=(e)=>fn(e)==="[object Map]",Us=(e)=>typeof e==="string",Ae=(e)=>typeof e==="symbol",ye=(e)=>e!==null&&typeof e==="object",js,fn=(e)=>js.call(e),pn=(e)=>fn(e).slice(8,-1),jt=(e)=>Us(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ke=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},Hs,ia,zs,sa,hn,oa,q=(e,t)=>!Object.is(e,t),qs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",aa,Qe,x,et,ar=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,Qe)if(Qe.active)Qe.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,et.has(this))et.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Fs(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,lr(this),mn(this);let e=x,t=T;x=this,T=!0;try{return this.fn()}finally{if(x!==this)G("Active effect was not restored correctly - this is likely a Vue internal bug.");gn(this),x=e,T=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)qt(e);this.deps=this.depsTail=void 0,lr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)et.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(yt(this))this.run()}get dirty(){return yt(this)}},bn=0,be,me,T=!0,xn,Re=0,Xs=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}},Zs=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(!x||!T||x===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==x){if(t=this.activeLink=new Xs(x,this),!x.deps)x.deps=x.depsTail=t;else t.prevDep=x.depsTail,x.depsTail.nextDep=t,x.depsTail=t;vn(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=x.depsTail,t.nextDep=void 0,x.depsTail.nextDep=t,x.depsTail=t,x.deps===t)x.deps=r}}if(x.onTrack)x.onTrack(xe({effect:x},e));return t}trigger(e){this.version++,Re++,this.notify(e)}notify(e){Ht();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(xe({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{zt()}}},_t,W,wt,_e,Qs,eo,to,yn,_n=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?po:kn:i?fo:En).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=ve(e);if(!n){let a;if(o&&(a=Qs[t]))return a;if(t==="hasOwnProperty")return ro}let s=Reflect.get(e,t,ge(e)?e:r);if(Ae(t)?yn.has(t):to(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ge(s)){let a=o&&jt(t)?s:s.value;return n&&ye(a)?kt(a):a}if(ye(s))return n?kt(s):Kt(s);return s}},no,io,so,oo,Et=(e)=>e,Ce=(e)=>Reflect.getPrototypeOf(e),co,uo,En,fo,kn,po,Q=(e)=>ye(e)?Kt(e):e,we=(e)=>ye(e)?kt(e):e,nt,yo,Tn=()=>{},Ao,Ln=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Cs(l),A(e,n)((c)=>{on(e,c,i)},{scope:l});return}if(t==="key")return To(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=A(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>Zr(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},H,Dn,$o;var Rn=si(()=>{R=[];gr=[],xr=[],vr=[];$e=new MutationObserver(Ue);z=[];Le=[];Ai={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 Si;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=Ar(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)}};Cr={};Or=Ii;De={};fe=new Map,Nr=Symbol();$r=[];F=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",ft,"teleport"];Hr=[];ke((e,t)=>{if(ze===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(O(e,(r)=>r._x_deferInit))t._x_ignore=!0});Dt=[],Fr=[];Yr=[];ht=[];w("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 os(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=Xr(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let d=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([c])=>c?.());return delete l._x_hidePromise,delete l._x_hideChildren,d};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};xs=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"]);P={};sn={};an={};Ms={get reactive(){return oe},get release(){return ae},get effect(){return ee},get raw(){return br},get transaction(){return xi},version:"3.17.4",flushAndStopDeferringMutations:ki,dontAutoEvaluateFunctions:Tr,disableEffectScheduling:bi,startObservingMutations:Tt,stopObservingMutations:Er,setReactivityEngine:mi,onAttributeRemoved:_r,onAttributesAdded:yr,closestDataStack:se,skipDuringClone:B,onlyDuringClone:zi,addRootSelector:Wr,addInitSelector:Jr,setErrorHandler:Mi,interceptClone:ke,addScopeToNode:Ee,deferMutations:Ei,mapAttributes:Nt,evaluateLater:A,interceptInit:Zi,initInterceptors:It,injectMagics:Ne,setEvaluator:Li,setRawEvaluator:Ni,mergeProxies:J,extractProp:ws,findClosest:O,onElRemoved:Ct,closestRoot:qe,destroyTree:te,interceptor:Sr,transition:xt,setStyles:Fe,mutateDom:_,deferInit:Vi,directive:w,entangle:nn,throttle:rn,debounce:tn,evaluate:V,evaluateRaw:Pi,initTree:N,nextTick:Rt,prefixed:le,prefix:Ri,plugin:Es,magic:M,store:ks,start:Gi,clone:Fi,cloneNode:qi,bound:_s,$data:kr,watch:mr,walk:Y,data:Os,bind:Ss},de=Ms,or=new WeakMap,ln=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}ln.add(t)});Is=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];ra=Object.freeze({}),na=Object.freeze([]),xe=Object.assign,$s=Object.prototype.hasOwnProperty,ve=Array.isArray,js=Object.prototype.toString,Hs=/-\w/g,ia=Ke((e)=>e.replace(Hs,(t)=>t.slice(1).toUpperCase())),zs=/\B([A-Z])/g,sa=Ke((e)=>e.replace(zs,"-$1").toLowerCase()),hn=Ke((e)=>e.charAt(0).toUpperCase()+e.slice(1)),oa=Ke((e)=>e?`on${hn(e)}`:""),aa=un(qs+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");et=new WeakSet;xn=[];_t=new WeakMap,W=Symbol("Object iterate"),wt=Symbol("Map keys iterate"),_e=Symbol("Array iterate");Qs={__proto__:null,[Symbol.iterator](){return tt(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return ne(this).concat(...e.map((t)=>ve(t)?ne(t):t))},entries(){return tt(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return D(this,"every",e,t,void 0,arguments)},filter(e,t){return D(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return D(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return D(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return D(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return D(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return D(this,"forEach",e,t,void 0,arguments)},includes(...e){return rt(this,"includes",e)},indexOf(...e){return rt(this,"indexOf",e)},join(e){return ne(this).join(e)},lastIndexOf(...e){return rt(this,"lastIndexOf",e)},map(e,t){return D(this,"map",e,t,void 0,arguments)},pop(){return ue(this,"pop")},push(...e){return ue(this,"push",e)},reduce(e,...t){return dr(this,"reduce",e,t)},reduceRight(e,...t){return dr(this,"reduceRight",e,t)},shift(){return ue(this,"shift")},some(e,t){return D(this,"some",e,t,void 0,arguments)},splice(...e){return ue(this,"splice",e)},toReversed(){return ne(this).toReversed()},toSorted(e){return ne(this).toSorted(e)},toSpliced(...e){return ne(this).toSpliced(...e)},unshift(...e){return ue(this,"unshift",e)},values(){return tt(this,"values",(e)=>I(this,e))}};eo=Array.prototype;to=un("__proto__,__v_isRef,__isVue"),yn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Ae));no=class extends _n{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=ve(e)&&jt(t);if(!this._isShallow){let l=X(i);if(!Z(r)&&!X(r))i=v(i),r=v(r);if(!o&&ge(i)&&!ge(r))if(l)return G(`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:vt(e,t),a=Reflect.set(e,t,r,ge(e)?e:n);if(e===v(n)&&a){if(!s)U(e,"add",t,r);else if(q(r,i))U(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=vt(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(!Ae(t)||!yn.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",ve(e)?"length":W),Reflect.ownKeys(e)}},io=class extends _n{constructor(e=!1){super(!0,e)}set(e,t){return G(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return G(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},so=new no,oo=new io;co={get:wn(!1,!1)},uo={get:wn(!0,!1)};En=new WeakMap,fo=new WeakMap,kn=new WeakMap,po=new WeakMap;M("nextTick",()=>Rt);M("dispatch",(e)=>pe.bind(pe,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=mr(()=>{let l;return o((d)=>l=d),l},i);r(a)});M("store",As);M("data",(e)=>kr(e));M("root",(e)=>qe(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=J(mo(e)),e._x_refs_proxy});nt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return vo(e,i,t,()=>{let o=go(e,r),s=o?o._x_ids[r]:Cn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});ke((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);On("Focus","focus","focus");On("Persist","persist","persist");w("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let c;return o((u)=>c=u),c},a=n(`${t} = __placeholder`),l=(c)=>a(()=>{},{scope:{__placeholder:c}}),d=s();l(d),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let c=e._x_model.get,u=e._x_model.setWithModifiers,f=nn({get(){return c()},set(g){u(g)}},{get(){return s()},set(g){l(g)}});i(f)})});w("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=ur(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))})});Ee(o,{},e);let s=(a,l,d)=>{if(d.includes("prepend"))l.parentNode.insertBefore(a,l);else if(d.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{B(()=>{s(o,i,t),N(o)})()}),e._x_teleportPutBack=()=>{let a=ur(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),te(o)}))});yo=document.createElement("div");Tn.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})};w("ignore",Tn);w("effect",B((e,{expression:t},{effect:r})=>{r(A(e,t))}));Ao=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];w("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=O(e,(p)=>p!==e);let s=A(o,r),a;if(typeof r==="string")a=A(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=A(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let p;return s((h)=>p=h),pr(p)?p.get():p},d=(p)=>{let h;if(s((b)=>h=b),pr(h))h.set(p);else a(()=>{},{scope:{__placeholder:p}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let c=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),f=t.includes("enter"),g=c||u||f,m;if(j)m=()=>{};else if(g){let p=[],h=(b)=>d(Te(e,t,b,l()));if(c)p.push(ie(e,"change",t,h));if(u){if(p.push(ie(e,"blur",t,h)),e.form){let b=e.form,k=()=>h({target:e});if(!b._x_pendingModelUpdates)b._x_pendingModelUpdates=[];b._x_pendingModelUpdates.push(k),i(()=>{if(b._x_pendingModelUpdates)b._x_pendingModelUpdates.splice(b._x_pendingModelUpdates.indexOf(k),1)})}}if(f)p.push(ie(e,"keydown",t,(b)=>{if(b.key==="Enter")h(b)}));m=()=>p.forEach((b)=>b())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=ie(e,p,t,(h)=>{d(Te(e,t,h,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Pe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)d(Te(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 p=ie(e.form,"reset",[],(h)=>{Rt(()=>e._x_model&&e._x_model.set(Te(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){d(p)},setWithModifiers:Mn(t,d)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(Pe(e))if(Array.isArray(p))e.checked=p.some((h)=>h==e.value);else e.checked=!!p;else if(Ut(e))if(typeof p==="boolean")e.checked=Me(e.value)===p;else e.checked=e.value==p;else Zr(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});w("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(le("cloak")))));Jr(()=>`[${le("init")}]`);w("init",B((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));w("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});w("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>te(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,N(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Nt(Pr(":",Rr(le("bind:"))));Ln.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}};w("bind",Ln);Wr(()=>`[${le("data")}]`);H=Symbol();w("data",(e,{expression:t},{cleanup:r})=>{if(Io(e))return;let n=e[H];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ne(i,e);let o={};Ts(o,i);let s=V(e,t,{scope:o});if(s===void 0||s===!0)s={};Ne(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Mo(a,s);let d={expression:t};e[H]=d,queueMicrotask(()=>{if(e[H]===d)delete e[H]})}else a=oe(s);It(a,r);let l=Ee(e,a);B(()=>{a.init&&V(e,a.init)})(),r(()=>{a.destroy&&V(e,a.destroy),l();let d={reactiveData:a};e[H]=d,queueMicrotask(()=>{if(e[H]===d)delete e[H]})})});ke((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=A(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=gt((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),d,c=!0;n(()=>i((u)=>{if(!c&&u===d)return;if(t.includes("immediate"))u?a():o();l(u),d=u,c=!1}))});w("for",B((e,{expression:t},{effect:r,cleanup:n})=>{let i=Do(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>No(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{te(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Nn.inline=(e,{expression:t},{cleanup:r})=>{let n=qe(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",Nn);w("if",B((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=A(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Ee(a,{},e),_(()=>{e.after(a),N(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{te(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())}));w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>xo(e,i))});ke((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Nt(Pr("@",Rr(le("on:"))));w("on",B((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?A(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=ie(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));Ve("Collapse","collapse","collapse");Ve("Intersect","intersect","intersect");Ve("Focus","trap","focus");Ve("Mask","mask","mask");w("html",(e,{expression:t})=>{je(Error("Using the x-html directive is prohibited in the CSP build"),e)});de.setEvaluator(Rs);de.setRawEvaluator(Ps);de.setReactivityEngine({reactive:Kt,effect:(e,t={})=>{let r;return r=Ws(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:Js,raw:v});Dn=de,$o=Dn;/*! Bundled license information:
|
|
8
|
+
|
|
9
|
+
@vue/shared/dist/shared.esm-bundler.js:
|
|
10
|
+
(**
|
|
11
|
+
* @vue/shared v3.5.41
|
|
12
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
13
|
+
* @license MIT
|
|
14
|
+
**)
|
|
15
|
+
|
|
16
|
+
@vue/reactivity/dist/reactivity.esm-bundler.js:
|
|
17
|
+
(**
|
|
18
|
+
* @vue/reactivity v3.5.41
|
|
19
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
20
|
+
* @license MIT
|
|
21
|
+
**)
|
|
22
|
+
*/});var Xt=typeof HTMLElement==="function"?HTMLElement:class{};function Zt(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 Qt(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 oi=Symbol.for("bare-v3.styles");function er(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[oi]??=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 Se=null;function Bn(){if(Se)return Se;let e=(Rn(),ti(Pn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Se=e}var $n=(e)=>Bn().reactive(e),Un=(e)=>Se?Se.raw(e):e;function jn(e,t,r){let n=Bn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function Uo(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},o=null,s=null,a=0,l=null,d=0,c=null,u=new n.MutationObserver((m)=>{if(!o.isConnected||m.some(({target:p})=>s.contains(p)&&!c.contains(p)))f()});function f(){if(!o)return;n.clearTimeout(d),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,c.textContent=""}function g(m){if(!c?.isConnected)c=r.createElement("span"),c.className="b3-visually-hidden",c.setAttribute("role","status"),r.body.append(c);let p=c;o=m,a=n.performance.now(),s=m.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||m.parentElement;let h=m.dataset.b3Confirm;if(h)l=[...m.childNodes],m.replaceChildren(h);m.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),d=n.setTimeout(f,4000),n.requestAnimationFrame(()=>{if(o===m)p.textContent=h||"Press again to confirm"})}e.addEventListener("click",(m)=>{let p=m.target.closest?.("[data-b3-confirm]");if(o&&p!==o)f();if(!p||p.disabled||!e.contains(p))return;if(p===o&&n.performance.now()-a>=350)return f();if(m.preventDefault(),m.stopImmediatePropagation(),p!==o)g(p)},{...i,capture:!0}),e.addEventListener("focusout",({target:m})=>{if(m===o)n.queueMicrotask(()=>m===o&&f())},i),e.addEventListener("keydown",(m)=>{let p=m;if(p.key==="Escape")f();else if(p.repeat&&(p.key==="Enter"||p.key===" ")&&p.target.closest?.("[data-b3-confirm]"))p.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),c?.remove()},{once:!0})}var Hn=Symbol.for("bare-v3.confirm");function zn(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Hn])return;e[Hn]=!0,Uo(document)}var jo=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,Ho=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,zo=350,Ye=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),qn=(e)=>JSON.parse(JSON.stringify(Un(e))),y=(e,t)=>e!=null&&String(e)===String(t),Vt=(e)=>!!e&&typeof e==="object",C=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],Jn=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function Fn(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=Ye();t.add(String(n.id))};return e.filter(Vt).map((n)=>{r(n),n.cards=Jn(Array.isArray(n.cards)?n.cards.filter(Vt):[]);for(let i of n.cards)if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(Vt(o))r(o)}return n})}function Kn(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>y(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>y(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=C(o),a=s.findIndex((l)=>y(l.id,r));if(a>=0)return void s.splice(a,1)}}}function Wt(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...C(e).map((n)=>n.title??"")].join(`
|
|
23
|
+
`);for(let[,,n]of r.matchAll(jo))t.add(n.toLowerCase());return[...t]}var qo=/\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))+)\)|\bhttps?:\/\/[^\s<>]+/giu;function Fo(e){if(/[\u0000- \u007f\\]/.test(e))return null;if(/^(https?:|mailto:)/i.test(e))return{href:e,file:!1};if(/^[a-z][a-z\d+.-]*:/i.test(e)||e.startsWith("//"))return null;return{href:e,file:!0}}function Yn(e){let t=[],r=0;for(let n of e.matchAll(qo)){let[i,o,s]=n,a=n.index+i.length;if(!s){let d=i;for(;;){if(d=d.replace(/[.,;:!?'"\]]+$/u,""),!d.endsWith(")")||d.split("(").length>=d.split(")").length)break;d=d.slice(0,-1)}a-=i.length-d.length,i=o=s=d}let l=Fo(s);if(!l)continue;if(n.index>r)t.push(e.slice(r,n.index));t.push({text:o,...l}),r=a}if(r<e.length)t.push(e.slice(r));return t}var Vn=(e)=>Yn(e).map((t)=>typeof t==="string"?t:t.text).join(""),Jt=null;function Ko(e,t){let r=e.ownerDocument;e.replaceChildren(...Yn(t).map((n)=>{if(typeof n==="string")return r.createTextNode(n);let i=r.createElement("a");if(i.className="b3-board-ref",i.href=n.href,i.dataset.href=n.href,i.draggable=!1,n.file){if(i.dataset.file="",!Jt){let o=r.createElement("template");o.innerHTML=Yo,Jt=o.content.firstElementChild}i.append(Jt.cloneNode(!0))}else if(!/^mailto:/i.test(n.href))i.target="_blank",i.rel="noopener noreferrer";return i.append(n.text),i}))}var Vo="b3-board-style",Wo=`
|
|
24
|
+
:where(b3-board){--b3-board-hit:var(--b3-d-control,var(--b3-touch,2.75rem));--b3-board-chip:var(--b3-d-control-small,2rem);
|
|
25
|
+
--b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
|
|
26
|
+
--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));}
|
|
27
|
+
@media (pointer:fine){:where(b3-board){--b3-board-hit:var(--b3-d-control-small,1.75rem);--b3-board-chip:1.5rem;}}
|
|
28
|
+
b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;cursor:default;}
|
|
29
|
+
.b3-board-ui{flex:1 1 auto;display:flex;flex-direction:column;gap:var(--b3-space-3,.75rem);min-inline-size:0;min-block-size:0;}
|
|
30
|
+
.b3-board-icon{flex:none;inline-size:1rem;block-size:1rem;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
|
|
31
|
+
.b3-board-filters{flex:none;display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--b3-space-3,.75rem);font-size:.8125rem;}
|
|
32
|
+
.b3-board-filters[hidden]{display:none;}
|
|
33
|
+
.b3-board-caption{color:var(--b3-color-muted);font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;}
|
|
34
|
+
/* A tag or mention is a word in its colour; choosing it underlines and bolds it. */
|
|
35
|
+
.b3-board-chip{display:inline-flex;align-items:center;max-inline-size:100%;min-block-size:var(--b3-board-chip);padding:0;border:0;background:none;
|
|
36
|
+
color:var(--b3-board-tag);font:inherit;text-align:start;overflow-wrap:anywhere;text-underline-offset:.2em;}
|
|
37
|
+
.b3-board-chip[data-mention]{color:var(--b3-board-mention);}
|
|
38
|
+
.b3-board-filters>.b3-board-chip:not([aria-pressed="true"]){color:var(--b3-color-muted);}
|
|
39
|
+
.b3-board-chip:hover{text-decoration:underline;}
|
|
40
|
+
.b3-board-chip[aria-pressed="true"]{font-weight:700;text-decoration:underline;text-decoration-thickness:2px;}
|
|
41
|
+
.b3-board-tags{display:flex;flex-wrap:wrap;column-gap:.625rem;min-inline-size:0;font-size:.75rem;}
|
|
42
|
+
.b3-board-tags>.b3-board-chip{min-block-size:calc(var(--b3-board-chip) - .5rem);}
|
|
43
|
+
/* Quiet text actions: Clear, Add details/subtask/column. */
|
|
44
|
+
.b3-board-ref{color:var(--b3-color-accent);text-decoration:none;text-underline-offset:.15em;overflow-wrap:anywhere;}
|
|
45
|
+
.b3-board-ref:hover{text-decoration:underline;}
|
|
46
|
+
.b3-board-ref>.b3-board-icon{display:inline;inline-size:.875em;block-size:.875em;margin-inline-end:.2em;vertical-align:-.125em;}
|
|
47
|
+
.b3-board-link{display:inline-flex;align-items:center;gap:.375rem;min-block-size:var(--b3-board-chip);padding:0 .375rem;border:0;
|
|
48
|
+
border-radius:var(--b3-radius-small,.375rem);background:none;color:var(--b3-color-muted);font:inherit;font-size:.8125rem;white-space:nowrap;}
|
|
49
|
+
.b3-board-link:hover{color:var(--b3-color-text);background:color-mix(in srgb,var(--b3-color-text) 6%,transparent);}
|
|
50
|
+
.b3-board-link>.b3-board-icon{inline-size:.875rem;block-size:.875rem;}
|
|
51
|
+
/* A height-bounded board scrolls each column's cards on their own; an unbounded one grows. */
|
|
52
|
+
.b3-board-columns{flex:1 1 auto;min-block-size:0;display:flex;align-items:flex-start;gap:var(--b3-space-3,.75rem);overflow-x:auto;
|
|
53
|
+
overscroll-behavior-inline:contain;scroll-snap-type:x proximity;padding-block-end:var(--b3-space-2,.5rem);}
|
|
54
|
+
.b3-board-column{flex:0 0 min(18rem,85%);min-inline-size:0;max-block-size:100%;scroll-snap-align:start;display:flex;flex-direction:column;
|
|
55
|
+
gap:var(--b3-space-2,.5rem);padding:0 var(--b3-space-2,.5rem) var(--b3-space-2,.5rem);border:1px solid var(--b3-board-line);
|
|
56
|
+
border-radius:var(--b3-radius-large,var(--b3-radius));background:color-mix(in srgb,var(--b3-color-text) 3%,var(--b3-color-canvas));overflow-wrap:break-word;}
|
|
57
|
+
.b3-board-column-header{flex:none;display:flex;align-items:center;gap:.375rem;min-block-size:var(--b3-board-hit);margin-inline:calc(-1 * var(--b3-space-2,.5rem));
|
|
58
|
+
padding:.25rem .375rem .25rem .625rem;border-block-end:1px solid var(--b3-board-line);touch-action:manipulation;}
|
|
59
|
+
.b3-board-column-name{flex:0 1 auto;min-inline-size:0;margin:0;padding:.25rem;font:inherit;font-size:.75rem;font-weight:700;letter-spacing:.06em;
|
|
60
|
+
text-transform:uppercase;text-align:start;background:none;border:0;color:inherit;border-radius:var(--b3-radius-small,.375rem);}
|
|
61
|
+
.b3-board-count{flex:none;min-inline-size:1.25rem;padding:0 .375rem;border-radius:.25rem;background:color-mix(in srgb,var(--b3-color-text) 8%,transparent);
|
|
62
|
+
color:var(--b3-color-muted);font-size:.6875rem;font-weight:600;line-height:1.5;text-align:center;font-variant-numeric:tabular-nums;}
|
|
63
|
+
.b3-board-add-card{margin-inline-start:auto;}
|
|
64
|
+
/* The card list is the column's scroller; its padding keeps focus rings and drop marks unclipped. */
|
|
65
|
+
.b3-board-cards{flex:0 1 auto;min-block-size:var(--b3-board-hit);overflow-y:auto;overscroll-behavior-block:contain;display:grid;
|
|
66
|
+
grid-template-columns:minmax(0,1fr);align-content:start;gap:var(--b3-space-2,.5rem);margin:-.25rem;padding:.25rem;list-style:none;}
|
|
67
|
+
.b3-board-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:.25rem;padding:.625rem .5rem .625rem .75rem;
|
|
68
|
+
border:1px solid var(--b3-board-line);border-radius:var(--b3-radius);background:var(--b3-color-surface);
|
|
69
|
+
box-shadow:0 1px 2px color-mix(in srgb,var(--b3-color-text) 6%,transparent);transition:box-shadow var(--b3-duration,.16s),border-color var(--b3-duration,.16s);
|
|
70
|
+
-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;}
|
|
71
|
+
.b3-board-card:focus-visible{outline:2px solid var(--b3-color-focus);outline-offset:1px;}
|
|
72
|
+
.b3-board-grip{position:absolute;inset-inline-start:.125rem;inset-block-start:.75rem;display:grid;color:var(--b3-color-muted);opacity:.6;}
|
|
73
|
+
.b3-board-card-head{position:relative;display:flex;align-items:flex-start;gap:.125rem;min-inline-size:0;}
|
|
74
|
+
.b3-board-tools{flex:none;display:flex;align-items:flex-start;gap:.125rem;}
|
|
75
|
+
.b3-board-title{flex:1;min-inline-size:0;margin:0;padding:.125rem 0;font:inherit;font-weight:600;line-height:1.45;text-align:start;overflow-wrap:break-word;
|
|
76
|
+
background:none;border:0;color:inherit;}
|
|
77
|
+
.b3-board-quiet{flex:none;display:inline-grid;place-items:center;min-inline-size:var(--b3-board-hit);min-block-size:var(--b3-board-hit);
|
|
78
|
+
margin-block:calc((1.45em + .25rem - var(--b3-board-hit)) / 2);padding:0;border:0;border-radius:var(--b3-radius-small,.375rem);
|
|
79
|
+
background:none;color:var(--b3-color-muted);font:inherit;line-height:1;}
|
|
80
|
+
.b3-board-quiet:hover{color:var(--b3-color-text);background:color-mix(in srgb,var(--b3-color-text) 6%,transparent);}
|
|
81
|
+
.b3-board-quiet>.b3-board-icon{inline-size:.9375rem;block-size:.9375rem;}
|
|
82
|
+
.b3-board-remove,.b3-board-remove:hover{color:var(--b3-color-danger);}
|
|
83
|
+
.b3-board-star[aria-pressed="true"]{color:var(--b3-board-star);}
|
|
84
|
+
.b3-board-star[aria-pressed="true"]>.b3-board-icon{fill:currentColor;}
|
|
85
|
+
.b3-board-star:disabled{opacity:1;background:none;}
|
|
86
|
+
/* Disclosure: chevron, subtask progress and (closed) the description's first line. */
|
|
87
|
+
.b3-board-toggle{justify-self:start;display:flex;align-items:center;gap:.375rem;min-inline-size:0;max-inline-size:100%;min-block-size:var(--b3-board-chip);
|
|
88
|
+
margin-inline-start:-.125rem;padding:0 .25rem 0 0;border:0;border-radius:var(--b3-radius-small,.375rem);background:none;color:var(--b3-color-muted);
|
|
89
|
+
font:inherit;font-size:.75rem;text-align:start;}
|
|
90
|
+
.b3-board-toggle:hover{color:var(--b3-color-text);}
|
|
91
|
+
.b3-board-toggle>.b3-board-icon{inline-size:.875rem;block-size:.875rem;transition:rotate var(--b3-duration,.16s);}
|
|
92
|
+
.b3-board-toggle[aria-expanded="true"]>.b3-board-icon{rotate:90deg;}
|
|
93
|
+
.b3-board-toggle:dir(rtl)>.b3-board-icon{scale:-1 1;}
|
|
94
|
+
.b3-board-toggle:dir(rtl)[aria-expanded="true"]>.b3-board-icon{rotate:-90deg;}
|
|
95
|
+
.b3-board-progress{flex:none;font-weight:600;font-variant-numeric:tabular-nums;}
|
|
96
|
+
.b3-board-progress[data-complete]{color:var(--b3-color-success);}
|
|
97
|
+
.b3-board-preview{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85;}
|
|
98
|
+
.b3-board-body{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem;padding-block-start:.125rem;}
|
|
99
|
+
.b3-board-description{margin:0;padding:.5rem .625rem;font:inherit;font-size:.8125rem;line-height:1.5;color:var(--b3-color-muted);white-space:pre-wrap;
|
|
100
|
+
overflow-wrap:break-word;text-align:start;background:var(--b3-board-soft);border:0;border-radius:var(--b3-radius-small,.375rem);}
|
|
101
|
+
.b3-board-subtasks{display:grid;grid-template-columns:minmax(0,1fr);margin:0;padding:0 0 0 .25rem;border-inline-start:2px solid var(--b3-board-line);list-style:none;}
|
|
102
|
+
.b3-board-subtask{display:flex;align-items:center;gap:.375rem;min-inline-size:0;font-size:.8125rem;}
|
|
103
|
+
.b3-board-subtask-grip{flex:none;align-self:stretch;display:grid;place-items:center;color:var(--b3-color-muted);opacity:.6;touch-action:none;}
|
|
104
|
+
.b3-board-subtask-grip>.b3-board-icon{inline-size:.75rem;block-size:.75rem;}
|
|
105
|
+
.b3-board-subtask>input{flex:none;margin:0;inline-size:1rem;block-size:1rem;accent-color:var(--b3-color-accent);}
|
|
106
|
+
.b3-board-subtask>.b3-board-title{padding:.25rem 0;font-weight:400;line-height:1.4;}
|
|
107
|
+
.b3-board-subtask>.b3-board-quiet{margin-block:calc((1.4em + .5rem - var(--b3-board-hit)) / 2);}
|
|
108
|
+
.b3-board-subtask>.b3-board-quiet>.b3-board-icon{inline-size:.8125rem;block-size:.8125rem;}
|
|
109
|
+
.b3-board-subtask[data-done] .b3-board-title{text-decoration:line-through;color:var(--b3-color-muted);}
|
|
110
|
+
.b3-board-actions{display:flex;flex-wrap:wrap;gap:0 .5rem;margin-inline-start:-.375rem;}
|
|
111
|
+
.b3-board-columns>.b3-board-add{flex:none;min-block-size:var(--b3-board-hit);}
|
|
112
|
+
.b3-board-quiet[data-b3-armed]{inline-size:auto;padding-inline:.5rem;color:var(--b3-color-danger);font-size:.8125rem;}
|
|
113
|
+
.b3-board-editor{-webkit-user-select:text;user-select:text;inline-size:100%;min-inline-size:0;min-block-size:2.25rem;field-sizing:content;resize:none;font:inherit;line-height:1.45;
|
|
114
|
+
padding:.25rem .375rem;border:1px solid var(--b3-color-focus);border-radius:var(--b3-radius-small,.375rem);background:var(--b3-color-canvas);color:inherit;}
|
|
115
|
+
.b3-board-card-head>.b3-board-editor{font-weight:600;}
|
|
116
|
+
/* iOS zooms the page into a field whose text is under 16px. */
|
|
117
|
+
@media (pointer:coarse){.b3-board-editor{font-size:max(1em,16px);}}
|
|
118
|
+
@media (hover:hover){
|
|
119
|
+
.b3-board-card{padding-inline-start:1.25rem;}
|
|
120
|
+
/* The tools overlay the title's end instead of reserving room for buttons that are not shown; a starred
|
|
121
|
+
title keeps room for its star, which always shows. */
|
|
122
|
+
.b3-board-card-head>.b3-board-tools{position:absolute;inset-block-start:0;inset-inline-end:0;padding-inline-start:.75rem;
|
|
123
|
+
background:linear-gradient(to var(--b3-board-fade,right),transparent,var(--b3-color-surface) .75rem);}
|
|
124
|
+
.b3-board-card-head:dir(rtl)>.b3-board-tools{--b3-board-fade:left;}
|
|
125
|
+
.b3-board-card[data-starred] .b3-board-card-head{padding-inline-end:var(--b3-board-hit);}
|
|
126
|
+
.b3-board-card:not(:hover,:focus-within) .b3-board-card-head>.b3-board-tools{background:none;}
|
|
127
|
+
.b3-board-card:hover{border-color:color-mix(in srgb,var(--b3-color-accent) 30%,var(--b3-color-border));box-shadow:0 4px 14px color-mix(in srgb,var(--b3-color-text) 12%,transparent);}
|
|
128
|
+
.b3-board-card:not(:hover,:focus-within) :is(.b3-board-tools>.b3-board-remove:not([data-b3-armed]),.b3-board-star:not([aria-pressed="true"]),.b3-board-details,.b3-board-grip),
|
|
129
|
+
.b3-board-subtask:not(:hover,:focus-within) :is(.b3-board-remove,.b3-board-subtask-grip),
|
|
130
|
+
.b3-board-column-header:not(:hover,:focus-within) .b3-board-remove:not([data-b3-armed]){opacity:0;}
|
|
131
|
+
}
|
|
132
|
+
@media (hover:none){.b3-board-grip{display:none;}}
|
|
133
|
+
b3-board[compact] :is(.b3-board-body,.b3-board-toggle,.b3-board-details){display:none;}
|
|
134
|
+
/* Holds a touch keyboard open between a tap and the editor it renders (16px: iOS zooms into smaller text). */
|
|
135
|
+
.b3-board-holder{position:fixed;inset-block-start:0;inset-inline-start:0;inline-size:1px;block-size:1px;padding:0;border:0;opacity:0;font-size:16px;pointer-events:none;}
|
|
136
|
+
/* Compact is a scan view: narrower columns (two side by side on a phone) with smaller card tools. */
|
|
137
|
+
b3-board[compact] .b3-board-column{flex-basis:min(15rem,calc(50% - var(--b3-space-3,.75rem) / 2));--b3-board-hit:var(--b3-board-chip);}
|
|
138
|
+
b3-board[compact] .b3-board-card{padding-inline-end:.25rem;}
|
|
139
|
+
b3-board[compact] .b3-board-column-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
|
140
|
+
/* On touch (no hover to reveal them), compact keeps its narrow columns for names and titles: the delete buttons and an
|
|
141
|
+
unstarred star give way — they are in the full view, one toggle away. */
|
|
142
|
+
@media (hover:none){
|
|
143
|
+
b3-board[compact] :is(.b3-board-remove:not([data-b3-armed]),.b3-board-star:not([aria-pressed="true"])){display:none;}
|
|
144
|
+
b3-board[compact] .b3-board-column-header{gap:.25rem;padding-inline:.375rem .25rem;}
|
|
145
|
+
b3-board[compact] .b3-board-column-name{padding-inline:.125rem;}
|
|
146
|
+
}
|
|
147
|
+
.b3-board-card[data-b3-dragging],.b3-board-column[data-b3-dragging],.b3-board-subtask[data-b3-dragging]{opacity:.4;}
|
|
148
|
+
.b3-board-ghost{position:fixed;z-index:1000;margin:0;pointer-events:none;box-shadow:var(--b3-shadow-raised,0 8px 24px #0003);
|
|
149
|
+
transform-origin:top left;rotate:1.5deg;list-style:none;}
|
|
150
|
+
.b3-board-subtask.b3-board-ghost{background:var(--b3-color-surface);border-radius:var(--b3-radius-small,.375rem);}
|
|
151
|
+
b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent);}
|
|
152
|
+
.b3-board-column[data-b3-drop="before"]{box-shadow:-3px 0 0 -1px var(--b3-color-accent);}
|
|
153
|
+
:is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
|
|
154
|
+
.b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
|
|
155
|
+
@media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
|
|
156
|
+
`,re=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,Wn=re('<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"/>'),We=re('<path d="M5 12h14M12 5v14"/>'),Yt=re('<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"/>'),Jo=re('<path d="m9 18 6-6-6-6"/>'),Yo=re('<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"/>'),Go=re('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),Xo=re('<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"/>'),Je=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
|
|
157
|
+
<textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
|
|
158
|
+
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,Zo=`
|
|
159
|
+
<div class="b3-board-filters" b3x-bind:hidden="!tokens().length" role="group" aria-label="Filter">
|
|
160
|
+
<span class="b3-board-caption" aria-hidden="true">Filter</span>
|
|
161
|
+
<template b3x-for="token in tokens()" b3x-bind:key="token">
|
|
162
|
+
<button type="button" class="b3-board-chip" b3x-bind:data-mention="mention(token)" b3x-bind:aria-pressed="pressed(token)" b3x-on:click="toggleFilter(token)" b3x-text="token"></button>
|
|
163
|
+
</template>
|
|
164
|
+
<button type="button" class="b3-board-link" b3x-show="filter.length" b3x-on:click="setFilter([])">Clear</button>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="b3-board-columns">
|
|
167
|
+
<template b3x-for="column in columns" b3x-bind:key="column.id">
|
|
168
|
+
<section class="b3-board-column" b3x-bind:data-column="column.id" b3x-bind:data-kind="column.kind || null" b3x-bind:aria-label="column.name">
|
|
169
|
+
<header class="b3-board-column-header">
|
|
170
|
+
${Je("name","column.id",!1)}
|
|
171
|
+
<button type="button" class="b3-board-column-name" b3x-show="!isEditing('name', column.id)"
|
|
172
|
+
b3x-on:click="edit('name', column.id, column.name)" b3x-on:keydown="keyColumn($event, column)" b3x-text="column.name || 'Untitled'"></button>
|
|
173
|
+
<span class="b3-board-count" b3x-text="count(column)"></span>
|
|
174
|
+
<button type="button" class="b3-board-quiet b3-board-add-card" b3x-show="!readonly" b3x-bind:aria-label="'Add card to ' + (column.name || 'Untitled')"
|
|
175
|
+
b3x-on:click="addCard(column)">${We}</button>
|
|
176
|
+
<button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" b3x-bind:aria-label="'Delete column ' + (column.name || 'Untitled')"
|
|
177
|
+
b3x-on:click="removeColumn(column)">${Yt}</button>
|
|
178
|
+
</header>
|
|
179
|
+
<ol class="b3-board-cards">
|
|
180
|
+
<template b3x-for="card in visible(column)" b3x-bind:key="card.id">
|
|
181
|
+
<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)">
|
|
182
|
+
<span class="b3-board-grip" b3x-show="!readonly">${Wn}</span>
|
|
183
|
+
<div class="b3-board-card-head">
|
|
184
|
+
${Je("title","card.id")}
|
|
185
|
+
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
|
|
186
|
+
b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
|
|
187
|
+
<span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
|
|
188
|
+
<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)"
|
|
189
|
+
b3x-on:click="addDetails(card)">${Go}</button>
|
|
190
|
+
<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)"
|
|
191
|
+
b3x-on:click="removeCard(column, card)">${Yt}</button>
|
|
192
|
+
<button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
|
|
193
|
+
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${Xo}</button>
|
|
194
|
+
</span>
|
|
195
|
+
</div>
|
|
196
|
+
<div class="b3-board-tags" b3x-show="tokensOf(card).length">
|
|
197
|
+
<template b3x-for="token in tokensOf(card)" b3x-bind:key="token">
|
|
198
|
+
<button type="button" class="b3-board-chip" b3x-bind:data-mention="mention(token)" b3x-bind:aria-pressed="pressed(token)" b3x-on:click="toggleFilter(token)" b3x-text="token"></button>
|
|
199
|
+
</template>
|
|
200
|
+
</div>
|
|
201
|
+
<button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
|
|
202
|
+
b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
|
|
203
|
+
${Jo}
|
|
204
|
+
<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>
|
|
205
|
+
<span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
|
|
206
|
+
<span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length">Hide details</span>
|
|
207
|
+
</button>
|
|
208
|
+
<template b3x-if="isOpen(card)">
|
|
209
|
+
<div class="b3-board-body">
|
|
210
|
+
${Je("description","card.id")}
|
|
211
|
+
<div class="b3-board-description" role="button" tabindex="0" b3x-show="card.description && !isEditing('description', card.id)"
|
|
212
|
+
b3x-on:click="edit('description', card.id, card.description)" b3x-on:keydown="keyText($event, 'description', card.id, card.description)"
|
|
213
|
+
b3x-effect="rich($el, card.description)"></div>
|
|
214
|
+
<ul class="b3-board-subtasks" b3x-show="subtasksOf(card).length">
|
|
215
|
+
<template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
|
|
216
|
+
<li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
|
|
217
|
+
<span class="b3-board-subtask-grip" b3x-show="!readonly">${Wn}</span>
|
|
218
|
+
<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)">
|
|
219
|
+
${Je("subtask","sub.id",!1)}
|
|
220
|
+
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
|
|
221
|
+
b3x-on:click="edit('subtask', sub.id, sub.title)" b3x-on:keydown="keySubtask($event, card, sub)" b3x-effect="rich($el, sub.title)"></span>
|
|
222
|
+
<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)">${Yt}</button>
|
|
223
|
+
</li>
|
|
224
|
+
</template>
|
|
225
|
+
</ul>
|
|
226
|
+
<div class="b3-board-actions" b3x-show="!readonly">
|
|
227
|
+
<button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${We}<span>Add details</span></button>
|
|
228
|
+
<button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${We}<span>Add subtask</span></button>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
</template>
|
|
232
|
+
</li>
|
|
233
|
+
</template>
|
|
234
|
+
</ol>
|
|
235
|
+
</section>
|
|
236
|
+
</template>
|
|
237
|
+
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${We}<span>Add column</span></button>
|
|
238
|
+
</div>
|
|
239
|
+
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class Gn extends Xt{static observedAttributes=["readonly"];#r=null;#e=null;#o=null;#a=null;#u=!1;#i=null;#l=null;#t=null;#d=!1;get columns(){let e=qn(this.#e?.columns??this.#o??[]),t=this.#e?.editing;if(t?.fresh)Kn(e,t);return e}set columns(e){let t=Fn(qn(e));if(!this.#e){this.#o=t;return}this.#n();let r=this.#e;if(r.columns=t,r.editing&&!this.#s(r.editing.id))r.editing=null}get filter(){return[...this.#e?.filter??this.#a??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e)this.#e.filter=t;else this.#a=t}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","readonly"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#r&&e.readyState==="loading"){if(!this.#u)this.#u=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#u=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(er(e,Vo,Wo),zn(),!this.#r){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#o;if(!r&&t)try{r=Fn(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#r=e.createElement("div"),this.#r.className="b3-board-ui",this.append(this.#r),this.#e=jn(this.#r,Zo,this.#x(r??[],this.#a??[])),this.#o=this.#a=null}else if(this.#r.parentNode!==this)this.append(this.#r);this.#l=new MutationObserver(()=>{if(this.#r&&this.#r.parentNode!==this)this.append(this.#r)}),this.#l.observe(this,{childList:!0}),this.#_(),Qt(this,this.#i.signal,{role:"region"})}disconnectedCallback(){this.#n(),this.#i?.abort(),this.#i=null,this.#l?.disconnect(),this.#l=null}attributeChangedCallback(){if(!this.#e)return;if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#n(),this.#e.editing=null}#s(e){for(let t of this.#e?.columns??[]){if(y(t.id,e))return t;for(let r of t.cards)if(y(r.id,e)||C(r).some((n)=>y(n.id,e)))return r}return null}#c(e){this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}#x(e,t){let r=this,n=(s)=>this.#c(s),i=(s)=>{for(let a of o.columns){let l=a.cards.findIndex((d)=>y(d.id,s));if(l>=0)return{column:a,index:l,card:a.cards[l]}}return null},o=$n({columns:e,filter:t,editing:null,announcement:"",readonly:r.readonly,viewed:{},tokensOf:Wt,subtasksOf:C,label(s){let a=String(s??"");return a.replace(Ho,"").trim()||a},pressed(s){return String(o.filter.includes(s))},mention(s){return s.startsWith("@")?"":null},starred(s){return String(!!s.starred)},hasDetails(s){return!!(s.description||C(s).length)},complete(s){let a=C(s).length;return a>0&&o.done(s)===a},preview(s){return Vn(String(s.description??"").split(`
|
|
240
|
+
`).find((a)=>a.trim())?.trim()??"")},plain(s){return Vn(o.label(s))},rich(s,a){Ko(s,String(a??""))},keyText(s,a,l,d){if(s.target!==s.currentTarget||s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),o.edit(a,l,d)},isOpen(s){let a=o.viewed[String(s.id)];return o.readonly&&a!==void 0?a:!!s.expanded},expanded(s){return String(o.isOpen(s))},isEditing(s,a){return!!o.editing&&o.editing.field===s&&o.editing.id===a},focusEditor(s){queueMicrotask(()=>r.#v(s))},blurEditor(s,a){if(o.isEditing(s,a))o.commit()},tokens(){let s=new Set;for(let a of o.columns)for(let l of a.cards)for(let d of Wt(l))s.add(d);return[...s].sort()},visible(s){if(!o.filter.length)return s.cards;let a=o.editing&&r.#s(o.editing.id);return s.cards.filter((l)=>{if(l===a)return!0;let d=Wt(l);return o.filter.every((c)=>d.includes(c))})},count(s){let a=o.visible(s).length;return a===s.cards.length?String(a):`${a}/${s.cards.length}`},done(s){return C(s).filter((a)=>a.done).length},disclosable(s){return!!(s.description||C(s).length||!o.readonly)},toggleFilter(s){o.filter=o.filter.includes(s)?o.filter.filter((a)=>a!==s):[...o.filter,s]},setFilter(s){o.filter=s},toggleStar(s){let a=i(s.id);if(o.readonly||!a)return;if(s.starred)delete s.starred;else s.starred=!0;a.column.cards=Jn(a.column.cards);let l=!!s.starred;o.announcement=`${s.title??""} ${l?"starred":"unstarred"}`,n({type:"star",card:s.id,starred:l}),r.#p(s.id)},toggle(s){if(o.readonly){o.viewed={...o.viewed,[String(s.id)]:!o.isOpen(s)};return}s.expanded=!s.expanded,n({type:"toggle",card:s.id,expanded:s.expanded})},edit(s,a,l,d=!1,c=!1){if(o.readonly||r.#t?.started)return;if(o.editing&&!o.isEditing(s,a))o.commit();o.editing={field:s,id:a,draft:l??"",fresh:d,opened:c},r.#y()},addDetails(s){if(o.readonly)return;let a=!s.expanded;s.expanded=!0,o.edit("description",s.id,String(s.description??""),!1,a)},keyEditor(s,a){if(s.stopPropagation(),s.key==="Escape")s.preventDefault(),o.cancel();else if(s.key==="Enter"&&!(a&&s.shiftKey)&&!s.isComposing)s.preventDefault(),o.commit(!0)},cancel(){let s=o.editing;if(o.editing=null,s?.fresh)o.discard(s);if(s?.opened)o.close(s);r.#h(s)},close(s){let a=r.#s(s.id);if(a&&!o.hasDetails(a))a.expanded=!1},commit(s=!1){let a=o.editing;if(!a)return;if(o.editing=null,o.readonly)return;let l=a.field==="description"?a.draft.trim():a.draft.replace(/\s+/g," ").trim(),d=r.#s(a.id);if(!d)return;if(!l&&a.fresh)return o.discard(a);if(!l&&a.opened)o.close(a);let c=null;if(a.field==="name"){let u=d;if(l&&l!==u.name)u.name=l,c={type:"edit",column:u.id,field:"name"};if(a.fresh)c={type:"add",column:u.id}}else if(a.field==="subtask"){let u=d,f=C(u).find((g)=>y(g.id,a.id));if(!l)return o.removeSubtask(u,f);if(l!==f.title)f.title=l,c={type:"edit",card:u.id,field:"subtask",subtask:f.id};if(a.fresh)c={type:"subtask",card:u.id,subtask:f.id,op:"add"}}else{let u=d,f=a.field;if((l||f==="description")&&l!==(u[f]??""))u[f]=l,c={type:"edit",card:u.id,field:f};if(a.fresh)c={type:"add",card:u.id,column:i(u.id).column.id}}if(c)n(c);if(a.fresh&&a.field==="subtask"&&s)o.addSubtask(d);else if(a.fresh&&a.field==="title"&&s&&!r.hasAttribute("compact"))o.addDetails(d);else r.#h(a)},discard(s){Kn(o.columns,s)},settle(){if(o.editing)o.commit()},addCard(s){if(o.readonly)return;o.settle();let a={id:Ye(),title:""};s.cards.push(a),o.edit("title",a.id,"",!0)},addColumn(){if(o.readonly)return;o.settle();let s={id:Ye(),name:"",cards:[]};o.columns.push(s),o.edit("name",s.id,"",!0)},addSubtask(s){if(o.readonly)return;o.settle();let a={id:Ye(),title:"",done:!1};if(s.expanded=!0,!Array.isArray(s.subtasks))s.subtasks=[];s.subtasks.push(a),o.edit("subtask",a.id,"",!0)},removeCard(s,a){if(o.readonly)return;s.cards=s.cards.filter((l)=>l!==a),n({type:"remove",card:a.id,column:s.id})},removeColumn(s){if(o.readonly)return;o.columns=o.columns.filter((a)=>a!==s),n({type:"remove",column:s.id})},removeSubtask(s,a){if(o.readonly)return;s.subtasks=C(s).filter((l)=>l!==a),n({type:"subtask",card:s.id,subtask:a.id,op:"remove"})},check(s,a,l){if(o.readonly)return;a.done=l,n({type:"check",card:s.id,subtask:a.id,done:l})},keyCard(s,a){if(s.target!==s.currentTarget)return;if(s.key==="Enter")return s.preventDefault(),o.edit("title",a.id,a.title);if(!s.altKey||o.readonly)return;let l=i(a.id);if(!l)return;let d=getComputedStyle(r).direction==="rtl",c={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[s.key];if(!c)return;if(s.preventDefault(),s.key==="ArrowUp"||s.key==="ArrowDown"){let f=o.visible(l.column),g=f[f.indexOf(l.card)+c];if(g&&!g.starred===!a.starred)r.moveCard(a.id,l.column.id,l.column.cards.indexOf(g));return}let u=o.columns[o.columns.indexOf(l.column)+c];if(u)r.moveCard(a.id,u.id,Math.min(l.index,u.cards.length))},keySubtask(s,a,l){o.keyText(s,"subtask",l.id,l.title);let d=s.key==="ArrowUp"?-1:s.key==="ArrowDown"?1:0;if(!s.altKey||!d||o.readonly)return;s.preventDefault(),s.stopPropagation(),r.#f(a,l.id,C(a).indexOf(l)+d)},keyColumn(s,a){if(!s.altKey||o.readonly)return;let l=getComputedStyle(r).direction==="rtl",d=s.key==="ArrowLeft"?l?1:-1:s.key==="ArrowRight"?l?-1:1:0;if(!d)return;s.preventDefault();let c=o.columns.indexOf(a)+d;if(c>=0&&c<o.columns.length)r.moveColumn(a.id,c)}});return o}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>y(f.id,e))),o=n.columns.find((u)=>y(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>y(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,d=Math.max(0,Math.min(o.cards.length,r)),c=a.starred?Math.min(d,l):Math.max(d,l);if(o.cards.splice(c,0,a),i===o&&s===c)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${c+1} of ${o.cards.length}`,this.#c({type:"move",card:a.id,from:i.id,to:o.id,index:c}),this.#p(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>y(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.#c({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=C(e),o=i.findIndex((l)=>y(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.#c({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}#v(e){if(!e.isConnected)return;e.focus({preventScroll:!0}),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?.visualViewport;if(!n)return;let i=new AbortController;n.addEventListener("resize",()=>{if(i.abort(),this.ownerDocument.activeElement===e)r()},{signal:i.signal}),setTimeout(()=>i.abort(),1000)}#y(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#r?.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.#r?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#p(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#h(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})})}#_(){this.#i?.abort(),this.#i=new AbortController;let e=this.#i.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(n)=>this.#E(n),{signal:e}),t.addEventListener("pointermove",(n)=>this.#k(n),{signal:e}),t.addEventListener("pointerup",(n)=>this.#A(n),{signal:e}),t.addEventListener("pointercancel",(n)=>{if(n.pointerId===this.#t?.pointerId)this.#n()},{signal:e}),t.addEventListener("keydown",(n)=>{if(n.key==="Escape"&&this.#t?.started)n.preventDefault(),this.#n()},{signal:e}),this.addEventListener("touchmove",(n)=>{if(this.#t?.started)n.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(n)=>{if(this.#t)n.preventDefault()},{signal:e}),this.addEventListener("click",(n)=>{if(!this.#d)return;this.#d=!1,n.preventDefault(),n.stopImmediatePropagation()},{signal:e,capture:!0});let r=(n)=>this.#w(n);this.addEventListener("click",r,{signal:e,capture:!0}),this.addEventListener("auxclick",(n)=>{if(n.button===1)r(n)},{signal:e,capture:!0})}#w(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(l)=>t.closest(l),n=this.#e?.columns.find((l)=>y(l.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((l)=>y(l.id,r("[data-card]")?.dataset.card)),o=i&&C(i).find((l)=>y(l.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;if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#E(e){if(this.readonly||this.#t||!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.#t=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#t===n)this.#b(e.clientX,e.clientY)},zo)}#b(e,t){let r=this.#t;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.#r.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#t!==r)return;this.#C(r.px,r.py),this.#S(this.#m(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#k(e){let t=this.#t;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.#n();return}if(r<5)return;this.#b(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}#A(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#n();let r=this.#m(e.clientX,e.clientY);if(this.#n(),this.#d=!0,setTimeout(()=>{this.#d=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>y(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((d)=>y(d.id,t.id))),s=r.before?i.cards.findIndex((l)=>y(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>y(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.#s(t.card);if(!i)return;let o=C(i),s=r.before?o.findIndex((a)=>y(a.id,r.before)):o.length;if(o.findIndex((a)=>y(a.id,t.id))<s)s-=1;this.#f(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>y(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>y(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#m(e,t){let r=this.#t,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#g(e,n);if(!l)return null;let d=l.querySelector(".b3-board-cards"),c=[...d.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=c.find((g)=>{let m=g.getBoundingClientRect();return t<m.top+m.height/2}),f=(g)=>!!(g!=null&&this.#s(g)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=c.find((g)=>!f(g.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:d}}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 f=u.getBoundingClientRect();return t<f.top+f.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 d=l.getBoundingClientRect();return s?e>d.left+d.width/2:e<d.left+d.width/2})?.dataset.column??null,list:i}}#S(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#t.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#g(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})}#C(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.#t?.kind==="card"?this.#g(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))}#n(){let e=this.#t;if(!e)return;this.#t=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")}}Zt("b3-board",Gn);export{Gn as B3Board};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <b3-date-picker> — a month grid as a plain custom element.
|
|
3
|
+
*
|
|
4
|
+
* Light DOM only: no shadow root, so bare.css tokens, themes and author styles reach inside.
|
|
5
|
+
* Opt-in entry (`@livx.cc/bare-v3/components/date-picker`), separate from the core components bundle.
|
|
6
|
+
*
|
|
7
|
+
* The failure this exists to end is DATE MATH, not gestures. Every date here is a LOCAL calendar
|
|
8
|
+
* day, never a UTC instant: `toIso` reads getFullYear/getMonth/getDate (never toISOString, which
|
|
9
|
+
* is the UTC day and is wrong for 14 of 24 hours in Kiritimati and 11 of 24 in Niue), and `parse`
|
|
10
|
+
* builds `new Date(y, m - 1, d)` (never `new Date('2026-09-18')`, which the spec parses as UTC
|
|
11
|
+
* midnight and which therefore reads back as the 17th anywhere west of Greenwich).
|
|
12
|
+
*/
|
|
13
|
+
import { Base } from './base';
|
|
14
|
+
/** The LOCAL calendar day of an instant, as YYYY-MM-DD. */
|
|
15
|
+
export declare function toIso(date: Date): string;
|
|
16
|
+
/** YYYY-MM-DD (or YYYY-MM) as LOCAL midnight. Returns null for anything else. */
|
|
17
|
+
export declare function parse(value: string | null | undefined): Date | null;
|
|
18
|
+
/** Today's LOCAL calendar day. */
|
|
19
|
+
export declare const today: () => string;
|
|
20
|
+
/**
|
|
21
|
+
* Add `count` days to a local calendar day.
|
|
22
|
+
* Arithmetic goes through the local Date so a DST day (23h or 25h long) still advances by one.
|
|
23
|
+
*/
|
|
24
|
+
export declare function addDays(iso: string, count: number): string;
|
|
25
|
+
/** Add `count` months, clamping the day into the shorter target month (Jan 31 + 1 -> Feb 28). */
|
|
26
|
+
export declare function addMonths(iso: string, count: number): string;
|
|
27
|
+
/** Days in a local month; `month` is 0-based. */
|
|
28
|
+
export declare const daysInMonth: (year: number, month: number) => number;
|
|
29
|
+
export declare class B3DatePicker extends Base {
|
|
30
|
+
#private;
|
|
31
|
+
static observedAttributes: string[];
|
|
32
|
+
get value(): string;
|
|
33
|
+
set value(next: string | null);
|
|
34
|
+
/** The visible month, YYYY-MM. Falls back to the selection's month, then to today's. */
|
|
35
|
+
get month(): string;
|
|
36
|
+
set month(next: string | null);
|
|
37
|
+
get min(): string;
|
|
38
|
+
set min(next: string | null);
|
|
39
|
+
get max(): string;
|
|
40
|
+
set max(next: string | null);
|
|
41
|
+
/** 0 = Sunday. Anything outside 0..6 is not a week start; treat it as unset. */
|
|
42
|
+
get weekStart(): number;
|
|
43
|
+
set weekStart(next: number);
|
|
44
|
+
get locale(): string | undefined;
|
|
45
|
+
set locale(next: string | null | undefined);
|
|
46
|
+
/** Whether a LOCAL calendar day is selectable. */
|
|
47
|
+
isDisabled(iso: string): boolean;
|
|
48
|
+
connectedCallback(): void;
|
|
49
|
+
disconnectedCallback(): void;
|
|
50
|
+
attributeChangedCallback(name: string, previous: string | null, next: string | null): void;
|
|
51
|
+
/** Select a day. A disabled or malformed day is refused and reported by the return value. */
|
|
52
|
+
select(iso: string): boolean;
|
|
53
|
+
/** Show a month (YYYY-MM or YYYY-MM-DD) without changing the selection. */
|
|
54
|
+
goTo(month: string): boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Register the element, optionally under another tag name.
|
|
58
|
+
* Idempotent: a page may load this entry more than once behind a bundler.
|
|
59
|
+
*/
|
|
60
|
+
export declare function define(name?: string): CustomElementConstructor | null;
|