lula2 0.3.5-nightly.4 → 0.4.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.
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CfcnqqSS.js","../chunks/DsnmJJEf.js","../chunks/B8sFn9qB.js","../chunks/AMsv4DTs.js","../chunks/DUYNrdfy.js","../chunks/DMUWw_xB.js","../chunks/DL7cUWpq.js","../chunks/d2wclEM1.js","../chunks/D6AXzSy_.js","../assets/0.D6CB7gA7.css","../nodes/1.Dy6JXIaq.js","../nodes/2.CIH2PoiR.js","../chunks/QPd3iGhF.js","../chunks/DPYPcVpy.js","../assets/DynamicControlEditor.DoNLxeLe.css","../nodes/3.DjScTeV8.js","../nodes/4.BLFN0K7u.js"])))=>i.map(i=>d[i]);
2
- import{d as O,aa as Y,h as f,ae as B,af as G,ag as J,Y as K,ah as W,T as z,p as F,C as H,u as Q,o as X,g as x,ai as Z,f as V,a as k,s as $,b as E,e as ee,aj as L,c as te,r as re,ak as S,al as se,J as ae,K as ne}from"../chunks/B8sFn9qB.js";import"../chunks/DsnmJJEf.js";import{p as A,i as C}from"../chunks/AMsv4DTs.js";import{c as j}from"../chunks/DL7cUWpq.js";import{b as T}from"../chunks/DPYPcVpy.js";function oe(c){return class extends ce{constructor(e){super({component:c,...e})}}}class ce{#t;#e;constructor(e){var a=new Map,i=(r,t)=>{var s=z(t,!1,!1);return a.set(r,s),s};const l=new Proxy({...e.props||{},$$events:{}},{get(r,t){return f(a.get(t)??i(t,Reflect.get(r,t)))},has(r,t){return t===Y?!0:(f(a.get(t)??i(t,Reflect.get(r,t))),Reflect.has(r,t))},set(r,t,s){return O(a.get(t)??i(t,s),s),Reflect.set(r,t,s)}});this.#e=(e.hydrate?B:G)(e.component,{target:e.target,anchor:e.anchor,props:l,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&J(),this.#t=l.$$events;for(const r of Object.keys(this.#e))r==="$set"||r==="$destroy"||r==="$on"||K(this,r,{get(){return this.#e[r]},set(t){this.#e[r]=t},enumerable:!0});this.#e.$set=r=>{Object.assign(l,r)},this.#e.$destroy=()=>{W(this.#e)}}$set(e){this.#e.$set(e)}$on(e,a){this.#t[e]=this.#t[e]||[];const i=(...l)=>a.call(this,...l);return this.#t[e].push(i),()=>{this.#t[e]=this.#t[e].filter(l=>l!==i)}}$destroy(){this.#e.$destroy()}}const ie="modulepreload",le=function(c,e){return new URL(c,e).href},I={},R=function(e,a,i){let l=Promise.resolve();if(a&&a.length>0){let w=function(o){return Promise.all(o.map(d=>Promise.resolve(d).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),p=s?.nonce||s?.getAttribute("nonce");l=w(a.map(o=>{if(o=le(o,i),o in I)return;I[o]=!0;const d=o.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(i)for(let h=t.length-1;h>=0;h--){const n=t[h];if(n.href===o&&(!d||n.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${m}`))return;const u=document.createElement("link");if(u.rel=d?"stylesheet":ie,d||(u.as="script"),u.crossOrigin="",u.href=o,p&&u.setAttribute("nonce",p),document.head.appendChild(u),d)return new Promise((h,n)=>{u.addEventListener("load",h),u.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${o}`)))})}))}function r(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return l.then(t=>{for(const s of t||[])s.status==="rejected"&&r(s.reason);return e().catch(r)})},Pe={};var ue=V('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),de=V("<!> <!>",1);function fe(c,e){F(e,!0);let a=A(e,"components",23,()=>[]),i=A(e,"data_0",3,null),l=A(e,"data_1",3,null);H(()=>e.stores.page.set(e.page)),Q(()=>{e.stores,e.page,e.constructors,a(),e.form,i(),l(),e.stores.page.notify()});let r=x(!1),t=x(!1),s=x(null);X(()=>{const n=e.stores.page.subscribe(()=>{f(r)&&(O(t,!0),Z().then(()=>{O(s,document.title||"untitled page",!0)}))});return O(r,!0),n});const p=S(()=>e.constructors[1]);var w=de(),o=k(w);{var d=n=>{const _=S(()=>e.constructors[0]);var v=L(),b=k(v);j(b,()=>f(_),(g,y)=>{T(y(g,{get data(){return i()},get form(){return e.form},get params(){return e.page.params},children:(P,_e)=>{var D=L(),M=k(D);j(M,()=>f(p),(N,q)=>{T(q(N,{get data(){return l()},get form(){return e.form},get params(){return e.page.params}}),U=>a()[1]=U,()=>a()?.[1])}),E(P,D)},$$slots:{default:!0}}),P=>a()[0]=P,()=>a()?.[0])}),E(n,v)},m=n=>{const _=S(()=>e.constructors[0]);var v=L(),b=k(v);j(b,()=>f(_),(g,y)=>{T(y(g,{get data(){return i()},get form(){return e.form},get params(){return e.page.params}}),P=>a()[0]=P,()=>a()?.[0])}),E(n,v)};C(o,n=>{e.constructors[1]?n(d):n(m,!1)})}var u=$(o,2);{var h=n=>{var _=ue(),v=te(_);{var b=g=>{var y=se();ae(()=>ne(y,f(s))),E(g,y)};C(v,g=>{f(t)&&g(b)})}re(_),E(n,_)};C(u,n=>{f(r)&&n(h)})}E(c,w),ee()}const Re=oe(fe),pe=[()=>R(()=>import("../nodes/0.CfcnqqSS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>R(()=>import("../nodes/1.Dy6JXIaq.js"),__vite__mapDeps([10,1,8,2,4]),import.meta.url),()=>R(()=>import("../nodes/2.CIH2PoiR.js"),__vite__mapDeps([11,1,8,2,3,12,7,5,4,6,13,14]),import.meta.url),()=>R(()=>import("../nodes/3.DjScTeV8.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,8,12,13,14]),import.meta.url),()=>R(()=>import("../nodes/4.BLFN0K7u.js"),__vite__mapDeps([16,1,8,2,3,7,4]),import.meta.url)],we=[],ke={"/":[2],"/control/[id]":[3],"/setup":[4]},me={handleError:(({error:c})=>{console.error(c)}),reroute:(()=>{}),transport:{}},he=Object.fromEntries(Object.entries(me.transport).map(([c,e])=>[c,e.decode])),Oe=!1,xe=(c,e)=>he[c](e);export{xe as decode,he as decoders,ke as dictionary,Oe as hash,me as hooks,Pe as matchers,pe as nodes,Re as root,we as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.B2WQMmWy.js","../chunks/DsnmJJEf.js","../chunks/B8sFn9qB.js","../chunks/AMsv4DTs.js","../chunks/CgOk0Ct0.js","../chunks/CBRQrpza.js","../chunks/DL7cUWpq.js","../chunks/d2wclEM1.js","../chunks/D6AXzSy_.js","../assets/0.D6CB7gA7.css","../nodes/1.DZuIkAUv.js","../nodes/2.CaMZrOwr.js","../chunks/DTNJlR4l.js","../chunks/DPYPcVpy.js","../assets/DynamicControlEditor.DoNLxeLe.css","../nodes/3.BCB0DxLi.js","../nodes/4.BlOrY_m9.js"])))=>i.map(i=>d[i]);
2
+ import{d as O,aa as Y,h as f,ae as B,af as G,ag as J,Y as K,ah as W,T as z,p as F,C as H,u as Q,o as X,g as x,ai as Z,f as V,a as k,s as $,b as E,e as ee,aj as L,c as te,r as re,ak as S,al as se,J as ae,K as ne}from"../chunks/B8sFn9qB.js";import"../chunks/DsnmJJEf.js";import{p as A,i as C}from"../chunks/AMsv4DTs.js";import{c as j}from"../chunks/DL7cUWpq.js";import{b as T}from"../chunks/DPYPcVpy.js";function oe(c){return class extends ce{constructor(e){super({component:c,...e})}}}class ce{#t;#e;constructor(e){var a=new Map,i=(r,t)=>{var s=z(t,!1,!1);return a.set(r,s),s};const l=new Proxy({...e.props||{},$$events:{}},{get(r,t){return f(a.get(t)??i(t,Reflect.get(r,t)))},has(r,t){return t===Y?!0:(f(a.get(t)??i(t,Reflect.get(r,t))),Reflect.has(r,t))},set(r,t,s){return O(a.get(t)??i(t,s),s),Reflect.set(r,t,s)}});this.#e=(e.hydrate?B:G)(e.component,{target:e.target,anchor:e.anchor,props:l,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&J(),this.#t=l.$$events;for(const r of Object.keys(this.#e))r==="$set"||r==="$destroy"||r==="$on"||K(this,r,{get(){return this.#e[r]},set(t){this.#e[r]=t},enumerable:!0});this.#e.$set=r=>{Object.assign(l,r)},this.#e.$destroy=()=>{W(this.#e)}}$set(e){this.#e.$set(e)}$on(e,a){this.#t[e]=this.#t[e]||[];const i=(...l)=>a.call(this,...l);return this.#t[e].push(i),()=>{this.#t[e]=this.#t[e].filter(l=>l!==i)}}$destroy(){this.#e.$destroy()}}const ie="modulepreload",le=function(c,e){return new URL(c,e).href},I={},R=function(e,a,i){let l=Promise.resolve();if(a&&a.length>0){let w=function(o){return Promise.all(o.map(d=>Promise.resolve(d).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),p=s?.nonce||s?.getAttribute("nonce");l=w(a.map(o=>{if(o=le(o,i),o in I)return;I[o]=!0;const d=o.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(i)for(let h=t.length-1;h>=0;h--){const n=t[h];if(n.href===o&&(!d||n.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${m}`))return;const u=document.createElement("link");if(u.rel=d?"stylesheet":ie,d||(u.as="script"),u.crossOrigin="",u.href=o,p&&u.setAttribute("nonce",p),document.head.appendChild(u),d)return new Promise((h,n)=>{u.addEventListener("load",h),u.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${o}`)))})}))}function r(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return l.then(t=>{for(const s of t||[])s.status==="rejected"&&r(s.reason);return e().catch(r)})},Pe={};var ue=V('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),de=V("<!> <!>",1);function fe(c,e){F(e,!0);let a=A(e,"components",23,()=>[]),i=A(e,"data_0",3,null),l=A(e,"data_1",3,null);H(()=>e.stores.page.set(e.page)),Q(()=>{e.stores,e.page,e.constructors,a(),e.form,i(),l(),e.stores.page.notify()});let r=x(!1),t=x(!1),s=x(null);X(()=>{const n=e.stores.page.subscribe(()=>{f(r)&&(O(t,!0),Z().then(()=>{O(s,document.title||"untitled page",!0)}))});return O(r,!0),n});const p=S(()=>e.constructors[1]);var w=de(),o=k(w);{var d=n=>{const _=S(()=>e.constructors[0]);var v=L(),b=k(v);j(b,()=>f(_),(g,y)=>{T(y(g,{get data(){return i()},get form(){return e.form},get params(){return e.page.params},children:(P,_e)=>{var D=L(),M=k(D);j(M,()=>f(p),(N,q)=>{T(q(N,{get data(){return l()},get form(){return e.form},get params(){return e.page.params}}),U=>a()[1]=U,()=>a()?.[1])}),E(P,D)},$$slots:{default:!0}}),P=>a()[0]=P,()=>a()?.[0])}),E(n,v)},m=n=>{const _=S(()=>e.constructors[0]);var v=L(),b=k(v);j(b,()=>f(_),(g,y)=>{T(y(g,{get data(){return i()},get form(){return e.form},get params(){return e.page.params}}),P=>a()[0]=P,()=>a()?.[0])}),E(n,v)};C(o,n=>{e.constructors[1]?n(d):n(m,!1)})}var u=$(o,2);{var h=n=>{var _=ue(),v=te(_);{var b=g=>{var y=se();ae(()=>ne(y,f(s))),E(g,y)};C(v,g=>{f(t)&&g(b)})}re(_),E(n,_)};C(u,n=>{f(r)&&n(h)})}E(c,w),ee()}const Re=oe(fe),pe=[()=>R(()=>import("../nodes/0.B2WQMmWy.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>R(()=>import("../nodes/1.DZuIkAUv.js"),__vite__mapDeps([10,1,8,2,4]),import.meta.url),()=>R(()=>import("../nodes/2.CaMZrOwr.js"),__vite__mapDeps([11,1,8,2,3,12,7,5,4,6,13,14]),import.meta.url),()=>R(()=>import("../nodes/3.BCB0DxLi.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,8,12,13,14]),import.meta.url),()=>R(()=>import("../nodes/4.BlOrY_m9.js"),__vite__mapDeps([16,1,8,2,3,7,4]),import.meta.url)],we=[],ke={"/":[2],"/control/[id]":[3],"/setup":[4]},me={handleError:(({error:c})=>{console.error(c)}),reroute:(()=>{}),transport:{}},he=Object.fromEntries(Object.entries(me.transport).map(([c,e])=>[c,e.decode])),Oe=!1,xe=(c,e)=>he[c](e);export{xe as decode,he as decoders,ke as dictionary,Oe as hash,me as hooks,Pe as matchers,pe as nodes,Re as root,we as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/CgOk0Ct0.js";export{o as load_css,r as start};
@@ -1 +1 @@
1
- import"../chunks/DsnmJJEf.js";import{at as le,p as R,am as y,d as k,T as $,G as m,h as u,an as F,ao as M,c as i,n as A,r as n,b as v,e as N,J as B,K as D,aj as Q,a as U,f as P,o as xe,au as be,s as V,av as ie}from"../chunks/B8sFn9qB.js";import{l as z,p as C,i as w,a as te,s as de}from"../chunks/AMsv4DTs.js";import{g as me}from"../chunks/DUYNrdfy.js";import{p as _e,D as we}from"../chunks/DMUWw_xB.js";import{i as Y}from"../chunks/D6AXzSy_.js";import{a as K,f as ce,w as q}from"../chunks/d2wclEM1.js";le(["change"]);var ye=M("<title> </title>"),ke=M('<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 $e(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=ke();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=ye(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(),n(s),v(b,s),N()}var ze=P('<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>'),Ce=P('<div class="text-sm text-gray-500 dark:text-gray-400">Loading...</div>');function Me(b,t){R(t,!1);const e=()=>te(ce,"$appState",l),[l,o]=de();Y();var g=Q(),f=U(g);{var r=p=>{var x=ze(),d=i(x);$e(d,{size:16}),A(),n(x),v(p,x)},s=p=>{var x=Ce();v(p,x)};w(f,p=>{e().isConnected?p(r):p(s,!1)})}v(b,g),N(),o()}var Se=M("<title> </title>"),Le=M('<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 Ae(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=Le();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=Se(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(2),n(s),v(b,s),N()}var Ee=M("<title> </title>"),He=M('<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 Ve(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=He();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=Ee(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(2),n(s),v(b,s),N()}var Re=M("<title> </title>"),Ne=M('<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 ne(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=Ne();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=Re(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(),n(s),v(b,s),N()}var Pe=M("<title> </title>"),Te=M('<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 je(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=Te();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=Pe(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(),n(s),v(b,s),N()}var Be=(b,t)=>t("csv"),De=(b,t)=>t("excel"),Ye=(b,t)=>t("json"),Ge=P('<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>'),Ie=P('<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>'),Ze=P('<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>'),Je=P('<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),Ue=P('<div class="h-screen flex flex-col"><!></div>');function et(b,t){R(t,!0);const e=()=>te(_e,"$page",o),l=()=>te(ce,"$appState",o),[o,g]=de();let f=!1;async function r(a){try{const c=`/api/export-controls?format=${a}`,h=document.createElement("a");h.href=c,h.download="",document.body.appendChild(h),h.click(),document.body.removeChild(h)}catch(c){console.error("Export failed:",c)}}xe(()=>{q.connect();let a=null;const c=async()=>{if(f||e().url.pathname==="/setup"||l().isSwitchingControlSet)return;const h=l();if(h.isConnected){if(f=!0,(!h.name||h.name==="Unknown Control Set"||h.id==="unknown"||h.id==="default")&&(!h.controls||h.controls.length===0)){await q.scanControlSets();const E=await new Promise(G=>{const T=O=>{window.removeEventListener("control-sets-list",T),G(O.detail)};window.addEventListener("control-sets-list",T),setTimeout(()=>{window.removeEventListener("control-sets-list",T),G(null)},2e3)});E&&Array.isArray(E)&&E.length===1?(console.log("Auto-loading single control set:",E[0].path),await q.switchControlSet(E[0].path)):me("/setup")}}else a=window.setTimeout(c,500)};return a=window.setTimeout(c,100),()=>{a&&clearTimeout(a)}}),be(()=>{q.disconnect()});var s=Ue(),p=i(s);{var x=a=>{var c=Je(),h=U(c),E=i(h),G=i(E),T=V(i(G),2),O=i(T);Me(O,{});var ae=V(O,2);{var ve=_=>{we(_,{buttonLabel:"Export",get buttonIcon(){return ne},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:W=>{var Z=Ge(),j=i(Z);j.__click=[Be,r];var S=i(j),H=i(S);Ve(H,{class:"w-4 h-4"}),A(2),n(S),n(j);var L=V(j,2);L.__click=[De,r];var J=i(L),X=i(J);ne(X,{class:"w-4 h-4"}),A(2),n(J),n(L);var ee=V(L,2);ee.__click=[Ye,r];var oe=i(ee),pe=i(oe);Ae(pe,{class:"w-4 h-4"}),A(2),n(oe),n(ee),n(Z),v(W,Z)},$$slots:{default:!0}})};w(ae,_=>{l().isConnected&&l().controls&&l().controls.length>0&&_(ve)})}var re=V(ae,2),ue=i(re);je(ue,{class:"w-5 h-5"}),n(re),n(T),n(G),n(E),n(h);var se=V(h,2),ge=i(se);{var fe=_=>{var I=Ie();v(_,I)},he=_=>{var I=Q(),W=U(I);{var Z=S=>{var H=Ze(),L=i(H),J=V(i(L),2),X=i(J,!0);n(J),n(L),n(H),B(()=>D(X,l().isConnected?l().fieldSchema?"Loading controls...":"Loading schema...":"Connecting...")),v(S,H)},j=S=>{var H=Q(),L=U(H);ie(L,()=>t.children),v(S,H)};w(W,S=>{!l().isConnected||!l().controls||l().controls.length===0||!l().fieldSchema?S(Z):S(j,!1)},!0)}v(_,I)};w(ge,_=>{l().isSwitchingControlSet?_(fe):_(he,!1)})}n(se),v(a,c)},d=a=>{var c=Q(),h=U(c);ie(h,()=>t.children),v(a,c)};w(p,a=>{e().url.pathname!=="/setup"?a(x):a(d,!1)})}n(s),v(b,s),N(),g()}le(["click"]);export{et as component};
1
+ import"../chunks/DsnmJJEf.js";import{at as le,p as R,am as y,d as k,T as $,G as m,h as u,an as F,ao as M,c as i,n as A,r as n,b as v,e as N,J as B,K as D,aj as Q,a as U,f as P,o as xe,au as be,s as V,av as ie}from"../chunks/B8sFn9qB.js";import{l as z,p as C,i as w,a as te,s as de}from"../chunks/AMsv4DTs.js";import{g as me}from"../chunks/CgOk0Ct0.js";import{p as _e,D as we}from"../chunks/CBRQrpza.js";import{i as Y}from"../chunks/D6AXzSy_.js";import{a as K,f as ce,w as q}from"../chunks/d2wclEM1.js";le(["change"]);var ye=M("<title> </title>"),ke=M('<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 $e(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=ke();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=ye(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(),n(s),v(b,s),N()}var ze=P('<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>'),Ce=P('<div class="text-sm text-gray-500 dark:text-gray-400">Loading...</div>');function Me(b,t){R(t,!1);const e=()=>te(ce,"$appState",l),[l,o]=de();Y();var g=Q(),f=U(g);{var r=p=>{var x=ze(),d=i(x);$e(d,{size:16}),A(),n(x),v(p,x)},s=p=>{var x=Ce();v(p,x)};w(f,p=>{e().isConnected?p(r):p(s,!1)})}v(b,g),N(),o()}var Se=M("<title> </title>"),Le=M('<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 Ae(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=Le();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=Se(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(2),n(s),v(b,s),N()}var Ee=M("<title> </title>"),He=M('<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 Ve(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=He();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=Ee(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(2),n(s),v(b,s),N()}var Re=M("<title> </title>"),Ne=M('<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 ne(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=Ne();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=Re(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(),n(s),v(b,s),N()}var Pe=M("<title> </title>"),Te=M('<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 je(b,t){const e=z(t,["children","$$slots","$$events","$$legacy"]),l=z(e,["size","title"]);R(t,!1);const o=$(),g=$();let f=C(t,"size",8,16),r=C(t,"title",8,void 0);y(()=>(m(e),m(r())),()=>{k(o,e["aria-label"]||e["aria-labelledby"]||r())}),y(()=>(u(o),m(e)),()=>{k(g,{"aria-hidden":u(o)?void 0:!0,role:u(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),F(),Y();var s=Te();K(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...u(g),...l}));var p=i(s);{var x=d=>{var a=Pe(),c=i(a,!0);n(a),B(()=>D(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(),n(s),v(b,s),N()}var Be=(b,t)=>t("csv"),De=(b,t)=>t("excel"),Ye=(b,t)=>t("json"),Ge=P('<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>'),Ie=P('<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>'),Ze=P('<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>'),Je=P('<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),Ue=P('<div class="h-screen flex flex-col"><!></div>');function et(b,t){R(t,!0);const e=()=>te(_e,"$page",o),l=()=>te(ce,"$appState",o),[o,g]=de();let f=!1;async function r(a){try{const c=`/api/export-controls?format=${a}`,h=document.createElement("a");h.href=c,h.download="",document.body.appendChild(h),h.click(),document.body.removeChild(h)}catch(c){console.error("Export failed:",c)}}xe(()=>{q.connect();let a=null;const c=async()=>{if(f||e().url.pathname==="/setup"||l().isSwitchingControlSet)return;const h=l();if(h.isConnected){if(f=!0,(!h.name||h.name==="Unknown Control Set"||h.id==="unknown"||h.id==="default")&&(!h.controls||h.controls.length===0)){await q.scanControlSets();const E=await new Promise(G=>{const T=O=>{window.removeEventListener("control-sets-list",T),G(O.detail)};window.addEventListener("control-sets-list",T),setTimeout(()=>{window.removeEventListener("control-sets-list",T),G(null)},2e3)});E&&Array.isArray(E)&&E.length===1?(console.log("Auto-loading single control set:",E[0].path),await q.switchControlSet(E[0].path)):me("/setup")}}else a=window.setTimeout(c,500)};return a=window.setTimeout(c,100),()=>{a&&clearTimeout(a)}}),be(()=>{q.disconnect()});var s=Ue(),p=i(s);{var x=a=>{var c=Je(),h=U(c),E=i(h),G=i(E),T=V(i(G),2),O=i(T);Me(O,{});var ae=V(O,2);{var ve=_=>{we(_,{buttonLabel:"Export",get buttonIcon(){return ne},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:W=>{var Z=Ge(),j=i(Z);j.__click=[Be,r];var S=i(j),H=i(S);Ve(H,{class:"w-4 h-4"}),A(2),n(S),n(j);var L=V(j,2);L.__click=[De,r];var J=i(L),X=i(J);ne(X,{class:"w-4 h-4"}),A(2),n(J),n(L);var ee=V(L,2);ee.__click=[Ye,r];var oe=i(ee),pe=i(oe);Ae(pe,{class:"w-4 h-4"}),A(2),n(oe),n(ee),n(Z),v(W,Z)},$$slots:{default:!0}})};w(ae,_=>{l().isConnected&&l().controls&&l().controls.length>0&&_(ve)})}var re=V(ae,2),ue=i(re);je(ue,{class:"w-5 h-5"}),n(re),n(T),n(G),n(E),n(h);var se=V(h,2),ge=i(se);{var fe=_=>{var I=Ie();v(_,I)},he=_=>{var I=Q(),W=U(I);{var Z=S=>{var H=Ze(),L=i(H),J=V(i(L),2),X=i(J,!0);n(J),n(L),n(H),B(()=>D(X,l().isConnected?l().fieldSchema?"Loading controls...":"Loading schema...":"Connecting...")),v(S,H)},j=S=>{var H=Q(),L=U(H);ie(L,()=>t.children),v(S,H)};w(W,S=>{!l().isConnected||!l().controls||l().controls.length===0||!l().fieldSchema?S(Z):S(j,!1)},!0)}v(_,I)};w(ge,_=>{l().isSwitchingControlSet?_(fe):_(he,!1)})}n(se),v(a,c)},d=a=>{var c=Q(),h=U(c);ie(h,()=>t.children),v(a,c)};w(p,a=>{e().url.pathname!=="/setup"?a(x):a(d,!1)})}n(s),v(b,s),N(),g()}le(["click"]);export{et as component};
@@ -1 +1 @@
1
- import"../chunks/DsnmJJEf.js";import{i as u}from"../chunks/D6AXzSy_.js";import{p as h,f as g,a as l,J as v,b as d,e as _,c as s,r as a,s as x,K as o}from"../chunks/B8sFn9qB.js";import{s as $,p}from"../chunks/DUYNrdfy.js";const b={get error(){return p.error},get status(){return p.status}};$.updated.check;const i=b;var k=g("<h1> </h1> <p> </p>",1);function q(m,c){h(c,!1),u();var t=k(),r=l(t),n=s(r,!0);a(r);var e=x(r,2),f=s(e,!0);a(e),v(()=>{o(n,i.status),o(f,i.error?.message)}),d(m,t),_()}export{q as component};
1
+ import"../chunks/DsnmJJEf.js";import{i as u}from"../chunks/D6AXzSy_.js";import{p as h,f as g,a as l,J as v,b as d,e as _,c as s,r as a,s as x,K as o}from"../chunks/B8sFn9qB.js";import{s as $,p}from"../chunks/CgOk0Ct0.js";const b={get error(){return p.error},get status(){return p.status}};$.updated.check;const i=b;var k=g("<h1> </h1> <p> </p>",1);function q(m,c){h(c,!1),u();var t=k(),r=l(t),n=s(r,!0);a(r);var e=x(r,2),f=s(e,!0);a(e),v(()=>{o(n,i.status),o(f,i.error?.message)}),d(m,t),_()}export{q as component};
@@ -1 +1 @@
1
- import"../chunks/DsnmJJEf.js";import"../chunks/D6AXzSy_.js";import{f,a as y,b as n,c as t,r,s as w,n as C}from"../chunks/B8sFn9qB.js";import{i as k,s as $,a as D}from"../chunks/AMsv4DTs.js";import{C as S,a as j,D as L}from"../chunks/QPd3iGhF.js";import{s as N}from"../chunks/DMUWw_xB.js";var P=f('<div class=" h-full flex flex-col"><div class="flex-1 flex items-center justify-center p-8"><div class="text-center text-gray-500 dark:text-gray-400"><!> <h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2">No Control Selected</h3> <p class="text-gray-600 dark:text-gray-400">Select a control from the list to view and edit its details</p></div></div></div>'),q=f('<div class="w-1/2 flex flex-col"><div class="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm h-full flex flex-col"><!></div></div> <div class="w-1/2 flex flex-col"><!></div>',1);function H(m){const o=()=>D(N,"$selectedControl",x),[x,g]=$();var l=q(),a=y(l),i=t(a),p=t(i);S(p,{}),r(i),r(a);var d=w(a,2),_=t(d);{var h=e=>{j(e,{get control(){return o()}})},b=e=>{var s=P(),c=t(s),v=t(c),u=t(v);L(u,{class:"mx-auto h-16 w-16 mb-4"}),C(4),r(v),r(c),r(s),n(e,s)};k(_,e=>{o()?e(h):e(b,!1)})}r(d),n(m,l),g()}export{H as component};
1
+ import"../chunks/DsnmJJEf.js";import"../chunks/D6AXzSy_.js";import{f,a as y,b as n,c as t,r,s as w,n as C}from"../chunks/B8sFn9qB.js";import{i as k,s as $,a as D}from"../chunks/AMsv4DTs.js";import{C as S,a as j,D as L}from"../chunks/DTNJlR4l.js";import{s as N}from"../chunks/CBRQrpza.js";var P=f('<div class=" h-full flex flex-col"><div class="flex-1 flex items-center justify-center p-8"><div class="text-center text-gray-500 dark:text-gray-400"><!> <h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2">No Control Selected</h3> <p class="text-gray-600 dark:text-gray-400">Select a control from the list to view and edit its details</p></div></div></div>'),q=f('<div class="w-1/2 flex flex-col"><div class="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm h-full flex flex-col"><!></div></div> <div class="w-1/2 flex flex-col"><!></div>',1);function H(m){const o=()=>D(N,"$selectedControl",x),[x,g]=$();var l=q(),a=y(l),i=t(a),p=t(i);S(p,{}),r(i),r(a);var d=w(a,2),_=t(d);{var h=e=>{j(e,{get control(){return o()}})},b=e=>{var s=P(),c=t(s),v=t(c),u=t(v);L(u,{class:"mx-auto h-16 w-16 mb-4"}),C(4),r(v),r(c),r(s),n(e,s)};k(_,e=>{o()?e(h):e(b,!1)})}r(d),n(m,l),g()}export{H as component};
@@ -1 +1 @@
1
- import"../chunks/DsnmJJEf.js";import{p as S,u as A,d as x,o as B,f as n,a as F,b as i,e as H,c as s,g as N,r as a,s as h,h as P,n as R}from"../chunks/B8sFn9qB.js";import{a as C,i as b,s as U}from"../chunks/AMsv4DTs.js";import{g as V}from"../chunks/DUYNrdfy.js";import{p as q,s as _}from"../chunks/DMUWw_xB.js";import{C as G,a as J,D as K}from"../chunks/QPd3iGhF.js";import{w}from"../chunks/d2wclEM1.js";var O=n('<div class="absolute top-4 right-4 z-10"><div class="w-8 h-8 flex items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900/30" title="Loading control..."><svg class="w-5 h-5 text-blue-600 dark:text-blue-400 animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg></div></div>'),Q=n('<div class=" h-full flex flex-col"><div class="flex-1 flex items-center justify-center p-8"><div class="text-center text-gray-500 dark:text-gray-400"><!> <h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2">No Control Selected</h3> <p class="text-gray-600 dark:text-gray-400">Select a control from the list to view and edit its details</p></div></div></div>'),T=n('<div class="w-1/2 flex flex-col"><div class="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm h-full flex flex-col"><!></div></div> <div class="w-1/2 flex flex-col relative"><!> <!></div>',1);function se(y,k){S(k,!0);const $=()=>C(q,"$page",c),d=()=>C(_,"$selectedControl",c),[c,D]=U();let v="",r=N(!1);A(()=>{const e=$().params.id;if(!e)return;const t=decodeURIComponent(e);t&&t!==v&&w.isConnected()&&(v=t,x(r,!0),w.getControlDetails(t))}),B(()=>{const e=t=>{const o=t.detail;x(r,!1),o?_.set(o):V("/")};return window.addEventListener("control-details",e),()=>{window.removeEventListener("control-details",e)}});var f=T(),l=F(f),p=s(l),L=s(p);G(L,{}),a(p),a(l);var g=h(l,2),m=s(g);{var I=e=>{var t=O();i(e,t)};b(m,e=>{P(r)&&e(I)})}var z=h(m,2);{var j=e=>{J(e,{get control(){return d()}})},E=e=>{var t=Q(),o=s(t),u=s(o),M=s(u);K(M,{class:"mx-auto h-16 w-16 mb-4"}),R(4),a(u),a(o),a(t),i(e,t)};b(z,e=>{d()?e(j):e(E,!1)})}a(g),i(y,f),H(),D()}export{se as component};
1
+ import"../chunks/DsnmJJEf.js";import{p as S,u as A,d as x,o as B,f as n,a as F,b as i,e as H,c as s,g as N,r as a,s as h,h as P,n as R}from"../chunks/B8sFn9qB.js";import{a as C,i as b,s as U}from"../chunks/AMsv4DTs.js";import{g as V}from"../chunks/CgOk0Ct0.js";import{p as q,s as _}from"../chunks/CBRQrpza.js";import{C as G,a as J,D as K}from"../chunks/DTNJlR4l.js";import{w}from"../chunks/d2wclEM1.js";var O=n('<div class="absolute top-4 right-4 z-10"><div class="w-8 h-8 flex items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900/30" title="Loading control..."><svg class="w-5 h-5 text-blue-600 dark:text-blue-400 animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg></div></div>'),Q=n('<div class=" h-full flex flex-col"><div class="flex-1 flex items-center justify-center p-8"><div class="text-center text-gray-500 dark:text-gray-400"><!> <h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2">No Control Selected</h3> <p class="text-gray-600 dark:text-gray-400">Select a control from the list to view and edit its details</p></div></div></div>'),T=n('<div class="w-1/2 flex flex-col"><div class="bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm h-full flex flex-col"><!></div></div> <div class="w-1/2 flex flex-col relative"><!> <!></div>',1);function se(y,k){S(k,!0);const $=()=>C(q,"$page",c),d=()=>C(_,"$selectedControl",c),[c,D]=U();let v="",r=N(!1);A(()=>{const e=$().params.id;if(!e)return;const t=decodeURIComponent(e);t&&t!==v&&w.isConnected()&&(v=t,x(r,!0),w.getControlDetails(t))}),B(()=>{const e=t=>{const o=t.detail;x(r,!1),o?_.set(o):V("/")};return window.addEventListener("control-details",e),()=>{window.removeEventListener("control-details",e)}});var f=T(),l=F(f),p=s(l),L=s(p);G(L,{}),a(p),a(l);var g=h(l,2),m=s(g);{var I=e=>{var t=O();i(e,t)};b(m,e=>{P(r)&&e(I)})}var z=h(m,2);{var j=e=>{J(e,{get control(){return d()}})},E=e=>{var t=Q(),o=s(t),u=s(o),M=s(u);K(M,{class:"mx-auto h-16 w-16 mb-4"}),R(4),a(u),a(o),a(t),i(e,t)};b(z,e=>{d()?e(j):e(E,!1)})}a(g),i(y,f),H(),D()}export{se as component};
@@ -1,4 +1,4 @@
1
- import"../chunks/DsnmJJEf.js";import{i as Je}from"../chunks/D6AXzSy_.js";import{p as Ye,am as Te,d as o,T as k,G as ge,h as e,an as $r,ao as Ve,c as a,n as _e,r as t,b as d,e as We,J as F,K as E,ap as Lr,f as h,s as i,aq as g,a as ye,ar as mr,aj as Me,a0 as De,ak as hr,al as rr,as as yr,k as de,o as ot,W as lt}from"../chunks/B8sFn9qB.js";import{l as tr,p as Ue,i as M,a as st,s as it}from"../chunks/AMsv4DTs.js";import{a as Nr,s as se,r as Vr,e as ce,b as qe,c as jr,d as _r,i as Cr,f as Sr,w as wr}from"../chunks/d2wclEM1.js";import{g as nt}from"../chunks/DUYNrdfy.js";function dt(pe){return function(...q){var z=q[0];return z.stopPropagation(),pe?.apply(this,q)}}var vt=Ve("<title> </title>"),ct=Ve('<svg><!><path d="M11 18L12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"></path><path d="M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"></path></svg>');function gt(pe,q){const z=tr(q,["children","$$slots","$$events","$$legacy"]),X=tr(z,["size","title"]);Ye(q,!1);const O=k(),L=k();let N=Ue(q,"size",8,16),f=Ue(q,"title",8,void 0);Te(()=>(ge(z),ge(f())),()=>{o(O,z["aria-label"]||z["aria-labelledby"]||f())}),Te(()=>(e(O),ge(z)),()=>{o(L,{"aria-hidden":e(O)?void 0:!0,role:e(O)?"img":void 0,focusable:Number(z.tabindex)===0?!0:void 0})}),$r(),Je();var S=ct();Nr(S,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:N(),height:N(),...e(L),...X}));var K=a(S);{var re=P=>{var p=vt(),U=a(p,!0);t(p),F(()=>E(U,f())),d(P,p)};M(K,P=>{f()&&P(re)})}_e(2),t(S),d(pe,S),We()}var pt=Ve("<title> </title>"),ut=Ve('<svg><!><path d="M10 6H14V10H10zM18 6H22V10H18zM10 14H14V18H10zM18 14H22V18H18zM10 22H14V26H10zM18 22H22V26H18z"></path></svg>');function kr(pe,q){const z=tr(q,["children","$$slots","$$events","$$legacy"]),X=tr(z,["size","title"]);Ye(q,!1);const O=k(),L=k();let N=Ue(q,"size",8,16),f=Ue(q,"title",8,void 0);Te(()=>(ge(z),ge(f())),()=>{o(O,z["aria-label"]||z["aria-labelledby"]||f())}),Te(()=>(e(O),ge(z)),()=>{o(L,{"aria-hidden":e(O)?void 0:!0,role:e(O)?"img":void 0,focusable:Number(z.tabindex)===0?!0:void 0})}),$r(),Je();var S=ut();Nr(S,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:N(),height:N(),...e(L),...X}));var K=a(S);{var re=P=>{var p=pt(),U=a(p,!0);t(p),F(()=>E(U,f())),d(P,p)};M(K,P=>{f()&&P(re)})}_e(),t(S),d(pe,S),We()}var bt=h('<div class="p-4 text-sm text-blue-800 rounded-lg bg-blue-50 dark:bg-gray-800 dark:text-blue-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <div><span class="font-medium">File loaded:</span> <div class="mt-1"><span class="font-medium">Sheets:</span> <span class="font-medium">Fields:</span> <span class="font-medium">Controls found:</span> </div></div></div></div>'),ft=h('<div class="p-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <span> </span></div></div>'),xt=h('<div class="p-4 text-sm text-green-800 rounded-lg bg-green-50 dark:bg-gray-800 dark:text-green-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <span> </span></div></div>'),mt=h("<option> </option>"),ht=h("<option> </option>"),yt=h("<option> </option>"),_t=h('<span class="ml-auto text-xs text-blue-600 dark:text-blue-400">ID</span>'),wt=h('<div draggable="true" role="button" tabindex="0" class="flex items-center px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded text-sm cursor-move hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors opacity-75"><svg class="w-3 h-3 mr-2 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20"><path d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"></path></svg> <span class="truncate line-through"> </span> <!></div>'),kt=h('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">No excluded fields</p>'),Ct=h('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),St=h('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),$t=h('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),Dt=h('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),Mt=h('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),zt=h('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),At=h('<div draggable="false" role="button" tabindex="0" class="flex items-center px-3 py-2 bg-orange-100 dark:bg-orange-900/30 text-orange-800 dark:text-orange-300 rounded text-sm hover:bg-orange-200 dark:hover:bg-orange-800/30 transition-colors"><span class="truncate"> </span> <button class="ml-auto text-gray-400 hover:text-red-500 dark:text-gray-500 dark:hover:text-red-400" title="Remove from mappings">×</button></div>'),Ft=h('<div role="region" aria-label="Justification field drop zone"><p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p></div>'),Ot=h('<th class="px-4 py-2"> </th>'),Pt=h('<td class="px-4 py-2"> </td>'),Ht=h('<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700"></tr>'),Et=h('<div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Sample Data Preview</h3> <div class="overflow-x-auto"><table class="w-full text-sm text-left text-gray-500 dark:text-gray-400"><thead class="text-xs text-gray-700 uppercase bg-gray-100 dark:bg-gray-600 dark:text-gray-400"><tr></tr></thead><tbody></tbody></table></div></div>'),It=h('<span class="flex items-center"><svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Importing...</span>'),Tt=h(`<div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Import Options</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4"><div><label for="controlSetName" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Control Set Name <span class="text-red-500">*</span></label> <input type="text" id="controlSetName" placeholder="e.g., NIST 800-53 Rev 4" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white" required/> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">This will be used as the display name and folder name</p></div> <div><label for="controlSetDescription" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Description</label> <input type="text" id="controlSetDescription" placeholder="Optional description" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"/> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Brief description of this control set</p></div></div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="sheet" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Sheet</label> <select id="sheet" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Select which worksheet contains your control data</p></div> <div><label for="headerRow" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Select Header Row</label> <select id="headerRow" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Select the row containing column headers</p></div> <div><label for="controlIdField" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Control ID Field <span class="text-red-500">*</span></label> <select id="controlIdField" required><option disabled>Select Control ID field</option><!></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Column containing unique control identifiers (e.g., AC-1, SC-7)</p></div></div></div> <div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2">Organize Fields</h3> <p class="text-sm text-gray-600 dark:text-gray-400 mb-4">Drag fields to organize them. <strong>Overview fields</strong> will appear as table columns in
1
+ import"../chunks/DsnmJJEf.js";import{i as Je}from"../chunks/D6AXzSy_.js";import{p as Ye,am as Te,d as o,T as k,G as ge,h as e,an as $r,ao as Ve,c as a,n as _e,r as t,b as d,e as We,J as F,K as E,ap as Lr,f as h,s as i,aq as g,a as ye,ar as mr,aj as Me,a0 as De,ak as hr,al as rr,as as yr,k as de,o as ot,W as lt}from"../chunks/B8sFn9qB.js";import{l as tr,p as Ue,i as M,a as st,s as it}from"../chunks/AMsv4DTs.js";import{a as Nr,s as se,r as Vr,e as ce,b as qe,c as jr,d as _r,i as Cr,f as Sr,w as wr}from"../chunks/d2wclEM1.js";import{g as nt}from"../chunks/CgOk0Ct0.js";function dt(pe){return function(...q){var z=q[0];return z.stopPropagation(),pe?.apply(this,q)}}var vt=Ve("<title> </title>"),ct=Ve('<svg><!><path d="M11 18L12.41 19.41 15 16.83 15 29 17 29 17 16.83 19.59 19.41 21 18 16 13 11 18z"></path><path d="M23.5,22H23V20h.5a4.5,4.5,0,0,0,.36-9L23,11l-.1-.82a7,7,0,0,0-13.88,0L9,11,8.14,11a4.5,4.5,0,0,0,.36,9H9v2H8.5A6.5,6.5,0,0,1,7.2,9.14a9,9,0,0,1,17.6,0A6.5,6.5,0,0,1,23.5,22Z"></path></svg>');function gt(pe,q){const z=tr(q,["children","$$slots","$$events","$$legacy"]),X=tr(z,["size","title"]);Ye(q,!1);const O=k(),L=k();let N=Ue(q,"size",8,16),f=Ue(q,"title",8,void 0);Te(()=>(ge(z),ge(f())),()=>{o(O,z["aria-label"]||z["aria-labelledby"]||f())}),Te(()=>(e(O),ge(z)),()=>{o(L,{"aria-hidden":e(O)?void 0:!0,role:e(O)?"img":void 0,focusable:Number(z.tabindex)===0?!0:void 0})}),$r(),Je();var S=ct();Nr(S,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:N(),height:N(),...e(L),...X}));var K=a(S);{var re=P=>{var p=vt(),U=a(p,!0);t(p),F(()=>E(U,f())),d(P,p)};M(K,P=>{f()&&P(re)})}_e(2),t(S),d(pe,S),We()}var pt=Ve("<title> </title>"),ut=Ve('<svg><!><path d="M10 6H14V10H10zM18 6H22V10H18zM10 14H14V18H10zM18 14H22V18H18zM10 22H14V26H10zM18 22H22V26H18z"></path></svg>');function kr(pe,q){const z=tr(q,["children","$$slots","$$events","$$legacy"]),X=tr(z,["size","title"]);Ye(q,!1);const O=k(),L=k();let N=Ue(q,"size",8,16),f=Ue(q,"title",8,void 0);Te(()=>(ge(z),ge(f())),()=>{o(O,z["aria-label"]||z["aria-labelledby"]||f())}),Te(()=>(e(O),ge(z)),()=>{o(L,{"aria-hidden":e(O)?void 0:!0,role:e(O)?"img":void 0,focusable:Number(z.tabindex)===0?!0:void 0})}),$r(),Je();var S=ut();Nr(S,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:N(),height:N(),...e(L),...X}));var K=a(S);{var re=P=>{var p=pt(),U=a(p,!0);t(p),F(()=>E(U,f())),d(P,p)};M(K,P=>{f()&&P(re)})}_e(),t(S),d(pe,S),We()}var bt=h('<div class="p-4 text-sm text-blue-800 rounded-lg bg-blue-50 dark:bg-gray-800 dark:text-blue-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <div><span class="font-medium">File loaded:</span> <div class="mt-1"><span class="font-medium">Sheets:</span> <span class="font-medium">Fields:</span> <span class="font-medium">Controls found:</span> </div></div></div></div>'),ft=h('<div class="p-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <span> </span></div></div>'),xt=h('<div class="p-4 text-sm text-green-800 rounded-lg bg-green-50 dark:bg-gray-800 dark:text-green-400"><div class="flex items-center"><svg class="flex-shrink-0 inline w-4 h-4 mr-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"></path></svg> <span> </span></div></div>'),mt=h("<option> </option>"),ht=h("<option> </option>"),yt=h("<option> </option>"),_t=h('<span class="ml-auto text-xs text-blue-600 dark:text-blue-400">ID</span>'),wt=h('<div draggable="true" role="button" tabindex="0" class="flex items-center px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 rounded text-sm cursor-move hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors opacity-75"><svg class="w-3 h-3 mr-2 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20"><path d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"></path></svg> <span class="truncate line-through"> </span> <!></div>'),kt=h('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">No excluded fields</p>'),Ct=h('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),St=h('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),$t=h('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),Dt=h('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),Mt=h('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),zt=h('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),At=h('<div draggable="false" role="button" tabindex="0" class="flex items-center px-3 py-2 bg-orange-100 dark:bg-orange-900/30 text-orange-800 dark:text-orange-300 rounded text-sm hover:bg-orange-200 dark:hover:bg-orange-800/30 transition-colors"><span class="truncate"> </span> <button class="ml-auto text-gray-400 hover:text-red-500 dark:text-gray-500 dark:hover:text-red-400" title="Remove from mappings">×</button></div>'),Ft=h('<div role="region" aria-label="Justification field drop zone"><p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p></div>'),Ot=h('<th class="px-4 py-2"> </th>'),Pt=h('<td class="px-4 py-2"> </td>'),Ht=h('<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700"></tr>'),Et=h('<div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Sample Data Preview</h3> <div class="overflow-x-auto"><table class="w-full text-sm text-left text-gray-500 dark:text-gray-400"><thead class="text-xs text-gray-700 uppercase bg-gray-100 dark:bg-gray-600 dark:text-gray-400"><tr></tr></thead><tbody></tbody></table></div></div>'),It=h('<span class="flex items-center"><svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Importing...</span>'),Tt=h(`<div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Import Options</h3> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4"><div><label for="controlSetName" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Control Set Name <span class="text-red-500">*</span></label> <input type="text" id="controlSetName" placeholder="e.g., NIST 800-53 Rev 4" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white" required/> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">This will be used as the display name and folder name</p></div> <div><label for="controlSetDescription" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Description</label> <input type="text" id="controlSetDescription" placeholder="Optional description" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"/> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Brief description of this control set</p></div></div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="sheet" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Sheet</label> <select id="sheet" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Select which worksheet contains your control data</p></div> <div><label for="headerRow" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Select Header Row</label> <select id="headerRow" class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:text-white"></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Select the row containing column headers</p></div> <div><label for="controlIdField" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Control ID Field <span class="text-red-500">*</span></label> <select id="controlIdField" required><option disabled>Select Control ID field</option><!></select> <p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Column containing unique control identifiers (e.g., AC-1, SC-7)</p></div></div></div> <div class="bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-900 rounded-lg p-4 border border-gray-200 dark:border-gray-700"><h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-2">Organize Fields</h3> <p class="text-sm text-gray-600 dark:text-gray-400 mb-4">Drag fields to organize them. <strong>Overview fields</strong> will appear as table columns in
2
2
  the controls list.</p> <div class="grid grid-cols-1 lg:grid-cols-5 gap-4"><div class="border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-700 rounded-t-lg"><h4 class="text-sm font-semibold text-gray-700 dark:text-gray-300">Excluded Fields</h4> <p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Not imported</p></div> <div role="region" aria-label="Excluded fields drop zone"><!> <!></div></div> <div class="border border-blue-300 dark:border-blue-700 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-blue-200 dark:border-blue-800 bg-blue-50 dark:bg-blue-900/20 rounded-t-lg"><h4 class="text-sm font-semibold text-blue-700 dark:text-blue-300">Overview Tab</h4> <p class="text-xs text-blue-600 dark:text-blue-400 mt-1">Shows in details & table columns</p></div> <div role="region" aria-label="Overview tab drop zone"><!> <!></div></div> <div class="border border-green-300 dark:border-green-700 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-green-200 dark:border-green-800 bg-green-50 dark:bg-green-900/20 rounded-t-lg"><h4 class="text-sm font-semibold text-green-700 dark:text-green-300">Implementation Tab</h4> <p class="text-xs text-green-600 dark:text-green-400 mt-1">Status & compliance</p></div> <div role="region" aria-label="Implementation tab drop zone"><!> <!></div></div> <div class="border border-purple-300 dark:border-purple-700 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-purple-200 dark:border-purple-800 bg-purple-50 dark:bg-purple-900/20 rounded-t-lg"><h4 class="text-sm font-semibold text-purple-700 dark:text-purple-300">Custom Tab</h4> <p class="text-xs text-purple-600 dark:text-purple-400 mt-1">Additional fields</p></div> <div role="region" aria-label="Custom fields drop zone"><!> <!></div></div> <div class="border border-orange-300 dark:border-orange-700 rounded-lg bg-white dark:bg-gray-800"><div class="p-3 border-b border-orange-200 dark:border-orange-800 bg-orange-50 dark:bg-orange-900/20 rounded-t-lg"><h4 class="text-sm font-semibold text-orange-700 dark:text-orange-300">Mappings Tab</h4> <p class="text-xs text-orange-600 dark:text-orange-400 mt-1">Pre-populate justification for a control mapping</p></div> <div role="region" aria-label="Justifications tab drop zone"><div class="space-y-2"><!></div></div></div></div></div> <!> <div class="flex justify-center"><button class="px-5 py-2.5 text-white bg-blue-600 hover:bg-blue-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm disabled:opacity-50 disabled:cursor-not-allowed"><!></button></div>`,1),Vt=h('<div class="space-y-6"><div role="button" tabindex="0" class="relative"><label><div class="flex flex-col items-center justify-center pt-5 pb-6"><!> <p class="mb-2 text-sm text-gray-500 dark:text-gray-400"><span class="font-semibold">Click to upload</span> or drag and drop</p> <p class="text-xs text-gray-500 dark:text-gray-400">XLSX, XLS or CSV files</p></div> <input type="file" class="hidden" accept=".xlsx,.xls,.csv"/></label></div> <!> <!> <!> <!></div>');function jt(pe,q){Ye(q,!1);const z=Lr();let X=k(null),O=k(""),L=k(""),N=k([]),f=k([]),S=k([]),K=k(0),re=k([]),P=k([]),p=k(new Map),U=k(1),V=k(""),fe=k(""),J=k(""),G=k(!1),Q=k(""),ue=k(""),we=k(!1),te=k(!1),$=k(null),B=k(null),ae=k(null);function ke(){o(f,[]),o(S,[]),o(K,0),e(p).clear(),o(p,new Map),o(P,[]),o(V,""),o(Q,""),o(ue,""),o($,null),o(B,null),o(ae,null)}function u(l){l.preventDefault(),o(te,!0)}function b(){o(te,!1)}function D(l){l.preventDefault(),o(te,!1);const n=l.dataTransfer?.files;n&&n.length>0&&I(n[0])}function T(l){const n=l.target;n.files&&n.files.length>0&&I(n.files[0])}async function I(l){ke(),o(O,l.name),o(X,l),o(Q,""),o(G,!0),o(fe,e(O).replace(/\.[^.]+$/,"").replace(/[-_]/g," ")),o(J,`Imported from ${e(O)}`);try{const n=new FormData;n.append("file",l);const y=await fetch("/api/parse-excel",{method:"POST",body:n});if(!y.ok){const w=await y.json();throw new Error(w.error||"Failed to parse file")}const _=await y.json();o(N,_.sheets||[]),o(L,_.selectedSheet||e(N)[0]),o(re,_.rowPreviews||[]),e(re).length>0&&e(U)===1&&o(U,e(re)[0].row),await Z(),o(we,!0)}catch(n){o(Q,"Error reading file: "+n.message)}finally{o(G,!1)}}async function Z(){if(!(!e(X)||!e(L))){o(G,!0),e(p).clear(),o(p,new Map),o(V,"");try{const l=new FormData;l.append("file",e(X)),l.append("sheetName",e(L)),l.append("headerRow",e(U).toString());const n=await fetch("/api/parse-excel-sheet",{method:"POST",body:l});if(!n.ok){const _=await n.json();throw new Error(_.error||"Failed to parse sheet")}const y=await n.json();if(o(f,y.fields||[]),o(S,y.sampleData||[]),o(K,y.controlCount||0),e(f).forEach((_,w)=>{const v=_.toLowerCase();let H="custom",R="text";v.includes("implementation")||v.includes("status")||v.includes("narrative")||v.includes("guidance")?H="implementation":(v.includes("id")||v.includes("title")||v.includes("family")||v.includes("cci")||v.includes("control")||v.includes("acronym"))&&(H="overview"),v.includes("description")||v.includes("narrative")||v.includes("guidance")||v.includes("statement")?R="textarea":v.includes("status")||v.includes("type")||v.includes("designation")?R="select":v.includes("date")?R="date":(v.includes("count")||v.includes("number"))&&(R="number"),e(p).set(_,{originalName:_,tab:H,displayOrder:w,fieldType:R,required:v.includes("id")||v.includes("title")})}),o(p,e(p)),e(V)&&!e(f).includes(e(V))&&o(V,""),!e(V)&&e(f).includes("AP Acronym")){const _=!e(S).length||e(S).every(ee=>!ee["AP Acronym"]||String(ee["AP Acronym"]).length<25),w=e(S).map(ee=>ee["AP Acronym"]).filter(ee=>ee!=null&&ee!==""&&String(ee).trim()!==""),v=new Set(w),H=!w.length||v.size===w.length,R=w.length>0;_&&H&&R&&o(V,"AP Acronym")}}catch(l){o(Q,"Error loading sheet data: "+l.message)}finally{o(G,!1)}}}function ve(l){if(!l)return l;let n=l.trim().replace(/\r?\n/g," ").replace(/\s+/g," ").trim();return je(n)}function je(l){return l.replace(/\W+/g," ").split(/ |\s/).map(n=>n.toLowerCase()).join("-")}function xe(l,n){o($,n),l.dataTransfer&&(l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("text/plain",n))}function oe(){o($,null),o(B,null),o(ae,null)}function C(l,n){l.preventDefault(),o(B,n),l.dataTransfer&&(l.dataTransfer.dropEffect="move")}function ie(){o(B,null)}function ne(l,n,y){if(l.preventDefault(),e($)&&e(p).has(e($))){const _=e(p).get(e($));if(n==="mappings")e(P).includes(e($))||o(P,[...e(P),e($)]);else{if(_.tab=n,y!==void 0&&n!==null){const v=Array.from(e(p).entries()).filter(([H,R])=>R.tab===n).sort((H,R)=>H[1].displayOrder-R[1].displayOrder).filter(([H])=>H!==e($));v.splice(y,0,[e($),_]),v.forEach(([H,R],ee)=>{R.displayOrder=ee,e(p).set(H,R)})}else if(n!==null){const w=Math.max(0,...Array.from(e(p).values()).filter(v=>v.tab===n).map(v=>v.displayOrder));_.displayOrder=w+1}e(p).set(e($),_),o(p,e(p))}}o($,null),o(B,null)}function ze(l,n){l.preventDefault(),l.stopPropagation(),o(ae,n)}function Ce(){o(ae,null)}function Se(l,n,y){if(l.preventDefault(),l.stopPropagation(),e($)&&e($)!==n){const w=Array.from(e(p).entries()).filter(([v,H])=>H.tab===y).sort((v,H)=>v[1].displayOrder-H[1].displayOrder).findIndex(([v])=>v===n);w!==-1&&ne(l,y,w)}o(ae,null)}async function Le(){if(!(!e(X)||!e(O))){if(!e(V)){o(Q,"Please select a Control ID field before importing"),o(ue,"");return}if(!e(fe)||e(fe).trim()===""){o(Q,"Please enter a Control Set Name before importing"),o(ue,"");return}o(G,!0),o(Q,""),o(ue,"");try{const l=new FormData;l.append("file",e(X),e(O)),l.append("controlIdField",e(V)),l.append("startRow",e(U).toString()),l.append("namingConvention","kebab-case"),l.append("skipEmpty","true"),l.append("skipEmptyRows","true"),l.append("controlSetName",e(fe)||e(O).replace(/\.[^.]+$/,"")),l.append("controlSetDescription",e(J)||`Imported from ${e(O)}`);const n=Array.from(e(p).entries()).filter(([w,v])=>v.tab!==null).map(([w,v])=>({fieldName:ve(w),...v}));l.append("fieldSchema",JSON.stringify(n)),l.append("justificationFields",JSON.stringify(e(P).map(w=>ve(w))));const y=await fetch("/api/import-spreadsheet",{method:"POST",body:l});if(!y.ok){const w=await y.json();throw new Error(w.error||"Import failed")}const _=await y.json();o(ue,`Successfully imported ${_.controlCount} controls into ${_.families.length} families`),z("created",{path:_.outputDir})}catch(l){o(Q,"Error importing spreadsheet: "+l.message)}finally{o(G,!1)}}}Je();var Ne=Vt(),me=a(Ne),Be=a(me),Ae=a(Be),ar=a(Ae);gt(ar,{class:"w-8 h-8 mb-4 text-gray-500 dark:text-gray-400"}),_e(4),t(Ae);var Xe=i(Ae,2);t(Be),t(me);var Fe=i(me,2);{var or=l=>{var n=bt(),y=a(n),_=i(a(y),2),w=i(a(_)),v=i(w),H=i(a(v)),R=i(H,2),ee=i(R,2);t(v),t(_),t(y),t(n),F(()=>{E(w,` ${e(O)??""} `),E(H,` ${e(N).length??""} | `),E(R,` ${e(f).length??""} | `),E(ee,` ${e(K)??""}`)}),d(l,n)};M(Fe,l=>{e(O)&&l(or)})}var Ke=i(Fe,2);{var lr=l=>{var n=ft(),y=a(n),_=i(a(y),2),w=a(_,!0);t(_),t(y),t(n),F(()=>E(w,e(Q))),d(l,n)};M(Ke,l=>{e(Q)&&l(lr)})}var Ze=i(Ke,2);{var sr=l=>{var n=xt(),y=a(n),_=i(a(y),2),w=a(_,!0);t(_),t(y),t(n),F(()=>E(w,e(ue))),d(l,n)};M(Ze,l=>{e(ue)&&l(sr)})}var ir=i(Ze,2);{var nr=l=>{var n=Tt(),y=ye(n),_=i(a(y),2),w=a(_),v=i(a(w),2);Vr(v),_e(2),t(w);var H=i(w,2),R=i(a(H),2);Vr(R),_e(2),t(H),t(_);var ee=i(_,2),dr=a(ee),Ge=i(a(dr),2);F(()=>{e(L),mr(()=>{e(N)})}),ce(Ge,5,()=>e(N),r=>r,(r,s)=>{var x=mt(),m=a(x,!0);t(x);var c={};F(()=>{E(m,e(s)),c!==(c=e(s))&&(x.value=(x.__value=e(s))??"")}),d(r,x)}),t(Ge),_e(2),t(dr);var vr=i(dr,2),Qe=i(a(vr),2);F(()=>{e(U),mr(()=>{e(re)})}),ce(Qe,5,()=>e(re),r=>r.row,(r,s)=>{var x=ht(),m=a(x);t(x);var c={};F(()=>{E(m,`Row ${e(s).row??""}: ${e(s).preview??""}`),c!==(c=e(s).row)&&(x.value=(x.__value=e(s).row)??"")}),d(r,x)}),t(Qe),_e(2),t(vr);var Dr=i(vr,2),er=i(a(Dr),2);F(()=>{e(V),mr(()=>{e(f),e(S)})});var cr=a(er);cr.value=cr.__value="";var Br=i(cr);ce(Br,1,()=>e(f),r=>r,(r,s)=>{const x=De(()=>e(S).length>0&&e(S)[0][e(s)]?String(e(S)[0][e(s)]).slice(0,30):""),m=De(()=>!e(S).length||e(S).every(le=>!le[e(s)]||String(le[e(s)]).length<25)),c=De(()=>e(S).map(le=>le[e(s)]).filter(le=>le!=null&&le!==""&&String(le).trim()!=="")),Y=De(()=>new Set(e(c))),W=De(()=>!e(c).length||e(Y).size===e(c).length),j=De(()=>e(c).length>0);var A=Me(),be=ye(A);{var $e=le=>{var he=yt(),xr=a(he);t(he);var Tr={};F(()=>{E(xr,`${e(s)??""}${e(x)?` (e.g., ${e(x)})`:""}`),Tr!==(Tr=e(s))&&(he.value=(he.__value=e(s))??"")}),d(le,he)};M(be,le=>{e(m)&&e(W)&&e(j)&&le($e)})}d(r,A)}),t(er),_e(2),t(Dr),t(ee),t(y);var gr=i(y,2),Mr=i(a(gr),4),pr=a(Mr),Oe=i(a(pr),2),zr=a(Oe);ce(zr,1,()=>e(f).filter(r=>!e(p).get(r)||e(p).get(r)?.tab===null),r=>r,(r,s)=>{var x=wt(),m=i(a(x),2),c=a(m,!0);t(m);var Y=i(m,2);{var W=j=>{var A=_t();d(j,A)};M(Y,j=>{e(s)===e(V)&&j(W)})}t(x),F(()=>{qe(x,"aria-label",`Drag ${e(s)??""} field`),E(c,e(s))}),g("dragstart",x,j=>xe(j,e(s))),g("dragend",x,oe),d(r,x)});var Zr=i(zr,2);{var Rr=r=>{var s=kt();d(r,s)};M(Zr,r=>{e(f).filter(s=>!e(p).get(s)||e(p).get(s)?.tab===null).length===0&&r(Rr)})}t(Oe),t(pr);var ur=i(pr,2),Pe=i(a(ur),2),Ar=a(Pe);ce(Ar,3,()=>Array.from(e(p).entries()).filter(([r,s])=>s.tab==="overview").sort((r,s)=>r[1].displayOrder-s[1].displayOrder),([r,s])=>r,(r,s)=>{var x=hr(()=>yr(e(s),2));let m=()=>e(x)[0];var c=Ct(),Y=a(c);kr(Y,{class:"w-3 h-3 mr-2 flex-shrink-0"});var W=i(Y,2),j=a(W,!0);t(W),t(c),F(()=>{qe(c,"aria-label",`${m()??""} field in Overview tab`),se(c,1,`flex items-center px-3 py-2 bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-300 rounded text-sm cursor-move hover:bg-blue-200 dark:hover:bg-blue-800/30 transition-colors
3
3
  ${e(ae)===m()&&e($)!==m()?"border-t-2 border-blue-500":""}`),E(j,m())}),g("dragstart",c,A=>xe(A,m())),g("dragend",c,oe),g("dragover",c,A=>ze(A,m())),g("dragleave",c,Ce),g("drop",c,A=>Se(A,m(),"overview")),d(r,c)});var qr=i(Ar,2);{var Ur=r=>{var s=St();d(r,s)};M(qr,r=>{Array.from(e(p).entries()).filter(([s,x])=>x.tab==="overview").length===0&&r(Ur)})}t(Pe),t(ur);var br=i(ur,2),He=i(a(br),2),Fr=a(He);ce(Fr,3,()=>Array.from(e(p).entries()).filter(([r,s])=>s.tab==="implementation").sort((r,s)=>r[1].displayOrder-s[1].displayOrder),([r,s])=>r,(r,s)=>{var x=hr(()=>yr(e(s),2));let m=()=>e(x)[0];var c=$t(),Y=a(c);kr(Y,{class:"w-3 h-3 mr-2 flex-shrink-0"});var W=i(Y,2),j=a(W,!0);t(W),t(c),F(()=>{qe(c,"aria-label",`${m()??""} field in Implementation tab`),se(c,1,`flex items-center px-3 py-2 bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300 rounded text-sm cursor-move hover:bg-green-200 dark:hover:bg-green-800/30 transition-colors
4
4
  ${e(ae)===m()&&e($)!==m()?"border-t-2 border-green-500":""}`),E(j,m())}),g("dragstart",c,A=>xe(A,m())),g("dragend",c,oe),g("dragover",c,A=>ze(A,m())),g("dragleave",c,Ce),g("drop",c,A=>Se(A,m(),"implementation")),d(r,c)});var Jr=i(Fr,2);{var Yr=r=>{var s=Dt();d(r,s)};M(Jr,r=>{Array.from(e(p).entries()).filter(([s,x])=>x.tab==="implementation").length===0&&r(Yr)})}t(He),t(br);var fr=i(br,2),Ee=i(a(fr),2),Or=a(Ee);ce(Or,3,()=>Array.from(e(p).entries()).filter(([r,s])=>s.tab==="custom").sort((r,s)=>r[1].displayOrder-s[1].displayOrder),([r,s])=>r,(r,s)=>{var x=hr(()=>yr(e(s),2));let m=()=>e(x)[0];var c=Mt(),Y=a(c);kr(Y,{class:"w-3 h-3 mr-2 flex-shrink-0"});var W=i(Y,2),j=a(W,!0);t(W),t(c),F(()=>{qe(c,"aria-label",`${m()??""} field in Custom tab`),se(c,1,`flex items-center px-3 py-2 bg-purple-100 dark:bg-purple-900/30 text-purple-800 dark:text-purple-300 rounded text-sm cursor-move hover:bg-purple-200 dark:hover:bg-purple-800/30 transition-colors
@@ -1 +1 @@
1
- {"version":"1758673933685"}
1
+ {"version":"1758737015632"}
@@ -1755,7 +1755,7 @@ var init_fileStore = __esm({
1755
1755
  if (!parsed.id) {
1756
1756
  try {
1757
1757
  parsed.id = getControlId(parsed, this.baseDir);
1758
- } catch (error) {
1758
+ } catch {
1759
1759
  parsed.id = controlId;
1760
1760
  }
1761
1761
  }
@@ -1782,7 +1782,7 @@ var init_fileStore = __esm({
1782
1782
  if (!parsed.id) {
1783
1783
  try {
1784
1784
  parsed.id = getControlId(parsed, this.baseDir);
1785
- } catch (error) {
1785
+ } catch {
1786
1786
  parsed.id = controlId;
1787
1787
  }
1788
1788
  }
@@ -2000,14 +2000,16 @@ var init_fileStore = __esm({
2000
2000
  /**
2001
2001
  * Delete a single mapping
2002
2002
  */
2003
- async deleteMapping(uuid) {
2003
+ async deleteMapping(compositeKey) {
2004
2004
  const mappingFiles = this.getAllMappingFiles();
2005
2005
  for (const file of mappingFiles) {
2006
2006
  try {
2007
2007
  const content = readFileSync2(file, "utf8");
2008
2008
  let mappings = yaml2.load(content) || [];
2009
2009
  const originalLength = mappings.length;
2010
- mappings = mappings.filter((m) => m.uuid !== uuid);
2010
+ mappings = mappings.filter((m) => {
2011
+ return `${m.control_id}:${m.uuid}` !== compositeKey;
2012
+ });
2011
2013
  if (mappings.length < originalLength) {
2012
2014
  if (mappings.length === 0) {
2013
2015
  unlinkSync(file);
@@ -2809,7 +2811,8 @@ async function loadAllData() {
2809
2811
  debug(`Loaded ${controls.length} controls from individual files`);
2810
2812
  const mappings = await state.fileStore.loadMappings();
2811
2813
  for (const mapping of mappings) {
2812
- state.mappingsCache.set(mapping.uuid, mapping);
2814
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
2815
+ state.mappingsCache.set(compositeKey, mapping);
2813
2816
  addMappingToIndexes(mapping);
2814
2817
  }
2815
2818
  debug(`Loaded ${mappings.length} mappings`);
@@ -4586,7 +4589,8 @@ var WebSocketManager = class {
4586
4589
  mapping.uuid = crypto2.randomUUID();
4587
4590
  }
4588
4591
  await state.fileStore.saveMapping(mapping);
4589
- state.mappingsCache.set(mapping.uuid, mapping);
4592
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
4593
+ state.mappingsCache.set(compositeKey, mapping);
4590
4594
  const family = mapping.control_id.split("-")[0];
4591
4595
  if (!state.mappingsByFamily.has(family)) {
4592
4596
  state.mappingsByFamily.set(family, /* @__PURE__ */ new Set());
@@ -4611,7 +4615,8 @@ var WebSocketManager = class {
4611
4615
  if (payload && payload.uuid) {
4612
4616
  const mapping = payload;
4613
4617
  await state.fileStore.saveMapping(mapping);
4614
- state.mappingsCache.set(mapping.uuid, mapping);
4618
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
4619
+ state.mappingsCache.set(compositeKey, mapping);
4615
4620
  ws.send(
4616
4621
  JSON.stringify({
4617
4622
  type: "mapping-updated",
@@ -1737,7 +1737,7 @@ var init_fileStore = __esm({
1737
1737
  if (!parsed.id) {
1738
1738
  try {
1739
1739
  parsed.id = getControlId(parsed, this.baseDir);
1740
- } catch (error) {
1740
+ } catch {
1741
1741
  parsed.id = controlId;
1742
1742
  }
1743
1743
  }
@@ -1764,7 +1764,7 @@ var init_fileStore = __esm({
1764
1764
  if (!parsed.id) {
1765
1765
  try {
1766
1766
  parsed.id = getControlId(parsed, this.baseDir);
1767
- } catch (error) {
1767
+ } catch {
1768
1768
  parsed.id = controlId;
1769
1769
  }
1770
1770
  }
@@ -1982,14 +1982,16 @@ var init_fileStore = __esm({
1982
1982
  /**
1983
1983
  * Delete a single mapping
1984
1984
  */
1985
- async deleteMapping(uuid) {
1985
+ async deleteMapping(compositeKey) {
1986
1986
  const mappingFiles = this.getAllMappingFiles();
1987
1987
  for (const file of mappingFiles) {
1988
1988
  try {
1989
1989
  const content = readFileSync2(file, "utf8");
1990
1990
  let mappings = yaml2.load(content) || [];
1991
1991
  const originalLength = mappings.length;
1992
- mappings = mappings.filter((m) => m.uuid !== uuid);
1992
+ mappings = mappings.filter((m) => {
1993
+ return `${m.control_id}:${m.uuid}` !== compositeKey;
1994
+ });
1993
1995
  if (mappings.length < originalLength) {
1994
1996
  if (mappings.length === 0) {
1995
1997
  unlinkSync(file);
@@ -2791,7 +2793,8 @@ async function loadAllData() {
2791
2793
  debug(`Loaded ${controls.length} controls from individual files`);
2792
2794
  const mappings = await state.fileStore.loadMappings();
2793
2795
  for (const mapping of mappings) {
2794
- state.mappingsCache.set(mapping.uuid, mapping);
2796
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
2797
+ state.mappingsCache.set(compositeKey, mapping);
2795
2798
  addMappingToIndexes(mapping);
2796
2799
  }
2797
2800
  debug(`Loaded ${mappings.length} mappings`);
@@ -4563,7 +4566,8 @@ var WebSocketManager = class {
4563
4566
  mapping.uuid = crypto2.randomUUID();
4564
4567
  }
4565
4568
  await state.fileStore.saveMapping(mapping);
4566
- state.mappingsCache.set(mapping.uuid, mapping);
4569
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
4570
+ state.mappingsCache.set(compositeKey, mapping);
4567
4571
  const family = mapping.control_id.split("-")[0];
4568
4572
  if (!state.mappingsByFamily.has(family)) {
4569
4573
  state.mappingsByFamily.set(family, /* @__PURE__ */ new Set());
@@ -4588,7 +4592,8 @@ var WebSocketManager = class {
4588
4592
  if (payload && payload.uuid) {
4589
4593
  const mapping = payload;
4590
4594
  await state.fileStore.saveMapping(mapping);
4591
- state.mappingsCache.set(mapping.uuid, mapping);
4595
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
4596
+ state.mappingsCache.set(compositeKey, mapping);
4592
4597
  ws.send(
4593
4598
  JSON.stringify({
4594
4599
  type: "mapping-updated",
@@ -1737,7 +1737,7 @@ var init_fileStore = __esm({
1737
1737
  if (!parsed.id) {
1738
1738
  try {
1739
1739
  parsed.id = getControlId(parsed, this.baseDir);
1740
- } catch (error) {
1740
+ } catch {
1741
1741
  parsed.id = controlId;
1742
1742
  }
1743
1743
  }
@@ -1764,7 +1764,7 @@ var init_fileStore = __esm({
1764
1764
  if (!parsed.id) {
1765
1765
  try {
1766
1766
  parsed.id = getControlId(parsed, this.baseDir);
1767
- } catch (error) {
1767
+ } catch {
1768
1768
  parsed.id = controlId;
1769
1769
  }
1770
1770
  }
@@ -1982,14 +1982,16 @@ var init_fileStore = __esm({
1982
1982
  /**
1983
1983
  * Delete a single mapping
1984
1984
  */
1985
- async deleteMapping(uuid) {
1985
+ async deleteMapping(compositeKey) {
1986
1986
  const mappingFiles = this.getAllMappingFiles();
1987
1987
  for (const file of mappingFiles) {
1988
1988
  try {
1989
1989
  const content = readFileSync2(file, "utf8");
1990
1990
  let mappings = yaml2.load(content) || [];
1991
1991
  const originalLength = mappings.length;
1992
- mappings = mappings.filter((m) => m.uuid !== uuid);
1992
+ mappings = mappings.filter((m) => {
1993
+ return `${m.control_id}:${m.uuid}` !== compositeKey;
1994
+ });
1993
1995
  if (mappings.length < originalLength) {
1994
1996
  if (mappings.length === 0) {
1995
1997
  unlinkSync(file);
@@ -2791,7 +2793,8 @@ async function loadAllData() {
2791
2793
  debug(`Loaded ${controls.length} controls from individual files`);
2792
2794
  const mappings = await state.fileStore.loadMappings();
2793
2795
  for (const mapping of mappings) {
2794
- state.mappingsCache.set(mapping.uuid, mapping);
2796
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
2797
+ state.mappingsCache.set(compositeKey, mapping);
2795
2798
  addMappingToIndexes(mapping);
2796
2799
  }
2797
2800
  debug(`Loaded ${mappings.length} mappings`);
@@ -4563,7 +4566,8 @@ var WebSocketManager = class {
4563
4566
  mapping.uuid = crypto2.randomUUID();
4564
4567
  }
4565
4568
  await state.fileStore.saveMapping(mapping);
4566
- state.mappingsCache.set(mapping.uuid, mapping);
4569
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
4570
+ state.mappingsCache.set(compositeKey, mapping);
4567
4571
  const family = mapping.control_id.split("-")[0];
4568
4572
  if (!state.mappingsByFamily.has(family)) {
4569
4573
  state.mappingsByFamily.set(family, /* @__PURE__ */ new Set());
@@ -4588,7 +4592,8 @@ var WebSocketManager = class {
4588
4592
  if (payload && payload.uuid) {
4589
4593
  const mapping = payload;
4590
4594
  await state.fileStore.saveMapping(mapping);
4591
- state.mappingsCache.set(mapping.uuid, mapping);
4595
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
4596
+ state.mappingsCache.set(compositeKey, mapping);
4592
4597
  ws.send(
4593
4598
  JSON.stringify({
4594
4599
  type: "mapping-updated",
@@ -158,7 +158,7 @@ var FileStore = class {
158
158
  if (!parsed.id) {
159
159
  try {
160
160
  parsed.id = getControlId(parsed, this.baseDir);
161
- } catch (error) {
161
+ } catch {
162
162
  parsed.id = controlId;
163
163
  }
164
164
  }
@@ -185,7 +185,7 @@ var FileStore = class {
185
185
  if (!parsed.id) {
186
186
  try {
187
187
  parsed.id = getControlId(parsed, this.baseDir);
188
- } catch (error) {
188
+ } catch {
189
189
  parsed.id = controlId;
190
190
  }
191
191
  }
@@ -403,14 +403,16 @@ var FileStore = class {
403
403
  /**
404
404
  * Delete a single mapping
405
405
  */
406
- async deleteMapping(uuid) {
406
+ async deleteMapping(compositeKey) {
407
407
  const mappingFiles = this.getAllMappingFiles();
408
408
  for (const file of mappingFiles) {
409
409
  try {
410
410
  const content = readFileSync2(file, "utf8");
411
411
  let mappings = yaml2.load(content) || [];
412
412
  const originalLength = mappings.length;
413
- mappings = mappings.filter((m) => m.uuid !== uuid);
413
+ mappings = mappings.filter((m) => {
414
+ return `${m.control_id}:${m.uuid}` !== compositeKey;
415
+ });
414
416
  if (mappings.length < originalLength) {
415
417
  if (mappings.length === 0) {
416
418
  unlinkSync(file);
@@ -1186,7 +1188,8 @@ async function loadAllData() {
1186
1188
  debug(`Loaded ${controls.length} controls from individual files`);
1187
1189
  const mappings = await state.fileStore.loadMappings();
1188
1190
  for (const mapping of mappings) {
1189
- state.mappingsCache.set(mapping.uuid, mapping);
1191
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
1192
+ state.mappingsCache.set(compositeKey, mapping);
1190
1193
  addMappingToIndexes(mapping);
1191
1194
  }
1192
1195
  debug(`Loaded ${mappings.length} mappings`);
@@ -184,7 +184,7 @@ var init_fileStore = __esm({
184
184
  if (!parsed.id) {
185
185
  try {
186
186
  parsed.id = getControlId(parsed, this.baseDir);
187
- } catch (error) {
187
+ } catch {
188
188
  parsed.id = controlId;
189
189
  }
190
190
  }
@@ -211,7 +211,7 @@ var init_fileStore = __esm({
211
211
  if (!parsed.id) {
212
212
  try {
213
213
  parsed.id = getControlId(parsed, this.baseDir);
214
- } catch (error) {
214
+ } catch {
215
215
  parsed.id = controlId;
216
216
  }
217
217
  }
@@ -429,14 +429,16 @@ var init_fileStore = __esm({
429
429
  /**
430
430
  * Delete a single mapping
431
431
  */
432
- async deleteMapping(uuid) {
432
+ async deleteMapping(compositeKey) {
433
433
  const mappingFiles = this.getAllMappingFiles();
434
434
  for (const file of mappingFiles) {
435
435
  try {
436
436
  const content = readFileSync2(file, "utf8");
437
437
  let mappings = yaml2.load(content) || [];
438
438
  const originalLength = mappings.length;
439
- mappings = mappings.filter((m) => m.uuid !== uuid);
439
+ mappings = mappings.filter((m) => {
440
+ return `${m.control_id}:${m.uuid}` !== compositeKey;
441
+ });
440
442
  if (mappings.length < originalLength) {
441
443
  if (mappings.length === 0) {
442
444
  unlinkSync(file);
@@ -1238,7 +1240,8 @@ async function loadAllData() {
1238
1240
  debug(`Loaded ${controls.length} controls from individual files`);
1239
1241
  const mappings = await state.fileStore.loadMappings();
1240
1242
  for (const mapping of mappings) {
1241
- state.mappingsCache.set(mapping.uuid, mapping);
1243
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
1244
+ state.mappingsCache.set(compositeKey, mapping);
1242
1245
  addMappingToIndexes(mapping);
1243
1246
  }
1244
1247
  debug(`Loaded ${mappings.length} mappings`);
@@ -2143,7 +2146,8 @@ var WebSocketManager = class {
2143
2146
  mapping.uuid = crypto2.randomUUID();
2144
2147
  }
2145
2148
  await state.fileStore.saveMapping(mapping);
2146
- state.mappingsCache.set(mapping.uuid, mapping);
2149
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
2150
+ state.mappingsCache.set(compositeKey, mapping);
2147
2151
  const family = mapping.control_id.split("-")[0];
2148
2152
  if (!state.mappingsByFamily.has(family)) {
2149
2153
  state.mappingsByFamily.set(family, /* @__PURE__ */ new Set());
@@ -2168,7 +2172,8 @@ var WebSocketManager = class {
2168
2172
  if (payload && payload.uuid) {
2169
2173
  const mapping = payload;
2170
2174
  await state.fileStore.saveMapping(mapping);
2171
- state.mappingsCache.set(mapping.uuid, mapping);
2175
+ const compositeKey = `${mapping.control_id}:${mapping.uuid}`;
2176
+ state.mappingsCache.set(compositeKey, mapping);
2172
2177
  ws.send(
2173
2178
  JSON.stringify({
2174
2179
  type: "mapping-updated",
package/dist/index.html CHANGED
@@ -6,10 +6,10 @@
6
6
  <link rel="icon" href="/lula.png" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
8
8
 
9
- <link rel="modulepreload" href="/_app/immutable/entry/start.CNJ8UExp.js">
10
- <link rel="modulepreload" href="/_app/immutable/chunks/DUYNrdfy.js">
9
+ <link rel="modulepreload" href="/_app/immutable/entry/start.Ca2qbK08.js">
10
+ <link rel="modulepreload" href="/_app/immutable/chunks/CgOk0Ct0.js">
11
11
  <link rel="modulepreload" href="/_app/immutable/chunks/B8sFn9qB.js">
12
- <link rel="modulepreload" href="/_app/immutable/entry/app.CmauYmwF.js">
12
+ <link rel="modulepreload" href="/_app/immutable/entry/app.DCeR7c2L.js">
13
13
  <link rel="modulepreload" href="/_app/immutable/chunks/DsnmJJEf.js">
14
14
  <link rel="modulepreload" href="/_app/immutable/chunks/AMsv4DTs.js">
15
15
  <link rel="modulepreload" href="/_app/immutable/chunks/DL7cUWpq.js">
@@ -19,15 +19,15 @@
19
19
  <div style="display: contents">
20
20
  <script>
21
21
  {
22
- __sveltekit_zzc82m = {
22
+ __sveltekit_1tcob8e = {
23
23
  base: ""
24
24
  };
25
25
 
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("/_app/immutable/entry/start.CNJ8UExp.js"),
30
- import("/_app/immutable/entry/app.CmauYmwF.js")
29
+ import("/_app/immutable/entry/start.Ca2qbK08.js"),
30
+ import("/_app/immutable/entry/app.DCeR7c2L.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });