lula2 0.6.4 → 0.6.5-nightly.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +3 -3
  2. package/dist/_app/immutable/assets/0.gNk4bE5Z.css +1 -0
  3. package/dist/_app/immutable/chunks/{DBdrJbLi.js → 6cSSDZaX.js} +1 -1
  4. package/dist/_app/immutable/chunks/{BaV6jU6m.js → BDFhLgJd.js} +1 -1
  5. package/dist/_app/immutable/chunks/{_8PUdHCK.js → BZU_Nz1O.js} +1 -1
  6. package/dist/_app/immutable/chunks/BnySH2DD.js +2 -0
  7. package/dist/_app/immutable/chunks/CByqgj46.js +3 -0
  8. package/dist/_app/immutable/chunks/{WNo48c2U.js → CF_cm2F-.js} +1 -1
  9. package/dist/_app/immutable/chunks/{DG4ZcLIc.js → CIRBatwX.js} +1 -1
  10. package/dist/_app/immutable/chunks/{sF1amBpw.js → CfxzrOg_.js} +1 -1
  11. package/dist/_app/immutable/chunks/{CynYS-Ma.js → ipJF3Ffx.js} +1 -1
  12. package/dist/_app/immutable/entry/{app.VdrAeFMF.js → app.CLMFUJFD.js} +2 -2
  13. package/dist/_app/immutable/entry/start.zJmCdi6K.js +1 -0
  14. package/dist/_app/immutable/nodes/0.B9fDmVAW.js +2 -0
  15. package/dist/_app/immutable/nodes/{1.Dt4-pegp.js → 1.SeLtwnaX.js} +1 -1
  16. package/dist/_app/immutable/nodes/{2.CgJgF2F1.js → 2.CRxss7kL.js} +1 -1
  17. package/dist/_app/immutable/nodes/{3.DsDKmoyP.js → 3.MV4AZQAx.js} +1 -1
  18. package/dist/_app/immutable/nodes/{4.E9uJ4Np6.js → 4.Dpov0x5l.js} +1 -1
  19. package/dist/_app/version.json +1 -1
  20. package/dist/cli/commands/ui.js +49 -7
  21. package/dist/cli/server/index.js +49 -7
  22. package/dist/cli/server/server.js +49 -7
  23. package/dist/cli/server/serverState.js +37 -4
  24. package/dist/cli/server/spreadsheetRoutes.js +12 -3
  25. package/dist/cli/server/websocketServer.js +49 -7
  26. package/dist/index.html +10 -10
  27. package/dist/index.js +49 -7
  28. package/package.json +22 -23
  29. package/src/lib/components/dialogs/ExportColumnDialog.svelte +7 -5
  30. package/src/routes/+layout.svelte +1 -1
  31. package/dist/_app/immutable/assets/0.CJjXKESY.css +0 -1
  32. package/dist/_app/immutable/chunks/DmBJsPtc.js +0 -2
  33. package/dist/_app/immutable/chunks/DztCq-9O.js +0 -3
  34. package/dist/_app/immutable/entry/start.BD6MZ_XC.js +0 -1
  35. package/dist/_app/immutable/nodes/0.D3GkfY8V.js +0 -2
@@ -1,3 +0,0 @@
1
- import{a$ as Ae,o as $e,g as U,h as L,d as P,bi as yt,ai as De}from"./DmBJsPtc.js";class le{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Re extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function _e({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const At=new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&Y.delete(Te(e)),Rt(e,t));const Y=new Map;function Tt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function It(e,t,n){if(Y.size>0){const r=Te(e,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(t,n)}function Te(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Et(...a)}"]`}return r}const Ut=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Lt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${xt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return me(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return me(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const d=Ut.exec(c),[,p,u,l,h]=d;return t.push({name:l,matcher:h,optional:!!p,rest:!!u,chained:u?f===1&&i[0]==="":!1}),u?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return me(c)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function xt(e){return e.slice(1).split("/").filter(Pt)}function Ct(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let f=a[o-i];if(c.chained&&c.rest&&i&&(f=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&c.chained&&(i=0),!d&&!p&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function me(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,f,d]])=>{const{pattern:p,params:u}=Lt(o),l={id:o,exec:h=>{const w=p.exec(h);if(w)return Ct(w,u,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...f||[]].map(i),leaf:s(c)};return l.errors.length=l.layouts.length=Math.max(l.errors.length,l.layouts.length),l});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Je(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Be(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const I=globalThis.__sveltekit_t1ry3i?.base??"",Nt=globalThis.__sveltekit_t1ry3i?.assets??I??"",jt="1760478281579",ze="sveltekit:snapshot",Xe="sveltekit:scroll",Ze="sveltekit:states",$t="sveltekit:pageurl",F="sveltekit:history",W="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function fe(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Fe={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function te(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=Qe(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Fe[r??"off"],preload_data:Fe[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ve(e){const t=Ae(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const tt={v:()=>{}};function Dt(){const{set:e,subscribe:t}=Ae(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Nt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==jt;return i&&(e(!0),tt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Z||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function An(e){}function Bt(e){const t=Vt(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const Ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Vt(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=Ft.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Mt=-1,qt=-2,Gt=-3,Yt=-4,Ht=-5,Kt=-6;function Wt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Mt)return;if(s===Gt)return NaN;if(s===Yt)return 1/0;if(s===Ht)return-1/0;if(s===Kt)return-0;if(i||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=t?.[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let l=1;l<o.length;l+=1)d.add(a(o[l]));break;case"Map":const p=new Map;r[s]=p;for(let l=1;l<o.length;l+=2)p.set(a(o[l]),a(o[l+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const u=Object.create(null);r[s]=u;for(let l=1;l<o.length;l+=2)u[o[l]]=a(o[l+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const l=globalThis[c],h=new l(a(o[1]));r[s]=o[2]!==void 0?h.subarray(o[2],o[3]):h;break}case"ArrayBuffer":{const l=o[1],h=Bt(l);r[s]=h;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const l=c.slice(9);r[s]=Temporal[l].from(o[1]);break}case"URL":{const l=new URL(o[1]);r[s]=l;break}case"URLSearchParams":{const l=new URLSearchParams(o[1]);r[s]=l;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let f=0;f<o.length;f+=1){const d=o[f];d!==qt&&(c[f]=a(d))}}else{const c={};r[s]=c;for(const f in o){if(f==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const d=o[f];c[f]=a(d)}}return r[s]}return a(0)}const nt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...nt];const Jt=new Set([...nt]);[...Jt];function zt(e){return e.filter(t=>t!=null)}const Xt="x-sveltekit-invalidated",Zt="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Re?e.status:500}function Qt(e){return e instanceof Re?e.text:"Internal Error"}let R,J,ye;const en=$e.toString().includes("$$")||/function \w+\(\) \{\}/.test($e.toString());en?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ye={current:!1}):(R=new class{#e=U({});get data(){return L(this.#e)}set data(t){P(this.#e,t)}#t=U(null);get form(){return L(this.#t)}set form(t){P(this.#t,t)}#n=U(null);get error(){return L(this.#n)}set error(t){P(this.#n,t)}#r=U({});get params(){return L(this.#r)}set params(t){P(this.#r,t)}#a=U({id:null});get route(){return L(this.#a)}set route(t){P(this.#a,t)}#o=U({});get state(){return L(this.#o)}set state(t){P(this.#o,t)}#s=U(-1);get status(){return L(this.#s)}set status(t){P(this.#s,t)}#i=U(new URL("https://example.com"));get url(){return L(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=U(null);get current(){return L(this.#e)}set current(t){P(this.#e,t)}},ye=new class{#e=U(!1);get current(){return L(this.#e)}set current(t){P(this.#e,t)}},tt.v=()=>ye.current=!0);function tn(e){Object.assign(R,e)}const nn="/__data.json",rn=".html__data.json";function an(e){return e.endsWith(".html")?e.replace(/\.html$/,rn):e.replace(/\/$/,"")+nn}const Me={spanContext(){return on},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},on={traceId:"",spanId:"",traceFlags:0},{tick:sn}=yt,cn=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Je(Xe)??{},z=Je(ze)??{},N={url:Ve({}),page:Ve({}),navigating:Ae(null),updated:Dt()};function Ue(e){D[e]=fe()}function ln(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function q(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function rt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(I||"/");e&&await e.update()}}function qe(){}let Le,be,re,x,ke,k;const ae=[],oe=[];let C=null;const ee=new Map,at=new Set,fn=new Set,H=new Set;let y={branch:[],error:null,url:null},Pe=!1,se=!1,Ge=!0,X=!1,G=!1,ot=!1,xe=!1,st,A,T,$;const K=new Set,Ye=new Map;async function In(e,t,n){globalThis.__sveltekit_t1ry3i?.data&&globalThis.__sveltekit_t1ry3i.data,document.URL!==location.href&&(location.href=location.href),k=e,await e.hooks.init?.(),Le=Ot(e),x=document.documentElement,ke=t,be=e.nodes[0],re=e.nodes[1],be(),re(),A=history.state?.[F],T=history.state?.[W],A||(A=T=Date.now(),history.replaceState({...history.state,[F]:A,[W]:T},""));const r=D[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await vn(ke,n)):(await V({type:"enter",url:Ie(k.hash?kn(new URL(location.href)):location.href),replace_state:!0}),a()),wn()}function un(){ae.length=0,xe=!1}function it(e){oe.some(t=>t?.snapshot)&&(z[e]=oe.map(t=>t?.snapshot?.capture()))}function ct(e){z[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function He(){Ue(A),Be(Xe,D),it(T),Be(ze,z)}async function lt(e,t,n,r){let a;t.invalidateAll&&(C=null),await V({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(xe=!0,a=[...Ye.keys()]),t.invalidate&&t.invalidate.forEach(yn)}}),t.invalidateAll&&De().then(De).then(()=>{Ye.forEach(({resource:s},i)=>{a?.includes(i)&&s.refresh?.()})})}async function dn(e){if(e.id!==C?.id){const t={};K.add(t),C={id:e.id,token:t,promise:dt({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(C=null),n))}}return C.promise}async function we(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function ft(e,t,n){y=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,e.props.page),st=new k.root({target:t,props:{...e.props,stores:N,components:oe},hydrate:n,sync:!1}),ct(T),n){const a={from:null,to:{params:y.params,route:{id:y.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(s=>s(a))}se=!0}function ie({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(I&&(e.pathname===I||e.pathname===I+"/"))o="always";else for(const l of n)l?.slash!==void 0&&(o=l.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:zt(n).map(l=>l.node.component),page:je(R)}};i!==void 0&&(c.props.form=i);let f={},d=!R,p=0;for(let l=0;l<Math.max(n.length,y.branch.length);l+=1){const h=n[l],w=y.branch[l];h?.data!==w?.data&&(d=!0),h&&(f={...f,...h.data},d&&(c.props[`data_${p}`]=f),p+=1)}return(!y.url||e.href!==y.url.href||y.error!==a||i!==void 0&&i!==R.form||d)&&(c.props.page={error:a,params:t,route:{id:s?.id??null},state:{},status:r,url:new URL(e),form:i??null,data:d?f:R.data}),c}async function Ce({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await e();if(f.universal?.load){let d=function(...u){for(const l of u){const{href:h}=new URL(l,n);c.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Me,current:Me},route:new Proxy(a,{get:(u,l)=>(o&&(c.route=!0),u[l])}),params:new Proxy(r,{get:(u,l)=>(o&&c.params.add(l),u[l])}),data:s?.data??null,url:kt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},k.hash),async fetch(u,l){u instanceof Request&&(l={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...l});const{resolved:h,promise:w}=ut(u,l,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await f.universal.load.call(null,p)??null}return{node:f,loader:e,server:s,universal:f.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:f.universal?.trailingSlash??s?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=se?It(r,a.href,t):Tt(r,t);return{resolved:a,promise:s}}function Ke(e,t,n,r,a,s){if(xe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==y.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Oe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function hn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function We({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(R),constructors:[]}}}async function dt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(C?.id===e)return K.delete(C.token),C.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(m=>m?.().catch(()=>{})),f.forEach(m=>m?.[1]().catch(()=>{}));let d=null;const p=y.url?e!==ce(y.url):!1,u=y.route?a.id!==y.route.id:!1,l=hn(y.url,n);let h=!1;const w=f.map((m,g)=>{const v=y.branch[g],b=!!m?.[0]&&(v?.loader!==m[1]||Ke(h,u,p,l,v.server?.uses,r));return b&&(h=!0),b});if(w.some(Boolean)){try{d=await gt(n,w)}catch(m){const g=await M(m,{url:n,params:r,route:{id:e}});return K.has(s)?We({error:g,url:n,params:r,route:a}):de({status:ne(m),error:g,url:n,route:a})}if(d.type==="redirect")return d}const E=d?.nodes;let _=!1;const O=f.map(async(m,g)=>{if(!m)return;const v=y.branch[g],b=E?.[g];if((!b||b.type==="skip")&&m[1]===v?.loader&&!Ke(_,u,p,l,v.universal?.uses,r))return v;if(_=!0,b?.type==="error")throw b;return Ce({loader:m[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge<g;ge+=1)Object.assign(pe,(await O[ge])?.data);return pe},server_data_node:Oe(b===void 0&&m[0]?{type:"skip"}:b??null,m[0]?v?.server:void 0)})});for(const m of O)m.catch(()=>{});const S=[];for(let m=0;m<f.length;m+=1)if(f[m])try{S.push(await O[m])}catch(g){if(g instanceof Se)return{type:"redirect",location:g.location};if(K.has(s))return We({error:await M(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let v=ne(g),b;if(E?.includes(g))v=g.status??v,b=g.error;else if(g instanceof le)b=g.body;else{if(await N.updated.check())return await rt(),await q(n);b=await M(g,{params:r,url:n,route:{id:a.id}})}const Q=await pn(m,S,i);return Q?ie({url:n,params:r,branch:S.slice(0,Q.idx).concat(Q.node),status:v,error:b,route:a}):await pt(n,{id:a.id},b,v)}else S.push(void 0);return ie({url:n,params:r,branch:S,status:200,error:null,route:a,form:t?void 0:null})}async function pn(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function de({status:e,error:t,url:n,route:r}){const a={};let s=null;if(k.server_loads[0]===0)try{const o=await gt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==Z||n.pathname!==location.pathname||Pe)&&await q(n)}try{const o=await Ce({loader:be,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Oe(s)}),c={node:await re(),loader:re,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return lt(new URL(o.location,location.href),{},0);throw o}}async function gn(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await k.hooks.reroute({url:new URL(e),fetch:async(s,i)=>ut(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);k.hash?s.hash=a:s.pathname=a,a=s}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function he(e,t){if(e&&!ue(e,I,k.hash)){const n=await gn(e);if(!n)return;const r=_n(n);for(const a of Le){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:bt(s),url:e}}}}function _n(e){return vt(k.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(I.length))||"/"}function ce(e){return(k.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:n,delta:r,event:a}){let s=!1;const i=Ne(y,n,e,t);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const o={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return X||at.forEach(c=>c(o)),s?null:i}async function V({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=qe,block:d=qe,event:p}){const u=$;$=c;const l=await he(t,!1),h=e==="enter"?Ne(y,l,t,e):ht({url:t,type:e,delta:n?.delta,intent:l,event:p});if(!h){d(),$===c&&($=u);return}const w=A,E=T;f(),X=!0,se&&h.navigation.type!=="enter"&&N.navigating.set(J.current=h.navigation);let _=l&&await dt(l);if(!_){if(ue(t,I,k.hash))return await q(t,s);_=await pt(t,{id:null},await M(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=l?.url||t,$!==c)return h.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(o<20){await V({type:e,url:new URL(_.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i,redirect_count:o+1,nav_token:c}),h.fulfil(void 0);return}_=await de({status:500,error:await M(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else _.props.page.status>=400&&await N.updated.check()&&(await rt(),await q(t,s));if(un(),Ue(w),it(E),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,v={[F]:A+=g,[W]:T+=g,[Ze]:i};(s?history.replaceState:history.pushState).call(history,v,"",t),s||ln(A,T)}if(C=null,_.props.page.state=i,se){const g=(await Promise.all(Array.from(fn,v=>v(h.navigation)))).filter(v=>typeof v=="function");if(g.length>0){let v=function(){g.forEach(b=>{H.delete(b)})};g.push(v),g.forEach(b=>{H.add(b)})}y=_.state,_.props.page&&(_.props.page.url=t),st.$set(_.props),tn(_.props.page),ot=!0}else ft(_,ke,!1);const{activeElement:O}=document;await sn();let S=n?n.scroll:a?fe():null;if(Ge){const g=t.hash&&document.getElementById(mt(t));if(S)scrollTo(S.x,S.y);else if(g){g.scrollIntoView();const{top:v,left:b}=g.getBoundingClientRect();S={x:pageXOffset+b,y:pageYOffset+v}}else scrollTo(0,0)}const m=document.activeElement!==O&&document.activeElement!==document.body;!r&&!m&&bn(t,S),Ge=!0,_.props.page&&Object.assign(R,_.props.page),X=!1,e==="popstate"&&ct(T),h.fulfil(void 0),H.forEach(g=>g(h.navigation)),N.navigating.set(J.current=null)}async function pt(e,t,n,r,a){return e.origin===Z&&e.pathname===location.pathname&&!Pe?await de({status:r,error:n,url:e,route:t}):await q(e,a)}function mn(){let e,t,n;x.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}x.addEventListener("mousedown",r),x.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(we(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const f=et(o,x),d=f===t&&c>=n;if(!f||d)return;const{url:p,external:u,download:l}=ve(f,I,k.hash);if(u||l)return;const h=te(f),w=p&&ce(y.url)===ce(p);if(!(h.reload||w))if(c<=h.preload_data){t=f,n=j.tap;const E=await he(p,!1);if(!E)return;dn(E)}else c<=h.preload_code&&(t=f,n=c,we(p))}function i(){a.disconnect();for(const o of x.querySelectorAll("a")){const{url:c,external:f,download:d}=ve(o,I,k.hash);if(f||d)continue;const p=te(o);p.reload||(p.preload_code===j.viewport&&a.observe(o),p.preload_code===j.eager&&we(c))}}H.add(i),i()}function M(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Qt(e);return k.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Un(e,t={}){return e=new URL(Ie(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):lt(e,t,0)}function yn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function wn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(He(),!X){const r=Ne(y,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};at.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&He()}),navigator.connection?.saveData||mn(),x.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=et(t.composedPath()[0],x);if(!n)return;const{url:r,external:a,target:s,download:i}=ve(n,I,k.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[f,d]=(k.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=f===_e(location);if(a||o.reload&&(!p||!d)){ht({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,u]=y.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const l=n.ownerDocument.getElementById(decodeURIComponent(d));l&&(l.scrollIntoView(),l.focus())}return}if(G=!0,Ue(A),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await V({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),x.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(i,I,!1))return;const o=t.target,c=te(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(o,r);i.search=new URLSearchParams(f).toString(),V({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[F]){const n=t.state[F];if($={},n===A)return;const r=D[n],a=t.state[Ze]??{},s=new URL(t.state[$t]??location.href),i=t.state[W],o=y.url?_e(location)===_e(y.url):!1;if(i===T&&(ot||o)){a!==R.state&&(R.state=a),e(s),D[A]=fe(),r&&scrollTo(r.x,r.y),A=n;return}const f=n-A;await V({type:"popstate",url:s,popped:{state:a,scroll:r,delta:f},accept:()=>{A=n,T=i},block:()=>{history.go(-f)},nav_token:$,event:t})}else if(!G){const n=new URL(location.href);e(n),k.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[F]:++A,[W]:T},"",location.href))});for(const t of document.querySelectorAll("link"))cn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&N.navigating.set(J.current=null)});function e(t){y.url=R.url=t,N.page.set(je(R)),N.page.notify()}}async function vn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Pe=!0;const f=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(f,!1)||{}),d=Le.find(({id:l})=>l===s.id);let p,u=!0;try{const l=r.map(async(w,E)=>{const _=o[E];return _?.uses&&(_.uses=_t(_.uses)),Ce({loader:k.nodes[w],url:f,params:a,route:s,parent:async()=>{const O={};for(let S=0;S<E;S+=1)Object.assign(O,(await l[S]).data);return O},server_data_node:Oe(_)})}),h=await Promise.all(l);if(d){const w=d.layouts;for(let E=0;E<w.length;E++)w[E]||h.splice(E,0,void 0)}p=ie({url:f,params:a,branch:h,status:t,error:n,form:c,route:d??null})}catch(l){if(l instanceof Se){await q(new URL(l.location,location.href));return}p=await de({status:ne(l),error:await M(l,{url:f,params:a,route:s}),url:f,route:s}),e.textContent="",u=!1}p.props.page&&(p.props.page.state={}),ft(p,e,u)}async function gt(e,t){const n=new URL(e);n.pathname=an(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(Zt,"1"),n.searchParams.append(Xt,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new le(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader();function c(d){return Wt(d,{...k.decoders,Promise:p=>new Promise((u,l)=>{i.set(p,{fulfil:u,reject:l})})})}let f="";for(;;){const{done:d,value:p}=await o.read();if(d&&!f)break;for(f+=!p&&f?`
2
- `:At.decode(p,{stream:!0});;){const u=f.indexOf(`
3
- `);if(u===-1)break;const l=JSON.parse(f.slice(0,u));if(f=f.slice(u+1),l.type==="redirect")return s(l);if(l.type==="data")l.nodes?.forEach(h=>{h?.type==="data"&&(h.uses=_t(h.uses),h.data=c(h.data))}),s(l);else if(l.type==="chunk"){const{id:h,data:w,error:E}=l,_=i.get(h);i.delete(h),E?_.reject(c(E)):_.fulfil(c(w))}}}})}function _t(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ee=!1;function bn(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:s,y:i}=t??fe();setTimeout(()=>{const o=history.state;Ee=!0,location.replace(`#${r}`),k.hash&&location.replace(e.hash),history.replaceState(o,"",e.hash),scrollTo(s,i),Ee=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let i=0;i<a.rangeCount;i+=1)s.push(a.getRangeAt(i));setTimeout(()=>{if(a.rangeCount===s.length){for(let i=0;i<a.rangeCount;i+=1){const o=s[i],c=a.getRangeAt(i);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r){let a,s;const i=new Promise((c,f)=>{a=c,s=f});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function kn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(k.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{In as a,Un as g,An as l,R as p,N as s};
@@ -1 +0,0 @@
1
- import{l as o,a as r}from"../chunks/DztCq-9O.js";export{o as load_css,r as start};
@@ -1,2 +0,0 @@
1
- import"../chunks/DsnmJJEf.js";import{aR as he,p as U,am as S,d as h,T as L,G as _,h as i,an as X,ao as A,c as r,n as P,r as a,b as p,e as Y,J as O,K as N,aj as le,a as K,f as I,ap as ze,g as ie,a0 as we,u as Ee,aq as Se,b0 as Le,s as $,i as He,o as Ae,b1 as De,b2 as ye}from"../chunks/DmBJsPtc.js";import{l as H,p as C,i as E,a as be,s as ke}from"../chunks/BaV6jU6m.js";import{g as Pe}from"../chunks/DztCq-9O.js";import{a as je,p as Re,D as Ne}from"../chunks/DG4ZcLIc.js";import{i as q}from"../chunks/_8PUdHCK.js";import{a as ee,f as Ce,e as Te,d as Ve,i as Be,w as ce}from"../chunks/sF1amBpw.js";he(["change"]);var Oe=A("<title> </title>"),Ue=A('<svg><!><path d="M11.41 26.59L7.83 23 28 23 28 21 7.83 21 11.41 17.41 10 16 4 22 10 28 11.41 26.59zM28 10L22 4 20.59 5.41 24.17 9 4 9 4 11 24.17 11 20.59 14.59 22 16 28 10z"></path></svg>');function Ye(v,t){const e=H(t,["children","$$slots","$$events","$$legacy"]),y=H(e,["size","title"]);U(t,!1);const o=L(),m=L();let g=C(t,"size",8,16),s=C(t,"title",8,void 0);S(()=>(_(e),_(s())),()=>{h(o,e["aria-label"]||e["aria-labelledby"]||s())}),S(()=>(i(o),_(e)),()=>{h(m,{"aria-hidden":i(o)?void 0:!0,role:i(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),X(),q();var n=Ue();ee(n,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:g(),height:g(),...i(m),...y}));var l=r(n);{var b=d=>{var c=Oe(),k=r(c,!0);a(c),O(()=>N(k,s())),p(d,c)};E(l,d=>{s()&&d(b)})}P(),a(n),p(v,n),Y()}var Ie=I('<a href="/setup" class="inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors" title="Switch control set"><!> Switch</a>'),Ge=I('<div class="text-sm text-gray-500 dark:text-gray-400">Loading...</div>');function Fe(v,t){U(t,!1);const e=()=>be(Ce,"$appState",y),[y,o]=ke();q();var m=le(),g=K(m);{var s=l=>{var b=Ie(),d=r(b);Ye(d,{size:16}),P(),a(b),p(l,b)},n=l=>{var b=Ge();p(l,b)};E(g,l=>{e().isConnected?l(s):l(n,!1)})}p(v,m),Y(),o()}var Ze=A("<title> </title>"),Je=A('<svg><!><path d="M17.4141 16L24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"></path></svg>');function Ke(v,t){const e=H(t,["children","$$slots","$$events","$$legacy"]),y=H(e,["size","title"]);U(t,!1);const o=L(),m=L();let g=C(t,"size",8,16),s=C(t,"title",8,void 0);S(()=>(_(e),_(s())),()=>{h(o,e["aria-label"]||e["aria-labelledby"]||s())}),S(()=>(i(o),_(e)),()=>{h(m,{"aria-hidden":i(o)?void 0:!0,role:i(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),X(),q();var n=Je();ee(n,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:g(),height:g(),...i(m),...y}));var l=r(n);{var b=d=>{var c=Ze(),k=r(c,!0);a(c),O(()=>N(k,s())),p(d,c)};E(l,d=>{s()&&d(b)})}P(),a(n),p(v,n),Y()}function qe(v,t){v.target===v.currentTarget&&t()}var We=(v,t)=>v.key==="Escape"&&t(),Qe=v=>v.stopPropagation(),Xe=I("<option> </option>"),et=I(`<div class="fixed inset-0 bg-gray-700 dark:bg-gray-900 bg-opacity-50 dark:bg-opacity-75 overflow-y-auto h-full w-full z-50 flex items-center justify-center p-4" role="dialog" aria-modal="true" tabindex="-1"><div class="bg-white dark:bg-gray-800 rounded-lg shadow-xl p-6 w-full max-w-md mx-auto" role="document"><div class="flex items-center justify-between mb-4"><h2 class="text-xl font-semibold text-gray-900 dark:text-white"> </h2> <button class="text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300" aria-label="Close dialog"><!></button></div> <div class="mb-6"><p class="text-sm text-gray-600 dark:text-gray-400 mb-4">Choose which column should contain the mappings data:</p> <div class="space-y-2"><label for="column-select" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Mappings Column</label> <select id="column-select" class="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"></select></div> <div class="mt-3 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-md"><p class="text-xs text-blue-600 dark:text-blue-400"><strong>Note:</strong> Mappings data will be formatted as "status: description..." in the
2
- selected column.</p></div></div> <div class="flex justify-end space-x-3"><button class="px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors">Cancel</button> <button class="px-4 py-2 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-lg transition-colors"> </button></div></div></div>`);function tt(v,t){U(t,!0);let e=C(t,"isOpen",15),y=C(t,"columnHeaders",19,()=>[]),o=C(t,"defaultColumn",3,"Mappings");const m=ze();let g=ie(we(o()));Ee(()=>{e()&&h(g,o())});function s(z){return e()&&setTimeout(()=>z.focus(),0),{update(D){D&&setTimeout(()=>z.focus(),0)}}}function n(){m("export",{format:t.format,mappingsColumn:i(g)}),e(!1)}function l(){m("cancel"),e(!1)}function b(z){z.key==="Escape"?l():z.key==="Enter"&&n()}var d=le();Se("keydown",Le,b);var c=K(d);{var k=z=>{var D=et();D.__click=[qe,l],D.__keydown=[We,l];var te=r(D);te.__click=[Qe];var ae=r(te),re=r(ae),ue=r(re);a(re);var f=$(re,2);f.__click=l;var x=r(f);Ke(x,{class:"w-6 h-6"}),a(f),a(ae);var u=$(ae,2),M=$(r(u),2),w=$(r(M),2);Te(w,21,y,Be,(j,G)=>{var F=Xe(),ge=r(F,!0);a(F);var de={};O(()=>{N(ge,i(G).label),de!==(de=i(G).value)&&(F.value=(F.__value=i(G).value)??"")}),p(j,F)}),a(w),je(w,(j,G)=>s?.(j),e),He(()=>Ve(w,()=>i(g),j=>h(g,j))),a(M),P(2),a(u);var T=$(u,2),J=r(T);J.__click=l;var W=$(J,2);W.__click=n;var ve=r(W);a(W),a(T),a(te),a(D),O((j,G)=>{N(ue,`Export as ${j??""}`),N(ve,`Export ${G??""}`)},[()=>t.format.toUpperCase(),()=>t.format.toUpperCase()]),p(z,D)};E(c,z=>{e()&&z(k)})}p(v,d),Y()}he(["click","keydown"]);var at=A("<title> </title>"),rt=A('<svg><!><path d="M31 16L24 23 22.59 21.59 28.17 16 22.59 10.41 24 9 31 16zM1 16L8 9 9.41 10.41 3.83 16 9.41 21.59 8 23 1 16z"></path><path d="M5.91 15H26.080000000000002V17H5.91z" transform="rotate(-75 15.996 16)"></path></svg>');function ot(v,t){const e=H(t,["children","$$slots","$$events","$$legacy"]),y=H(e,["size","title"]);U(t,!1);const o=L(),m=L();let g=C(t,"size",8,16),s=C(t,"title",8,void 0);S(()=>(_(e),_(s())),()=>{h(o,e["aria-label"]||e["aria-labelledby"]||s())}),S(()=>(i(o),_(e)),()=>{h(m,{"aria-hidden":i(o)?void 0:!0,role:i(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),X(),q();var n=rt();ee(n,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:g(),height:g(),...i(m),...y}));var l=r(n);{var b=d=>{var c=at(),k=r(c,!0);a(c),O(()=>N(k,s())),p(d,c)};E(l,d=>{s()&&d(b)})}P(2),a(n),p(v,n),Y()}var st=A("<title> </title>"),nt=A('<svg><!><path d="M13 21L26.17 21 23.59 23.59 25 25 30 20 25 15 23.59 16.41 26.17 19 13 19 13 21z"></path><path d="M22,14V10a1,1,0,0,0-.29-.71l-7-7A1,1,0,0,0,14,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H20a2,2,0,0,0,2-2V26H20v2H4V4h8v6a2,2,0,0,0,2,2h6v2Zm-8-4V4.41L19.59,10Z"></path></svg>');function it(v,t){const e=H(t,["children","$$slots","$$events","$$legacy"]),y=H(e,["size","title"]);U(t,!1);const o=L(),m=L();let g=C(t,"size",8,16),s=C(t,"title",8,void 0);S(()=>(_(e),_(s())),()=>{h(o,e["aria-label"]||e["aria-labelledby"]||s())}),S(()=>(i(o),_(e)),()=>{h(m,{"aria-hidden":i(o)?void 0:!0,role:i(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),X(),q();var n=nt();ee(n,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:g(),height:g(),...i(m),...y}));var l=r(n);{var b=d=>{var c=st(),k=r(c,!0);a(c),O(()=>N(k,s())),p(d,c)};E(l,d=>{s()&&d(b)})}P(2),a(n),p(v,n),Y()}var lt=A("<title> </title>"),dt=A('<svg><!><path d="M26 24v4H6V24H4v4H4a2 2 0 002 2H26a2 2 0 002-2h0V24zM26 14L24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z"></path></svg>');function _e(v,t){const e=H(t,["children","$$slots","$$events","$$legacy"]),y=H(e,["size","title"]);U(t,!1);const o=L(),m=L();let g=C(t,"size",8,16),s=C(t,"title",8,void 0);S(()=>(_(e),_(s())),()=>{h(o,e["aria-label"]||e["aria-labelledby"]||s())}),S(()=>(i(o),_(e)),()=>{h(m,{"aria-hidden":i(o)?void 0:!0,role:i(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),X(),q();var n=dt();ee(n,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:g(),height:g(),...i(m),...y}));var l=r(n);{var b=d=>{var c=lt(),k=r(c,!0);a(c),O(()=>N(k,s())),p(d,c)};E(l,d=>{s()&&d(b)})}P(),a(n),p(v,n),Y()}var ct=A("<title> </title>"),ut=A('<svg><!><path fill-rule="evenodd" d="M16,2a14,14,0,0,0-4.43,27.28c.7.13,1-.3,1-.67s0-1.21,0-2.38c-3.89.84-4.71-1.88-4.71-1.88A3.71,3.71,0,0,0,6.24,22.3c-1.27-.86.1-.85.1-.85A2.94,2.94,0,0,1,8.48,22.9a3,3,0,0,0,4.08,1.16,2.93,2.93,0,0,1,.88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4,5.4,0,0,1,1.44-3.76,5,5,0,0,1,.14-3.7s1.17-.38,3.85,1.43a13.3,13.3,0,0,1,7,0c2.67-1.81,3.84-1.43,3.84-1.43a5,5,0,0,1,.14,3.7,5.4,5.4,0,0,1,1.44,3.76c0,5.38-3.27,6.56-6.39,6.91a3.33,3.33,0,0,1,.95,2.59c0,1.87,0,3.38,0,3.84s.25.81,1,.67A14,14,0,0,0,16,2Z"></path></svg>');function vt(v,t){const e=H(t,["children","$$slots","$$events","$$legacy"]),y=H(e,["size","title"]);U(t,!1);const o=L(),m=L();let g=C(t,"size",8,16),s=C(t,"title",8,void 0);S(()=>(_(e),_(s())),()=>{h(o,e["aria-label"]||e["aria-labelledby"]||s())}),S(()=>(i(o),_(e)),()=>{h(m,{"aria-hidden":i(o)?void 0:!0,role:i(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),X(),q();var n=ut();ee(n,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:g(),height:g(),...i(m),...y}));var l=r(n);{var b=d=>{var c=ct(),k=r(c,!0);a(c),O(()=>N(k,s())),p(d,c)};E(l,d=>{s()&&d(b)})}P(),a(n),p(v,n),Y()}var gt=(v,t)=>t("csv"),ft=(v,t)=>t("excel"),pt=(v,t)=>t("json"),mt=I('<div class="space-y-1 p-1"><button class="w-full text-left px-3 py-2 text-sm rounded-md transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"><div class="flex items-center gap-2"><!> <span>Export as CSV</span></div></button> <button class="w-full text-left px-3 py-2 text-sm rounded-md transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"><div class="flex items-center gap-2"><!> <span>Export as Excel</span></div></button> <button class="w-full text-left px-3 py-2 text-sm rounded-md transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"><div class="flex items-center gap-2"><!> <span>Export as JSON</span></div></button></div>'),bt=I('<div class="flex-1 flex justify-center items-center"><div class="text-center"><div class="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div> <p class="text-gray-500 dark:text-gray-400">Switching control set...</p></div></div>'),ht=I('<div class="flex-1 flex justify-center items-center"><div class="text-center"><div class="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div> <p class="text-gray-500 dark:text-gray-400"> </p></div></div>'),xt=I('<header class="bg-white dark:bg-gray-900 shadow-sm border-b border-gray-200 dark:border-gray-700 flex-shrink-0"><div class="w-full px-6 lg:px-8"><div class="flex justify-between items-center h-16"><div class="flex items-center"><a href="/" class="flex items-center space-x-3 hover:opacity-80 transition-opacity"><img src="/lula.png" class="h-8 w-8" alt="Lula Logo"/> <div class="flex flex-col"><span class="text-xl font-bold text-gray-900 dark:text-white">Lula</span> <span class="text-xs text-gray-500 dark:text-gray-400 -mt-1">Gitops for Compliance</span></div></a></div> <div class="flex items-center space-x-4"><!> <!> <a class="p-2 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors" title="Github" href="https://github.com/defenseunicorns/lula" target="_blank"><!></a></div></div></div></header> <div class="flex-1 flex gap-6 p-6 overflow-hidden"><!></div>',1),yt=I('<div class="h-screen flex flex-col"><!></div> <!>',1);function Et(v,t){U(t,!0);const e=()=>be(Ce,"$appState",o),y=()=>be(Re,"$page",o),[o,m]=ke();let g=!1,s=ie(!1),n=ie("csv"),l=ie(we([])),b=ie("Mappings");async function d(){try{if(!e().currentPath){console.error("No current control set path available"),h(l,[{value:"Mappings",label:"Mappings (Default)"}],!0),h(b,"Mappings");return}const x=await fetch("/api/export-column-headers");if(x.ok){const u=await x.json();h(l,u.columnHeaders||[],!0),h(b,u.defaultColumn||"Mappings",!0)}else console.error("Failed to load column headers"),h(l,[{value:"Mappings",label:"Mappings (Default)"}],!0),h(b,"Mappings")}catch(f){console.error("Error loading column headers:",f),h(l,[{value:"Mappings",label:"Mappings (Default)"}],!0),h(b,"Mappings")}}async function c(f){if(f==="json")try{const x=`/api/export-controls?format=${f}`,u=document.createElement("a");u.href=x,u.download="",document.body.appendChild(u),u.click(),document.body.removeChild(u)}catch(x){console.error("Export failed:",x)}else h(n,f,!0),await d(),h(s,!0)}async function k(f){try{const{format:x,mappingsColumn:u}=f.detail,M=`/api/export-controls?format=${x}&mappingsColumn=${encodeURIComponent(u)}`,w=document.createElement("a");w.href=M,w.download="",document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch(x){console.error("Export failed:",x)}}Ae(()=>{ce.connect();let f=null;const x=async()=>{if(g||y().url.pathname==="/setup"||e().isSwitchingControlSet)return;const u=e();if(u.isConnected){if(g=!0,(!u.name||u.name==="Unknown Control Set"||u.id==="unknown"||u.id==="default")&&(!u.controls||u.controls.length===0)){await ce.scanControlSets();const M=await new Promise(w=>{const T=J=>{window.removeEventListener("control-sets-list",T),w(J.detail)};window.addEventListener("control-sets-list",T),setTimeout(()=>{window.removeEventListener("control-sets-list",T),w(null)},2e3)});M&&Array.isArray(M)&&M.length===1?(console.log("Auto-loading single control set:",M[0].path),await ce.switchControlSet(M[0].path)):Pe("/setup")}}else f=window.setTimeout(x,500)};return f=window.setTimeout(x,100),()=>{f&&clearTimeout(f)}}),De(()=>{ce.disconnect()});var z=yt(),D=K(z),te=r(D);{var ae=f=>{var x=xt(),u=K(x),M=r(u),w=r(M),T=$(r(w),2),J=r(T);Fe(J,{});var W=$(J,2);{var ve=R=>{Ne(R,{buttonLabel:"Export",get buttonIcon(){return _e},buttonClass:"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors",dropdownClass:"w-48",children:fe=>{var se=mt(),Q=r(se);Q.__click=[gt,c];var V=r(Q),Z=r(V);it(Z,{class:"w-4 h-4"}),P(2),a(V),a(Q);var B=$(Q,2);B.__click=[ft,c];var ne=r(B),pe=r(ne);_e(pe,{class:"w-4 h-4"}),P(2),a(ne),a(B);var me=$(B,2);me.__click=[pt,c];var xe=r(me),Me=r(xe);ot(Me,{class:"w-4 h-4"}),P(2),a(xe),a(me),a(se),p(fe,se)},$$slots:{default:!0}})};E(W,R=>{e().isConnected&&e().controls&&e().controls.length>0&&R(ve)})}var j=$(W,2),G=r(j);vt(G,{class:"w-5 h-5"}),a(j),a(T),a(w),a(M),a(u);var F=$(u,2),ge=r(F);{var de=R=>{var oe=bt();p(R,oe)},$e=R=>{var oe=le(),fe=K(oe);{var se=V=>{var Z=ht(),B=r(Z),ne=$(r(B),2),pe=r(ne,!0);a(ne),a(B),a(Z),O(()=>N(pe,e().isConnected?e().fieldSchema?"Loading controls...":"Loading schema...":"Connecting...")),p(V,Z)},Q=V=>{var Z=le(),B=K(Z);ye(B,()=>t.children),p(V,Z)};E(fe,V=>{!e().isConnected||!e().controls||e().controls.length===0||!e().fieldSchema?V(se):V(Q,!1)},!0)}p(R,oe)};E(ge,R=>{e().isSwitchingControlSet?R(de):R($e,!1)})}a(F),p(f,x)},re=f=>{var x=le(),u=K(x);ye(u,()=>t.children),p(f,x)};E(te,f=>{y().url.pathname!=="/setup"?f(ae):f(re,!1)})}a(D);var ue=$(D,2);tt(ue,{get format(){return i(n)},get columnHeaders(){return i(l)},get defaultColumn(){return i(b)},get isOpen(){return i(s)},set isOpen(f){h(s,f,!0)},$$events:{export:k,cancel:()=>{}}}),p(v,z),Y(),m()}he(["click"]);export{Et as component};