lula2 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -28
- package/dist/_app/immutable/assets/0.C97xfQzG.css +1 -0
- package/dist/_app/immutable/chunks/BJF-sFqz.js +2 -0
- package/dist/_app/immutable/chunks/{7x_q-1ab.js → BYKwBiub.js} +1 -1
- package/dist/_app/immutable/chunks/{CMWPLh7h.js → Bg93OsgA.js} +1 -1
- package/dist/_app/immutable/chunks/Bh_lsY1c.js +3 -0
- package/dist/_app/immutable/chunks/{BR-0Dorr.js → BqNBD7oY.js} +1 -1
- package/dist/_app/immutable/chunks/{D3aNP_lg.js → Bty54Wy4.js} +1 -1
- package/dist/_app/immutable/chunks/{B19gt6-g.js → CBYXl-8c.js} +1 -1
- package/dist/_app/immutable/chunks/{D4Q_ObIy.js → DUz6FRLu.js} +1 -1
- package/dist/_app/immutable/chunks/{B8y4N5iB.js → Ds9w7fzN.js} +1 -1
- package/dist/_app/immutable/entry/{app.gXI-RXWG.js → app.BycSt6Ly.js} +2 -2
- package/dist/_app/immutable/entry/start.CStyDRI8.js +1 -0
- package/dist/_app/immutable/nodes/{0.CSH0JcZp.js → 0.liUzuc-A.js} +1 -1
- package/dist/_app/immutable/nodes/{1.B2ee3OXU.js → 1.t1GUCrrv.js} +1 -1
- package/dist/_app/immutable/nodes/{2.D-sdW8nU.js → 2.CTVpMB9b.js} +1 -1
- package/dist/_app/immutable/nodes/{3.DpuBpKOB.js → 3.DnzjoQZ0.js} +1 -1
- package/dist/_app/immutable/nodes/{4.OaCXaSqf.js → 4.Dvs__DIQ.js} +1 -1
- package/dist/_app/version.json +1 -1
- package/dist/cli/commands/ui.js +2421 -4
- package/dist/cli/commands/version.js +4 -1
- package/dist/cli/server/index.js +2421 -4
- package/dist/cli/server/server.js +2421 -4
- package/dist/index.html +10 -10
- package/dist/index.js +2427 -7
- package/package.json +12 -11
- package/dist/_app/immutable/assets/0.DtiRW3lO.css +0 -1
- package/dist/_app/immutable/chunks/B_3ksxz5.js +0 -2
- package/dist/_app/immutable/chunks/DQAUO7J_.js +0 -3
- package/dist/_app/immutable/entry/start.B_FNOkXN.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{b2 as Ae,o as De,g as L,h as P,d as x,bg as yt,as as Fe}from"./BJF-sFqz.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 me({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 u=>(n(u),i[o](u));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"&&G.delete(Te(e)),Rt(e,t));const G=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&&G.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(G.size>0){const r=Te(e,n),a=G.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);G.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,u)=>{if(u%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const d=Ut.exec(c),[,h,f,l,p]=d;return t.push({name:l,matcher:p,optional:!!h,rest:!!f,chained:f?u===1&&i[0]==="":!1}),f?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return _e(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 u=a[o-i];if(c.chained&&c.rest&&i&&(u=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),u===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](u)){r[c.name]=u;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Nt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,u,d]])=>{const{pattern:h,params:f}=Lt(o),l={id:o,exec:p=>{const w=h.exec(p);if(w)return Ct(w,f,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...u||[]].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 ze(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 T=globalThis.__sveltekit_aeogwl?.base??"",Ot=globalThis.__sveltekit_aeogwl?.assets??T,jt="1757525976934",Xe="sveltekit:snapshot",Ze="sveltekit:scroll",Qe="sveltekit:states",$t="sveltekit:pageurl",B="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 ue(){return{x:pageXOffset,y:pageYOffset}}function F(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...j,"":j.hover};function et(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function tt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=et(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||fe(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=F(o,"preload-code")),a===null&&(a=F(o,"preload-data")),t===null&&(t=F(o,"keepfocus")),n===null&&(n=F(o,"noscroll")),s===null&&(s=F(o,"reload")),i===null&&(i=F(o,"replacestate")),o=et(o);function c(u){switch(u){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Me(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 nt={v:()=>{}};function Dt(){const{set:e,subscribe:t}=Ae(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ot}/_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),nt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function fe(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 Ft(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 Bt="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|=Bt.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,Ht=-4,Kt=-5,Yt=-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===Ht)return 1/0;if(s===Kt)return-1/0;if(s===Yt)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],u=t?.[c];if(u)return r[s]=u(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 h=new Map;r[s]=h;for(let l=1;l<o.length;l+=2)h.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 f=Object.create(null);r[s]=f;for(let l=1;l<o.length;l+=2)f[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],p=new l(a(o[1]));r[s]=o[2]!==void 0?p.subarray(o[2],o[3]):p;break}case"ArrayBuffer":{const l=o[1],p=Ft(l);r[s]=p;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 u=0;u<o.length;u+=1){const d=o[u];d!==qt&&(c[u]=a(d))}}else{const c={};r[s]=c;for(const u in o){if(u==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const d=o[u];c[u]=a(d)}}return r[s]}return a(0)}const rt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...rt];const Jt=new Set([...rt]);[...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 A,J,ye;const en=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());en?(A={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ye={current:!1}):(A=new class{#e=L({});get data(){return P(this.#e)}set data(t){x(this.#e,t)}#t=L(null);get form(){return P(this.#t)}set form(t){x(this.#t,t)}#n=L(null);get error(){return P(this.#n)}set error(t){x(this.#n,t)}#r=L({});get params(){return P(this.#r)}set params(t){x(this.#r,t)}#a=L({id:null});get route(){return P(this.#a)}set route(t){x(this.#a,t)}#o=L({});get state(){return P(this.#o)}set state(t){x(this.#o,t)}#s=L(-1);get status(){return P(this.#s)}set status(t){x(this.#s,t)}#i=L(new URL("https://example.com"));get url(){return P(this.#i)}set url(t){x(this.#i,t)}},J=new class{#e=L(null);get current(){return P(this.#e)}set current(t){x(this.#e,t)}},ye=new class{#e=L(!1);get current(){return P(this.#e)}set current(t){x(this.#e,t)}},nt.v=()=>ye.current=!0);function tn(e){Object.assign(A,e)}const nn="/__data.json",rn=".html__data.json";function an(e){return e.endsWith(".html")?e.replace(/\.html$/,rn):e.replace(/\/$/,"")+nn}const qe={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=ze(Ze)??{},z=ze(Xe)??{},O={url:Me({}),page:Me({}),navigating:Ae(null),updated:Dt()};function Ue(e){D[e]=ue()}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 M(e){return location.href=e.href,new Promise(()=>{})}async function at(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(T||"/");e&&await e.update()}}function Ge(){}let Le,be,re,C,ke,v;globalThis.__sveltekit_aeogwl?.data;const ae=[],oe=[];let N=null;const ee=new Map,ot=new Set,un=new Set,H=new Set;let y={branch:[],error:null,url:null},Pe=!1,se=!1,He=!0,X=!1,q=!1,st=!1,xe=!1,it,k,R,$;const K=new Set,Ke=new Map;async function In(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Le=Nt(e),C=document.documentElement,ke=t,be=e.nodes[0],re=e.nodes[1],be(),re(),k=history.state?.[B],R=history.state?.[W],k||(k=R=Date.now(),history.replaceState({...history.state,[B]:k,[W]:R},""));const r=D[k];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await vn(ke,n)):(await Y({type:"enter",url:Ie(v.hash?kn(new URL(location.href)):location.href),replace_state:!0}),a()),wn()}function fn(){ae.length=0,xe=!1}function ct(e){oe.some(t=>t?.snapshot)&&(z[e]=oe.map(t=>t?.snapshot?.capture()))}function lt(e){z[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function Ye(){Ue(k),Be(Ze,D),ct(R),Be(Xe,z)}async function Ce(e,t,n,r){let a;const s=await Y({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=[...Ke.keys()]),t.invalidate&&t.invalidate.forEach(yn)}});return t.invalidateAll&&Fe().then(Fe).then(()=>{Ke.forEach(({resource:i},o)=>{a?.includes(o)&&i.refresh?.()})}),s}async function dn(e){if(e.id!==N?.id){const t={};K.add(t),N={id:e.id,token:t,promise:dt({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(N=null),n))}}return N.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 ut(e,t,n){y=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(A,e.props.page),it=new v.root({target:t,props:{...e.props,stores:O,components:oe},hydrate:n,sync:!1}),lt(R),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(T&&(e.pathname===T||e.pathname===T+"/"))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:$e(A)}};i!==void 0&&(c.props.form=i);let u={},d=!A,h=0;for(let l=0;l<Math.max(n.length,y.branch.length);l+=1){const p=n[l],w=y.branch[l];p?.data!==w?.data&&(d=!0),p&&(u={...u,...p.data},d&&(c.props[`data_${h}`]=u),h+=1)}return(!y.url||e.href!==y.url.href||y.error!==a||i!==void 0&&i!==A.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?u:A.data}),c}async function Ne({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},u=await e();if(u.universal?.load){let d=function(...f){for(const l of f){const{href:p}=new URL(l,n);c.dependencies.add(p)}};const h={tracing:{enabled:!1,root:qe,current:qe},route:new Proxy(a,{get:(f,l)=>(o&&(c.route=!0),f[l])}),params:new Proxy(r,{get:(f,l)=>(o&&c.params.add(l),f[l])}),data:s?.data??null,url:kt(n,()=>{o&&(c.url=!0)},f=>{o&&c.search_params.add(f)},v.hash),async fetch(f,l){f instanceof Request&&(l={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...l});const{resolved:p,promise:w}=ft(f,l,n);return o&&d(p.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};i=await u.universal.load.call(null,h)??null}return{node:u,loader:e,server:s,universal:u.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:u.universal?.trailingSlash??s?.slash}}function ft(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 We(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 Je({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$e(A),constructors:[]}}}async function dt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(N?.id===e)return K.delete(N.token),N.promise;const{errors:i,layouts:o,leaf:c}=a,u=[...o,c];i.forEach(g=>g?.().catch(()=>{})),u.forEach(g=>g?.[1]().catch(()=>{}));let d=null;const h=y.url?e!==ce(y.url):!1,f=y.route?a.id!==y.route.id:!1,l=hn(y.url,n);let p=!1;const w=u.map((g,_)=>{const b=y.branch[_],E=!!g?.[0]&&(b?.loader!==g[1]||We(p,f,h,l,b.server?.uses,r));return E&&(p=!0),E});if(w.some(Boolean)){try{d=await gt(n,w)}catch(g){const _=await V(g,{url:n,params:r,route:{id:e}});return K.has(s)?Je({error:_,url:n,params:r,route:a}):de({status:ne(g),error:_,url:n,route:a})}if(d.type==="redirect")return d}const m=d?.nodes;let S=!1;const U=u.map(async(g,_)=>{if(!g)return;const b=y.branch[_],E=m?.[_];if((!E||E.type==="skip")&&g[1]===b?.loader&&!We(S,f,h,l,b.universal?.uses,r))return b;if(S=!0,E?.type==="error")throw E;return Ne({loader:g[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge<_;ge+=1)Object.assign(pe,(await U[ge])?.data);return pe},server_data_node:Oe(E===void 0&&g[0]?{type:"skip"}:E??null,g[0]?b?.server:void 0)})});for(const g of U)g.catch(()=>{});const I=[];for(let g=0;g<u.length;g+=1)if(u[g])try{I.push(await U[g])}catch(_){if(_ instanceof Se)return{type:"redirect",location:_.location};if(K.has(s))return Je({error:await V(_,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=ne(_),E;if(m?.includes(_))b=_.status??b,E=_.error;else if(_ instanceof le)E=_.body;else{if(await O.updated.check())return await at(),await M(n);E=await V(_,{params:r,url:n,route:{id:a.id}})}const Q=await pn(g,I,i);return Q?ie({url:n,params:r,branch:I.slice(0,Q.idx).concat(Q.node),status:b,error:E,route:a}):await pt(n,{id:a.id},E,b)}else I.push(void 0);return ie({url:n,params:r,branch:I,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(v.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 M(n)}try{const o=await Ne({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 Ce(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 v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>ft(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.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&&!fe(e,T,v.hash)){const n=await gn(e);if(!n)return;const r=mn(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 mn(e){return vt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(T.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:n,delta:r}){let a=!1;const s=je(y,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return X||ot.forEach(o=>o(i)),a?null:s}async function Y({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:u=Ge,block:d=Ge}){const h=$;$=c;const f=await he(t,!1),l=e==="enter"?je(y,f,t,e):ht({url:t,type:e,delta:n?.delta,intent:f});if(!l){d(),$===c&&($=h);return}const p=k,w=R;u(),X=!0,se&&l.navigation.type!=="enter"&&O.navigating.set(J.current=l.navigation);let m=f&&await dt(f);if(!m){if(fe(t,T,v.hash))return await M(t);m=await pt(t,{id:null},await V(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=f?.url||t,$!==c)return l.reject(new Error("navigation aborted")),!1;if(m.type==="redirect")if(o>=20)m=await de({status:500,error:await V(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await Ce(new URL(m.location,t).href,{},o+1,c),!1;else m.props.page.status>=400&&await O.updated.check()&&(await at(),await M(t));if(fn(),Ue(p),ct(w),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,_={[B]:k+=g,[W]:R+=g,[Qe]:i};(s?history.replaceState:history.pushState).call(history,_,"",t),s||ln(k,R)}if(N=null,m.props.page.state=i,se){const g=(await Promise.all(Array.from(un,_=>_(l.navigation)))).filter(_=>typeof _=="function");if(g.length>0){let _=function(){g.forEach(b=>{H.delete(b)})};g.push(_),g.forEach(b=>{H.add(b)})}y=m.state,m.props.page&&(m.props.page.url=t),it.$set(m.props),tn(m.props.page),st=!0}else ut(m,ke,!1);const{activeElement:S}=document;await sn();const U=n?n.scroll:a?ue():null;if(He){const g=t.hash&&document.getElementById(_t(t));U?scrollTo(U.x,U.y):g?g.scrollIntoView():scrollTo(0,0)}const I=document.activeElement!==S&&document.activeElement!==document.body;!r&&!I&&bn(t),He=!0,m.props.page&&Object.assign(A,m.props.page),X=!1,e==="popstate"&<(R),l.fulfil(void 0),H.forEach(g=>g(l.navigation)),O.navigating.set(J.current=null)}async function pt(e,t,n,r){return e.origin===Z&&e.pathname===location.pathname&&!Pe?await de({status:r,error:n,url:e,route:t}):await M(e)}function _n(){let e,t,n;C.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)}C.addEventListener("mousedown",r),C.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 u=tt(o,C),d=u===t&&c>=n;if(!u||d)return;const{url:h,external:f,download:l}=ve(u,T,v.hash);if(f||l)return;const p=te(u),w=h&&ce(y.url)===ce(h);if(!(p.reload||w))if(c<=p.preload_data){t=u,n=j.tap;const m=await he(h,!1);if(!m)return;dn(m)}else c<=p.preload_code&&(t=u,n=c,we(h))}function i(){a.disconnect();for(const o of C.querySelectorAll("a")){const{url:c,external:u,download:d}=ve(o,T,v.hash);if(u||d)continue;const h=te(o);h.reload||(h.preload_code===j.viewport&&a.observe(o),h.preload_code===j.eager&&we(c))}}H.add(i),i()}function V(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Qt(e);return v.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")):Ce(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(Ye(),!X){const r=je(y,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};ot.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ye()}),navigator.connection?.saveData||_n(),C.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=tt(t.composedPath()[0],C);if(!n)return;const{url:r,external:a,target:s,download:i}=ve(n,T,v.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[u,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),h=u===me(location);if(a||o.reload&&(!h||!d)){ht({url:r,type:"link"})?X=!0:t.preventDefault();return}if(d!==void 0&&h){const[,f]=y.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const l=n.ownerDocument.getElementById(decodeURIComponent(d));l&&(l.scrollIntoView(),l.focus())}return}if(q=!0,Ue(k),e(r),!o.replace_state)return;q=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await Y({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),C.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(fe(i,T,!1))return;const o=t.target,c=te(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const u=new FormData(o),d=r?.getAttribute("name");d&&u.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(u).toString(),Y({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[B]){const n=t.state[B];if($={},n===k)return;const r=D[n],a=t.state[Qe]??{},s=new URL(t.state[$t]??location.href),i=t.state[W],o=y.url?me(location)===me(y.url):!1;if(i===R&&(st||o)){a!==A.state&&(A.state=a),e(s),D[k]=ue(),r&&scrollTo(r.x,r.y),k=n;return}const u=n-k;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:u},accept:()=>{k=n,R=i},block:()=>{history.go(-u)},nav_token:$})}else if(!q){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{q&&(q=!1,history.replaceState({...history.state,[B]:++k,[W]:R},"",location.href))});for(const t of document.querySelectorAll("link"))cn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&O.navigating.set(J.current=null)});function e(t){y.url=A.url=t,O.page.set($e(A)),O.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 u=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(u,!1)||{}),d=Le.find(({id:l})=>l===s.id);let h,f=!0;try{const l=r.map(async(w,m)=>{const S=o[m];return S?.uses&&(S.uses=mt(S.uses)),Ne({loader:v.nodes[w],url:u,params:a,route:s,parent:async()=>{const U={};for(let I=0;I<m;I+=1)Object.assign(U,(await l[I]).data);return U},server_data_node:Oe(S)})}),p=await Promise.all(l);if(d){const w=d.layouts;for(let m=0;m<w.length;m++)w[m]||p.splice(m,0,void 0)}h=ie({url:u,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(l){if(l instanceof Se){await M(new URL(l.location,location.href));return}h=await de({status:ne(l),error:await V(l,{url:u,params:a,route:s}),url:u,route:s}),e.textContent="",f=!1}h.props.page&&(h.props.page.state={}),ut(h,e,f)}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,{...v.decoders,Promise:h=>new Promise((f,l)=>{i.set(h,{fulfil:f,reject:l})})})}let u="";for(;;){const{done:d,value:h}=await o.read();if(d&&!u)break;for(u+=!h&&u?`
|
|
2
|
+
`:At.decode(h,{stream:!0});;){const f=u.indexOf(`
|
|
3
|
+
`);if(f===-1)break;const l=JSON.parse(u.slice(0,f));if(u=u.slice(f+1),l.type==="redirect")return s(l);if(l.type==="data")l.nodes?.forEach(p=>{p?.type==="data"&&(p.uses=mt(p.uses),p.data=c(p.data))}),s(l);else if(l.type==="chunk"){const{id:p,data:w,error:m}=l,S=i.get(p);i.delete(p),m?S.reject(c(m)):S.fulfil(c(w))}}}})}function mt(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){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=_t(e);if(n&&document.getElementById(n)){const{x:a,y:s}=ue();setTimeout(()=>{const i=history.state;Ee=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ee=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function je(e,t,n,r){let a,s;const i=new Promise((c,u)=>{a=c,s=u});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 $e(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 _t(e){let t;if(v.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,A as p,O as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l,m,t as p,E as _,v,w as h,x as s,y as b,z as x,A as y}from"./
|
|
1
|
+
import{l,m,t as p,E as _,v,w as h,x as s,y as b,z as x,A as y}from"./BJF-sFqz.js";function g(d,i,u){l&&m();var r=d,n,e,a=null,f=null;function t(){e&&(y(e),e=null),a&&(a.lastChild.remove(),r.before(a),a=null),e=f,f=null}p(()=>{if(n!==(n=i())){var c=b();if(n){var o=r;c&&(a=document.createDocumentFragment(),a.append(o=v()),e&&s.skipped_effects.add(e)),f=h(()=>u(o,n))}c?s.add_callback(t):t()}},_),l&&(r=x)}export{g as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as d,C as g,u as c,k as m,D as i,F as b,h as p,G as h,H as k,I as v}from"./
|
|
1
|
+
import{B as d,C as g,u as c,k as m,D as i,F as b,h as p,G as h,H as k,I as v}from"./BJF-sFqz.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let f=()=>h(s.s);if(n){let a=0,t={};const _=k(()=>{let l=!1;const r=s.s;for(const o in r)r[o]!==t[o]&&(t[o]=r[o],l=!0);return l&&a++,a});f=()=>p(_)}e.b.length&&g(()=>{u(s,f),i(e.b)}),c(()=>{const a=m(()=>e.m.map(b));return()=>{for(const t of a)typeof t=="function"&&t()}}),e.a.length&&c(()=>{u(s,f),i(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}v();export{x as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{O as K,l as k,aw as Ne,v as de,m as Me,t as ae,h as te,a0 as Oe,L as We,M as Ie,N as ie,P as R,z as D,ax as De,ay as Le,w as H,y as Pe,az as B,aA as J,x as W,aB as ve,aC as he,aD as pe,T as Re,ab as oe,aE as le,Q as we,A as $e,aF as X,q as He,aG as U,aH as Ue,aI as qe,aJ as Fe,aK as Ve,aL as Ye,aM as Be,a3 as Je,i as ne,aN as ze,aO as Ge,X as Ke,aP as se,aQ as Xe,aR as Qe,aS as Ze,aT as je,at as xe,aU as et,aV as tt,U as rt,aW as at,aX as nt,aY as st,aZ as it,a_ as ot,a$ as lt,b0 as ct,as as ft,k as be,j as _e,b1 as ut,b2 as dt}from"./
|
|
1
|
+
import{O as K,l as k,aw as Ne,v as de,m as Me,t as ae,h as te,a0 as Oe,L as We,M as Ie,N as ie,P as R,z as D,ax as De,ay as Le,w as H,y as Pe,az as B,aA as J,x as W,aB as ve,aC as he,aD as pe,T as Re,ab as oe,aE as le,Q as we,A as $e,aF as X,q as He,aG as U,aH as Ue,aI as qe,aJ as Fe,aK as Ve,aL as Ye,aM as Be,a3 as Je,i as ne,aN as ze,aO as Ge,X as Ke,aP as se,aQ as Xe,aR as Qe,aS as Ze,aT as je,at as xe,aU as et,aV as tt,U as rt,aW as at,aX as nt,aY as st,aZ as it,a_ as ot,a$ as lt,b0 as ct,as as ft,k as be,j as _e,b1 as ut,b2 as dt}from"./BJF-sFqz.js";function mt(e,t){return t}function vt(e,t,r){for(var a=e.items,n=[],s=t.length,i=0;i<s;i++)Ve(t[i].e,n,!0);var l=s>0&&n.length===0&&r!==null;if(l){var g=r.parentNode;Ye(g),g.append(r),a.clear(),T(e,t[0].prev,t[s-1].next)}Be(n,()=>{for(var d=0;d<s;d++){var S=t[d];l||(a.delete(S.k),T(e,S.prev,S.next)),U(S.e,!l)}})}function Tt(e,t,r,a,n,s=null){var i=e,l={flags:t,items:new Map,first:null},g=(t&ve)!==0;if(g){var d=e;i=k?K(Ne(d)):d.appendChild(de())}k&&Me();var S=null,y=!1,w=new Map,E=Oe(()=>{var h=r();return pe(h)?h:h==null?[]:he(h)}),f,u;function _(){ht(u,f,l,w,i,n,t,a,r),s!==null&&(f.length===0?S?we(S):S=H(()=>s(i)):S!==null&&$e(S,()=>{S=null}))}ae(()=>{u??=Je,f=te(E);var h=f.length;if(y&&h===0)return;y=h===0;let C=!1;if(k){var v=We(i)===Ie;v!==(h===0)&&(i=ie(),K(i),R(!1),C=!0)}if(k){for(var p=null,b,o=0;o<h;o++){if(D.nodeType===De&&D.data===Le){i=D,C=!0,R(!1);break}var c=f[o],A=a(c,o);b=re(D,l,p,null,c,A,o,n,t,r),l.items.set(A,b),p=b}h>0&&K(ie())}if(k)h===0&&s&&(S=H(()=>s(i)));else if(Pe()){var M=new Set,q=W;for(o=0;o<h;o+=1){c=f[o],A=a(c,o);var O=l.items.get(A)??w.get(A);O?(t&(B|J))!==0&&Se(O,c,o,t):(b=re(null,l,null,null,c,A,o,n,t,r,!0),w.set(A,b)),M.add(A)}for(const[m,F]of l.items)M.has(m)||q.skipped_effects.add(F.e);q.add_callback(_)}else _();C&&R(!0),te(E)}),k&&(i=D)}function ht(e,t,r,a,n,s,i,l,g){var d=(i&qe)!==0,S=(i&(B|J))!==0,y=t.length,w=r.items,E=r.first,f=E,u,_=null,h,C=[],v=[],p,b,o,c;if(d)for(c=0;c<y;c+=1)p=t[c],b=l(p,c),o=w.get(b),o!==void 0&&(o.a?.measure(),(h??=new Set).add(o));for(c=0;c<y;c+=1){if(p=t[c],b=l(p,c),o=w.get(b),o===void 0){var A=a.get(b);if(A!==void 0){a.delete(b),w.set(b,A);var M=_?_.next:f;T(r,_,A),T(r,A,M),Q(A,M,n),_=A}else{var q=f?f.e.nodes_start:n;_=re(q,r,_,_===null?r.first:_.next,p,b,c,s,i,g)}w.set(b,_),C=[],v=[],f=_.next;continue}if(S&&Se(o,p,c,i),(o.e.f&X)!==0&&(we(o.e),d&&(o.a?.unfix(),(h??=new Set).delete(o))),o!==f){if(u!==void 0&&u.has(o)){if(C.length<v.length){var O=v[0],m;_=O.prev;var F=C[0],z=C[C.length-1];for(m=0;m<C.length;m+=1)Q(C[m],O,n);for(m=0;m<v.length;m+=1)u.delete(v[m]);T(r,F.prev,z.next),T(r,_,F),T(r,z,O),f=O,_=z,c-=1,C=[],v=[]}else u.delete(o),Q(o,f,n),T(r,o.prev,o.next),T(r,o,_===null?r.first:_.next),T(r,_,o),_=o;continue}for(C=[],v=[];f!==null&&f.k!==b;)(f.e.f&X)===0&&(u??=new Set).add(f),v.push(f),f=f.next;if(f===null)continue;o=f}C.push(o),_=o,f=o.next}if(f!==null||u!==void 0){for(var I=u===void 0?[]:he(u);f!==null;)(f.e.f&X)===0&&I.push(f),f=f.next;var G=I.length;if(G>0){var me=(i&ve)!==0&&y===0?n:null;if(d){for(c=0;c<G;c+=1)I[c].a?.measure();for(c=0;c<G;c+=1)I[c].a?.fix()}vt(r,I,me)}}d&&He(()=>{if(h!==void 0)for(o of h)o.a?.apply()}),e.first=r.first&&r.first.e,e.last=_&&_.e;for(var Te of a.values())U(Te.e);a.clear()}function Se(e,t,r,a){(a&B)!==0&&le(e.v,t),(a&J)!==0?le(e.i,r):e.i=r}function re(e,t,r,a,n,s,i,l,g,d,S){var y=(g&B)!==0,w=(g&Ue)===0,E=y?w?Re(n,!1,!1):oe(n):n,f=(g&J)===0?i:oe(i),u={i:f,v:E,k:s,a:null,e:null,prev:r,next:a};try{if(e===null){var _=document.createDocumentFragment();_.append(e=de())}return u.e=H(()=>l(e,E,f,d),k),u.e.prev=r&&r.e,u.e.next=a&&a.e,r===null?S||(t.first=u):(r.next=u,r.e.next=u.e),a!==null&&(a.prev=u,a.e.prev=u.e),u}finally{}}function Q(e,t,r){for(var a=e.next?e.next.e.nodes_start:r,n=t?t.e.nodes_start:r,s=e.e.nodes_start;s!==null&&s!==a;){var i=Fe(s);n.before(s),s=i}}function T(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function pt(e,t){var r=void 0,a;ae(()=>{r!==(r=t())&&(a&&(U(a),a=null),r&&(a=H(()=>{ne(()=>r(e))})))})}function ge(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=ge(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function wt(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=ge(e))&&(a&&(a+=" "),a+=t);return a}function bt(e){return typeof e=="object"?wt(e):e??""}const ce=[...`
|
|
2
2
|
\r\f \v\uFEFF`];function _t(e,t,r){var a=e==null?"":""+e;if(t&&(a=a?a+" "+t:t),r){for(var n in r)if(r[n])a=a?a+" "+n:n;else if(a.length)for(var s=n.length,i=0;(i=a.indexOf(n,i))>=0;){var l=i+s;(i===0||ce.includes(a[i-1]))&&(l===a.length||ce.includes(a[l]))?a=(i===0?"":a.substring(0,i))+a.substring(l+1):i=l}}return a===""?null:a}function fe(e,t=!1){var r=t?" !important;":";",a="";for(var n in e){var s=e[n];s!=null&&s!==""&&(a+=" "+n+": "+s+r)}return a}function Z(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function St(e,t){if(t){var r="",a,n;if(Array.isArray(t)?(a=t[0],n=t[1]):a=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,i=0,l=!1,g=[];a&&g.push(...Object.keys(a).map(Z)),n&&g.push(...Object.keys(n).map(Z));var d=0,S=-1;const u=e.length;for(var y=0;y<u;y++){var w=e[y];if(l?w==="/"&&e[y-1]==="*"&&(l=!1):s?s===w&&(s=!1):w==="/"&&e[y+1]==="*"?l=!0:w==='"'||w==="'"?s=w:w==="("?i++:w===")"&&i--,!l&&s===!1&&i===0){if(w===":"&&S===-1)S=y;else if(w===";"||y===u-1){if(S!==-1){var E=Z(e.substring(d,S).trim());if(!g.includes(E)){w!==";"&&y++;var f=e.substring(d,y).trim();r+=" "+f+";"}}d=y+1,S=-1}}}}return a&&(r+=fe(a)),n&&(r+=fe(n,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function gt(e,t,r,a,n,s){var i=e.__className;if(k||i!==r||i===void 0){var l=_t(r,a,s);(!k||l!==e.getAttribute("class"))&&(l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l)),e.__className=r}else if(s&&n!==s)for(var g in s){var d=!!s[g];(n==null||d!==!!n[g])&&e.classList.toggle(g,d)}return s}function j(e,t={},r,a){for(var n in r){var s=r[n];t[n]!==s&&(r[n]==null?e.style.removeProperty(n):e.style.setProperty(n,s,a))}}function yt(e,t,r,a){var n=e.__style;if(k||n!==t){var s=St(t,a);(!k||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}else a&&(Array.isArray(a)?(j(e,r?.[0],a[0]),j(e,r?.[1],a[1],"important")):j(e,r,a));return a}function V(e,t,r=!1){if(e.multiple){if(t==null)return;if(!pe(t))return ze();for(var a of e.options)a.selected=t.includes($(a));return}for(a of e.options){var n=$(a);if(Ge(n,t)){a.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function ye(e){var t=new MutationObserver(()=>{V(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ke(()=>{t.disconnect()})}function Nt(e,t,r=t){var a=!0;se(e,"change",n=>{var s=n?"[selected]":":checked",i;if(e.multiple)i=[].map.call(e.querySelectorAll(s),$);else{var l=e.querySelector(s)??e.querySelector("option:not([disabled])");i=l&&$(l)}r(i)}),ne(()=>{var n=t();if(V(e,n,a),a&&n===void 0){var s=e.querySelector(":checked");s!==null&&(n=$(s),r(n))}e.__value=n,a=!1}),ye(e)}function $(e){return"__value"in e?e.__value:e.value}const L=Symbol("class"),P=Symbol("style"),Ce=Symbol("is custom element"),Ae=Symbol("is html");function Mt(e){if(k){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var a=e.value;Y(e,"value",null),e.value=a}if(e.hasAttribute("checked")){var n=e.checked;Y(e,"checked",null),e.checked=n}}};e.__on_r=r,it(r),ot()}}function Ct(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Y(e,t,r,a){var n=ke(e);k&&(n[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||n[t]!==(n[t]=r)&&(t==="loading"&&(e[st]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ee(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function At(e,t,r,a,n=!1){var s=ke(e),i=s[Ce],l=!s[Ae];let g=k&&i;g&&R(!1);var d=t||{},S=e.tagName==="OPTION";for(var y in t)y in r||(r[y]=null);r.class?r.class=bt(r.class):r[L]&&(r.class=null),r[P]&&(r.style??=null);var w=Ee(e);for(const v in r){let p=r[v];if(S&&v==="value"&&p==null){e.value=e.__value="",d[v]=p;continue}if(v==="class"){var E=e.namespaceURI==="http://www.w3.org/1999/xhtml";gt(e,E,p,a,t?.[L],r[L]),d[v]=p,d[L]=r[L];continue}if(v==="style"){yt(e,p,t?.[P],r[P]),d[v]=p,d[P]=r[P];continue}var f=d[v];if(!(p===f&&!(p===void 0&&e.hasAttribute(v)))){d[v]=p;var u=v[0]+v[1];if(u!=="$$")if(u==="on"){const b={},o="$$"+v;let c=v.slice(2);var _=lt(c);if(Ze(c)&&(c=c.slice(0,-7),b.capture=!0),!_&&f){if(p!=null)continue;e.removeEventListener(c,d[o],b),d[o]=null}if(p!=null)if(_)e[`__${c}`]=p,xe([c]);else{let A=function(M){d[v].call(this,M)};d[o]=je(c,e,A,b)}else _&&(e[`__${c}`]=void 0)}else if(v==="style")Y(e,v,p);else if(v==="autofocus")et(e,!!p);else if(!i&&(v==="__value"||v==="value"&&p!=null))e.value=e.__value=p;else if(v==="selected"&&S)Ct(e,p);else{var h=v;l||(h=tt(h));var C=h==="defaultValue"||h==="defaultChecked";if(p==null&&!i&&!C)if(s[v]=null,h==="value"||h==="checked"){let b=e;const o=t===void 0;if(h==="value"){let c=b.defaultValue;b.removeAttribute(h),b.defaultValue=c,b.value=b.__value=o?c:null}else{let c=b.defaultChecked;b.removeAttribute(h),b.defaultChecked=c,b.checked=o?c:!1}}else e.removeAttribute(v);else C||w.includes(h)&&(i||typeof p!="string")?(e[h]=p,h in s&&(s[h]=rt)):typeof p!="function"&&Y(e,h,p)}}}return g&&R(!0),d}function Ot(e,t,r=[],a=[],n,s=!1){Xe(r,a,i=>{var l=void 0,g={},d=e.nodeName==="SELECT",S=!1;if(ae(()=>{var w=t(...i.map(te)),E=At(e,l,w,n,s);S&&d&&"value"in w&&V(e,w.value);for(let u of Object.getOwnPropertySymbols(g))w[u]||U(g[u]);for(let u of Object.getOwnPropertySymbols(w)){var f=w[u];u.description===Qe&&(!l||f!==l[u])&&(g[u]&&U(g[u]),g[u]=H(()=>pt(e,()=>f))),E[u]=f}l=E}),d){var y=e;ne(()=>{V(y,l.value,!0),ye(y)})}S=!0})}function ke(e){return e.__attributes??={[Ce]:e.nodeName.includes("-"),[Ae]:e.namespaceURI===at}}var ue=new Map;function Ee(e){var t=e.getAttribute("is")||e.nodeName,r=ue.get(t);if(r)return r;ue.set(t,r=[]);for(var a,n=e,s=Element.prototype;s!==n;){a=ct(n);for(var i in a)a[i].set&&r.push(i);n=nt(n)}return r}function Wt(e,t,r=t){var a=new WeakSet;se(e,"input",async n=>{var s=n?e.defaultValue:e.value;if(s=x(e)?ee(s):s,r(s),W!==null&&a.add(W),await ft(),s!==(s=t())){var i=e.selectionStart,l=e.selectionEnd;e.value=s??"",l!==null&&(e.selectionStart=i,e.selectionEnd=Math.min(l,e.value.length))}}),(k&&e.defaultValue!==e.value||be(t)==null&&e.value)&&(r(x(e)?ee(e.value):e.value),W!==null&&a.add(W)),_e(()=>{var n=t();if(e===document.activeElement){var s=ut??W;if(a.has(s))return}x(e)&&n===ee(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}function It(e,t,r=t){se(e,"change",a=>{var n=a?e.defaultChecked:e.checked;r(n)}),(k&&e.defaultChecked!==e.checked||be(t)==null)&&r(e.checked),_e(()=>{var a=t();e.checked=!!a})}function x(e){var t=e.type;return t==="number"||t==="range"}function ee(e){return e===""?null:+e}const N=dt({id:"unknown",name:"Unknown Control Set",currentPath:"",controls:[],mappings:[],families:[],totalControls:0,totalMappings:0,isConnected:!1});class kt{ws=null;reconnectTimer=null;reconnectAttempts=0;maxReconnectAttempts=5;reconnectDelay=1e3;connect(){if(this.ws&&(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)){console.log("WebSocket already connected or connecting");return}const t=window.location.protocol==="https:"?"wss:":"ws:",r=window.location.hostname==="localhost"?"localhost:3000":window.location.host,a=`${t}//${r}/ws`;console.log("Connecting to WebSocket:",a);try{this.ws=new WebSocket(a),this.ws.onopen=()=>{console.log("WebSocket connected"),this.reconnectAttempts=0,this.reconnectDelay=1e3},this.ws.onmessage=n=>{try{const s=JSON.parse(n.data);this.handleMessage(s)}catch(s){console.error("Failed to parse WebSocket message:",s)}},this.ws.onerror=n=>{console.error("WebSocket error:",n)},this.ws.onclose=()=>{console.log("WebSocket disconnected"),N.update(n=>({...n,isConnected:!1})),this.ws=null,this.scheduleReconnect()}}catch(n){console.error("Failed to create WebSocket:",n),this.scheduleReconnect()}}handleMessage(t){switch(console.log("WebSocket message received:",t),t.type){case"connected":console.log("WebSocket connection confirmed"),N.update(r=>({...r,isConnected:!0}));break;case"state-update":console.log("State update received"),t.payload&&N.set({...t.payload,isConnected:!0,isSwitchingControlSet:!1});break;case"metadata-update":console.log("Metadata update received"),t.payload&&N.update(r=>({...r,...t.payload,isConnected:!0,isSwitchingControlSet:!1}));break;case"controls-update":console.log("Controls update received"),t.payload&&N.update(r=>({...r,controls:t.payload}));break;case"mappings-update":console.log("Mappings update received"),t.payload&&N.update(r=>({...r,mappings:t.payload}));break;case"control-details":console.log("Control details received:",t.payload),t.payload&&window.dispatchEvent(new CustomEvent("control-details",{detail:t.payload}));break;case"control-sets-list":console.log("Control sets list received"),t.payload&&window.dispatchEvent(new CustomEvent("control-sets-list",{detail:t.payload}));break;case"control-updated":console.log("Control updated successfully:",t.payload);break;case"mapping-created":case"mapping-updated":case"mapping-deleted":console.log(`Mapping operation successful: ${t.type}`,t.payload),window.dispatchEvent(new CustomEvent("mappings-changed",{detail:t.payload}));break;case"error":console.error("WebSocket error:",t.payload);break;default:console.warn("Unknown WebSocket message type:",t.type)}}scheduleReconnect(){if(this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectAttempts>=this.maxReconnectAttempts){console.error("Max reconnection attempts reached");return}this.reconnectAttempts++,console.log(`Scheduling reconnect attempt ${this.reconnectAttempts} in ${this.reconnectDelay}ms`),this.reconnectTimer=window.setTimeout(()=>{this.connect()},this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*2,3e4)}disconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),N.update(t=>({...t,isConnected:!1}))}isConnected(){return this.ws!==null&&this.ws.readyState===WebSocket.OPEN}async sendCommand(t,r){if(console.log(`Sending WebSocket command: ${t}`,r),!this.ws||this.ws.readyState!==WebSocket.OPEN){console.log("WebSocket not ready, waiting for connection...");try{await this.waitForConnection()}catch(a){throw console.error("Failed to connect:",a),a}}if(this.ws&&this.ws.readyState===WebSocket.OPEN){const a=JSON.stringify({type:t,payload:r});console.log("Sending message:",a),this.ws.send(a)}else{const a=new Error("WebSocket not connected after waiting");throw console.error(a),a}}waitForConnection(t=5e3){return new Promise((r,a)=>{const n=Date.now(),s=()=>{this.ws&&this.ws.readyState===WebSocket.OPEN?r():Date.now()-n>t?a(new Error("WebSocket connection timeout")):setTimeout(s,100)};s()})}async updateControl(t){return this.sendCommand("update-control",t)}async createMapping(t){return this.sendCommand("create-mapping",t)}async updateMapping(t){return this.sendCommand("update-mapping",t)}async deleteMapping(t){return this.sendCommand("delete-mapping",{uuid:t})}async switchControlSet(t){return N.update(r=>({...r,isSwitchingControlSet:!0})),this.sendCommand("switch-control-set",{path:t})}async getControlDetails(t){return this.sendCommand("get-control",{id:t})}async scanControlSets(){return this.sendCommand("scan-control-sets")}send(t){this.ws&&this.ws.readyState===WebSocket.OPEN?this.ws.send(JSON.stringify(t)):console.warn("WebSocket not connected, cannot send message")}}const Dt=new kt;export{Ot as a,Y as b,Wt as c,Nt as d,Tt as e,N as f,bt as g,yt as h,mt as i,It as j,Mt as r,gt as s,Dt as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as U,l as R,m as Y,E as M,L as B,M as K,N as $,O as C,P as O,v as F,w,x as Z,U as q,y as z,Q as H,A as G,z as Q,R as D,T as V,V as W,W as X,h,X as j,d as y,Y as J,Z as k,_ as ee,$ as L,H as re,a0 as ne,a1 as se,a2 as ae,a3 as A,a4 as ue,a5 as ie,k as te,a6 as fe,a7 as le,a8 as ce,a9 as de,S as oe,aa as _e,ab as ve,ac as N,ad as g}from"./
|
|
1
|
+
import{t as U,l as R,m as Y,E as M,L as B,M as K,N as $,O as C,P as O,v as F,w,x as Z,U as q,y as z,Q as H,A as G,z as Q,R as D,T as V,V as W,W as X,h,X as j,d as y,Y as J,Z as k,_ as ee,$ as L,H as re,a0 as ne,a1 as se,a2 as ae,a3 as A,a4 as ue,a5 as ie,k as te,a6 as fe,a7 as le,a8 as ce,a9 as de,S as oe,aa as _e,ab as ve,ac as N,ad as g}from"./BJF-sFqz.js";function Pe(e,r,a=!1){R&&Y();var n=e,i=null,t=null,l=q,o=a?M:0,v=!1;const S=(c,u=!0)=>{v=!0,_(u,c)};var f=null;function P(){f!==null&&(f.lastChild.remove(),n.before(f),f=null);var c=l?i:t,u=l?t:i;c&&H(c),u&&G(u,()=>{l?t=null:i=null})}const _=(c,u)=>{if(l===(l=c))return;let x=!1;if(R){const E=B(n)===K;!!l===E&&(n=$(),C(n),O(!1),x=!0)}var b=z(),d=n;if(b&&(f=document.createDocumentFragment(),f.append(d=F())),l?i??=u&&w(()=>u(d)):t??=u&&w(()=>u(d)),b){var m=Z,s=l?i:t,p=l?t:i;s&&m.skipped_effects.delete(s),p&&m.skipped_effects.add(p),m.add_callback(P)}else P();x&&O(!0)};U(()=>{v=!1,r(S),v||_(null,null)},o),R&&(n=Q)}let I=!1,T=Symbol();function xe(e,r,a){const n=a[r]??={store:null,source:V(void 0),unsubscribe:D};if(n.store!==e&&!(T in a))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=D;else{var i=!0;n.unsubscribe=W(e,t=>{i?n.source.v=t:y(n.source,t)}),i=!1}return e&&T in a?X(e):h(n.source)}function Ee(){const e={};function r(){j(()=>{for(var a in e)e[a].unsubscribe();J(e,T,{enumerable:!1,value:!0})})}return[e,r]}function pe(e){var r=I;try{return I=!1,[e(),I]}finally{I=r}}const be={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Ie(e,r,a){return new Proxy({props:e,exclude:r},be)}const me={get(e,r){if(!e.exclude.includes(r))return h(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,a){if(!(r in e.special)){var n=A;try{g(e.parent_effect),e.special[r]=he({get[r](){return e.props[r]}},r,L)}finally{g(n)}}return e.special[r](a),N(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),N(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Re(e,r){return new Proxy({props:e,exclude:r,special:{},version:ve(0),parent_effect:A},me)}function he(e,r,a,n){var i=!fe||(a&le)!==0,t=(a&ie)!==0,l=(a&de)!==0,o=n,v=!0,S=()=>(v&&(v=!1,o=l?te(n):n),o),f;if(t){var P=oe in e||_e in e;f=k(e,r)?.set??(P&&r in e?s=>e[r]=s:void 0)}var _,c=!1;t?[_,c]=pe(()=>e[r]):_=e[r],_===void 0&&n!==void 0&&(_=S(),f&&(i&&ee(),f(_)));var u;if(i?u=()=>{var s=e[r];return s===void 0?S():(v=!0,s)}:u=()=>{var s=e[r];return s!==void 0&&(o=void 0),s===void 0?o:s},i&&(a&L)===0)return u;if(f){var x=e.$$legacy;return(function(s,p){return arguments.length>0?((!i||!p||x||c)&&f(p?u():s),s):u()})}var b=!1,d=((a&ce)!==0?re:ne)(()=>(b=!1,u()));t&&h(d);var m=A;return(function(s,p){if(arguments.length>0){const E=p?h(d):i&&t?se(s):s;return y(d,E),b=!0,o!==void 0&&(o=E),s}return ae&&b||(m.f&ue)!==0?d.v:h(d)})}export{xe as a,Pe as i,Re as l,he as p,Ie as r,Ee as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./DsnmJJEf.js";import{J as z,l as ka,m as Sa,a3 as xn,ba as _n,z as Na,ax as wn,aJ as kn,bb as Sn,bc as Nn,bd as Oa,O as On,be as Cn,aw as Sr,f as k,c as u,s as E,r as l,K as I,b as g,av as Xr,ag as _e,p as ue,g as Be,a1 as Qt,o as Mn,au as jn,a as Z,R as An,h as s,ai as Nr,e as fe,d as W,ae as be,T as ge,G as Y,af as it,n as Ve,ak as te,al as oe,am as Ut,at as ft,bf as Ba,an as Lr,u as En,b9 as ur,a0 as je,k as X}from"./B_3ksxz5.js";import{p as G,i as j,l as we,s as Va,a as pt}from"./D4Q_ObIy.js";import{s as me,b as Oe,h as ea,a as lt,e as ye,i as pe,d as Pa,c as Ct,r as Ft,j as Tn,g as la,w as jr,f as Jt}from"./B19gt6-g.js";import{i as st}from"./D3aNP_lg.js";import{T as Ln,a as Ca,b as Ma,p as In,S as Fn,D as zn,c as Ra}from"./CMWPLh7h.js";import{g as Dn}from"./DQAUO7J_.js";import{b as ja}from"./7x_q-1ab.js";function ta(r,e,t=!1,a=!1,n=!1){var i=r,o="";z(()=>{var d=xn;if(o===(o=e()??"")){ka&&Sa();return}if(d.nodes_start!==null&&(_n(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),o!==""){if(ka){Na.data;for(var c=Sa(),h=c;c!==null&&(c.nodeType!==wn||c.data!=="");)h=c,c=kn(c);if(c===null)throw Sn(),Nn;Oa(Na,h),i=On(c);return}var S=o+"";t?S=`<svg>${S}</svg>`:a&&(S=`<math>${S}</math>`);var y=Cn(S);if((t||a)&&(y=Sr(y)),Oa(Sr(y),y.lastChild),t||a)for(;Sr(y);)i.before(Sr(y));else i.before(y)}})}var Bn=k("<div><!></div>"),Vn=_e('<svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg>'),Pn=k('<div class="mt-6"><!></div>'),Rn=k("<div><!> <h3> </h3> <p> </p> <!></div>");function Aa(r,e){let t=G(e,"size",3,"md");const n=(f=>{switch(f){case"sm":return{container:"py-6",icon:"h-8 w-8",title:"text-sm",description:"text-xs"};case"lg":return{container:"py-16",icon:"h-16 w-16",title:"text-lg",description:"text-base"};default:return{container:"py-12",icon:"h-12 w-12",title:"text-base",description:"text-sm"}}})(t());var i=Rn(),o=u(i);{var d=f=>{var v=Bn(),N=u(v);Xr(N,()=>e.icon),l(v),z(()=>me(v,1,`mx-auto ${n.icon??""} mb-4 text-gray-400 dark:text-gray-500`)),g(f,v)},c=f=>{var v=Vn();z(()=>me(v,0,`mx-auto ${n.icon??""} mb-4 text-gray-400 dark:text-gray-500`)),g(f,v)};j(o,f=>{e.icon?f(d):f(c,!1)})}var h=E(o,2),S=u(h,!0);l(h);var y=E(h,2),m=u(y,!0);l(y);var p=E(y,2);{var x=f=>{var v=Pn(),N=u(v);Xr(N,()=>e.action),l(v),g(f,v)};j(p,f=>{e.action&&f(x)})}l(i),z(()=>{me(i,1,`text-center ${n.container??""}`),me(h,1,`font-medium text-gray-900 dark:text-white ${n.title??""}`),I(S,e.title),me(y,1,`mt-2 text-gray-500 dark:text-gray-400 ${n.description??""}`),I(m,e.description)}),g(r,i)}var Jn=k("<span> </span>");function Hn(r,e){let t=G(e,"type",3,"control"),a=G(e,"size",3,"sm");const n=(c,h)=>{if(!c)return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200";if(h==="mapping")switch(c.toLowerCase()){case"implemented":return"bg-green-500 text-white";case"verified":return"bg-blue-500 text-white";case"planned":return"bg-yellow-500 text-white";default:return"bg-gray-600 text-white"}if(h==="compliance")switch(c.toLowerCase()){case"compliant":return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200";case"non-compliant":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";case"not assessed":return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200";default:return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200"}switch(c.toLowerCase()){case"implemented":return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200";case"planned":return"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200";case"not implemented":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";default:return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200"}},i=c=>{switch(c){case"sm":return"px-2.5 py-0.5 text-xs";case"md":return"px-3 py-1 text-sm";case"lg":return"px-4 py-2 text-base";default:return"px-2.5 py-0.5 text-xs"}};var o=Jn(),d=u(o,!0);l(o),z((c,h)=>{me(o,1,`inline-flex items-center rounded-lg font-medium shadow-sm ${c??""} ${h??""}`),Oe(o,"title",`${t()} status: ${e.status}`),I(d,e.status)},[()=>n(e.status,t()),()=>i(a())]),g(r,o)}var Un=k('<div role="tooltip"> <div></div></div>'),Kn=k('<div class="inline-flex items-center" role="button" tabindex="0"><!></div> <!>',1);function fr(r,e){ue(e,!0);let t=G(e,"placement",3,"top"),a=G(e,"maxWidth",3,"300px"),n=G(e,"multiline",3,!1),i=Be(null),o,d=Be(!1),c=Be(Qt({x:0,y:0}));function h(){if(!o||!s(i))return;const N=o.getBoundingClientRect(),_=s(i).getBoundingClientRect(),M=8;let O=0,b=0;switch(t()){case"top":O=N.left+N.width/2-_.width/2,b=N.top-_.height-M;break;case"bottom":O=N.left+N.width/2-_.width/2,b=N.bottom+M;break;case"left":O=N.left-_.width-M,b=N.top+N.height/2-_.height/2;break;case"right":O=N.right+M,b=N.top+N.height/2-_.height/2;break}const w=8;O=Math.max(w,Math.min(O,window.innerWidth-_.width-w)),b=Math.max(w,Math.min(b,window.innerHeight-_.height-w)),W(c,{x:O,y:b},!0)}function S(){W(d,!0),requestAnimationFrame(h)}function y(){W(d,!1)}Mn(()=>{window.addEventListener("scroll",h,!0),window.addEventListener("resize",h)}),jn(()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)});var m=Kn(),p=Z(m),x=u(p);Xr(x,()=>e.children??An),l(p),ja(p,N=>o=N,()=>o);var f=E(p,2);{var v=N=>{var _=Un(),M=u(_),O=E(M);let b;l(_),ja(_,w=>W(i,w),()=>s(i)),z(w=>{me(_,1,`fixed z-50 px-3 py-2 text-sm text-white bg-gray-900 dark:bg-gray-700 rounded-md shadow-lg pointer-events-none transition-opacity duration-200 ${n()?"whitespace-pre-wrap":"whitespace-nowrap"}`),ea(_,`left: ${s(c).x??""}px; top: ${s(c).y??""}px; max-width: ${a()??""};`),I(M,`${e.content??""} `),b=me(O,1,"absolute w-2 h-2 bg-gray-900 dark:bg-gray-700 transform rotate-45",null,b,w)},[()=>({"bottom-[-4px]":t()==="top","left-[50%]":t()==="top"||t()==="bottom","translate-x-[-50%]":t()==="top"||t()==="bottom","top-[-4px]":t()==="bottom","right-[-4px]":t()==="left","top-[50%]":t()==="left"||t()==="right","translate-y-[-50%]":t()==="left"||t()==="right","left-[-4px]":t()==="right"})]),g(N,_)};j(f,N=>{s(d)&&N(v)})}Nr("mouseenter",p,S),Nr("mouseleave",p,y),Nr("focus",p,S),Nr("blur",p,y),g(r,m),fe()}var Wn=_e("<title> </title>"),Yn=_e('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function qn(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=Yn();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=Wn(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(2),l(c),g(r,c),fe()}var $n=_e("<title> </title>"),Qn=_e('<svg><!><path d="M23,16a7,7,0,0,0-4.18,1.39L14.6,13.17A6.86,6.86,0,0,0,16,9a7,7,0,1,0-2.81,5.59l4.21,4.22A7,7,0,1,0,23,16ZM4,9a5,5,0,1,1,5,5A5,5,0,0,1,4,9Z" transform="translate(0 .01)"></path></svg>');function Zn(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=Qn();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=$n(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(),l(c),g(r,c),fe()}var Gn=_e("<title> </title>"),Xn=_e('<svg><!><path d="M2 26H30V28H2zM25.4 9c.8-.8.8-2 0-2.8 0 0 0 0 0 0l-3.6-3.6c-.8-.8-2-.8-2.8 0 0 0 0 0 0 0l-15 15V24h6.4L25.4 9zM20.4 4L24 7.6l-3 3L17.4 7 20.4 4zM6 22v-3.6l10-10 3.6 3.6-10 10H6z"></path></svg>');function Ea(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=Xn();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=Gn(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(),l(c),g(r,c),fe()}var ei=_e("<title> </title>"),ti=_e('<svg><!><path d="M17 22L17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22zM16 8a1.5 1.5 0 101.5 1.5A1.5 1.5 0 0016 8z"></path><path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"></path></svg>');function Ht(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=ti();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=ei(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(2),l(c),g(r,c),fe()}var ri=_e("<title> </title>"),ai=_e('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"></path></svg>');function ni(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=ai();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=ri(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(),l(c),g(r,c),fe()}var ii=_e("<title> </title>"),si=_e('<svg><!><path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"></path><path d="M20.59 22L15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"></path></svg>');function oi(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=si();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=ii(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(2),l(c),g(r,c),fe()}var li=_e("<title> </title>"),di=_e('<svg><!><path d="M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"></path><path fill="none" d="M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z" data-icon-path="inner-path" opacity="0"></path></svg>');function ci(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=di();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=li(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(2),l(c),g(r,c),fe()}function ui(r){if(!r)return[];if(fi(r))return gi(r);const e=r.split(`
|
|
1
|
+
import"./DsnmJJEf.js";import{J as z,l as ka,m as Sa,a3 as xn,ba as _n,z as Na,ax as wn,aJ as kn,bb as Sn,bc as Nn,bd as Oa,O as On,be as Cn,aw as Sr,f as k,c as u,s as E,r as l,K as I,b as g,av as Xr,ag as _e,p as ue,g as Be,a1 as Qt,o as Mn,au as jn,a as Z,R as An,h as s,ai as Nr,e as fe,d as W,ae as be,T as ge,G as Y,af as it,n as Ve,ak as te,al as oe,am as Ut,at as ft,bf as Ba,an as Lr,u as En,b9 as ur,a0 as je,k as X}from"./BJF-sFqz.js";import{p as G,i as j,l as we,s as Va,a as pt}from"./DUz6FRLu.js";import{s as me,b as Oe,h as ea,a as lt,e as ye,i as pe,d as Pa,c as Ct,r as Ft,j as Tn,g as la,w as jr,f as Jt}from"./CBYXl-8c.js";import{i as st}from"./Bty54Wy4.js";import{T as Ln,a as Ca,b as Ma,p as In,S as Fn,D as zn,c as Ra}from"./Bg93OsgA.js";import{g as Dn}from"./Bh_lsY1c.js";import{b as ja}from"./BYKwBiub.js";function ta(r,e,t=!1,a=!1,n=!1){var i=r,o="";z(()=>{var d=xn;if(o===(o=e()??"")){ka&&Sa();return}if(d.nodes_start!==null&&(_n(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),o!==""){if(ka){Na.data;for(var c=Sa(),h=c;c!==null&&(c.nodeType!==wn||c.data!=="");)h=c,c=kn(c);if(c===null)throw Sn(),Nn;Oa(Na,h),i=On(c);return}var S=o+"";t?S=`<svg>${S}</svg>`:a&&(S=`<math>${S}</math>`);var y=Cn(S);if((t||a)&&(y=Sr(y)),Oa(Sr(y),y.lastChild),t||a)for(;Sr(y);)i.before(Sr(y));else i.before(y)}})}var Bn=k("<div><!></div>"),Vn=_e('<svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg>'),Pn=k('<div class="mt-6"><!></div>'),Rn=k("<div><!> <h3> </h3> <p> </p> <!></div>");function Aa(r,e){let t=G(e,"size",3,"md");const n=(f=>{switch(f){case"sm":return{container:"py-6",icon:"h-8 w-8",title:"text-sm",description:"text-xs"};case"lg":return{container:"py-16",icon:"h-16 w-16",title:"text-lg",description:"text-base"};default:return{container:"py-12",icon:"h-12 w-12",title:"text-base",description:"text-sm"}}})(t());var i=Rn(),o=u(i);{var d=f=>{var v=Bn(),N=u(v);Xr(N,()=>e.icon),l(v),z(()=>me(v,1,`mx-auto ${n.icon??""} mb-4 text-gray-400 dark:text-gray-500`)),g(f,v)},c=f=>{var v=Vn();z(()=>me(v,0,`mx-auto ${n.icon??""} mb-4 text-gray-400 dark:text-gray-500`)),g(f,v)};j(o,f=>{e.icon?f(d):f(c,!1)})}var h=E(o,2),S=u(h,!0);l(h);var y=E(h,2),m=u(y,!0);l(y);var p=E(y,2);{var x=f=>{var v=Pn(),N=u(v);Xr(N,()=>e.action),l(v),g(f,v)};j(p,f=>{e.action&&f(x)})}l(i),z(()=>{me(i,1,`text-center ${n.container??""}`),me(h,1,`font-medium text-gray-900 dark:text-white ${n.title??""}`),I(S,e.title),me(y,1,`mt-2 text-gray-500 dark:text-gray-400 ${n.description??""}`),I(m,e.description)}),g(r,i)}var Jn=k("<span> </span>");function Hn(r,e){let t=G(e,"type",3,"control"),a=G(e,"size",3,"sm");const n=(c,h)=>{if(!c)return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200";if(h==="mapping")switch(c.toLowerCase()){case"implemented":return"bg-green-500 text-white";case"verified":return"bg-blue-500 text-white";case"planned":return"bg-yellow-500 text-white";default:return"bg-gray-600 text-white"}if(h==="compliance")switch(c.toLowerCase()){case"compliant":return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200";case"non-compliant":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";case"not assessed":return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200";default:return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200"}switch(c.toLowerCase()){case"implemented":return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200";case"planned":return"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200";case"not implemented":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200";default:return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200"}},i=c=>{switch(c){case"sm":return"px-2.5 py-0.5 text-xs";case"md":return"px-3 py-1 text-sm";case"lg":return"px-4 py-2 text-base";default:return"px-2.5 py-0.5 text-xs"}};var o=Jn(),d=u(o,!0);l(o),z((c,h)=>{me(o,1,`inline-flex items-center rounded-lg font-medium shadow-sm ${c??""} ${h??""}`),Oe(o,"title",`${t()} status: ${e.status}`),I(d,e.status)},[()=>n(e.status,t()),()=>i(a())]),g(r,o)}var Un=k('<div role="tooltip"> <div></div></div>'),Kn=k('<div class="inline-flex items-center" role="button" tabindex="0"><!></div> <!>',1);function fr(r,e){ue(e,!0);let t=G(e,"placement",3,"top"),a=G(e,"maxWidth",3,"300px"),n=G(e,"multiline",3,!1),i=Be(null),o,d=Be(!1),c=Be(Qt({x:0,y:0}));function h(){if(!o||!s(i))return;const N=o.getBoundingClientRect(),_=s(i).getBoundingClientRect(),M=8;let O=0,b=0;switch(t()){case"top":O=N.left+N.width/2-_.width/2,b=N.top-_.height-M;break;case"bottom":O=N.left+N.width/2-_.width/2,b=N.bottom+M;break;case"left":O=N.left-_.width-M,b=N.top+N.height/2-_.height/2;break;case"right":O=N.right+M,b=N.top+N.height/2-_.height/2;break}const w=8;O=Math.max(w,Math.min(O,window.innerWidth-_.width-w)),b=Math.max(w,Math.min(b,window.innerHeight-_.height-w)),W(c,{x:O,y:b},!0)}function S(){W(d,!0),requestAnimationFrame(h)}function y(){W(d,!1)}Mn(()=>{window.addEventListener("scroll",h,!0),window.addEventListener("resize",h)}),jn(()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)});var m=Kn(),p=Z(m),x=u(p);Xr(x,()=>e.children??An),l(p),ja(p,N=>o=N,()=>o);var f=E(p,2);{var v=N=>{var _=Un(),M=u(_),O=E(M);let b;l(_),ja(_,w=>W(i,w),()=>s(i)),z(w=>{me(_,1,`fixed z-50 px-3 py-2 text-sm text-white bg-gray-900 dark:bg-gray-700 rounded-md shadow-lg pointer-events-none transition-opacity duration-200 ${n()?"whitespace-pre-wrap":"whitespace-nowrap"}`),ea(_,`left: ${s(c).x??""}px; top: ${s(c).y??""}px; max-width: ${a()??""};`),I(M,`${e.content??""} `),b=me(O,1,"absolute w-2 h-2 bg-gray-900 dark:bg-gray-700 transform rotate-45",null,b,w)},[()=>({"bottom-[-4px]":t()==="top","left-[50%]":t()==="top"||t()==="bottom","translate-x-[-50%]":t()==="top"||t()==="bottom","top-[-4px]":t()==="bottom","right-[-4px]":t()==="left","top-[50%]":t()==="left"||t()==="right","translate-y-[-50%]":t()==="left"||t()==="right","left-[-4px]":t()==="right"})]),g(N,_)};j(f,N=>{s(d)&&N(v)})}Nr("mouseenter",p,S),Nr("mouseleave",p,y),Nr("focus",p,S),Nr("blur",p,y),g(r,m),fe()}var Wn=_e("<title> </title>"),Yn=_e('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function qn(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=Yn();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=Wn(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(2),l(c),g(r,c),fe()}var $n=_e("<title> </title>"),Qn=_e('<svg><!><path d="M23,16a7,7,0,0,0-4.18,1.39L14.6,13.17A6.86,6.86,0,0,0,16,9a7,7,0,1,0-2.81,5.59l4.21,4.22A7,7,0,1,0,23,16ZM4,9a5,5,0,1,1,5,5A5,5,0,0,1,4,9Z" transform="translate(0 .01)"></path></svg>');function Zn(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=Qn();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=$n(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(),l(c),g(r,c),fe()}var Gn=_e("<title> </title>"),Xn=_e('<svg><!><path d="M2 26H30V28H2zM25.4 9c.8-.8.8-2 0-2.8 0 0 0 0 0 0l-3.6-3.6c-.8-.8-2-.8-2.8 0 0 0 0 0 0 0l-15 15V24h6.4L25.4 9zM20.4 4L24 7.6l-3 3L17.4 7 20.4 4zM6 22v-3.6l10-10 3.6 3.6-10 10H6z"></path></svg>');function Ea(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=Xn();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=Gn(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(),l(c),g(r,c),fe()}var ei=_e("<title> </title>"),ti=_e('<svg><!><path d="M17 22L17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22zM16 8a1.5 1.5 0 101.5 1.5A1.5 1.5 0 0016 8z"></path><path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"></path></svg>');function Ht(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=ti();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=ei(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(2),l(c),g(r,c),fe()}var ri=_e("<title> </title>"),ai=_e('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"></path></svg>');function ni(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=ai();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=ri(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(),l(c),g(r,c),fe()}var ii=_e("<title> </title>"),si=_e('<svg><!><path d="M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"></path><path d="M20.59 22L15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"></path></svg>');function oi(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=si();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=ii(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(2),l(c),g(r,c),fe()}var li=_e("<title> </title>"),di=_e('<svg><!><path d="M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"></path><path fill="none" d="M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z" data-icon-path="inner-path" opacity="0"></path></svg>');function ci(r,e){const t=we(e,["children","$$slots","$$events","$$legacy"]),a=we(t,["size","title"]);ue(e,!1);const n=ge(),i=ge();let o=G(e,"size",8,16),d=G(e,"title",8,void 0);be(()=>(Y(t),Y(d())),()=>{W(n,t["aria-label"]||t["aria-labelledby"]||d())}),be(()=>(s(n),Y(t)),()=>{W(i,{"aria-hidden":s(n)?void 0:!0,role:s(n)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),it(),st();var c=di();lt(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...s(i),...a}));var h=u(c);{var S=y=>{var m=li(),p=u(m,!0);l(m),z(()=>I(p,d())),g(y,m)};j(h,y=>{d()&&y(S)})}Ve(2),l(c),g(r,c),fe()}function ui(r){if(!r)return[];if(fi(r))return gi(r);const e=r.split(`
|
|
2
2
|
`),t=[];let a=[],n="paragraph";for(let o=0;o<e.length;o++){const d=e[o],c=d.trim();if(!c){a.length>0&&i();continue}if(c.endsWith(":")&&o<e.length-1&&(e[o+1]?.trim()||o+2<e.length&&e[o+2]?.trim())){a.length>0&&i(),t.push({type:"header",content:c.slice(0,-1)});continue}if(hi(c)){n!=="list"&&(a.length>0&&i(),n="list"),a.push(c);continue}n==="list"&&(a.length>0&&i(),n="paragraph"),a.push(d)}a.length>0&&i();function i(){if(n==="list"){const o=a.map(d=>d.replace(/^[-*•]\s*/,"").replace(/^\d+\.\s*/,"").replace(/^[a-zA-Z]\.\s*/,""));t.push({type:"list",content:a.join(`
|
|
3
3
|
`),data:{items:o}})}else t.push({type:"paragraph",content:a.join(`
|
|
4
4
|
`).trim()});a=[]}return t}function fi(r){const e=r.split(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{d as k,aa as U,h as f,ao as Y,ap as G,aq as J,Y as K,ar as W,T as z,p as F,C as H,u as Q,o as X,g as O,as as Z,f as V,a as w,s as $,b as y,e as ee,ak as x,c as te,r as re,al as L,am as se,J as ae,K as ne}from"../chunks/
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.liUzuc-A.js","../chunks/DsnmJJEf.js","../chunks/BJF-sFqz.js","../chunks/DUz6FRLu.js","../chunks/Bh_lsY1c.js","../chunks/Bg93OsgA.js","../chunks/BqNBD7oY.js","../chunks/CBYXl-8c.js","../chunks/Bty54Wy4.js","../assets/0.C97xfQzG.css","../nodes/1.t1GUCrrv.js","../nodes/2.CTVpMB9b.js","../chunks/Ds9w7fzN.js","../chunks/BYKwBiub.js","../assets/DynamicControlEditor.BkVTzFZ-.css","../nodes/3.DnzjoQZ0.js","../nodes/4.Dvs__DIQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as k,aa as U,h as f,ao as Y,ap as G,aq as J,Y as K,ar as W,T as z,p as F,C as H,u as Q,o as X,g as O,as as Z,f as V,a as w,s as $,b as y,e as ee,ak as x,c as te,r as re,al as L,am as se,J as ae,K as ne}from"../chunks/BJF-sFqz.js";import"../chunks/DsnmJJEf.js";import{p as S,i as A}from"../chunks/DUz6FRLu.js";import{c as C}from"../chunks/BqNBD7oY.js";import{b as T}from"../chunks/BYKwBiub.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===U?!0:(f(a.get(t)??i(t,Reflect.get(r,t))),Reflect.has(r,t))},set(r,t,s){return k(a.get(t)??i(t,s),s),Reflect.set(r,t,s)}});this.#e=(e.hydrate?Y: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={},P=function(e,a,i){let l=Promise.resolve();if(a&&a.length>0){let p=function(o){return Promise.all(o.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),R=s?.nonce||s?.getAttribute("nonce");l=p(a.map(o=>{if(o=le(o,i),o in I)return;I[o]=!0;const d=o.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(!!i)for(let n=t.length-1;n>=0;n--){const u=t[n];if(u.href===o&&(!d||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${h}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":ie,d||(m.as="script"),m.crossOrigin="",m.href=o,R&&m.setAttribute("nonce",R),document.head.appendChild(m),d)return new Promise((n,u)=>{m.addEventListener("load",n),m.addEventListener("error",()=>u(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>'),me=V("<!> <!>",1);function de(c,e){F(e,!0);let a=S(e,"components",23,()=>[]),i=S(e,"data_0",3,null),l=S(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=O(!1),t=O(!1),s=O(null);X(()=>{const n=e.stores.page.subscribe(()=>{f(r)&&(k(t,!0),Z().then(()=>{k(s,document.title||"untitled page",!0)}))});return k(r,!0),n});const R=L(()=>e.constructors[1]);var p=me(),o=w(p);{var d=n=>{const u=L(()=>e.constructors[0]);var _=x(),E=w(_);C(E,()=>f(u),(v,g)=>{T(g(v,{get data(){return i()},get form(){return e.form},get params(){return e.page.params},children:(b,_e)=>{var D=x(),q=w(D);C(q,()=>f(R),(B,M)=>{T(M(B,{get data(){return l()},get form(){return e.form},get params(){return e.page.params}}),N=>a()[1]=N,()=>a()?.[1])}),y(b,D)},$$slots:{default:!0}}),b=>a()[0]=b,()=>a()?.[0])}),y(n,_)},h=n=>{const u=L(()=>e.constructors[0]);var _=x(),E=w(_);C(E,()=>f(u),(v,g)=>{T(g(v,{get data(){return i()},get form(){return e.form},get params(){return e.page.params}}),b=>a()[0]=b,()=>a()?.[0])}),y(n,_)};A(o,n=>{e.constructors[1]?n(d):n(h,!1)})}var j=$(o,2);{var m=n=>{var u=ue(),_=te(u);{var E=v=>{var g=se();ae(()=>ne(g,f(s))),y(v,g)};A(_,v=>{f(t)&&v(E)})}re(u),y(n,u)};A(j,n=>{f(r)&&n(m)})}y(c,p),ee()}const Re=oe(de),pe=[()=>P(()=>import("../nodes/0.liUzuc-A.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>P(()=>import("../nodes/1.t1GUCrrv.js"),__vite__mapDeps([10,1,8,2,4]),import.meta.url),()=>P(()=>import("../nodes/2.CTVpMB9b.js"),__vite__mapDeps([11,1,8,2,3,12,7,5,4,6,13,14]),import.meta.url),()=>P(()=>import("../nodes/3.DnzjoQZ0.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,8,12,13,14]),import.meta.url),()=>P(()=>import("../nodes/4.Dvs__DIQ.js"),__vite__mapDeps([16,1,8,2,3,7,4]),import.meta.url)],we=[],ke={"/":[2],"/control/[id]":[3],"/setup":[4]},fe={handleError:(({error:c})=>{console.error(c)}),reroute:(()=>{}),transport:{}},he=Object.fromEntries(Object.entries(fe.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,fe 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/Bh_lsY1c.js";export{o as load_css,r as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunks/DsnmJJEf.js";import{at as le,p as R,ae as y,d as k,T as $,G as m,h as u,af as F,ag as M,c as i,n as A,r as n,b as v,e as N,J as D,K as Y,ak as Q,a as U,f as P,o as xe,au as be,s as V,av as ie}from"../chunks/B_3ksxz5.js";import{l as z,p as C,i as w,a as te,s as de}from"../chunks/D4Q_ObIy.js";import{g as me}from"../chunks/DQAUO7J_.js";import{p as _e,D as we}from"../chunks/CMWPLh7h.js";import{i as j}from"../chunks/D3aNP_lg.js";import{a as K,f as ce,w as q}from"../chunks/B19gt6-g.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(),j();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),D(()=>Y(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();j();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(),j();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),D(()=>Y(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(),j();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),D(()=>Y(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(),j();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),D(()=>Y(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 Be(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(),j();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),D(()=>Y(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(),n(s),v(b,s),N()}var De=(b,t)=>t("csv"),Ye=(b,t)=>t("excel"),je=(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(),B=i(Z);B.__click=[De,r];var S=i(B),H=i(S);Ve(H,{class:"w-4 h-4"}),A(2),n(S),n(B);var L=V(B,2);L.__click=[Ye,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=[je,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);Be(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),D(()=>Y(X,l().isConnected?l().fieldSchema?"Loading controls...":"Loading schema...":"Connecting...")),v(S,H)},B=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(B,!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,ae as y,d as k,T as $,G as m,h as u,af as F,ag as M,c as i,n as A,r as n,b as v,e as N,J as D,K as Y,ak as Q,a as U,f as P,o as xe,au as be,s as V,av as ie}from"../chunks/BJF-sFqz.js";import{l as z,p as C,i as w,a as te,s as de}from"../chunks/DUz6FRLu.js";import{g as me}from"../chunks/Bh_lsY1c.js";import{p as _e,D as we}from"../chunks/Bg93OsgA.js";import{i as j}from"../chunks/Bty54Wy4.js";import{a as K,f as ce,w as q}from"../chunks/CBYXl-8c.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(),j();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),D(()=>Y(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();j();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(),j();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),D(()=>Y(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(),j();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),D(()=>Y(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(),j();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),D(()=>Y(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 Be(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(),j();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),D(()=>Y(c,r())),v(d,a)};w(p,d=>{r()&&d(x)})}A(),n(s),v(b,s),N()}var De=(b,t)=>t("csv"),Ye=(b,t)=>t("excel"),je=(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(),B=i(Z);B.__click=[De,r];var S=i(B),H=i(S);Ve(H,{class:"w-4 h-4"}),A(2),n(S),n(B);var L=V(B,2);L.__click=[Ye,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=[je,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);Be(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),D(()=>Y(X,l().isConnected?l().fieldSchema?"Loading controls...":"Loading schema...":"Connecting...")),v(S,H)},B=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(B,!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/
|
|
1
|
+
import"../chunks/DsnmJJEf.js";import{i as u}from"../chunks/Bty54Wy4.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/BJF-sFqz.js";import{s as $,p}from"../chunks/Bh_lsY1c.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/
|
|
1
|
+
import"../chunks/DsnmJJEf.js";import"../chunks/Bty54Wy4.js";import{f,a as y,b as n,c as t,r,s as w,n as C}from"../chunks/BJF-sFqz.js";import{i as k,s as $,a as D}from"../chunks/DUz6FRLu.js";import{C as S,a as j,D as L}from"../chunks/Ds9w7fzN.js";import{s as N}from"../chunks/Bg93OsgA.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/
|
|
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/BJF-sFqz.js";import{a as C,i as b,s as U}from"../chunks/DUz6FRLu.js";import{g as V}from"../chunks/Bh_lsY1c.js";import{p as q,s as _}from"../chunks/Bg93OsgA.js";import{C as G,a as J,D as K}from"../chunks/Ds9w7fzN.js";import{w}from"../chunks/CBYXl-8c.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 Ye}from"../chunks/
|
|
1
|
+
import"../chunks/DsnmJJEf.js";import{i as Ye}from"../chunks/Bty54Wy4.js";import{p as We,ae as Me,d as l,T as C,G as te,h as e,af as ar,ag as Ve,c as o,n as _e,r,b as v,e as Xe,J as H,K as P,ah as Vr,f as k,s as n,k as x,ai as u,a as we,aj as xr,ak as Ie,a0 as $e,al as hr,am as rr,an as yr,o as Gr,W as Qr}from"../chunks/BJF-sFqz.js";import{l as tr,p as Ue,i as M,a as et,s as rt}from"../chunks/DUz6FRLu.js";import{a as Tr,s as de,r as Er,e as pe,i as De,b as qe,c as Ir,d as _r,f as Cr,w as wr}from"../chunks/CBYXl-8c.js";import{g as tt}from"../chunks/Bh_lsY1c.js";var at=Ve("<title> </title>"),ot=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 lt(fe,K){const F=tr(K,["children","$$slots","$$events","$$legacy"]),se=tr(F,["size","title"]);We(K,!1);const V=C(),T=C();let N=Ue(K,"size",8,16),f=Ue(K,"title",8,void 0);Me(()=>(te(F),te(f())),()=>{l(V,F["aria-label"]||F["aria-labelledby"]||f())}),Me(()=>(e(V),te(F)),()=>{l(T,{"aria-hidden":e(V)?void 0:!0,role:e(V)?"img":void 0,focusable:Number(F.tabindex)===0?!0:void 0})}),ar(),Ye();var b=ot();Tr(b,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:N(),height:N(),...e(T),...se}));var S=o(b);{var ie=R=>{var c=at(),q=o(c,!0);r(c),H(()=>P(q,f())),v(R,c)};M(S,R=>{f()&&R(ie)})}_e(2),r(b),v(fe,b),Xe()}var st=Ve("<title> </title>"),it=Ve('<svg><!><path d="M10 6H14V10H10zM18 6H22V10H18zM10 14H14V18H10zM18 14H22V18H18zM10 22H14V26H10zM18 22H22V26H18z"></path></svg>');function kr(fe,K){const F=tr(K,["children","$$slots","$$events","$$legacy"]),se=tr(F,["size","title"]);We(K,!1);const V=C(),T=C();let N=Ue(K,"size",8,16),f=Ue(K,"title",8,void 0);Me(()=>(te(F),te(f())),()=>{l(V,F["aria-label"]||F["aria-labelledby"]||f())}),Me(()=>(e(V),te(F)),()=>{l(T,{"aria-hidden":e(V)?void 0:!0,role:e(V)?"img":void 0,focusable:Number(F.tabindex)===0?!0:void 0})}),ar(),Ye();var b=it();Tr(b,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:N(),height:N(),...e(T),...se}));var S=o(b);{var ie=R=>{var c=st(),q=o(c,!0);r(c),H(()=>P(q,f())),v(R,c)};M(S,R=>{f()&&R(ie)})}_e(),r(b),v(fe,b),Xe()}var nt=k('<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>'),dt=k('<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>'),vt=k('<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>'),ct=k("<option> </option>"),gt=k("<option> </option>"),pt=k("<option> </option>"),ut=k('<span class="ml-auto text-xs text-blue-600 dark:text-blue-400">ID</span>'),bt=k('<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>'),ft=k('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">No excluded fields</p>'),mt=k('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),xt=k('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),ht=k('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),yt=k('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),_t=k('<div draggable="true" role="button" tabindex="0"><!> <span class="truncate"> </span></div>'),wt=k('<p class="text-xs text-gray-400 dark:text-gray-500 text-center py-4">Drop fields here</p>'),kt=k('<th class="px-4 py-2"> </th>'),Ct=k('<td class="px-4 py-2"> </td>'),St=k('<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700"></tr>'),$t=k('<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>'),Dt=k('<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>'),Mt=k(`<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-4 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></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),zt=k('<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 At(fe,K){We(K,!1);const F=C(),se=Vr();let V=C(null),T=C(""),N=C(""),f=C([]),b=C([]),S=C([]),ie=C(0),R=C([]),c=C(new Map),q=C(1),j=C(""),ue=C(""),U=C(""),Y=C(!1),W=C(""),ve=C(""),ye=C(!1),ae=C(!1),E=C(null),X=C(null),oe=C(null);function ke(){l(b,[]),l(S,[]),l(ie,0),e(c).clear(),l(c,new Map),l(j,""),l(W,""),l(ve,""),l(E,null),l(X,null),l(oe,null)}function p(t){t.preventDefault(),l(ae,!0)}function m(){l(ae,!1)}function z(t){t.preventDefault(),l(ae,!1);const i=t.dataTransfer?.files;i&&i.length>0&&I(i[0])}function L(t){const i=t.target;i.files&&i.files.length>0&&I(i.files[0])}async function I(t){ke(),l(T,t.name),l(V,t),l(W,""),l(Y,!0),l(ue,e(T).replace(/\.[^.]+$/,"").replace(/[-_]/g," ")),l(U,`Imported from ${e(T)}`);try{const i=new FormData;i.append("file",t);const h=await fetch("/api/parse-excel",{method:"POST",body:i});if(!h.ok){const $=await h.json();throw new Error($.error||"Failed to parse file")}const y=await h.json();l(f,y.sheets||[]),l(N,y.selectedSheet||e(f)[0]),l(R,y.rowPreviews||[]),e(R).length>0&&e(q)===1&&l(q,e(R)[0].row),await B(),l(ye,!0)}catch(i){l(W,"Error reading file: "+i.message)}finally{l(Y,!1)}}async function B(){if(!(!e(V)||!e(N))){l(Y,!0),e(c).clear(),l(c,new Map),l(j,"");try{const t=new FormData;t.append("file",e(V)),t.append("sheetName",e(N)),t.append("headerRow",e(q).toString());const i=await fetch("/api/parse-excel-sheet",{method:"POST",body:t});if(!i.ok){const y=await i.json();throw new Error(y.error||"Failed to parse sheet")}const h=await i.json();if(l(b,h.fields||[]),l(S,h.sampleData||[]),l(ie,h.controlCount||0),e(b).forEach((y,$)=>{const d=y.toLowerCase();let O="custom",Z="text";d.includes("implementation")||d.includes("status")||d.includes("narrative")||d.includes("guidance")?O="implementation":(d.includes("id")||d.includes("title")||d.includes("family")||d.includes("cci")||d.includes("control")||d.includes("acronym"))&&(O="overview"),d.includes("description")||d.includes("narrative")||d.includes("guidance")||d.includes("statement")?Z="textarea":d.includes("status")||d.includes("type")||d.includes("designation")?Z="select":d.includes("date")?Z="date":(d.includes("count")||d.includes("number"))&&(Z="number"),e(c).set(y,{originalName:y,tab:O,displayOrder:$,fieldType:Z,required:d.includes("id")||d.includes("title")})}),l(c,e(c)),e(j)&&!e(b).includes(e(j))&&l(j,""),!e(j)&&e(b).includes("AP Acronym")){const y=!e(S).length||e(S).every(Q=>!Q["AP Acronym"]||String(Q["AP Acronym"]).length<25),$=e(S).map(Q=>Q["AP Acronym"]).filter(Q=>Q!=null&&Q!==""&&String(Q).trim()!==""),d=new Set($),O=!$.length||d.size===$.length,Z=$.length>0;y&&O&&Z&&l(j,"AP Acronym")}}catch(t){l(W,"Error loading sheet data: "+t.message)}finally{l(Y,!1)}}}function ce(t){if(!t)return t;let i=t.trim().replace(/\r?\n/g," ").replace(/\s+/g," ").trim();return Te(i)}function Te(t){return t.replace(/\W+/g," ").split(/ |\s/).map(i=>i.toLowerCase()).join("-")}function be(t,i){l(E,i),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",i))}function le(){l(E,null),l(X,null),l(oe,null)}function D(t,i){t.preventDefault(),l(X,i),t.dataTransfer&&(t.dataTransfer.dropEffect="move")}function ge(){l(X,null)}function ne(t,i,h){if(t.preventDefault(),e(E)&&e(c).has(e(E))){const y=e(c).get(e(E));if(y.tab=i,h!==void 0&&i!==null){const d=Array.from(e(c).entries()).filter(([O,Z])=>Z.tab===i).sort((O,Z)=>O[1].displayOrder-Z[1].displayOrder).filter(([O])=>O!==e(E));d.splice(h,0,[e(E),y]),d.forEach(([O,Z],Q)=>{Z.displayOrder=Q,e(c).set(O,Z)})}else if(i!==null){const $=Math.max(0,...Array.from(e(c).values()).filter(d=>d.tab===i).map(d=>d.displayOrder));y.displayOrder=$+1}e(c).set(e(E),y),l(c,e(c))}l(E,null),l(X,null)}function ze(t,i){t.preventDefault(),t.stopPropagation(),l(oe,i)}function Ce(){l(oe,null)}function Se(t,i,h){if(t.preventDefault(),t.stopPropagation(),e(E)&&e(E)!==i){const $=Array.from(e(c).entries()).filter(([d,O])=>O.tab===h).sort((d,O)=>d[1].displayOrder-O[1].displayOrder).findIndex(([d])=>d===i);$!==-1&&ne(t,h,$)}l(oe,null)}async function Le(){if(!(!e(V)||!e(T))){if(!e(j)){l(W,"Please select a Control ID field before importing"),l(ve,"");return}if(!e(ue)||e(ue).trim()===""){l(W,"Please enter a Control Set Name before importing"),l(ve,"");return}l(Y,!0),l(W,""),l(ve,"");try{const t=new FormData;t.append("file",e(V),e(T)),t.append("controlIdField",e(j)),t.append("startRow",e(q).toString()),t.append("namingConvention","kebab-case"),t.append("skipEmpty","true"),t.append("skipEmptyRows","true"),t.append("controlSetName",e(ue)||e(T).replace(/\.[^.]+$/,"")),t.append("controlSetDescription",e(U)||`Imported from ${e(T)}`);const i=Array.from(e(c).entries()).filter(([$,d])=>d.tab!==null).map(([$,d])=>({fieldName:ce($),...d}));t.append("fieldSchema",JSON.stringify(i));const h=await fetch("/api/import-spreadsheet",{method:"POST",body:t});if(!h.ok){const $=await h.json();throw new Error($.error||"Import failed")}const y=await h.json();l(ve,`Successfully imported ${y.controlCount} controls into ${y.families.length} families`),se("created",{path:y.outputDir})}catch(t){l(W,"Error importing spreadsheet: "+t.message)}finally{l(Y,!1)}}}Me(()=>e(b),()=>{l(F,e(b).filter(t=>e(b).includes(t)))}),ar(),Ye();var Ne=zt(),me=o(Ne),je=o(me),Ae=o(je),or=o(Ae);lt(or,{class:"w-8 h-8 mb-4 text-gray-500 dark:text-gray-400"}),_e(4),r(Ae);var Je=n(Ae,2);r(je),r(me);var Fe=n(me,2);{var lr=t=>{var i=nt(),h=o(i),y=n(o(h),2),$=n(o(y)),d=n($),O=n(o(d)),Z=n(O,2),Q=n(Z,2);r(d),r(y),r(h),r(i),H(()=>{P($,` ${e(T)??""} `),P(O,` ${e(f),x(()=>e(f).length)??""} | `),P(Z,` ${e(b),x(()=>e(b).length)??""} | `),P(Q,` ${e(ie)??""}`)}),v(t,i)};M(Fe,t=>{e(T)&&t(lr)})}var Ke=n(Fe,2);{var sr=t=>{var i=dt(),h=o(i),y=n(o(h),2),$=o(y,!0);r(y),r(h),r(i),H(()=>P($,e(W))),v(t,i)};M(Ke,t=>{e(W)&&t(sr)})}var Be=n(Ke,2);{var ir=t=>{var i=vt(),h=o(i),y=n(o(h),2),$=o(y,!0);r(y),r(h),r(i),H(()=>P($,e(ve))),v(t,i)};M(Be,t=>{e(ve)&&t(ir)})}var nr=n(Be,2);{var dr=t=>{var i=Mt(),h=we(i),y=n(o(h),2),$=o(y),d=n(o($),2);Er(d),_e(2),r($);var O=n($,2),Z=n(o(O),2);Er(Z),_e(2),r(O),r(y);var Q=n(y,2),vr=o(Q),Ge=n(o(vr),2);H(()=>{e(N),xr(()=>{e(f)})}),pe(Ge,5,()=>e(f),De,(a,s)=>{var _=ct(),w=o(_,!0);r(_);var g={};H(()=>{P(w,e(s)),g!==(g=e(s))&&(_.value=(_.__value=e(s))??"")}),v(a,_)}),r(Ge),_e(2),r(vr);var cr=n(vr,2),Qe=n(o(cr),2);H(()=>{e(q),xr(()=>{e(R)})}),pe(Qe,5,()=>e(R),De,(a,s)=>{var _=gt(),w=o(_);r(_);var g={};H(()=>{P(w,`Row ${e(s),x(()=>e(s).row)??""}: ${e(s),x(()=>e(s).preview)??""}`),g!==(g=(e(s),x(()=>e(s).row)))&&(_.value=(_.__value=(e(s),x(()=>e(s).row)))??"")}),v(a,_)}),r(Qe),_e(2),r(cr);var Sr=n(cr,2),er=n(o(Sr),2);H(()=>{e(j),xr(()=>{e(b),e(S)})});var gr=o(er);gr.value=gr.__value="";var Lr=n(gr);pe(Lr,1,()=>e(b),De,(a,s)=>{const _=$e(()=>(e(S),e(s),x(()=>e(S).length>0&&e(S)[0][e(s)]?String(e(S)[0][e(s)]).slice(0,30):""))),w=$e(()=>(e(S),e(s),x(()=>!e(S).length||e(S).every(re=>!re[e(s)]||String(re[e(s)]).length<25)))),g=$e(()=>(e(S),e(s),x(()=>e(S).map(re=>re[e(s)]).filter(re=>re!=null&&re!==""&&String(re).trim()!=="")))),G=$e(()=>new Set(e(g))),ee=$e(()=>(te(e(g)),te(e(G)),x(()=>!e(g).length||e(G).size===e(g).length))),J=$e(()=>(te(e(g)),x(()=>e(g).length>0)));var A=Ie(),xe=we(A);{var Re=re=>{var he=pt(),mr=o(he);r(he);var Pr={};H(()=>{P(mr,`${e(s)??""}${e(_)?` (e.g., ${e(_)})`:""}`),Pr!==(Pr=e(s))&&(he.value=(he.__value=e(s))??"")}),v(re,he)};M(xe,re=>{e(w)&&e(ee)&&e(J)&&re(Re)})}v(a,A)}),r(er),_e(2),r(Sr),r(Q),r(h);var pr=n(h,2),$r=n(o(pr),4),ur=o($r),Oe=n(o(ur),2),Dr=o(Oe);pe(Dr,1,()=>(e(b),e(c),x(()=>e(b).filter(a=>!e(c).get(a)||e(c).get(a)?.tab===null))),a=>a,(a,s)=>{var _=bt(),w=n(o(_),2),g=o(w,!0);r(w);var G=n(w,2);{var ee=J=>{var A=ut();v(J,A)};M(G,J=>{e(s)===e(j)&&J(ee)})}r(_),H(()=>{qe(_,"aria-label",`Drag ${e(s)??""} field`),P(g,e(s))}),u("dragstart",_,J=>be(J,e(s))),u("dragend",_,le),v(a,_)});var Nr=n(Dr,2);{var jr=a=>{var s=ft();v(a,s)};M(Nr,a=>{e(b),e(c),x(()=>e(b).filter(s=>!e(c).get(s)||e(c).get(s)?.tab===null).length===0)&&a(jr)})}r(Oe),r(ur);var br=n(ur,2),He=n(o(br),2),Mr=o(He);pe(Mr,3,()=>(e(c),x(()=>Array.from(e(c).entries()).filter(([a,s])=>s.tab==="overview").sort((a,s)=>a[1].displayOrder-s[1].displayOrder))),([a,s])=>a,(a,s)=>{var _=hr(()=>yr(e(s),2));let w=()=>e(_)[0];var g=mt(),G=o(g);kr(G,{class:"w-3 h-3 mr-2 flex-shrink-0"});var ee=n(G,2),J=o(ee,!0);r(ee),r(g),H(()=>{qe(g,"aria-label",`${w()??""} field in Overview tab`),de(g,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(oe)===w()&&e(E)!==w()?"border-t-2 border-blue-500":""}`),P(J,w())}),u("dragstart",g,A=>be(A,w())),u("dragend",g,le),u("dragover",g,A=>ze(A,w())),u("dragleave",g,Ce),u("drop",g,A=>Se(A,w(),"overview")),v(a,g)});var Br=n(Mr,2);{var Zr=a=>{var s=xt();v(a,s)};M(Br,a=>{e(c),x(()=>Array.from(e(c).entries()).filter(([s,_])=>_.tab==="overview").length===0)&&a(Zr)})}r(He),r(br);var fr=n(br,2),Pe=n(o(fr),2),zr=o(Pe);pe(zr,3,()=>(e(c),x(()=>Array.from(e(c).entries()).filter(([a,s])=>s.tab==="implementation").sort((a,s)=>a[1].displayOrder-s[1].displayOrder))),([a,s])=>a,(a,s)=>{var _=hr(()=>yr(e(s),2));let w=()=>e(_)[0];var g=ht(),G=o(g);kr(G,{class:"w-3 h-3 mr-2 flex-shrink-0"});var ee=n(G,2),J=o(ee,!0);r(ee),r(g),H(()=>{qe(g,"aria-label",`${w()??""} field in Implementation tab`),de(g,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(oe)===w()&&e(E)!==w()?"border-t-2 border-green-500":""}`),P(J,w())}),u("dragstart",g,A=>be(A,w())),u("dragend",g,le),u("dragover",g,A=>ze(A,w())),u("dragleave",g,Ce),u("drop",g,A=>Se(A,w(),"implementation")),v(a,g)});var Rr=n(zr,2);{var qr=a=>{var s=yt();v(a,s)};M(Rr,a=>{e(c),x(()=>Array.from(e(c).entries()).filter(([s,_])=>_.tab==="implementation").length===0)&&a(qr)})}r(Pe),r(fr);var Ar=n(fr,2),Ee=n(o(Ar),2),Fr=o(Ee);pe(Fr,3,()=>(e(c),x(()=>Array.from(e(c).entries()).filter(([a,s])=>s.tab==="custom").sort((a,s)=>a[1].displayOrder-s[1].displayOrder))),([a,s])=>a,(a,s)=>{var _=hr(()=>yr(e(s),2));let w=()=>e(_)[0];var g=_t(),G=o(g);kr(G,{class:"w-3 h-3 mr-2 flex-shrink-0"});var ee=n(G,2),J=o(ee,!0);r(ee),r(g),H(()=>{qe(g,"aria-label",`${w()??""} field in Custom tab`),de(g,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
|
package/dist/_app/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1757525976934"}
|