@kizenapps/cli 1.1.2 → 1.5.0-f5c8da8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/index.js +17 -17
  2. package/dist/index.js.map +1 -1
  3. package/dist/viewer/assets/AppDetailPage-RmQ6eFrs.js +1 -0
  4. package/dist/viewer/assets/BootstrapContext-BLyrI7bs.js +1 -0
  5. package/dist/viewer/assets/Card-D66xMN4f.js +1 -0
  6. package/dist/viewer/assets/{CodeStepsPage-DnL8JwSJ.js → CodeStepsPage-4mGAx_d8.js} +1 -1
  7. package/dist/viewer/assets/{CodeViewer-C9aVhzG7.js → CodeViewer-BbZIh-MU.js} +1 -1
  8. package/dist/viewer/assets/ConfigurationPage-DCE50jxK.js +1 -0
  9. package/dist/viewer/assets/DevSidebar-BkO0bOpR.js +1 -0
  10. package/dist/viewer/assets/Dialog-BtHSr4rf.js +1 -0
  11. package/dist/viewer/assets/IconReferencePage-DrDFi3ph.js +1 -0
  12. package/dist/viewer/assets/SandboxPage-Lg8-iFmb.js +1 -0
  13. package/dist/viewer/assets/SidebarContext-CENlTk-2.js +1 -0
  14. package/dist/viewer/assets/{SourceBrowserPage-BBZcr3MI.js → SourceBrowserPage-C7hAR6YZ.js} +1 -1
  15. package/dist/viewer/assets/{Tooltip-tpqNw0op.js → Tooltip-D9Le4Lgo.js} +1 -1
  16. package/dist/viewer/assets/{VersionsPage-D6QScnTb.js → VersionsPage-BOapKeT8.js} +1 -1
  17. package/dist/viewer/assets/{WhenBadge-DZrl6k94.js → WhenBadge-B-bN_K_6.js} +1 -1
  18. package/dist/viewer/assets/api--yBCib3R.js +11 -0
  19. package/dist/viewer/assets/{bundleQuery-CjbA01rb.js → bundleQuery-Bjqi6ox2.js} +1 -1
  20. package/dist/viewer/assets/calendarSource.worker-Ch3rgZR6.js +25 -0
  21. package/dist/viewer/assets/{configStorage-aLI-65re.js → configStorage-CqY0w-Nt.js} +1 -1
  22. package/dist/viewer/assets/{fa-core-BoBqCOD3.js → fa-core-B7dAyAZA.js} +1 -1
  23. package/dist/viewer/assets/{fa-pro-icons-j8-_MCQ7.js → fa-pro-icons-CmhlYbxQ.js} +1 -1
  24. package/dist/viewer/assets/floatingFrame.worker-Bbq7GWth.js +24 -0
  25. package/dist/viewer/assets/generic.worker-Cbl5oax1.js +24 -0
  26. package/dist/viewer/assets/iconMap-BotklELY.js +1 -0
  27. package/dist/viewer/assets/index-B2_Kf66j.js +5 -0
  28. package/dist/viewer/assets/index-CyOoy-kN.css +2 -0
  29. package/dist/viewer/assets/{react-csXWLXSE.js → react-j0eBFjQW.js} +1 -1
  30. package/dist/viewer/assets/recordDetail.worker-DNuhYdSl.js +24 -0
  31. package/dist/viewer/assets/rolldown-runtime-Dw2cE7zH.js +1 -0
  32. package/dist/viewer/assets/storageKeys-CSWy3aiP.js +1 -0
  33. package/dist/viewer/assets/useCriticalExceptionDialog-BWqpBmfm.js +40 -0
  34. package/dist/viewer/assets/{useLocalStorage-CyZiO78q.js → useLocalStorage-oRuCYBcL.js} +1 -1
  35. package/dist/viewer/assets/{useNavigate-BblEmQ3O.js → useNavigate-AMIImip9.js} +1 -1
  36. package/dist/viewer/assets/{useQuery-5OkVbV1s.js → useQuery-CHCkzQbK.js} +1 -1
  37. package/dist/viewer/index.html +14 -13
  38. package/package.json +13 -3
  39. package/dist/viewer/assets/AppDetailPage-BorvgFPN.js +0 -1
  40. package/dist/viewer/assets/BootstrapContext-D5ZnMrOp.js +0 -1
  41. package/dist/viewer/assets/Card-BpDJPrPZ.js +0 -1
  42. package/dist/viewer/assets/ConfigurationPage-CAdaFi9y.js +0 -1
  43. package/dist/viewer/assets/DevSidebar-DS8UU-G8.js +0 -1
  44. package/dist/viewer/assets/IconReferencePage-bTBpdJEd.js +0 -1
  45. package/dist/viewer/assets/SandboxPage-CU6fvI8A.js +0 -1
  46. package/dist/viewer/assets/SidebarContext-Cn8QRb77.js +0 -1
  47. package/dist/viewer/assets/api-DtXiAEKW.js +0 -10
  48. package/dist/viewer/assets/calendarSource.worker-DGRTJYHs.js +0 -24
  49. package/dist/viewer/assets/floatingFrame.worker-CKAMagoG.js +0 -23
  50. package/dist/viewer/assets/generic.worker-Bzr3c9PO.js +0 -23
  51. package/dist/viewer/assets/index-Cp0A29vq.js +0 -5
  52. package/dist/viewer/assets/index-DtzraybB.css +0 -2
  53. package/dist/viewer/assets/recordDetail.worker-B-1qFS5m.js +0 -23
  54. package/dist/viewer/assets/rolldown-runtime-DF2fYuay.js +0 -1
  55. package/dist/viewer/assets/storageKeys-C6c8YF5Y.js +0 -1
  56. package/dist/viewer/assets/useCriticalExceptionDialog-C8PL9Dxt.js +0 -5
  57. package/dist/viewer/assets/validIcons-BzGQ4tWD.js +0 -1
  58. /package/dist/viewer/assets/{formatBytes-C9lOTtsO.js → formatBytes-BCP0hIUu.js} +0 -0
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{j as t}from"./fa-core-B7dAyAZA.js";var n=e(t(),1),r=(0,n.createContext)(0),i=()=>(0,n.useContext)(r);export{i as n,r as t};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{A as t,T as n,a as r,d as i,j as a,k as o,m as s,p as c,r as l}from"./fa-core-BoBqCOD3.js";import{t as u}from"./useQuery-5OkVbV1s.js";import{t as d}from"./formatBytes-C9lOTtsO.js";import{n as f,t as p}from"./CodeViewer-C9aVhzG7.js";import{t as m}from"./useLocalStorage-CyZiO78q.js";var h=e(a(),1),g=new Set([`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`,`.md`,`.mdx`,`.yml`,`.yaml`,`.toml`,`.css`,`.scss`,`.html`,`.htm`,`.xml`,`.svg`,`.txt`,`.sh`,`.py`,`.env`,`.gitignore`,`.prettierrc`,`.eslintrc`]),_=t(),v=new Set([`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.svg`,`.ico`]);function y(e){let t=e.lastIndexOf(`/`),n=t>=0?e.slice(t+1):e,r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r).toLowerCase()}function b(e,t){return e===``?t:`${e}/${t}`}function x(e){return{queryKey:[`source-tree`,e],queryFn:async()=>{let t=await fetch(`/api/source/tree?path=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Failed to list ${e||`/`}`);return await t.json()}}}var S=class extends Error{status;constructor(e,t){super(e),this.status=t}};function C(e){return{queryKey:[`source-file`,e],enabled:e!==null&&e!==``,retry:(e,t)=>t instanceof S&&t.status>=400&&t.status<500?!1:e<3,queryFn:async()=>{if(e===null||e===``)throw Error(`No path`);let t=await fetch(`/api/source/file?path=${encodeURIComponent(e)}`),n=t.headers.get(`content-type`)??`application/octet-stream`,r=t.headers.get(`content-length`),i=r===null?0:Number(r);if(t.status===413)return{kind:`too-large`,size:(await t.json()).size??i,contentType:n};if(!t.ok)throw new S(`Failed to read ${e}`,t.status);let a=y(e);if(v.has(a)&&!n.startsWith(`text/`))return{kind:`image`,size:i,contentType:n};if(g.has(a)||n.startsWith(`text/`)||n.includes(`json`)){let e=await t.text();return{kind:`text`,content:e,size:e.length,contentType:n}}return{kind:`binary`,size:i,contentType:n}}}}var w=({path:e,name:t,depth:a,expanded:d,toggleExpanded:f,selectedPath:p,onSelect:m})=>{let h=d.has(e),{data:g,isLoading:v,isError:y}=u({...x(e),enabled:h});return(0,_.jsxs)(`div`,{children:[(0,_.jsxs)(`button`,{onClick:()=>{f(e)},className:`flex w-full items-center gap-1.5 px-2 py-0.5 text-left text-[12px] text-neutral-700 hover:bg-neutral-100`,style:{paddingLeft:`${String(8+a*12)}px`},children:[(0,_.jsx)(o,{icon:h?l:r,className:`w-3 text-[9px] text-neutral-400`}),(0,_.jsx)(o,{icon:h?s:c,className:`w-3 text-[11px] text-amber-500`}),(0,_.jsx)(`span`,{className:`truncate`,children:t})]}),h&&(0,_.jsxs)(`div`,{children:[v&&(0,_.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-0.5 text-[11px] text-neutral-400`,style:{paddingLeft:`${String(24+a*12)}px`},children:[(0,_.jsx)(o,{icon:n,className:`animate-spin text-[9px]`}),(0,_.jsx)(`span`,{children:`Loading…`})]}),y&&(0,_.jsx)(`div`,{className:`px-2 py-0.5 text-[11px] text-red-500`,style:{paddingLeft:`${String(24+a*12)}px`},children:`Failed to load`}),g?.entries.map(t=>{let n=b(e,t.name);if(t.kind===`dir`)return(0,_.jsx)(w,{path:n,name:t.name,depth:a+1,expanded:d,toggleExpanded:f,selectedPath:p,onSelect:m},n);let r=p===n;return(0,_.jsxs)(`button`,{onClick:()=>{m(n)},className:`flex w-full items-center gap-1.5 px-2 py-0.5 text-left text-[12px] ${r?`bg-neutral-800 text-white`:`text-neutral-700 hover:bg-neutral-100`}`,style:{paddingLeft:`${String(24+(a+1)*12)}px`},title:n,children:[(0,_.jsx)(o,{icon:i,className:`w-3 text-[11px] ${r?`text-white/70`:`text-neutral-400`}`}),(0,_.jsx)(`span`,{className:`truncate`,children:t.name})]},n)})]})]})},T=({path:e,onMissing:t})=>{let{data:r,isLoading:i,isError:a,error:s}=u(C(e)),c=y(e);return(0,h.useEffect)(()=>{a&&s instanceof S&&s.status===404&&t()},[a,s,t]),i?(0,_.jsxs)(`div`,{className:`flex items-center gap-2 p-4 text-[12px] text-neutral-500`,children:[(0,_.jsx)(o,{icon:n,className:`animate-spin`}),(0,_.jsxs)(`span`,{children:[`Loading `,e,`…`]})]}):a||!r?(0,_.jsx)(`div`,{className:`p-4 text-[12px] text-red-600`,children:s instanceof Error?s.message:`Could not read ${e}`}):r.kind===`too-large`?(0,_.jsxs)(`div`,{className:`p-4 text-[12px] text-neutral-600`,children:[`File too large to preview (`,d(r.size),`).`]}):r.kind===`image`?(0,_.jsx)(`div`,{className:`flex items-start justify-start p-4`,children:(0,_.jsx)(`img`,{src:`/api/source/file?path=${encodeURIComponent(e)}`,alt:e,className:`max-w-full rounded border border-black/10 bg-[url('data:image/svg+xml;utf8,<svg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2216%22%20height=%2216%22><rect%20width=%228%22%20height=%228%22%20fill=%22%23f3f4f6%22/><rect%20x=%228%22%20y=%228%22%20width=%228%22%20height=%228%22%20fill=%22%23f3f4f6%22/></svg>')]`})}):r.kind===`binary`?(0,_.jsxs)(`div`,{className:`p-4 text-[12px] text-neutral-600`,children:[`Binary file (`,d(r.size),`) — cannot preview.`]}):(0,_.jsx)(`div`,{className:`p-4`,children:(0,_.jsx)(p,{code:r.content??``,language:f(c)})})},E=()=>{let{data:e,isLoading:t,isError:n}=u(x(``)),[r,a]=m(`source-browser-expanded`,[]),[s,c]=m(`source-browser-selected`,null),l=(0,h.useMemo)(()=>new Set(r),[r]),d=e=>{let t=new Set(l);t.has(e)?t.delete(e):t.add(e),a([...t])},[f,p]=(0,h.useState)(!1);return t?(0,_.jsx)(`div`,{className:`-m-6 flex h-[calc(100%+3rem)] items-center justify-center bg-white text-[13px] text-neutral-600`,children:`Loading source tree…`}):n||!e?(0,_.jsx)(`div`,{className:`-m-6 flex h-[calc(100%+3rem)] items-center justify-center bg-white text-[13px] text-red-600`,children:`Could not load source tree.`}):(0,_.jsxs)(`div`,{className:`-m-6 flex h-[calc(100%+3rem)] overflow-hidden bg-white`,children:[(0,_.jsxs)(`div`,{className:`flex w-72 shrink-0 flex-col border-r border-black/10 bg-neutral-50/60`,children:[(0,_.jsx)(`div`,{className:`flex h-10 shrink-0 items-center border-b border-black/10 px-4 text-[11px] font-semibold uppercase tracking-widest text-neutral-400`,children:`Plugin Source`}),(0,_.jsx)(`div`,{className:`flex-1 overflow-auto py-1`,children:e.entries.map(e=>{let t=b(``,e.name);if(e.kind===`dir`)return(0,_.jsx)(w,{path:t,name:e.name,depth:0,expanded:l,toggleExpanded:d,selectedPath:s,onSelect:c},t);let n=s===t;return(0,_.jsxs)(`button`,{onClick:()=>{c(t)},className:`flex w-full items-center gap-1.5 px-2 py-0.5 text-left text-[12px] ${n?`bg-neutral-800 text-white`:`text-neutral-700 hover:bg-neutral-100`}`,style:{paddingLeft:`24px`},title:t,children:[(0,_.jsx)(o,{icon:i,className:`w-3 text-[11px] ${n?`text-white/70`:`text-neutral-400`}`}),(0,_.jsx)(`span`,{className:`truncate`,children:e.name})]},t)})})]}),(0,_.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,_.jsx)(`div`,{className:`flex h-10 shrink-0 items-center gap-2 border-b border-black/10 px-4`,children:s===null?(0,_.jsx)(`span`,{className:`text-[12px] text-neutral-400`,children:`Select a file to preview`}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`span`,{className:`truncate font-mono text-[12px] text-neutral-700`,children:s}),(0,_.jsx)(`button`,{onClick:()=>{s!==null&&navigator.clipboard.writeText(s).then(()=>{p(!0),setTimeout(()=>{p(!1)},1200)})},className:`rounded-full border border-black/10 bg-white px-2 py-0.5 text-[10px] font-medium text-neutral-500 hover:border-black/20 hover:text-neutral-800`,children:f?`Copied`:`Copy path`})]})}),(0,_.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:s!==null&&s!==``&&(0,_.jsx)(T,{path:s,onMissing:()=>{c(null)}})})]})]})};export{E as SourceBrowserPage};
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{A as t,T as n,a as r,d as i,j as a,k as o,m as s,p as c,r as l}from"./fa-core-B7dAyAZA.js";import{t as u}from"./useQuery-CHCkzQbK.js";import{t as d}from"./formatBytes-BCP0hIUu.js";import{n as f,t as p}from"./CodeViewer-BbZIh-MU.js";import{t as m}from"./useLocalStorage-oRuCYBcL.js";var h=e(a(),1),g=new Set([`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`,`.md`,`.mdx`,`.yml`,`.yaml`,`.toml`,`.css`,`.scss`,`.html`,`.htm`,`.xml`,`.svg`,`.txt`,`.sh`,`.py`,`.env`,`.gitignore`,`.prettierrc`,`.eslintrc`]),_=t(),v=new Set([`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.svg`,`.ico`]);function y(e){let t=e.lastIndexOf(`/`),n=t>=0?e.slice(t+1):e,r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r).toLowerCase()}function b(e,t){return e===``?t:`${e}/${t}`}function x(e){return{queryKey:[`source-tree`,e],queryFn:async()=>{let t=await fetch(`/api/source/tree?path=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Failed to list ${e||`/`}`);return await t.json()}}}var S=class extends Error{status;constructor(e,t){super(e),this.status=t}};function C(e){return{queryKey:[`source-file`,e],enabled:e!==null&&e!==``,retry:(e,t)=>t instanceof S&&t.status>=400&&t.status<500?!1:e<3,queryFn:async()=>{if(e===null||e===``)throw Error(`No path`);let t=await fetch(`/api/source/file?path=${encodeURIComponent(e)}`),n=t.headers.get(`content-type`)??`application/octet-stream`,r=t.headers.get(`content-length`),i=r===null?0:Number(r);if(t.status===413)return{kind:`too-large`,size:(await t.json()).size??i,contentType:n};if(!t.ok)throw new S(`Failed to read ${e}`,t.status);let a=y(e);if(v.has(a)&&!n.startsWith(`text/`))return{kind:`image`,size:i,contentType:n};if(g.has(a)||n.startsWith(`text/`)||n.includes(`json`)){let e=await t.text();return{kind:`text`,content:e,size:e.length,contentType:n}}return{kind:`binary`,size:i,contentType:n}}}}var w=({path:e,name:t,depth:a,expanded:d,toggleExpanded:f,selectedPath:p,onSelect:m})=>{let h=d.has(e),{data:g,isLoading:v,isError:y}=u({...x(e),enabled:h});return(0,_.jsxs)(`div`,{children:[(0,_.jsxs)(`button`,{onClick:()=>{f(e)},className:`flex w-full items-center gap-1.5 px-2 py-0.5 text-left text-[12px] text-neutral-700 hover:bg-neutral-100`,style:{paddingLeft:`${String(8+a*12)}px`},children:[(0,_.jsx)(o,{icon:h?l:r,className:`w-3 text-[9px] text-neutral-400`}),(0,_.jsx)(o,{icon:h?s:c,className:`w-3 text-[11px] text-amber-500`}),(0,_.jsx)(`span`,{className:`truncate`,children:t})]}),h&&(0,_.jsxs)(`div`,{children:[v&&(0,_.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-0.5 text-[11px] text-neutral-400`,style:{paddingLeft:`${String(24+a*12)}px`},children:[(0,_.jsx)(o,{icon:n,className:`animate-spin text-[9px]`}),(0,_.jsx)(`span`,{children:`Loading…`})]}),y&&(0,_.jsx)(`div`,{className:`px-2 py-0.5 text-[11px] text-red-500`,style:{paddingLeft:`${String(24+a*12)}px`},children:`Failed to load`}),g?.entries.map(t=>{let n=b(e,t.name);if(t.kind===`dir`)return(0,_.jsx)(w,{path:n,name:t.name,depth:a+1,expanded:d,toggleExpanded:f,selectedPath:p,onSelect:m},n);let r=p===n;return(0,_.jsxs)(`button`,{onClick:()=>{m(n)},className:`flex w-full items-center gap-1.5 px-2 py-0.5 text-left text-[12px] ${r?`bg-neutral-800 text-white`:`text-neutral-700 hover:bg-neutral-100`}`,style:{paddingLeft:`${String(24+(a+1)*12)}px`},title:n,children:[(0,_.jsx)(o,{icon:i,className:`w-3 text-[11px] ${r?`text-white/70`:`text-neutral-400`}`}),(0,_.jsx)(`span`,{className:`truncate`,children:t.name})]},n)})]})]})},T=({path:e,onMissing:t})=>{let{data:r,isLoading:i,isError:a,error:s}=u(C(e)),c=y(e);return(0,h.useEffect)(()=>{a&&s instanceof S&&s.status===404&&t()},[a,s,t]),i?(0,_.jsxs)(`div`,{className:`flex items-center gap-2 p-4 text-[12px] text-neutral-500`,children:[(0,_.jsx)(o,{icon:n,className:`animate-spin`}),(0,_.jsxs)(`span`,{children:[`Loading `,e,`…`]})]}):a||!r?(0,_.jsx)(`div`,{className:`p-4 text-[12px] text-red-600`,children:s instanceof Error?s.message:`Could not read ${e}`}):r.kind===`too-large`?(0,_.jsxs)(`div`,{className:`p-4 text-[12px] text-neutral-600`,children:[`File too large to preview (`,d(r.size),`).`]}):r.kind===`image`?(0,_.jsx)(`div`,{className:`flex items-start justify-start p-4`,children:(0,_.jsx)(`img`,{src:`/api/source/file?path=${encodeURIComponent(e)}`,alt:e,className:`max-w-full rounded border border-black/10 bg-[url('data:image/svg+xml;utf8,<svg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2216%22%20height=%2216%22><rect%20width=%228%22%20height=%228%22%20fill=%22%23f3f4f6%22/><rect%20x=%228%22%20y=%228%22%20width=%228%22%20height=%228%22%20fill=%22%23f3f4f6%22/></svg>')]`})}):r.kind===`binary`?(0,_.jsxs)(`div`,{className:`p-4 text-[12px] text-neutral-600`,children:[`Binary file (`,d(r.size),`) — cannot preview.`]}):(0,_.jsx)(`div`,{className:`p-4`,children:(0,_.jsx)(p,{code:r.content??``,language:f(c)})})},E=()=>{let{data:e,isLoading:t,isError:n}=u(x(``)),[r,a]=m(`source-browser-expanded`,[]),[s,c]=m(`source-browser-selected`,null),l=(0,h.useMemo)(()=>new Set(r),[r]),d=e=>{let t=new Set(l);t.has(e)?t.delete(e):t.add(e),a([...t])},[f,p]=(0,h.useState)(!1);return t?(0,_.jsx)(`div`,{className:`-m-6 flex h-[calc(100%+3rem)] items-center justify-center bg-white text-[13px] text-neutral-600`,children:`Loading source tree…`}):n||!e?(0,_.jsx)(`div`,{className:`-m-6 flex h-[calc(100%+3rem)] items-center justify-center bg-white text-[13px] text-red-600`,children:`Could not load source tree.`}):(0,_.jsxs)(`div`,{className:`-m-6 flex h-[calc(100%+3rem)] overflow-hidden bg-white`,children:[(0,_.jsxs)(`div`,{className:`flex w-72 shrink-0 flex-col border-r border-black/10 bg-neutral-50/60`,children:[(0,_.jsx)(`div`,{className:`flex h-10 shrink-0 items-center border-b border-black/10 px-4 text-[11px] font-semibold uppercase tracking-widest text-neutral-400`,children:`Plugin Source`}),(0,_.jsx)(`div`,{className:`flex-1 overflow-auto py-1`,children:e.entries.map(e=>{let t=b(``,e.name);if(e.kind===`dir`)return(0,_.jsx)(w,{path:t,name:e.name,depth:0,expanded:l,toggleExpanded:d,selectedPath:s,onSelect:c},t);let n=s===t;return(0,_.jsxs)(`button`,{onClick:()=>{c(t)},className:`flex w-full items-center gap-1.5 px-2 py-0.5 text-left text-[12px] ${n?`bg-neutral-800 text-white`:`text-neutral-700 hover:bg-neutral-100`}`,style:{paddingLeft:`24px`},title:t,children:[(0,_.jsx)(o,{icon:i,className:`w-3 text-[11px] ${n?`text-white/70`:`text-neutral-400`}`}),(0,_.jsx)(`span`,{className:`truncate`,children:e.name})]},t)})})]}),(0,_.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,_.jsx)(`div`,{className:`flex h-10 shrink-0 items-center gap-2 border-b border-black/10 px-4`,children:s===null?(0,_.jsx)(`span`,{className:`text-[12px] text-neutral-400`,children:`Select a file to preview`}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`span`,{className:`truncate font-mono text-[12px] text-neutral-700`,children:s}),(0,_.jsx)(`button`,{onClick:()=>{s!==null&&navigator.clipboard.writeText(s).then(()=>{p(!0),setTimeout(()=>{p(!1)},1200)})},className:`rounded-full border border-black/10 bg-white px-2 py-0.5 text-[10px] font-medium text-neutral-500 hover:border-black/20 hover:text-neutral-800`,children:f?`Copied`:`Copy path`})]})}),(0,_.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:s!==null&&s!==``&&(0,_.jsx)(T,{path:s,onMissing:()=>{c(null)}})})]})]})};export{E as SourceBrowserPage};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{A as t,j as n}from"./fa-core-BoBqCOD3.js";import{n as r}from"./react-csXWLXSE.js";var i=e(n(),1),a=r(),o=t(),s=({text:e,children:t})=>{let[n,r]=(0,i.useState)(null);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{onMouseEnter:e=>{let t=e.currentTarget.getBoundingClientRect();r({x:t.left,y:t.top})},onMouseLeave:()=>{r(null)},children:t}),n&&(0,a.createPortal)((0,o.jsx)(`div`,{className:`pointer-events-none fixed z-50 max-w-xs break-all rounded bg-neutral-700 px-2 py-1 text-[11px] text-neutral-100 shadow-lg`,style:{left:n.x,top:n.y,transform:`translateY(calc(-100% - 4px))`},children:e}),document.body)]})};export{s as t};
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{A as t,j as n}from"./fa-core-B7dAyAZA.js";import{n as r}from"./react-j0eBFjQW.js";var i=e(n(),1),a=r(),o=t(),s=({text:e,children:t})=>{let[n,r]=(0,i.useState)(null);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{onMouseEnter:e=>{let t=e.currentTarget.getBoundingClientRect();r({x:t.left,y:t.top})},onMouseLeave:()=>{r(null)},children:t}),n&&(0,a.createPortal)((0,o.jsx)(`div`,{className:`pointer-events-none fixed z-50 max-w-xs break-all rounded bg-neutral-700 px-2 py-1 text-[11px] text-neutral-100 shadow-lg`,style:{left:n.x,top:n.y,transform:`translateY(calc(-100% - 4px))`},children:e}),document.body)]})};export{s as t};
@@ -1 +1 @@
1
- import"./rolldown-runtime-DF2fYuay.js";import{A as e,j as t}from"./fa-core-BoBqCOD3.js";import{n,t as r}from"./bundleQuery-CjbA01rb.js";import{t as i}from"./useQuery-5OkVbV1s.js";import{t as a}from"./Card-BpDJPrPZ.js";t();var o=e(),s=()=>{let{apiName:e}=n({from:`/$apiName/versions`}),{data:t,isLoading:s,isError:c}=i(r);if(s)return(0,o.jsx)(a,{children:(0,o.jsx)(`p`,{className:`text-[13px] text-neutral-400`,children:`Loading...`})});if(c||!t)return(0,o.jsx)(a,{children:(0,o.jsx)(`p`,{className:`text-[13px] text-red-500`,children:`Error loading bundle.`})});let l=t.find(t=>t.api_name===e),u=l?.version??``,d=Array.isArray(l?.allReleaseNotes)?l.allReleaseNotes:[];return d.length===0?(0,o.jsx)(a,{children:(0,o.jsx)(`p`,{className:`text-[13px] text-neutral-400`,children:`No release notes found.`})}):(0,o.jsx)(`div`,{className:`flex flex-col gap-4`,children:d.map(({version:e,notes:t})=>(0,o.jsxs)(a,{children:[(0,o.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,o.jsxs)(`span`,{className:`rounded bg-neutral-100 px-2 py-0.5 text-[11px] font-semibold tracking-wide text-neutral-600`,children:[`v`,e]}),e===u&&(0,o.jsx)(`span`,{className:`rounded bg-green-100 px-2 py-0.5 text-[11px] font-semibold tracking-wide text-green-700`,children:`current`})]}),(0,o.jsx)(`div`,{className:`mb-3 border-t border-black/5`}),(0,o.jsx)(`pre`,{className:`whitespace-pre-wrap font-mono text-[12px] leading-relaxed text-neutral-700`,children:t})]},e))})};export{s as VersionsPage};
1
+ import"./rolldown-runtime-Dw2cE7zH.js";import{A as e,j as t}from"./fa-core-B7dAyAZA.js";import{n,t as r}from"./bundleQuery-Bjqi6ox2.js";import{t as i}from"./useQuery-CHCkzQbK.js";import{t as a}from"./Card-D66xMN4f.js";t();var o=e(),s=()=>{let{apiName:e}=n({from:`/$apiName/versions`}),{data:t,isLoading:s,isError:c}=i(r);if(s)return(0,o.jsx)(a,{children:(0,o.jsx)(`p`,{className:`text-[13px] text-neutral-400`,children:`Loading...`})});if(c||!t)return(0,o.jsx)(a,{children:(0,o.jsx)(`p`,{className:`text-[13px] text-red-500`,children:`Error loading bundle.`})});let l=t.find(t=>t.api_name===e),u=l?.version??``,d=Array.isArray(l?.allReleaseNotes)?l.allReleaseNotes:[];return d.length===0?(0,o.jsx)(a,{children:(0,o.jsx)(`p`,{className:`text-[13px] text-neutral-400`,children:`No release notes found.`})}):(0,o.jsx)(`div`,{className:`flex flex-col gap-4`,children:d.map(({version:e,notes:t})=>(0,o.jsxs)(a,{children:[(0,o.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,o.jsxs)(`span`,{className:`rounded bg-neutral-100 px-2 py-0.5 text-[11px] font-semibold tracking-wide text-neutral-600`,children:[`v`,e]}),e===u&&(0,o.jsx)(`span`,{className:`rounded bg-green-100 px-2 py-0.5 text-[11px] font-semibold tracking-wide text-green-700`,children:`current`})]}),(0,o.jsx)(`div`,{className:`mb-3 border-t border-black/5`}),(0,o.jsx)(`pre`,{className:`whitespace-pre-wrap font-mono text-[12px] leading-relaxed text-neutral-700`,children:t})]},e))})};export{s as VersionsPage};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{A as t,j as n}from"./fa-core-BoBqCOD3.js";import{a as r}from"./api-DtXiAEKW.js";import{t as i}from"./Tooltip-tpqNw0op.js";var a=e(n(),1),o=t(),s=({when:e,whenState:t})=>{let[n,s]=(0,a.useState)(null);return(0,a.useEffect)(()=>{r(e,t).then(s).catch(()=>{s(null)})},[e,t]),n===null?null:(0,o.jsx)(i,{text:e,children:(0,o.jsxs)(`span`,{className:`font-mono text-[10px] ${n?`text-green-600`:`text-amber-600`}`,children:[n?`enabled`:`disabled`,` by condition`]})})};export{s as t};
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{A as t,j as n}from"./fa-core-B7dAyAZA.js";import{a as r}from"./api--yBCib3R.js";import{t as i}from"./Tooltip-D9Le4Lgo.js";var a=e(n(),1),o=t(),s=({when:e,whenState:t})=>{let[n,s]=(0,a.useState)(null);return(0,a.useEffect)(()=>{r(e,t).then(s).catch(()=>{s(null)})},[e,t]),n===null?null:(0,o.jsx)(i,{text:e,children:(0,o.jsxs)(`span`,{className:`font-mono text-[10px] ${n?`text-green-600`:`text-amber-600`}`,children:[n?`enabled`:`disabled`,` by condition`]})})};export{s as t};
@@ -0,0 +1,11 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{j as t}from"./fa-core-B7dAyAZA.js";import{f as n}from"./storageKeys-CSWy3aiP.js";var r=e(t(),1),i=new Set([`get`,`delete`,`head`]),a=class extends Error{code;request;response;__isMock=!0;constructor({code:e,request:t,response:n}){super(`Request failed with status ${String(e)}`),this.code=e,this.request=t,this.response=n}},o=e=>typeof e==`object`&&!!e&&`__isMock`in e,s=async(e,t,n,r,i)=>{let o=r!=null,s=r instanceof FormData||r instanceof Blob,c=o&&!s?{"Content-Type":`application/json`,...i?.headers}:i?.headers,l=await e(n,{method:t,...o&&{body:s?r:JSON.stringify(r)},...c&&{headers:c}});if(!l.ok)throw new a({code:l.status,request:{method:t.toUpperCase(),url:n,body:r,headers:c},response:{data:{error:`Request failed with status ${String(l.status)}`},status:l.status}});return l.status===204||l.headers.get(`content-length`)===`0`?{}:await l.json()};function c(e){return{get:(t,n)=>s(e,`GET`,t,void 0,n),delete:(t,n)=>s(e,`DELETE`,t,void 0,n),head:(t,n)=>s(e,`HEAD`,t,void 0,n),post:(t,n,r)=>s(e,`POST`,t,n,r),put:(t,n,r)=>s(e,`PUT`,t,n,r),patch:(t,n,r)=>s(e,`PATCH`,t,n,r),request:(t,n,r,a)=>{let o=t.toLowerCase(),c=i.has(o)?r:a,l=i.has(o)?void 0:r;return s(e,t.toUpperCase(),n,l,c)}}}var l={QUERY_REQUEST:`query:request`,UI_OUTPUT:`outputui`,IFRAME_OUTPUT:`iframeoutput`,POSTFORMDATA_REQUEST:`postformdata:request`,SETSTATE:`setstate`,DONE:`done`,RUN:`run`,OPEN_WINDOW:`openwindow`,COMMUNICATE:`communicate`,HIDE:`hide`,SHOW:`show`,EXPAND:`expand`,COLLAPSE:`collapse`,HIDE_HEADER:`hideheader`,SHOW_HEADER:`showheader`,OPEN_CREATE_RECORD_MODAL_REQUEST:`opencreaterecordmodal:request`,OPEN_CREATE_RELATED_RECORD_MODAL_REQUEST:`opencreaterelatedrecordmodal:request`,SHOW_TOAST:`showtoast`,CLEAR_TOASTS:`cleartoasts`,REFRESH_TIMELINE:`refreshtimeline`,REFRESH_ENTITY:`refreshentity`,UPLOADFILE_REQUEST:`uploadfile:request`,UPDATE_SESSION_DATA:`updatesessiondata`,INSTALL_THIRD_PARTY_SCRIPT_REQUEST:`installthirdpartyscript:request`,PROMPT_REQUEST:`prompt:request`,DYNAMIC_PROMPT_REQUEST:`dynamicprompt:request`,RELEASE_BLOCKING_SCRIPT:`releaseblockingscript`,AUTHORIZE:`authorize`,COPY_TO_CLIPBOARD:`copytoclipboard`,SHOW_VIEW_IN_MODAL_REQUEST:`showviewinmodal:request`,CLOSE_MODAL_REQUEST:`closemodal:request`,CONSOLE_LOG:`consolelog`},u={QUERY_RESPONSE:`query:response`,POSTFORMDATA_RESPONSE:`postformdata:response`,ERROR:`error`,UPLOADFILE_RESPONSE:`uploadfile:response`,UPLOADFILE_PROGRESS:`uploadfile:progress`,INSTALL_THIRD_PARTY_SCRIPT_RESPONSE:`installthirdpartyscript:response`,PROMPT_RESPONSE:`prompt:response`,REFRESH_ENTITY_RESPONSE:`refreshentity:response`,CREATE_RECORD_RESPONSE:`createrecord:response`,CREATE_RELATED_RECORD_RESPONSE:`createrelatedrecord:response`},d={RUN_FRAME_SCRIPT:`runframescript`,SEND_MESSAGE_TO_FRAME:`sendmessagetoframe`,CALL_THIRD_PARTY_SCRIPT:`callthirdpartyscript`},f=`integration:route-change`,p=`kizen-route-change`,m=`kzn-integration-frame`,h=[`__plugin_engine`,`1.5.0`],g={CALENDAR_SOURCE_CALENDAR_LIST:(e,t)=>[...h,`calendar-source`,`calendar-list`,e,t],CALENDAR_SOURCE_EVENTS:(e,t,n,r)=>[...h,`calendar-source`,`events`,e,t,n,r]},_=/https:\/\/.*widget\.freshworks\.com\/.*\.js/,v=/https:\/\/widget\.intercom\.io\/widget\/[a-z0-9]+/,y={FRESHWORKS:`freshworks`,INTERCOM:`intercom`},b=e=>{if(_.test(e))return y.FRESHWORKS;if(v.test(e))return y.INTERCOM},x={[y.FRESHWORKS]:`FreshworksWidget`,[y.INTERCOM]:`Intercom`},S={[y.FRESHWORKS]:e=>{window.fwSettings={widget_id:e.widgetId},(function(...e){if(typeof window[x[y.FRESHWORKS]]!=`function`){let t=function(){t.q.push(...e)};t.__kizen_pending=!0,t.q=[],window[x[y.FRESHWORKS]]=t}})()},[y.INTERCOM]:()=>{(function(){if(typeof window[x[y.INTERCOM]]!=`function`){let e=window,t=function(){t.c(arguments)};t.q=[],t.c=function(e){t.q.push(e)},t.__kizen_pending=!0,e[x[y.INTERCOM]]=t}})()}},C={[y.FRESHWORKS]:()=>window[x[y.FRESHWORKS]]?.__kizen_pending!==!0,[y.INTERCOM]:()=>window[x[y.INTERCOM]]?.__kizen_pending!==!0},w=()=>({host:window.location.host,hash:window.location.hash,href:window.location.href,origin:window.location.origin,pathname:window.location.pathname,search:window.location.search,port:window.location.port,protocol:window.location.protocol}),T=()=>{let e=new Date().getTime();return typeof performance<`u`&&typeof performance.now==`function`&&(e+=performance.now()),`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t===`x`?n:n&3|8).toString(16)})};Object.getPrototypeOf(async function(){}).constructor;var ee=e=>`${e?.plugin_api_name??``}-${e?.id??``}-${e?.api_name??``}-${e?.script_id??``}`,te=e=>typeof e==`object`&&!!e&&`__kzConsole`in e,ne=/^\/(.*)\/([dgimsuvy]*)$/,E=e=>{try{if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return e.map(E);if(te(e))switch(e.__kzConsole){case`undefined`:return;case`bigint`:try{return BigInt(e.value)}catch{return e.value}case`symbol`:return e.value;case`function`:return`[Function: ${e.name}]`;case`error`:{let t=Error(e.message);return t.name=e.name,e.stack&&(t.stack=e.stack),t}case`date`:return new Date(e.value);case`regexp`:{let t=ne.exec(e.value);if(!t)return e.value;try{return new RegExp(t[1]??``,t[2])}catch{return e.value}}case`circular`:return`[Circular]`;case`unserializable`:return`[Unserializable: ${e.reason}]`}let t={};for(let[n,r]of Object.entries(e))t[n]=E(r);return t}catch{return`[Unserializable]`}},D=class e extends Error{proxyStatus;upstreamStatus;upstreamResponse;constructor(t,n,r,i){super(i??r?.error?.message??(n?`Request failed with status code ${String(n)}`:`Request failed with proxy status code ${String(t)}`)),this.name=`KizenRequestError`,this.proxyStatus=t,this.upstreamStatus=n,this.upstreamResponse=r,Object.setPrototypeOf(this,e.prototype)}},O=e=>({key:`action__${e.api_name}`,type:`custom_object`,label:e.name,allow_multiple:!0}),k=[`description`,`container`,`qr`,`image`,`link`],A=(e,t)=>{let n=(e.fields??[]).filter(e=>!k.includes(e.type)).map(e=>({...e,when:t?`(${t}) && (${e.when??`true`})`:e.when})),r=(e.fields??[]).filter(e=>e.type===`container`).flatMap(e=>A(e,e.when)),i=e.actions?.filter(e=>e.hint_object_name)??[];return[...n,...r,...i.map(e=>({...O(e),match_hint:e.hint_object_name??``}))]},re=(e,t)=>{let n=A(e).reduce((e,t)=>({...e,[t.key]:t}),{}),r=Object.keys(t),i={};return r.forEach(e=>{let r=t[e],a=n[e];if(a?.type){switch(a.type){case`boolean`:let t=r;if(!t)return;i[e]=t.value;return;case`custom_object`:{let t=r;if(!t)return;i[e]={objectId:t.value?.id,objectName:t.value?.objectName};return}case`field`:{let t=r;if(!t?.value)return;Array.isArray(t.value)?i[e]=t.value.map(e=>({fieldId:e.value,fieldName:e.label,objectId:t.associatedObject?.id,objectName:t.associatedObject?.name})):typeof t.value==`object`&&typeof t.associatedObject==`object`&&(i[e]={fieldId:t.value.value,fieldName:t.value.label,objectId:t.associatedObject.id,objectName:t.associatedObject.name});return}case`number`:{let t=r;if(!t)return;try{let n=Number(t.value);if(!n&&n!==0)return;i[e]=n}catch{i[e]=NaN}return}case`select`:{let t=r;if(!t)return;i[e]=t.value;return}case`text`:{let t=r?.value;if(t){i[e]=t;return}let n=a.default;n&&(i[e]=n);return}case`description`:case`container`:case`qr`:case`image`:case`link`:return}return r?.value}}),i},ie=Object.create,j=Object.defineProperty,M=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,P=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty,F=(e,t)=>function(){return t||(0,e[N(e)[0]])((t={exports:{}}).exports,t),t.exports},oe=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of N(t))!ae.call(e,i)&&i!==n&&j(e,i,{get:()=>t[i],enumerable:!(r=M(t,i))||r.enumerable});return e},I=(e,t,n)=>(n=e==null?{}:ie(P(e)),oe(t||!e||!e.__esModule?j(n,`default`,{value:e,enumerable:!0}):n,e));function se(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ce(e){if(Array.isArray(e))return e}function L(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function le(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ue(e,t){return ce(e)||L(e,t)||de(e,t)||le()}function de(e,t){if(e){if(typeof e==`string`)return se(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?se(e,t):void 0}}var fe=Object.entries,pe=Object.setPrototypeOf,me=Object.isFrozen,he=Object.getPrototypeOf,ge=Object.getOwnPropertyDescriptor,R=Object.freeze,z=Object.seal,_e=Object.create,ve=typeof Reflect<`u`&&Reflect,B=ve.apply,ye=ve.construct;R||=function(e){return e},z||=function(e){return e},B||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ye||=function(e){return new e(...[...arguments].slice(1))};var be=G(Array.prototype.forEach),xe=G(Array.prototype.lastIndexOf),Se=G(Array.prototype.pop),Ce=G(Array.prototype.push),we=G(Array.prototype.splice),V=Array.isArray,Te=G(String.prototype.toLowerCase),Ee=G(String.prototype.toString),De=G(String.prototype.match),Oe=G(String.prototype.replace),ke=G(String.prototype.indexOf),Ae=G(String.prototype.trim),je=G(Number.prototype.toString),Me=G(Boolean.prototype.toString),Ne=typeof BigInt>`u`?null:G(BigInt.prototype.toString),Pe=typeof Symbol>`u`?null:G(Symbol.prototype.toString),H=G(Object.prototype.hasOwnProperty),U=G(Object.prototype.toString),W=G(RegExp.prototype.test),Fe=Ie(TypeError);function G(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return B(e,t,n)}}function Ie(e){return function(){return ye(e,[...arguments])}}function K(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Te;if(pe&&pe(e,null),!V(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(me(t)||(t[r]=e),i=e)}e[i]=!0}return e}function q(e){for(let t=0;t<e.length;t++)H(e,t)||(e[t]=null);return e}function J(e){let t=_e(null);for(let r of fe(e)){var n=ue(r,2);let i=n[0],a=n[1];H(e,i)&&(V(a)?t[i]=q(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=J(a):t[i]=a)}return t}function Le(e){switch(typeof e){case`string`:return e;case`number`:return je(e);case`boolean`:return Me(e);case`bigint`:return Ne?Ne(e):`0`;case`symbol`:return Pe?Pe(e):`Symbol()`;case`undefined`:return U(e);case`function`:case`object`:{if(e===null)return U(e);let t=e,n=Re(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:U(e)}return U(e)}default:return U(e)}}function Re(e,t){for(;e!==null;){let n=ge(e,t);if(n){if(n.get)return G(n.get);if(typeof n.value==`function`)return G(n.value)}e=he(e)}function n(){return null}return n}function ze(e){try{return W(e,``),!0}catch{return!1}}var Be=R(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ve=R(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),He=R([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ue=R([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),We=R(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ge=R([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ke=R([`#text`]),qe=R(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Je=R(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Ye=R(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Xe=R([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ze=z(/{{[\w\W]*|^[\w\W]*}}/g),Qe=z(/<%[\w\W]*|^[\w\W]*%>/g),$e=z(/\${[\w\W]*/g),et=z(/^data-[\-\w.\u00B7-\uFFFF]+$/),tt=z(/^aria-[\-\w]+$/),nt=z(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rt=z(/^(?:\w+script|data):/i),it=z(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),at=z(/^html$/i),ot=z(/^[a-z][.\w]*(-[.\w]+)+$/i),st={element:1,text:3,progressingInstruction:7,comment:8,document:9},ct=function(){return typeof window>`u`?null:window},lt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},ut=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function dt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ct(),t=e=>dt(e);if(t.version=`3.4.3`,t.removed=[],!e||!e.document||e.document.nodeType!==st.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript,a=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,c=e.Element,l=e.NodeFilter,u=e.NamedNodeMap,d=u===void 0?e.NamedNodeMap||e.MozNamedAttrMap:u,f=e.HTMLFormElement,p=e.DOMParser,m=e.trustedTypes,h=c.prototype,g=Re(h,`cloneNode`),_=Re(h,`remove`),v=Re(h,`nextSibling`),y=Re(h,`childNodes`),b=Re(h,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C=n,w=C.implementation,T=C.createNodeIterator,ee=C.createDocumentFragment,te=C.getElementsByTagName,ne=r.importNode,E=ut();t.isSupported=typeof fe==`function`&&typeof b==`function`&&w&&w.createHTMLDocument!==void 0;let D=Ze,O=Qe,k=$e,A=et,re=tt,ie=rt,j=it,M=ot,N=nt,P=null,ae=K({},[...Be,...Ve,...He,...We,...Ke]),F=null,oe=K({},[...qe,...Je,...Ye,...Xe]),I=Object.seal(_e(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,ce=null,L=Object.seal(_e(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),le=!0,ue=!0,de=!1,pe=!0,me=!1,he=!0,ge=!1,z=!1,ve=!1,B=!1,ye=!1,je=!1,Me=!0,Ne=!1,Pe=`user-content-`,U=!0,G=!1,Ie={},q=null,ft=K({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),pt=null,mt=K({},[`audio`,`video`,`img`,`source`,`image`,`track`]),ht=null,gt=K({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),_t=`http://www.w3.org/1998/Math/MathML`,vt=`http://www.w3.org/2000/svg`,Y=`http://www.w3.org/1999/xhtml`,yt=Y,bt=!1,xt=null,St=K({},[_t,vt,Y],Ee),Ct=K({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),wt=K({},[`annotation-xml`]),Tt=K({},[`title`,`style`,`font`,`a`,`script`]),Et=null,Dt=[`application/xhtml+xml`,`text/html`],X=null,Ot=null,kt=n.createElement(`form`),At=function(e){return e instanceof RegExp||e instanceof Function},jt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ot&&Ot===e)return;(!e||typeof e!=`object`)&&(e={}),e=J(e),Et=Dt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=Et===`application/xhtml+xml`?Ee:Te,P=H(e,`ALLOWED_TAGS`)&&V(e.ALLOWED_TAGS)?K({},e.ALLOWED_TAGS,X):ae,F=H(e,`ALLOWED_ATTR`)&&V(e.ALLOWED_ATTR)?K({},e.ALLOWED_ATTR,X):oe,xt=H(e,`ALLOWED_NAMESPACES`)&&V(e.ALLOWED_NAMESPACES)?K({},e.ALLOWED_NAMESPACES,Ee):St,ht=H(e,`ADD_URI_SAFE_ATTR`)&&V(e.ADD_URI_SAFE_ATTR)?K(J(gt),e.ADD_URI_SAFE_ATTR,X):gt,pt=H(e,`ADD_DATA_URI_TAGS`)&&V(e.ADD_DATA_URI_TAGS)?K(J(mt),e.ADD_DATA_URI_TAGS,X):mt,q=H(e,`FORBID_CONTENTS`)&&V(e.FORBID_CONTENTS)?K({},e.FORBID_CONTENTS,X):ft,se=H(e,`FORBID_TAGS`)&&V(e.FORBID_TAGS)?K({},e.FORBID_TAGS,X):J({}),ce=H(e,`FORBID_ATTR`)&&V(e.FORBID_ATTR)?K({},e.FORBID_ATTR,X):J({}),Ie=H(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?J(e.USE_PROFILES):e.USE_PROFILES:!1,le=e.ALLOW_ARIA_ATTR!==!1,ue=e.ALLOW_DATA_ATTR!==!1,de=e.ALLOW_UNKNOWN_PROTOCOLS||!1,pe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,me=e.SAFE_FOR_TEMPLATES||!1,he=e.SAFE_FOR_XML!==!1,ge=e.WHOLE_DOCUMENT||!1,B=e.RETURN_DOM||!1,ye=e.RETURN_DOM_FRAGMENT||!1,je=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,Me=e.SANITIZE_DOM!==!1,Ne=e.SANITIZE_NAMED_PROPS||!1,U=e.KEEP_CONTENT!==!1,G=e.IN_PLACE||!1,N=ze(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:nt,yt=typeof e.NAMESPACE==`string`?e.NAMESPACE:Y,Ct=H(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?J(e.MATHML_TEXT_INTEGRATION_POINTS):K({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),wt=H(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?J(e.HTML_INTEGRATION_POINTS):K({},[`annotation-xml`]);let t=H(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?J(e.CUSTOM_ELEMENT_HANDLING):_e(null);if(I=_e(null),H(t,`tagNameCheck`)&&At(t.tagNameCheck)&&(I.tagNameCheck=t.tagNameCheck),H(t,`attributeNameCheck`)&&At(t.attributeNameCheck)&&(I.attributeNameCheck=t.attributeNameCheck),H(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(I.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),me&&(ue=!1),ye&&(B=!0),Ie&&(P=K({},Ke),F=_e(null),Ie.html===!0&&(K(P,Be),K(F,qe)),Ie.svg===!0&&(K(P,Ve),K(F,Je),K(F,Xe)),Ie.svgFilters===!0&&(K(P,He),K(F,Je),K(F,Xe)),Ie.mathMl===!0&&(K(P,We),K(F,Ye),K(F,Xe))),L.tagCheck=null,L.attributeCheck=null,H(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?L.tagCheck=e.ADD_TAGS:V(e.ADD_TAGS)&&(P===ae&&(P=J(P)),K(P,e.ADD_TAGS,X))),H(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?L.attributeCheck=e.ADD_ATTR:V(e.ADD_ATTR)&&(F===oe&&(F=J(F)),K(F,e.ADD_ATTR,X))),H(e,`ADD_URI_SAFE_ATTR`)&&V(e.ADD_URI_SAFE_ATTR)&&K(ht,e.ADD_URI_SAFE_ATTR,X),H(e,`FORBID_CONTENTS`)&&V(e.FORBID_CONTENTS)&&(q===ft&&(q=J(q)),K(q,e.FORBID_CONTENTS,X)),H(e,`ADD_FORBID_CONTENTS`)&&V(e.ADD_FORBID_CONTENTS)&&(q===ft&&(q=J(q)),K(q,e.ADD_FORBID_CONTENTS,X)),U&&(P[`#text`]=!0),ge&&K(P,[`html`,`head`,`body`]),P.table&&(K(P,[`tbody`]),delete se.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Fe(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Fe(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);x=e.TRUSTED_TYPES_POLICY,S=x.createHTML(``)}else x===void 0&&(x=lt(m,i)),x!==null&&typeof S==`string`&&(S=x.createHTML(``));R&&R(e),Ot=e},Mt=K({},[...Ve,...He,...Ue]),Nt=K({},[...We,...Ge]),Pt=function(e){let t=b(e);(!t||!t.tagName)&&(t={namespaceURI:yt,tagName:`template`});let n=Te(e.tagName),r=Te(t.tagName);return xt[e.namespaceURI]?e.namespaceURI===vt?t.namespaceURI===Y?n===`svg`:t.namespaceURI===_t?n===`svg`&&(r===`annotation-xml`||Ct[r]):!!Mt[n]:e.namespaceURI===_t?t.namespaceURI===Y?n===`math`:t.namespaceURI===vt?n===`math`&&wt[r]:!!Nt[n]:e.namespaceURI===Y?t.namespaceURI===vt&&!wt[r]||t.namespaceURI===_t&&!Ct[r]?!1:!Nt[n]&&(Tt[n]||!Mt[n]):!!(Et===`application/xhtml+xml`&&xt[e.namespaceURI]):!1},Z=function(e){Ce(t.removed,{element:e});try{b(e).removeChild(e)}catch{_(e)}},Q=function(e,n){try{Ce(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Ce(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(B||ye)try{Z(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ft=function(e){let t=null,r=null;if(ve)e=`<remove></remove>`+e;else{let t=De(e,/^[\r\n\t ]+/);r=t&&t[0]}Et===`application/xhtml+xml`&&yt===Y&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?x.createHTML(e):e;if(yt===Y)try{t=new p().parseFromString(i,Et)}catch{}if(!t||!t.documentElement){t=w.createDocument(yt,`template`,null);try{t.documentElement.innerHTML=bt?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),yt===Y?te.call(t,ge?`html`:`body`)[0]:ge?t.documentElement:a},It=function(e){return T.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Lt=function(e){return e instanceof f&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof d)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Rt=function(e){return typeof s==`function`&&e instanceof s};function $(e,n,r){be(e,e=>{e.call(t,n,r,Ot)})}let zt=function(e){let n=null;if($(E.beforeSanitizeElements,e,null),Lt(e))return Z(e),!0;let r=X(e.nodeName);if($(E.uponSanitizeElement,e,{tagName:r,allowedTags:P}),he&&e.hasChildNodes()&&!Rt(e.firstElementChild)&&W(/<[/\w!]/g,e.innerHTML)&&W(/<[/\w!]/g,e.textContent)||he&&e.namespaceURI===Y&&r===`style`&&Rt(e.firstElementChild)||e.nodeType===st.progressingInstruction||he&&e.nodeType===st.comment&&W(/<[/\w]/g,e.data))return Z(e),!0;if(se[r]||!(L.tagCheck instanceof Function&&L.tagCheck(r))&&!P[r]){if(!se[r]&&Ht(r)&&(I.tagNameCheck instanceof RegExp&&W(I.tagNameCheck,r)||I.tagNameCheck instanceof Function&&I.tagNameCheck(r)))return!1;if(U&&!q[r]){let t=b(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=g(n[i],!0);t.insertBefore(r,v(e))}}}return Z(e),!0}return e instanceof c&&!Pt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&W(/<\/no(script|embed|frames)/i,e.innerHTML)?(Z(e),!0):(me&&e.nodeType===st.text&&(n=e.textContent,be([D,O,k],e=>{n=Oe(n,e,` `)}),e.textContent!==n&&(Ce(t.removed,{element:e.cloneNode()}),e.textContent=n)),$(E.afterSanitizeElements,e,null),!1)},Bt=function(e,t,r){if(ce[t]||Me&&(t===`id`||t===`name`)&&(r in n||r in kt))return!1;let i=F[t]||L.attributeCheck instanceof Function&&L.attributeCheck(t,e);if(!(ue&&!ce[t]&&W(A,t))&&!(le&&W(re,t))){if(!i||ce[t]){if(!(Ht(e)&&(I.tagNameCheck instanceof RegExp&&W(I.tagNameCheck,e)||I.tagNameCheck instanceof Function&&I.tagNameCheck(e))&&(I.attributeNameCheck instanceof RegExp&&W(I.attributeNameCheck,t)||I.attributeNameCheck instanceof Function&&I.attributeNameCheck(t,e))||t===`is`&&I.allowCustomizedBuiltInElements&&(I.tagNameCheck instanceof RegExp&&W(I.tagNameCheck,r)||I.tagNameCheck instanceof Function&&I.tagNameCheck(r))))return!1}else if(!ht[t]&&!W(N,Oe(r,j,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ke(r,`data:`)===0&&pt[e])&&!(de&&!W(ie,Oe(r,j,``)))&&r)return!1}return!0},Vt=K({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ht=function(e){return!Vt[Te(e)]&&W(M,e)},Ut=function(e){$(E.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||Lt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},i=n.length;for(;i--;){let a=n[i],o=a.name,s=a.namespaceURI,c=a.value,l=X(o),u=c,d=o===`value`?u:Ae(u);if(r.attrName=l,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,$(E.uponSanitizeAttribute,e,r),d=r.attrValue,Ne&&(l===`id`||l===`name`)&&ke(d,Pe)!==0&&(Q(o,e),d=Pe+d),he&&W(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Q(o,e);continue}if(l===`attributename`&&De(d,`href`)){Q(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Q(o,e);continue}if(!pe&&W(/\/>/i,d)){Q(o,e);continue}me&&be([D,O,k],e=>{d=Oe(d,e,` `)});let f=X(e.nodeName);if(!Bt(f,l,d)){Q(o,e);continue}if(x&&typeof m==`object`&&typeof m.getAttributeType==`function`&&!s)switch(m.getAttributeType(f,l)){case`TrustedHTML`:d=x.createHTML(d);break;case`TrustedScriptURL`:d=x.createScriptURL(d);break}if(d!==u)try{s?e.setAttributeNS(s,o,d):e.setAttribute(o,d),Lt(e)?Z(e):Se(t.removed)}catch{Q(o,e)}}$(E.afterSanitizeAttributes,e,null)},Wt=function(e){let t=null,n=It(e);for($(E.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)$(E.uponSanitizeShadowNode,t,null),zt(t),Ut(t),t.content instanceof a&&Wt(t.content);$(E.afterSanitizeShadowDOM,e,null)},Gt=function(e){if(e.nodeType===st.element&&e.shadowRoot instanceof a){let t=e.shadowRoot;Gt(t),Wt(t)}let t=e.childNodes;if(!t)return;let n=[];be(t,e=>{Ce(n,e)});for(let e of n)Gt(e)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(bt=!e,bt&&(e=`<!-->`),typeof e!=`string`&&!Rt(e)&&(e=Le(e),typeof e!=`string`))throw Fe(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(z||jt(n),t.removed=[],typeof e==`string`&&(G=!1),G){let t=e.nodeName;if(typeof t==`string`){let e=X(t);if(!P[e]||se[e])throw Fe(`root node is forbidden and cannot be sanitized in-place`)}Gt(e)}else if(e instanceof s)i=Ft(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===st.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o),Gt(o);else{if(!B&&!me&&!ge&&e.indexOf(`<`)===-1)return x&&je?x.createHTML(e):e;if(i=Ft(e),!i)return B?null:je?S:``}i&&ve&&Z(i.firstChild);let u=It(G?e:i);for(;c=u.nextNode();)zt(c),Ut(c),c.content instanceof a&&Wt(c.content);if(G)return e;if(B){if(me){i.normalize();let e=i.innerHTML;be([D,O,k],t=>{e=Oe(e,t,` `)}),i.innerHTML=e}if(ye)for(l=ee.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(F.shadowroot||F.shadowrootmode)&&(l=ne.call(r,l,!0)),l}let d=ge?i.outerHTML:i.innerHTML;return ge&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&W(at,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
3
+ `+d),me&&be([D,O,k],e=>{d=Oe(d,e,` `)}),x&&je?x.createHTML(d):d},t.setConfig=function(){jt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),z=!0},t.clearConfig=function(){Ot=null,z=!1},t.isValidAttribute=function(e,t,n){return Ot||jt({}),Bt(X(e),X(t),n)},t.addHook=function(e,t){typeof t==`function`&&Ce(E[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=xe(E[e],t);return n===-1?void 0:we(E[e],n,1)[0]}return Se(E[e])},t.removeHooks=function(e){E[e]=[]},t.removeAllHooks=function(){E=ut()},t}var ft=dt(),pt=F({"node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/lib/parse.js"(e,t){var n,r,i={'"':`"`,"\\":`\\`,"/":`/`,b:`\b`,f:`\f`,n:`
4
+ `,r:`\r`,t:` `},a;function o(e){throw{name:`SyntaxError`,message:e,at:n,text:a}}function s(e){return e&&e!==r&&o(`Expected '`+e+`' instead of '`+r+`'`),r=a.charAt(n),n+=1,r}function c(){var e,t=``;for(r===`-`&&(t=`-`,s(`-`));r>=`0`&&r<=`9`;)t+=r,s();if(r===`.`)for(t+=`.`;s()&&r>=`0`&&r<=`9`;)t+=r;if(r===`e`||r===`E`)for(t+=r,s(),(r===`-`||r===`+`)&&(t+=r,s());r>=`0`&&r<=`9`;)t+=r,s();return e=Number(t),isFinite(e)||o(`Bad number`),e}function l(){var e,t,n=``,a;if(r===`"`)for(;s();)if(r===`"`)return s(),n;else if(r===`\\`)if(s(),r===`u`){for(a=0,t=0;t<4&&(e=parseInt(s(),16),isFinite(e));t+=1)a=a*16+e;n+=String.fromCharCode(a)}else if(typeof i[r]==`string`)n+=i[r];else break;else n+=r;o(`Bad string`)}function u(){for(;r&&r<=` `;)s()}function d(){switch(r){case`t`:return s(`t`),s(`r`),s(`u`),s(`e`),!0;case`f`:return s(`f`),s(`a`),s(`l`),s(`s`),s(`e`),!1;case`n`:return s(`n`),s(`u`),s(`l`),s(`l`),null;default:o(`Unexpected '`+r+`'`)}}function f(){var e=[];if(r===`[`){if(s(`[`),u(),r===`]`)return s(`]`),e;for(;r;){if(e.push(m()),u(),r===`]`)return s(`]`),e;s(`,`),u()}}o(`Bad array`)}function p(){var e,t={};if(r===`{`){if(s(`{`),u(),r===`}`)return s(`}`),t;for(;r;){if(e=l(),u(),s(`:`),Object.prototype.hasOwnProperty.call(t,e)&&o(`Duplicate key "`+e+`"`),t[e]=m(),u(),r===`}`)return s(`}`),t;s(`,`),u()}}o(`Bad object`)}function m(){switch(u(),r){case`{`:return p();case`[`:return f();case`"`:return l();case`-`:return c();default:return r>=`0`&&r<=`9`?c():d()}}t.exports=function(e,t){var i;return a=e,n=0,r=` `,i=m(),u(),r&&o(`Syntax error`),typeof t==`function`?(function e(n,r){var i,a,o=n[r];if(o&&typeof o==`object`)for(i in m)Object.prototype.hasOwnProperty.call(o,i)&&(a=e(o,i),a===void 0?delete o[i]:o[i]=a);return t.call(n,r,o)})({"":i},``):i}}}),mt=F({"node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/lib/stringify.js"(e,t){var n=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r,i,a={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,'"':`\\"`,"\\":`\\\\`},o;function s(e){return n.lastIndex=0,n.test(e)?`"`+e.replace(n,function(e){var t=a[e];return typeof t==`string`?t:`\\u`+(`0000`+e.charCodeAt(0).toString(16)).slice(-4)})+`"`:`"`+e+`"`}function c(e,t){var n,a,l,u,d=r,f,p=t[e];switch(p&&typeof p==`object`&&typeof p.toJSON==`function`&&(p=p.toJSON(e)),typeof o==`function`&&(p=o.call(t,e,p)),typeof p){case`string`:return s(p);case`number`:return isFinite(p)?String(p):`null`;case`boolean`:case`null`:return String(p);case`object`:if(!p)return`null`;if(r+=i,f=[],Object.prototype.toString.apply(p)===`[object Array]`){for(u=p.length,n=0;n<u;n+=1)f[n]=c(n,p)||`null`;return l=f.length===0?`[]`:r?`[
5
+ `+r+f.join(`,
6
+ `+r)+`
7
+ `+d+`]`:`[`+f.join(`,`)+`]`,r=d,l}if(o&&typeof o==`object`)for(u=o.length,n=0;n<u;n+=1)a=o[n],typeof a==`string`&&(l=c(a,p),l&&f.push(s(a)+(r?`: `:`:`)+l));else for(a in p)Object.prototype.hasOwnProperty.call(p,a)&&(l=c(a,p),l&&f.push(s(a)+(r?`: `:`:`)+l));return l=f.length===0?`{}`:r?`{
8
+ `+r+f.join(`,
9
+ `+r)+`
10
+ `+d+`}`:`{`+f.join(`,`)+`}`,r=d,l}}t.exports=function(e,t,n){var a;if(r=``,i=``,typeof n==`number`)for(a=0;a<n;a+=1)i+=` `;else typeof n==`string`&&(i=n);if(o=t,t&&typeof t!=`function`&&(typeof t!=`object`||typeof t.length!=`number`))throw Error(`JSON.stringify`);return c(``,{"":e})}}}),ht=F({"node_modules/.pnpm/jsonify@0.0.1/node_modules/jsonify/index.js"(e){e.parse=pt(),e.stringify=mt()}}),gt=F({"node_modules/.pnpm/isarray@2.0.5/node_modules/isarray/index.js"(e,t){var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}}}),_t=F({"node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js"(e,t){var n=Object.prototype.toString;t.exports=function(e){var t=n.call(e),r=t===`[object Arguments]`;return r||=t!==`[object Array]`&&typeof e==`object`&&!!e&&typeof e.length==`number`&&e.length>=0&&n.call(e.callee)===`[object Function]`,r}}}),vt=F({"node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js"(e,t){var n;Object.keys||(r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=_t(),o=Object.prototype.propertyIsEnumerable,s=!o.call({toString:null},`toString`),c=o.call(function(){},`prototype`),l=[`toString`,`toLocaleString`,`valueOf`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`constructor`],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=(function(){if(typeof window>`u`)return!1;for(var e in window)try{if(!d[`$`+e]&&r.call(window,e)&&window[e]!==null&&typeof window[e]==`object`)try{u(window[e])}catch{return!0}}catch{return!0}return!1})(),p=function(e){if(typeof window>`u`||!f)return u(e);try{return u(e)}catch{return!1}},n=function(e){var t=typeof e==`object`&&!!e,n=i.call(e)===`[object Function]`,o=a(e),u=t&&i.call(e)===`[object String]`,d=[];if(!t&&!n&&!o)throw TypeError(`Object.keys called on a non-object`);var f=c&&n;if(u&&e.length>0&&!r.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(o&&e.length>0)for(var h=0;h<e.length;++h)d.push(String(h));else for(var g in e)!(f&&g===`prototype`)&&r.call(e,g)&&d.push(String(g));if(s)for(var _=p(e),v=0;v<l.length;++v)!(_&&l[v]===`constructor`)&&r.call(e,l[v])&&d.push(l[v]);return d});var r,i,a,o,s,c,l,u,d,f,p;t.exports=n}}),Y=F({"node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js"(e,t){var n=Array.prototype.slice,r=_t(),i=Object.keys,a=i?function(e){return i(e)}:vt(),o=Object.keys;a.shim=function(){return Object.keys?(function(){var e=Object.keys(arguments);return e&&e.length===arguments.length})(1,2)||(Object.keys=function(e){return r(e)?o(n.call(e)):o(e)}):Object.keys=a,Object.keys||a},t.exports=a}}),yt=F({"node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(e,t){t.exports=Object}}),bt=F({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(e,t){t.exports=Error}}),xt=F({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(e,t){t.exports=EvalError}}),St=F({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(e,t){t.exports=RangeError}}),Ct=F({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(e,t){t.exports=ReferenceError}}),wt=F({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(e,t){t.exports=SyntaxError}}),Tt=F({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(e,t){t.exports=TypeError}}),Et=F({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(e,t){t.exports=URIError}}),Dt=F({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(e,t){t.exports=Math.abs}}),X=F({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(e,t){t.exports=Math.floor}}),Ot=F({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(e,t){t.exports=Math.max}}),kt=F({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(e,t){t.exports=Math.min}}),At=F({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(e,t){t.exports=Math.pow}}),jt=F({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(e,t){t.exports=Math.round}}),Mt=F({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(e,t){t.exports=Number.isNaN||function(e){return e!==e}}}),Nt=F({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(e,t){var n=Mt();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}}),Pt=F({"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(e,t){t.exports=Object.getOwnPropertyDescriptor}}),Z=F({"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(e,t){var n=Pt();if(n)try{n([],`length`)}catch{n=null}t.exports=n}}),Q=F({"node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(e,t){var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}}),Ft=F({"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}}),It=F({"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(e,t){var n=typeof Symbol<`u`&&Symbol,r=Ft();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}}),Lt=F({"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(e,t){t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}}),Rt=F({"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(e,t){t.exports=yt().getPrototypeOf||null}}),$=F({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(e,t){var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}}}),zt=F({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e,t){var n=$();t.exports=Function.prototype.bind||n}}),Bt=F({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(e,t){t.exports=Function.prototype.call}}),Vt=F({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(e,t){t.exports=Function.prototype.apply}}),Ht=F({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(e,t){t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}}),Ut=F({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(e,t){var n=zt(),r=Vt(),i=Bt();t.exports=Ht()||n.call(i,r)}}),Wt=F({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(e,t){var n=zt(),r=Tt(),i=Bt(),a=Ut();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}}),Gt=F({"node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(e,t){var n=Wt(),r=Z(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?(function(e){return s(e==null?e:o(e))}):!1}}),Kt=F({"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(e,t){var n=Lt(),r=Rt(),i=Gt();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}}),qt=F({"node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(e,t){var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=zt().call(n,r)}}),Jt=F({"node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(e,t){var n,r=yt(),i=bt(),a=xt(),o=St(),s=Ct(),c=wt(),l=Tt(),u=Et(),d=Dt(),f=X(),p=Ot(),m=kt(),h=At(),g=jt(),_=Nt(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Z(),x=Q(),S=function(){throw new l},C=b?(function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}})():S,w=It()(),T=Kt(),ee=Rt(),te=Lt(),ne=Vt(),E=Bt(),D={},O=typeof Uint8Array>`u`||!T?n:T(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":O,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":ne,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":ee,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":te};if(T)try{null.error}catch(e){A=T(T(e)),k[`%Error.prototype%`]=A}var A,re=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return k[t]=n,n},ie={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},j=zt(),M=qt(),N=j.call(E,Array.prototype.concat),P=j.call(ne,Array.prototype.splice),ae=j.call(E,String.prototype.replace),F=j.call(E,String.prototype.slice),oe=j.call(E,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,se=/\\(\\)?/g,ce=function(e){var t=F(e,0,1),n=F(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return ae(e,I,function(e,t,n,i){r[r.length]=n?ae(i,se,`$1`):t||e}),r},L=function(e,t){var n=e,r;if(M(ie,n)&&(r=ie[n],n=`%`+r[0]+`%`),M(k,n)){var i=k[n];if(i===D&&(i=re(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(oe(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ce(e),r=n.length>0?n[0]:``,i=L(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],P(n,N([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=F(p,0,1),h=F(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,M(k,a))o=k[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=M(o,p),o=o[p];f&&!s&&(k[a]=o)}}return o}}}),Yt=F({"node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js"(e,t){var n=Q(),r=wt(),i=Tt(),a=Z();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}}}),Xt=F({"node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js"(e,t){var n=Q(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r}}),Zt=F({"node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(e,t){var n=Jt(),r=Yt(),i=Xt()(),a=Z(),o=Tt(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}}}),Qt=F({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/applyBind.js"(e,t){var n=zt(),r=Vt(),i=Ut();t.exports=function(){return i(n,r,arguments)}}}),$t=F({"node_modules/.pnpm/call-bind@1.0.8/node_modules/call-bind/index.js"(e,t){var n=Zt(),r=Q(),i=Wt(),a=Qt();t.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},r?r(t.exports,`apply`,{value:a}):t.exports.apply=a}}),en=F({"node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(e,t){var n=Jt(),r=Wt(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}}}),tn=I(F({"node_modules/.pnpm/json-stable-stringify@1.3.0/node_modules/json-stable-stringify/index.js"(e,t){var n=(typeof JSON<`u`?JSON:ht()).stringify,r=gt(),i=Y(),a=$t(),o=en(),s=o(`Array.prototype.join`),c=o(`Array.prototype.indexOf`),l=o(`Array.prototype.splice`),u=o(`Array.prototype.sort`),d=function(e,t){for(var n=``,r=0;r<e;r+=1)n+=t;return n},f=function(e,t,n){return n};t.exports=function(e){var t=arguments.length>1?arguments[1]:void 0,o=t&&t.space||``;typeof o==`number`&&(o=d(o,` `));var p=!!t&&typeof t.cycles==`boolean`&&t.cycles,m=t&&t.replacer?a(t.replacer):f;if(t&&t.collapseEmpty!==void 0&&typeof t.collapseEmpty!=`boolean`)throw TypeError("`collapseEmpty` must be a boolean, if provided");var h=!!t&&t.collapseEmpty,g=typeof t==`function`?t:t&&t.cmp,_=g&&function(e){var t=g.length>2&&function(t){return e[t]};return function(n,r){return g({key:n,value:e[n]},{key:r,value:e[r]},t?{__proto__:null,get:t}:void 0)}},v=[];return(function e(t,a,f,g){var y=o?`
11
+ `+d(g,o):``,b=o?`: `:`:`;if(f&&f.toJSON&&typeof f.toJSON==`function`&&(f=f.toJSON()),f=m(t,a,f),f!==void 0){if(typeof f!=`object`||!f)return n(f);var x=function(e,t){return h&&e.length===0?t:(t===`[]`?`[`:`{`)+s(e,`,`)+y+(t===`[]`?`]`:`}`)};if(r(f)){for(var S=[],C=0;C<f.length;C++){var w=e(f,C,f[C],g+1)||n(null);S[S.length]=y+o+w}return x(S,`[]`)}if(c(v,f)!==-1){if(p)return n(`__cycle__`);throw TypeError(`Converting circular structure to JSON`)}else v[v.length]=f;for(var T=u(i(f),_&&_(f)),S=[],C=0;C<T.length;C++){var a=T[C],ee=e(f,a,f[a],g+1);if(ee){var te=n(a)+b+ee;S[S.length]=y+o+te}}return l(v,c(v,f),1),x(S,`{}`)}})({"":e},``,e,0)}}})(),1),nn=e=>localStorage.getItem(`kizen-flag-${e}`)===`true`,rn=(e=``)=>e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),an=e=>{try{return rn((0,tn.default)(e))}catch(e){return nn(`script-runner-logging`)&&console.warn(`Failed to stringify object for hashing:`,e),rn(String(Math.random()))}},on=e=>{if(e===`boolean`)return!1},sn=(e,t,n,r)=>{let i=Object.keys(e),a={};return i.forEach(r=>{t.includes(r)?a[r]={value:on(n[r]?.type),type:n[r]?.type}:a[r]={value:e[r],type:n[r]?.type}}),A({fields:r??[]}).forEach(e=>{a[e.key]===void 0&&(t.includes(e.key)?a[e.key]={value:on(e.type),type:e.type}:a[e.key]={value:e.default,type:e.type})}),a},cn=e=>e?e.replaceAll(`{{config.`,`{{config__`).replaceAll(`{{userConfig.`,`{{userConfig__`):``,ln=async(e,t)=>await wn(cn(e),t),un=e=>{let t=e;return t=/^(http|https):\/\//.test(e)?e:e.startsWith(`/`)?`${w().origin}${t}`:`${w().origin}/${t}`,t},dn=(e,t)=>{let n=new URLSearchParams;return e&&e.forEach(e=>{e===`base_url`?n.append(e,w().origin):t&&n.append(e,t(e))}),n},fn=(e,t)=>{let n=t.toString();if(!n)return e;let r=e.indexOf(`#`),i=r===-1?e:e.slice(0,r),a=r===-1?``:e.slice(r);return`${i}${i.includes(`?`)?`&`:`?`}${n}${a}`},pn=(e,t,n)=>fn(un(e??``),dn(t,n)),mn=(e,t,n)=>fn(e??``,dn(t,n)),hn=e=>{if(!e)return{html:``,error:null,removed:[]};try{return{html:ft.sanitize(e,{ADD_TAGS:[`iframe`],ADD_ATTR:[`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`src`,`sandbox`,`name`,`loading`,`width`,`height`,`title`]}),error:null,removed:ft.removed}}catch(e){return{html:``,error:e,removed:[]}}},gn=e=>e.startsWith(`/`),_n=[`microphone`,`speaker-selection`,`autoplay`,`camera`,`display-capture`,`hid`],vn=[`allow-popups`,`allow-scripts`,`allow-same-origin`],yn=3e4,bn=100,xn=class{worker;scriptUIRef;onStateChange;done;onError;waitForFrame=!1;plugin;executionPlugin;frameId;onShowToast;onClearToasts;sessionData={};setSessionData;pluginComponentId;onShowModal;onCloseModal;onShowCreateRecordModal;onShowCreateRelatedRecordModal;onReleaseBlockingScript;pluginApiName;onNetworkError;onNetworkRequest;invalidateCache;getPendingCacheCount;createFileId;performFileUpload;pushHistory;appPath;onConsoleLog;constructor(e){this.scriptUIRef=e.scriptUIRef,this.onStateChange=e.onStateChange,this.done=e.done,this.onError=e.onError,this.onReleaseBlockingScript=e.onReleaseBlockingScript,this.worker=e.worker,this.worker.onmessage=this.handleMessage,this.plugin=e.plugin,this.executionPlugin=e.executionPlugin,this.onShowToast=e.onShowToast,this.onClearToasts=e.onClearToasts,this.pluginComponentId=e.pluginComponentId,this.onShowModal=e.onShowModal,this.onCloseModal=e.onCloseModal,this.onShowCreateRecordModal=e.onShowCreateRecordModal,this.onShowCreateRelatedRecordModal=e.onShowCreateRelatedRecordModal,this.onNetworkError=e.onNetworkError,this.onNetworkRequest=e.onNetworkRequest,this.invalidateCache=e.invalidateCache,this.getPendingCacheCount=e.getPendingCacheCount,this.createFileId=e.createFileId,this.performFileUpload=e.performFileUpload,this.pushHistory=e.pushHistory,this.appPath=e.appPath,this.onConsoleLog=e.onConsoleLog,this.plugin&&(this.frameId=`${m}-${this.plugin.plugin_api_name}-${this.plugin.api_name}`),this.pluginApiName=this.executionPlugin?.plugin_api_name??this.plugin?.plugin_api_name??``,this.pluginApiName?(this.sessionData=e.sessionData[this.pluginApiName],this.setSessionData=t=>{e.setSessionData?.(this.pluginApiName,t)}):this.setSessionData=()=>{this.onError?.({message:`Script must be associated with a plugin to use session data`})}}handleMessage=async e=>{let t=JSON.parse(e.data),{action:n}=t;switch(n){case l.QUERY_REQUEST:{let e=t;await this.handleQueryRequest(e.id,e.method,e.url,e.payload,e.options);return}case l.UI_OUTPUT:{let e=t;this.handleUIOutput(e.markup);return}case l.IFRAME_OUTPUT:{let e=t;this.handleIframeOutput(e.url,e.allow,e.sandbox,e.preserve);return}case l.POSTFORMDATA_REQUEST:{let e=t;this.handleFormPostRequest(e.id,e.url,e.payload,e.createNewTab);return}case l.UPLOADFILE_REQUEST:{let e=t;await this.handleUploadFileRequest(e.id,e.payload);return}case l.SETSTATE:{let e=t;this.onStateChange?.(e.state);return}case l.DONE:{let e=t;this.handleDone(e.preserve,e.result);return}case u.ERROR:{let e=t;this.onError?.({message:e.error});return}case l.OPEN_WINDOW:{let e=t;this.handleOpenWindow(e.url,e.target,e.features);return}case l.COMMUNICATE:{let e=t;this.handleCommunication(e.type,e.recipient,e.args,e.params);return}case l.HIDE:{let{config:e}=t,n=!1;e.hideTrigger&&(n=!0),this.onStateChange?.({hidden:!0,triggerHidden:n});return}case l.SHOW:{let{config:e}=t,n=!1;e.showTrigger===!1&&(n=!0),this.onStateChange?.({hidden:!1,triggerHidden:n});return}case l.EXPAND:this.onStateChange?.({minimized:!1});return;case l.COLLAPSE:this.onStateChange?.({minimized:!0});return;case l.HIDE_HEADER:this.onStateChange?.({hideHeader:!0});return;case l.SHOW_HEADER:this.onStateChange?.({hideHeader:!1});return;case l.COPY_TO_CLIPBOARD:{let e=t;await this.copyToClipboard(e.text);return}case l.OPEN_CREATE_RECORD_MODAL_REQUEST:{let e=t;this.handleCreateRecordRequest(e.id,e.entityId);return}case l.OPEN_CREATE_RELATED_RECORD_MODAL_REQUEST:{let e=t;this.handleCreateRelatedRecordRequest(e.id,e.objectId,e.relatedEntityId);return}case l.SHOW_TOAST:{let e=t;this.showToast(e.message,e.toastOptions);return}case l.CLEAR_TOASTS:this.clearToasts();return;case l.REFRESH_TIMELINE:{let e=t;this.handleRefreshTimeline(e.entityId);return}case l.REFRESH_ENTITY:{let e=t;await this.handleRefreshEntity(e.entityId,e.id);return}case l.UPDATE_SESSION_DATA:{let e=t;this.handleSetSessionData(e.update);return}case l.INSTALL_THIRD_PARTY_SCRIPT_REQUEST:{let e=t;this.handleInstallThirdPartyScriptRequest(e.id,e.url,e.args);return}case l.PROMPT_REQUEST:{let e=t;this.handlePromptRequest(e.id,e.config,!1);return}case l.DYNAMIC_PROMPT_REQUEST:{let e=t;this.handlePromptRequest(e.id,e.config,!0);return}case l.SHOW_VIEW_IN_MODAL_REQUEST:{let e=t;this.handleShowViewInModalRequest(e.id,e.viewId,e.args,e.options);return}case l.CLOSE_MODAL_REQUEST:{let e=t;this.onCloseModal?.(e.values,e.canceled);return}case l.RELEASE_BLOCKING_SCRIPT:this.handleReleaseBlockingScript();return;case l.AUTHORIZE:{let e=t;this.handleAuthorize(e.serviceName,e.config);return}case l.CONSOLE_LOG:{let e=t,n=[];try{n=e.args.map(E)}catch{n=[`[unparseable plugin log]`]}try{console[e.level](...n)}catch{}try{this.onConsoleLog?.(e.level,n)}catch{}return}default:return}};handleCommunication=(e,t,n,r)=>{if(e===d.SEND_MESSAGE_TO_FRAME){if(this.frameId){let e=document.getElementById(this.frameId);e&&e.contentWindow?.postMessage({...n?.payload??{},__kizen:{recipient:t,frameId:this.frameId}},n?.path??`*`)}}else if(e===d.CALL_THIRD_PARTY_SCRIPT)this.handleCallThirdPartyScript(t.type,r);else{let r=this.executionPlugin?.plugin_api_name??this.plugin?.plugin_api_name,i=new CustomEvent(`integration:${e}`,{detail:{recipient:{...t,plugin:r},args:n}});window.dispatchEvent(i)}};handleDone=(e,t)=>{this.waitForFrame||this.done(e,t)};postMessage=(e,t)=>{this.worker.postMessage(JSON.stringify({action:e,...t}))};handleSetSessionData=e=>{this.setSessionData(e)};handleQueryRequest=async(e,t,n,r,i)=>{try{let a=await this.onNetworkRequest?.(t,n,r,i);this.postMessage(u.QUERY_RESPONSE,{data:a,id:e})}catch(t){this.onNetworkError?.(t);let n=t instanceof D?{__kizenError:!0,proxyStatus:t.proxyStatus,upstreamStatus:t.upstreamStatus,upstreamResponse:t.upstreamResponse,message:t.message}:(()=>{if(t instanceof Error)return{message:t.message,name:t.name};try{let e=JSON.parse(JSON.stringify(t));if(typeof e==`object`&&e&&!Array.isArray(e))return e}catch{}return{message:String(t)}})();this.postMessage(u.QUERY_RESPONSE,{error:n,id:e})}};handleUIOutput=e=>{if(this.scriptUIRef?.current){let t=hn(e).html;this.scriptUIRef.current.innerHTML=t}};onLoad=e=>{e.iframe&&(this.waitForFrame=!1,this.handleDone(e.preserve))};handleIframeOutput=(e,t=[],n=[],r=!1)=>{if(this.scriptUIRef?.current){let i=t.filter(e=>_n.includes(e)),a=n.filter(e=>vn.includes(e));this.waitForFrame=!0;let o=document.createElement(`iframe`);o.src=e,o.allow=i.join(`; `),a.forEach(e=>{o.sandbox.add(e)}),o.style.border=`none`,o.style.width=`100%`,o.style.height=`100%`,o.onload=this.onLoad.bind(this,{iframe:o,preserve:r}),this.frameId&&(o.id=this.frameId),this.scriptUIRef.current.replaceChildren(o)}};handleCreateRecordRequest=(e,t)=>{this.onShowCreateRecordModal?.(t,t=>{this.postMessage(u.CREATE_RECORD_RESPONSE,{id:e,data:t})})};handleCreateRelatedRecordRequest=(e,t,n)=>{this.onShowCreateRelatedRecordModal?.(t,n,t=>{this.postMessage(u.CREATE_RELATED_RECORD_RESPONSE,{id:e,data:t})})};showToast=(e,t)=>{this.onShowToast?.({message:e,variant:t?.variant??`success`,autohide:t?.autohide??!0})};clearToasts=()=>{this.onClearToasts?.()};copyToClipboard=async e=>{try{await navigator.clipboard.writeText(e)}catch(e){this.onError?.({message:e.message})}};handleRefreshTimeline=e=>{this.invalidateCache?.(`timeline`,e)};waitForIdleState=e=>new Promise(t=>{let n=0,r=setInterval(()=>{(this.getPendingCacheCount?.(e)??0)===0?(clearInterval(r),t(!0)):(n+=1,n>Math.floor(yn/bn)&&(clearInterval(r),t(!1)))},bn)});handleRefreshEntity=async(e,t)=>{this.invalidateCache?.(`entity`,e);let n=await this.waitForIdleState(e);this.postMessage(u.REFRESH_ENTITY_RESPONSE,{id:t,data:{success:n}})};handleFormPostRequest=(e,t,n,r)=>{let i=document.createElement(`form`);i.method=`POST`,i.action=t,r&&(i.target=`_blank`);for(let e in n){let t=document.createElement(`input`);t.type=`hidden`,t.name=e,t.value=n[e],i.appendChild(t)}document.body.appendChild(i),i.submit(),r&&document.body.removeChild(i),this.postMessage(u.POSTFORMDATA_RESPONSE,{success:!0,id:e})};handleUploadFileRequest=async(e,t)=>{if(!this.performFileUpload){this.postMessage(u.UPLOADFILE_RESPONSE,{error:`File upload not supported`,id:e});return}let{file:n,isPublic:r=!1,fileName:i}=t,a=await(await fetch(n)).blob(),o=new File([a],i??`upload-${new Date().toISOString()}`,{type:a.type});o.$id=this.createFileId?.()??T();let s=await this.performFileUpload({file:o,id:o.$id,publicFile:r,source:`field_value`,handleProgress:e=>{this.postMessage(u.UPLOADFILE_PROGRESS,{fileId:e.id,progress:e.progress})},businessId:void 0});this.postMessage(u.UPLOADFILE_RESPONSE,{data:s,id:e})};waitForReadyState=(e,t,n=0)=>{e||t?.(!0),e?.()?t?.(!0):n<20?setTimeout(()=>{this.waitForReadyState(e,t,n+1)},n*50):t?.(!1)};handleCallThirdPartyScript=(e,t=[])=>{if(e&&x[e]){let n=x[e],r=window[n];r?.(...t)}};handleReleaseBlockingScript=()=>this.onReleaseBlockingScript?.(this.executionPlugin);handlePromptRequest=(e,t,n=!1)=>{this.onShowModal?this.onShowModal({...t,pluginApiName:this.pluginApiName??``,dynamic:n},(t={})=>{this.postMessage(u.PROMPT_RESPONSE,{id:e,data:t})}):this.postMessage(u.PROMPT_RESPONSE,{id:e,data:{canceled:!0}})};handleShowViewInModalRequest=(e,t,n,r)=>{this.onShowModal?this.onShowModal({viewId:t,...n!==void 0&&{args:n},pluginApiName:this.pluginApiName??``,...r?.size!==void 0&&{size:r.size},...r?.frameless?{frameless:!0}:{...r?.title!==void 0&&{title:r.title},...r?.confirmButton!==void 0&&{confirmButton:r.confirmButton},...r?.cancelButton!==void 0&&{cancelButton:r.cancelButton}}},(t={})=>{this.postMessage(u.PROMPT_RESPONSE,{id:e,data:t})}):this.postMessage(u.PROMPT_RESPONSE,{id:e,data:{canceled:!0}})};handleInstallThirdPartyScriptRequest=(e,t,n={})=>{let r=b(t);if(!r){this.postMessage(u.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE,{data:{success:!1,url:t},id:e});return}let i=S[r];i(n);let a=document.createElement(`script`);a.onload=()=>{this.waitForReadyState(C[r],n=>{this.postMessage(u.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE,{data:{success:!0,url:t,matched:n},id:e})})},a.onerror=()=>{this.postMessage(u.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE,{data:{success:!1,url:t},id:e})},a.src=t,a.setAttribute(`data-script-url`,t),document.querySelectorAll(`[data-script-url="`+t+`"]`).length>0?this.waitForReadyState(C[r],n=>{this.postMessage(u.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE,{data:{success:!0,url:t,reused:!0,matched:n},id:e})}):document.documentElement.firstChild?.appendChild(a)};handleOpenWindow=(e,t,n)=>{!gn(e)||t===`_blank`||!this.pushHistory?window.open(e,t,n):this.pushHistory(e)};handleAuthorize=(e,t={})=>{let n=new URLSearchParams;if(t.successRedirectPath&&n.append(`success_redirect_path`,t.successRedirectPath),t.errorRedirectPath&&n.append(`error_redirect_path`,t.errorRedirectPath),!this.appPath){this.onError?.({message:`App path is not defined.`});return}if(!this.pluginApiName){this.onError?.({message:`Plugin API name is not defined.`});return}let r=n.toString();this.handleOpenWindow(`${this.appPath}/external-integrations/business-plugin-apps/${this.pluginApiName}/services/${encodeURIComponent(e)}/authorize${r?`?${r}`:``}`,`_blank`,``)};run=(e,t,n)=>{let r=w();this.postMessage(l.RUN,{script:e,setup:t,args:n,sessionData:this.sessionData,pluginComponentId:this.pluginComponentId,pluginApiName:this.pluginApiName,location:r})}},Sn=async({scriptBody:e,user:t,teamMember:n,business:r,onError:i,onReleaseBlockingScript:a,setLoadingState:o,clientObject:s,scriptUIRef:c,onStateChange:l,workerName:u,context:d,args:f=``,plugin:p,onShowToast:m,onClearToasts:h,terminators:g,executionPlugin:_,sessionData:v,setSessionData:y,onShowModal:b,onCloseModal:x,onShowCreateRecordModal:S,onShowCreateRelatedRecordModal:C,onNetworkError:w,onNetworkRequest:T,appPath:ee,pushHistory:te,createFileId:ne,performFileUpload:E,getPendingCacheCount:D,invalidateCache:O,onConsoleLog:k})=>{let A=nn(`script-runner-logging`),re;return re=u===`recordDetail`?new Worker(new URL(`/assets/recordDetail.worker-DNuhYdSl.js`,``+import.meta.url),{type:`module`}):u===`genericPlugin`?new Worker(new URL(`/assets/generic.worker-Cbl5oax1.js`,``+import.meta.url),{type:`module`}):u===`floatingFramePlugin`?new Worker(new URL(`/assets/floatingFrame.worker-Bbq7GWth.js`,``+import.meta.url),{type:`module`}):new Worker(new URL(`/assets/calendarSource.worker-Ch3rgZR6.js`,``+import.meta.url),{type:`module`}),new Promise(u=>{let ie=rn(e),j=rn(f),M=`${p?.plugin_api_name??``}-${p?.api_name??``}-${String(ie)}-${String(j)}`,N=`${p?.plugin_api_name??``}-${p?.api_name??``}`;_?.field_type?(M=`${_.plugin_api_name??``}-${_.field_type}-${String(ie)}-${String(j)}`,N=`${_.plugin_api_name??``}-${_.field_type??_.script_id}`):_&&(M=`${_.plugin_api_name??``}-${_.api_name}-${String(ie)}-${String(j)}`,N=`${_.plugin_api_name??``}-${_.api_name}`),g.current[M]&&(g.current[M]?.forEach(e=>{e()}),g.current[M]=[]),g.current[M]??=[],g.current[M]?.push(()=>{re.terminate()});let P=new xn({worker:re,done:(e,t)=>{o(!1),e||(g.current[M]?.forEach(e=>{e()}),g.current[M]=[]),u(t)},onError:i,onReleaseBlockingScript:a,scriptUIRef:c,onStateChange:l,plugin:p,executionPlugin:_,onShowToast:m,onClearToasts:h,sessionData:v,setSessionData:y,pluginComponentId:N,onShowModal:b,onCloseModal:x,onShowCreateRecordModal:S,onShowCreateRelatedRecordModal:C,onNetworkError:w,pushHistory:te,onNetworkRequest:T,appPath:ee,createFileId:ne,performFileUpload:E,getPendingCacheCount:D,invalidateCache:O,onConsoleLog:k});o(!0),P.run(e,{...d,user:t,teamMember:n,business:r,clientObject:s,appPath:ee,isDebug:A},f)})},Cn=(e,t)=>{let n=new Worker(new URL(`/assets/expression.worker-Cin-WNVB.js`,``+import.meta.url),{type:`module`});return new Promise(r=>{n.onmessage=e=>{let t=JSON.parse(e.data);n.terminate(),r(t.result)};let i=nn(`script-runner-logging`);n.postMessage(JSON.stringify({expression:e,args:t,isDebug:i}))})},wn=async(e,t)=>await Cn(e,t),Tn=async(e,t)=>await Cn(e,t),En=async(e,t)=>await Cn(e,t),Dn=async(e,t)=>await Cn(e,t),On=e=>{let t={...e,data:e.data.body??e.data,status:e.data.status_code??e.status};return{response:t,upstreamStatus:t.status,upstreamResponse:e.data.body}},kn=(e,t,n)=>new D(e,t,n),An=(e,t)=>new D(e??500,void 0,void 0,t??`An unknown error occurred in the proxy`),jn=e=>{let{response:t,upstreamStatus:n,upstreamResponse:r}=On(e);if(n>=400)throw kn(200,n,r);return t},Mn={go:`https://app.go.kizen.com/api`,fmo:`https://app.fmo.kizen.com/api`,staging:`https://staging.kizen.com/api`,integration:`https://integration.kizen.dev/api`,test1:`https://test1.kizen.dev/api`},Nn={go:`https://go.kizen.com`,fmo:`https://fmo.kizen.com`,staging:`https://v2.staging.kizen.com`,integration:`https://v2.integration.kizen.dev`,test1:`https://test1.kizen.dev`};function Pn(){let{apiKey:e,userId:t,businessId:i,environment:a}=n(),o=Mn[a];return(0,r.useCallback)((n,r={})=>fetch(`/api/proxy${n}`,{...r,headers:{"x-proxy-target":o,"X-API-KEY":e,"X-USER-ID":t,"X-BUSINESS-ID":i,...r.headers}}),[o,e,t,i])}var Fn=e=>async(t,n,r,i)=>{if(n.startsWith(`/external-integrations/proxy`))try{let a=await e.request(t,n,r,i);return jn({data:a,status:a.status_code??200})}catch(e){throw e instanceof D?e:o(e)?An(e.response?.status,e.response?.data?.error):e}else return{data:await e.request(t,n,r,i)}};export{g as C,c as E,m as S,f as T,re as _,ln as a,ee as b,pn as c,sn as d,wn as f,Tn as g,Sn as h,Pn as i,an as l,En as m,Mn as n,mn as o,Dn as p,Fn as r,hn as s,Nn as t,nn as u,A as v,p as w,d as x,O as y};
@@ -1 +1 @@
1
- import{n as e,t}from"./rolldown-runtime-DF2fYuay.js";import{j as n}from"./fa-core-BoBqCOD3.js";function r(e){return e[e.length-1]}function i(e){return typeof e==`function`}function a(e,t){return i(e)?e(t):e}var o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,c=()=>Object.create(null),l=(e,t)=>u(e,t,c);function u(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=m(e)&&m(i);if(!a&&!(f(e)&&f(i)))return i;let s=a?e:d(e);if(!s)return i;let c=a?i:d(i);if(!c)return i;let l=s.length,p=c.length,h=a?Array(p):n(),g=0;for(let t=0;t<p;t++){let s=a?t:c[t],d=e[s],f=i[s];if(d===f){h[s]=d,(a?t<l:o.call(e,s))&&g++;continue}if(d===null||f===null||typeof d!=`object`||typeof f!=`object`){h[s]=f;continue}let p=u(d,f,n,r+1);h[s]=p,p===d&&g++}return l===p&&g===l?e:h}function d(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!s.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!s.call(e,t))return!1;r.push(t)}return r}function f(e){if(!p(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!p(n)||!n.hasOwnProperty(`isPrototypeOf`))}function p(e){return Object.prototype.toString.call(e)===`[object Object]`}function m(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function h(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!h(e[r],t[r],n))return!1;return!0}if(f(e)&&f(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!h(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!h(e[o],t[o],n)))return!1;return i===a}return!1}function g(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function _(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function v(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function y(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return v(t)}var b=[`http:`,`https:`,`mailto:`,`tel:`];function x(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function S(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=y(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=y(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function C(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function w(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function T(){throw Error(`Invariant failed`)}var E=e(n(),1),D=E.createContext(null);function O(e){return E.useContext(D)}var k=E.createContext(void 0),A=E.createContext(void 0),j=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),M=t(((e,t)=>{t.exports=j()})),N=t((e=>{var t=n(),r=M();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),P=t(((e,t)=>{t.exports=N()}))();function F(e,t){return e===t}function I(e,t,n=F){let r=(0,E.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,E.useCallback)(()=>e?.get(),[e]);return(0,P.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var L={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function R(e){let t=O(),n=E.useContext(e.from?A:k),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=E.useRef(void 0);return I(i??L,n=>{if((e.shouldThrow??!0)&&!n&&T(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=u(a.current,r);return a.current=e,e}return r})}function z(e){return R({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}var B={queryKey:[`bundle`],queryFn:async()=>{let e=await fetch(`/api/bundle`);if(!e.ok)throw Error(`Failed to fetch bundle.json`);return e.json()}};export{f as _,k as a,l as b,T as c,g as d,S as f,x as g,a as h,I as i,b as l,C as m,z as n,O as o,h as p,R as r,D as s,B as t,w as u,_ as v,u as x,r as y};
1
+ import{r as e,t}from"./rolldown-runtime-Dw2cE7zH.js";import{j as n}from"./fa-core-B7dAyAZA.js";function r(e){return e[e.length-1]}function i(e){return typeof e==`function`}function a(e,t){return i(e)?e(t):e}var o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,c=()=>Object.create(null),l=(e,t)=>u(e,t,c);function u(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=m(e)&&m(i);if(!a&&!(f(e)&&f(i)))return i;let s=a?e:d(e);if(!s)return i;let c=a?i:d(i);if(!c)return i;let l=s.length,p=c.length,h=a?Array(p):n(),g=0;for(let t=0;t<p;t++){let s=a?t:c[t],d=e[s],f=i[s];if(d===f){h[s]=d,(a?t<l:o.call(e,s))&&g++;continue}if(d===null||f===null||typeof d!=`object`||typeof f!=`object`){h[s]=f;continue}let p=u(d,f,n,r+1);h[s]=p,p===d&&g++}return l===p&&g===l?e:h}function d(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!s.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!s.call(e,t))return!1;r.push(t)}return r}function f(e){if(!p(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!p(n)||!n.hasOwnProperty(`isPrototypeOf`))}function p(e){return Object.prototype.toString.call(e)===`[object Object]`}function m(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function h(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!h(e[r],t[r],n))return!1;return!0}if(f(e)&&f(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!h(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!h(e[o],t[o],n)))return!1;return i===a}return!1}function g(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function _(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function v(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function y(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return v(t)}var b=[`http:`,`https:`,`mailto:`,`tel:`];function x(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function S(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=y(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=y(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function C(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function w(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function T(){throw Error(`Invariant failed`)}var E=e(n(),1),D=E.createContext(null);function O(e){return E.useContext(D)}var k=E.createContext(void 0),A=E.createContext(void 0),j=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),M=t(((e,t)=>{t.exports=j()})),N=t((e=>{var t=n(),r=M();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),P=t(((e,t)=>{t.exports=N()}))();function F(e,t){return e===t}function I(e,t,n=F){let r=(0,E.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,E.useCallback)(()=>e?.get(),[e]);return(0,P.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var L={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function R(e){let t=O(),n=E.useContext(e.from?A:k),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=E.useRef(void 0);return I(i??L,n=>{if((e.shouldThrow??!0)&&!n&&T(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=u(a.current,r);return a.current=e,e}return r})}function z(e){return R({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}var B={queryKey:[`bundle`],queryFn:async()=>{let e=await fetch(`/api/bundle`);if(!e.ok)throw Error(`Failed to fetch bundle.json`);return e.json()}};export{f as _,k as a,l as b,T as c,g as d,S as f,x as g,a as h,I as i,b as l,C as m,z as n,O as o,h as p,R as r,D as s,B as t,w as u,_ as v,u as x,r as y};
@@ -0,0 +1,25 @@
1
+ (function(){var e={QUERY_REQUEST:`query:request`,UI_OUTPUT:`outputui`,IFRAME_OUTPUT:`iframeoutput`,POSTFORMDATA_REQUEST:`postformdata:request`,SETSTATE:`setstate`,DONE:`done`,RUN:`run`,OPEN_WINDOW:`openwindow`,COMMUNICATE:`communicate`,HIDE:`hide`,SHOW:`show`,EXPAND:`expand`,COLLAPSE:`collapse`,HIDE_HEADER:`hideheader`,SHOW_HEADER:`showheader`,OPEN_CREATE_RECORD_MODAL_REQUEST:`opencreaterecordmodal:request`,OPEN_CREATE_RELATED_RECORD_MODAL_REQUEST:`opencreaterelatedrecordmodal:request`,SHOW_TOAST:`showtoast`,CLEAR_TOASTS:`cleartoasts`,REFRESH_TIMELINE:`refreshtimeline`,REFRESH_ENTITY:`refreshentity`,UPLOADFILE_REQUEST:`uploadfile:request`,UPDATE_SESSION_DATA:`updatesessiondata`,INSTALL_THIRD_PARTY_SCRIPT_REQUEST:`installthirdpartyscript:request`,PROMPT_REQUEST:`prompt:request`,DYNAMIC_PROMPT_REQUEST:`dynamicprompt:request`,RELEASE_BLOCKING_SCRIPT:`releaseblockingscript`,AUTHORIZE:`authorize`,COPY_TO_CLIPBOARD:`copytoclipboard`,SHOW_VIEW_IN_MODAL_REQUEST:`showviewinmodal:request`,CLOSE_MODAL_REQUEST:`closemodal:request`,CONSOLE_LOG:`consolelog`},t={QUERY_RESPONSE:`query:response`,POSTFORMDATA_RESPONSE:`postformdata:response`,ERROR:`error`,UPLOADFILE_RESPONSE:`uploadfile:response`,UPLOADFILE_PROGRESS:`uploadfile:progress`,INSTALL_THIRD_PARTY_SCRIPT_RESPONSE:`installthirdpartyscript:response`,PROMPT_RESPONSE:`prompt:response`,REFRESH_ENTITY_RESPONSE:`refreshentity:response`,CREATE_RECORD_RESPONSE:`createrecord:response`,CREATE_RELATED_RECORD_RESPONSE:`createrelatedrecord:response`},n={RUN_FRAME_SCRIPT:`runframescript`,SEND_MESSAGE_TO_FRAME:`sendmessagetoframe`,CALL_THIRD_PARTY_SCRIPT:`callthirdpartyscript`},r=/https:\/\/.*widget\.freshworks\.com\/.*\.js/,i=/https:\/\/widget\.intercom\.io\/widget\/[a-z0-9]+/,a={FRESHWORKS:`freshworks`,INTERCOM:`intercom`},o=e=>{if(r.test(e))return a.FRESHWORKS;if(i.test(e))return a.INTERCOM};a.FRESHWORKS,a.INTERCOM,a.FRESHWORKS,a.INTERCOM,a.FRESHWORKS,a.INTERCOM;var s=class{instance;scriptUrl;integration;constructor(e,t){this.instance=e,this.scriptUrl=t;let n=o(t);if(n)this.integration=n;else throw Error(`Error: Disallowed script url: ${t}`)}get type(){return this.integration}call(...t){this.instance.postMessage(JSON.stringify({action:e.COMMUNICATE,type:n.CALL_THIRD_PARTY_SCRIPT,eventName:`thirdParty:${n.CALL_THIRD_PARTY_SCRIPT}`,recipient:{script:this.scriptUrl,type:this.type},params:t}))}},c=()=>{let e=new Date().getTime();return typeof performance<`u`&&typeof performance.now==`function`&&(e+=performance.now()),`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t===`x`?n:n&3|8).toString(16)})},l=Object.getPrototypeOf(async function(){}).constructor,u=e=>{let t=`
2
+ const __cleanup = this.__cleanup.bind(this);
3
+ const __error = this.onError.bind(this);
4
+ const console = this.console;
5
+ let __kizen_internal_result;
6
+ {
7
+ this.__setup();
8
+ }
9
+ try {
10
+ __kizen_internal_result = await (async () => { ${e} })();
11
+ } catch (ex) {
12
+ __error(ex);
13
+ } finally {
14
+ __cleanup(__kizen_internal_result);
15
+ }
16
+ `;try{return{fn:new l(t),functionBody:t}}catch{let e=`
17
+ this.__setup();
18
+ this.onError({ message: "The script has a syntax error and could not be parsed" });
19
+ this.__cleanup();
20
+ `;return{fn:new l(e),functionBody:e}}},d=class{promises;isDebug;constructor({isDebug:e=!1}){this.promises=new Map,this.isDebug=e}delete(e){this.isDebug&&console.log(`Deleting promise ${e}`),this.promises.delete(e)}get(e){return this.isDebug&&console.log(`Getting promise ${e}`),this.promises.get(e)}set(e,t,n){this.promises.set(e,{resolve:t,reject:n})}id(){return c()}register(e,t){let n=this.id();return this.set(n,e,t),n}resolve(e,t){this.get(e)?.resolve(t),this.delete(e)}reject(e,t){this.get(e)?.reject(t),this.delete(e)}},f=e=>({__kzConsole:`unserializable`,reason:e}),p=e=>{try{return String(e)}catch{return`[unserializable]`}},m=(e,t)=>{try{if(e===void 0)return{__kzConsole:`undefined`};if(e===null)return null;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e==`bigint`)return{__kzConsole:`bigint`,value:e.toString()};if(typeof e==`symbol`)return{__kzConsole:`symbol`,value:e.toString()};if(typeof e==`function`)return{__kzConsole:`function`,name:e.name||`anonymous`};if(e instanceof Error){let t=`Error`,n=``,r;try{t=e.name}catch{}try{n=e.message}catch{}try{r=e.stack}catch{}return{__kzConsole:`error`,name:t,message:n,stack:r}}if(e instanceof Date)try{return{__kzConsole:`date`,value:e.toISOString()}}catch{return f(`invalid Date`)}if(e instanceof RegExp)return{__kzConsole:`regexp`,value:p(e)};if(t.has(e))return{__kzConsole:`circular`};if(t.add(e),Array.isArray(e)){let n=[];for(let r of e)try{n.push(m(r,t))}catch{n.push(f(`threw during read`))}return n}let n={},r=[];try{r=Object.keys(e)}catch{return f(`cannot enumerate keys`)}for(let i of r)try{n[i]=m(e[i],t)}catch{n[i]=f(`threw during read`)}return n}catch{return f(`serialization failed`)}},h=e=>{try{return m(e,new WeakSet)}catch{return f(`serialization failed`)}},g=class e extends Error{proxyStatus;upstreamStatus;upstreamResponse;constructor(t,n,r,i){super(i??r?.error?.message??(n?`Request failed with status code ${String(n)}`:`Request failed with proxy status code ${String(t)}`)),this.name=`KizenRequestError`,this.proxyStatus=t,this.upstreamStatus=n,this.upstreamResponse=r,Object.setPrototypeOf(this,e.prototype)}},_=e=>({key:`action__${e.api_name}`,type:`custom_object`,label:e.name,allow_multiple:!0}),v=[`description`,`container`,`qr`,`image`,`link`],y=(e,t)=>{let n=(e.fields??[]).filter(e=>!v.includes(e.type)).map(e=>({...e,when:t?`(${t}) && (${e.when??`true`})`:e.when})),r=(e.fields??[]).filter(e=>e.type===`container`).flatMap(e=>y(e,e.when)),i=e.actions?.filter(e=>e.hint_object_name)??[];return[...n,...r,...i.map(e=>({..._(e),match_hint:e.hint_object_name??``}))]},b=(e,t)=>{let n=y(e).reduce((e,t)=>({...e,[t.key]:t}),{}),r=Object.keys(t),i={};return r.forEach(e=>{let r=t[e],a=n[e];if(a?.type){switch(a.type){case`boolean`:let t=r;if(!t)return;i[e]=t.value;return;case`custom_object`:{let t=r;if(!t)return;i[e]={objectId:t.value?.id,objectName:t.value?.objectName};return}case`field`:{let t=r;if(!t?.value)return;Array.isArray(t.value)?i[e]=t.value.map(e=>({fieldId:e.value,fieldName:e.label,objectId:t.associatedObject?.id,objectName:t.associatedObject?.name})):typeof t.value==`object`&&typeof t.associatedObject==`object`&&(i[e]={fieldId:t.value.value,fieldName:t.value.label,objectId:t.associatedObject.id,objectName:t.associatedObject.name});return}case`number`:{let t=r;if(!t)return;try{let n=Number(t.value);if(!n&&n!==0)return;i[e]=n}catch{i[e]=NaN}return}case`select`:{let t=r;if(!t)return;i[e]=t.value;return}case`text`:{let t=r?.value;if(t){i[e]=t;return}let n=a.default;n&&(i[e]=n);return}case`description`:case`container`:case`qr`:case`image`:case`link`:return}return r?.value}}),i},x=(t,n)=>r=>async(i,a,o)=>new Promise((s,c)=>{let l=n.register(s,c);t.postMessage(JSON.stringify({action:e.QUERY_REQUEST,id:l,method:r,url:i,payload:a,options:o}))}),S=(t,n)=>(r,i,a=!0)=>new Promise((o,s)=>{let c=n.register(o,s);t.postMessage(JSON.stringify({action:e.POSTFORMDATA_REQUEST,url:r,id:c,payload:i,createNewTab:a}))}),C=(t,n)=>r=>new Promise((i,a)=>{let o=n.register(i,a);t.postMessage(JSON.stringify({action:e.PROMPT_REQUEST,id:o,config:r}))}),w=(t,n)=>r=>new Promise((i,a)=>{let o=n.register(i,a);t.postMessage(JSON.stringify({action:e.DYNAMIC_PROMPT_REQUEST,id:o,config:r}))}),T=(e,n,r)=>{switch(e){case t.QUERY_RESPONSE:{let{id:e,data:t,error:i}=JSON.parse(n.data);if(i){let t=typeof i==`object`&&`__kizenError`in i?new g(i.proxyStatus,i.upstreamStatus,i.upstreamResponse,i.message):i;r.reject(e,t)}else r.resolve(e,t);break}case t.POSTFORMDATA_RESPONSE:{let{id:e,success:t}=JSON.parse(n.data);t?r.resolve(e):r.reject(e);break}case t.UPLOADFILE_RESPONSE:{let{id:e,data:t,error:i}=JSON.parse(n.data);t?r.resolve(e,t):r.reject(e,i);break}case t.INSTALL_THIRD_PARTY_SCRIPT_RESPONSE:{let{id:e,data:t}=JSON.parse(n.data);t.success?r.resolve(e,t):r.reject(e);break}case t.PROMPT_RESPONSE:{let{id:e,data:t}=JSON.parse(n.data);r.resolve(e,t);break}case t.CREATE_RECORD_RESPONSE:{let{id:e,data:t}=JSON.parse(n.data);r.resolve(e,t);break}case t.CREATE_RELATED_RECORD_RESPONSE:{let{id:e,data:t}=JSON.parse(n.data);r.resolve(e,t);break}case t.REFRESH_ENTITY_RESPONSE:{let{id:e,data:t}=JSON.parse(n.data);t.success?r.resolve(e,!0):r.reject(e);break}}},E=`integration:${n.RUN_FRAME_SCRIPT}`,D=class{instance;constructor(e){this.instance=e}runFrameScript(t,r,i){this.instance.postMessage(JSON.stringify({action:e.COMMUNICATE,type:n.RUN_FRAME_SCRIPT,eventName:E,recipient:{frame:t,script:r},args:i}))}sendMessageToOwnFrame(t,r){this.instance.postMessage(JSON.stringify({action:e.COMMUNICATE,type:n.SEND_MESSAGE_TO_FRAME,args:{payload:t,path:r}}))}},O=async e=>{let t=null;try{t=await e.json()}catch{}return{status:e.status,statusText:e.statusText,body:t}},k=(e,t,n={},r=``)=>`(function() { ${r}
21
+ return ${`(${e.toString()})({ state: {{${t}}}, args: ${JSON.stringify(n)}, utils: __kizen_utils })`}; })()`,A=class{user;teamMember;business;clientObject;appPath;dataCache=new Map;queryOptions={};api;postFormData;executionTimer=0;setupExecutions=0;cleanupExecutions=0;isDebug=!1;scriptBody;internalState={indicator:`none`};instance;breakOnException=!1;args;communicate;shouldPreserve=!1;uploadFileHandler;internalSessionData;pluginComponentId;installThirdPartyScriptHandler;promptHandler;dynamicPromptHandler;showViewInModalHandler;closeModalHandler;refreshEntityHandler;openCreateRecordHandler;openCreateRelatedRecordHandler;runnerType;pluginApiName;tempPromptState={};partialLocation;constructor({user:e,teamMember:t,business:n,clientObject:r,appPath:i,isDebug:a,kizenRequest:o,postFormData:s,scriptBody:c,instance:l,args:u,uploadFile:d,sessionData:f,pluginComponentId:p,installThirdPartyScript:m,prompt:h,refreshEntity:g,openCreateRecord:_,openCreateRelatedRecord:v,pluginApiName:y,dynamicPrompt:b,showViewInModal:x,closeModal:S,location:C}){this.user=e,this.teamMember=t,this.business=n,this.clientObject=r,this.partialLocation=C,this.appPath=i,this.isDebug=a??!1,this.api={get:o(`get`),post:o(`post`),put:o(`put`),delete:o(`delete`),patch:o(`patch`)},this.postFormData=s,this.scriptBody=c,this.instance=l,this.communicate=new D(l),this.uploadFileHandler=d,this.internalSessionData=f??{},this.pluginComponentId=p,this.installThirdPartyScriptHandler=m,this.promptHandler=h,this.refreshEntityHandler=g,this.openCreateRecordHandler=_,this.openCreateRelatedRecordHandler=v,this.runnerType=`base`,this.pluginApiName=y,this.dynamicPromptHandler=b,this.showViewInModalHandler=x,this.closeModalHandler=S;try{this.args=JSON.parse(u??`{}`)}catch{this.args={}}}onError(e){if(this.breakOnException)debugger;this.instance.postMessage(JSON.stringify({action:t.ERROR,error:e?.message}))}set debug(e){this.isDebug=e,this.breakOnException=e}set preserve(e){this.shouldPreserve=e}get preserve(){return this.shouldPreserve}parseDate(e){return e.split(`-`)}parsePhone(e){return e.replace(/\+/g,``)}openWindow(t,n=`_blank`){this.instance.postMessage(JSON.stringify({action:e.OPEN_WINDOW,url:t,target:n,features:`noopener noreferrer`}))}authorize(t,n={}){if(!t)throw Error(`Service name is required to authorize`);this.instance.postMessage(JSON.stringify({action:e.AUTHORIZE,serviceName:t,config:{successRedirectPath:n.successRedirectPath??`/marketplace/${this.pluginApiName}/auth`,errorRedirectPath:n.errorRedirectPath??`/marketplace/${this.pluginApiName}/auth`}}))}getServiceUrl(e,t){if(!e)throw Error(`Service name is required to get a service url`);let n=`/external-integrations/proxy/${this.pluginApiName}/${e}`;return t.startsWith(`/`)?`${n}${t}`:`${n}/${t}`}get currentBusiness(){return this.business}get applicationPath(){return this.appPath}get currentUser(){return{profile:{id:this.teamMember?.id??``,full_name:this.teamMember?.full_name??``,first_name:this.teamMember?.first_name??``,last_name:this.teamMember?.last_name??``,email:this.teamMember?.email??``,phone:this.teamMember?.phone??``,created:this.teamMember?.created??``,crm_client_id:this.user?.crm_client_id??``}}}get sessionData(){return this.internalSessionData}get config(){return this.args.__kizen_clean_config?new Proxy(this.args.__kizen_clean_config??{},{get:(e,t)=>{if(Reflect.has(e,t))return Reflect.get(e,t)}}):{}}get location(){return new Proxy(this.partialLocation,{get:(e,t)=>{if(t===`toJSON`)return()=>this.partialLocation;if(Reflect.has(e,t))return Reflect.get(e,t);throw Error(`Property ${String(t)} is not available on location object for plugin apps`)}})}get userConfig(){let e=this.args.__kizen_user_config?.__kizen_clean_config;return e?new Proxy(e,{get:(e,t)=>{if(Reflect.has(e,t))return Reflect.get(e,t)}}):{}}setSessionData(t){if(typeof t!=`object`)throw Error(`Invalid session update with type ${typeof t}`);if(Array.isArray(t))throw Error(`Invalid session update with type array`);this.internalSessionData={...this.internalSessionData,...t},this.instance.postMessage(JSON.stringify({action:e.UPDATE_SESSION_DATA,update:t}))}async get(e,t){try{if(this.isRelativeUrl(e)){let n=this.dataCache.get(e);if(n&&!t?.ignoreCache)return t?.returnErrors?[n.data,null]:n.data;let{data:r}=await this.api.get(e,{...this.queryOptions,headers:this.buildHeaders(t?.headers)});return this.dataCache.set(e,{ts:Date.now(),data:r}),t?.returnErrors?[r,null]:r}else{let n=await fetch(e,{method:`GET`,headers:new Headers(t?.headers),credentials:t?.credentials??`same-origin`});if(!n.ok)throw await O(n);let r=await n.json();return t?.returnErrors?[r,null]:r}}catch(e){if(t?.returnErrors)return[null,e];this.onError(e)}}async getWithErrors(e,t){return this.get(e,{...t,returnErrors:!0})}async getUserConfig(){if(!this.args.pluginId||!this.pluginComponentId)throw Error(`User config is not available for scripts not associated to a plugin or plugin component`);return(await this.get(`/employee/mine/configs/plugins/${this.args.pluginId}`,{ignoreCache:!0})).config?.[this.pluginComponentId]??{}}async setUserConfig(e){if(!this.args.pluginId||!this.pluginComponentId)throw Error(`User config is not available for scripts not associated to a plugin or plugin component`);let t=await this.get(`/employee/mine/configs/plugins/${this.args.pluginId}`,{ignoreCache:!0});return await this.post(`/employee/mine/configs/plugins/${this.args.pluginId}`,{config:{...t?.config,[this.pluginComponentId]:{...t?.config?.[this.pluginComponentId],...e}}})}async patch(e,t,n){try{if(this.isRelativeUrl(e)){let{data:r}=await this.api.patch(e,t,{...this.queryOptions,headers:n?.headers});return n?.returnErrors?[r,null]:r}else{let r=await fetch(e,{method:`PATCH`,body:t?JSON.stringify(t):null,headers:new Headers(n?.headers),credentials:n?.credentials??`same-origin`});if(!r.ok)throw await O(r);let i=await r.json();return n?.returnErrors?[i,null]:i}}catch(e){if(n?.returnErrors)return[null,e];this.onError(e)}}async patchWithErrors(e,t,n){return this.patch(e,t,{...n,returnErrors:!0})}async post(e,t,n){try{if(this.isRelativeUrl(e)){let{data:r}=await this.api.post(e,t,{...this.queryOptions,headers:this.buildHeaders(n?.headers)});return n?.returnErrors?[r,null]:r}else{let r=await fetch(e,{method:`POST`,body:t?JSON.stringify(t):null,headers:new Headers(n?.headers),credentials:n?.credentials??`same-origin`});if(!r.ok)throw await O(r);let i=await r.json();return n?.returnErrors?[i,null]:i}}catch(e){if(n?.returnErrors)return[null,e];this.onError(e)}}async postWithErrors(e,t,n){return this.post(e,t,{...n,returnErrors:!0})}async delete(e,t){try{if(this.isRelativeUrl(e)){let{data:n}=await this.api.delete(e,{...this.queryOptions,headers:this.buildHeaders(t?.headers)});return t?.returnErrors?[n,null]:n}else{let n=await fetch(e,{method:`DELETE`,headers:new Headers(t?.headers),credentials:t?.credentials??`same-origin`});if(!n.ok)throw await O(n);let r=null;return n.status!==204&&(r=await n.json()),t?.returnErrors?[r,null]:r}}catch(e){if(t?.returnErrors)return[null,e];this.onError(e)}}async deleteWithErrors(e,t){return this.delete(e,{...t,returnErrors:!0})}async openCreateRecordModal(e){return this.openCreateRecordHandler(e)}async openCreateRelatedRecordModal(e,t){return this.openCreateRelatedRecordHandler(e,t)}showToast(t,n){this.instance.postMessage(JSON.stringify({action:e.SHOW_TOAST,message:t,toastOptions:n}))}clearToasts(){this.instance.postMessage(JSON.stringify({action:e.CLEAR_TOASTS}))}outputUI(t){this.instance.postMessage(JSON.stringify({action:e.UI_OUTPUT,markup:t}))}prompt(e){return this.promptHandler(e)}async showViewInModal(e,t){return this.showViewInModalHandler(e,t)}closeModal(e,t){this.closeModalHandler(e,t)}async dynamicPrompt(e){let t=`__kizen_state`,n=`const __kizen_utils = {};
22
+ `;if(e.registerUtils){let t=Object.keys(e.registerUtils);n+=t.map(t=>{let n=e.registerUtils?.[t];if(typeof n!=`function`)throw Error(`Registered util ${t} is not a function, got ${typeof n}`);return`__kizen_utils["${t}"] = (${n.toString()});`}).join(`
23
+ `)}let r=e.content?.map(e=>{let r=``;`optionMapper`in e&&(r=k(e.optionMapper,t,e.args,n));let i=``;`getFetchUrl`in e&&(i=k(e.getFetchUrl,t,e.args,n));let a=``;`getHeaders`in e&&(a=k(e.getHeaders,t,e.args,n));let o=``;return`getBody`in e&&(o=k(e.getBody,t,e.args,n)),{...e,optionMapper:r,getFetchUrl:i,getHeaders:a,getBody:o}}),i={...e,content:r},a={fields:i.content},o=await this.dynamicPromptHandler(i),s=b(a,o.values);return{...o,values:s}}outputIframe(t,n,r){this.instance.postMessage(JSON.stringify({action:e.IFRAME_OUTPUT,url:t,allow:n,sandbox:r,preserve:this.preserve}))}getBase64EncodedBlob(e){return new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)},r.onerror=e=>{n(e)}})}async uploadFile(e,t,n=!1){let r=await this.getBase64EncodedBlob(e);return await this.uploadFileHandler({file:r,fileName:t??`file_`+String(Date.now()),isPublic:n})}afterSetup(){}__setup(){if(this.setupExecutions!==0)throw Error(`Setup must be called exactly once, and should never be called by a script directly.`);if(this.cleanupExecutions!==0)throw Error(`Setup was called after cleanup`);this.isDebug&&this.console.log(`Running script:
24
+
25
+ ${this.scriptBody}`),this.setupExecutions++,this.executionTimer=performance.now(),this.afterSetup()}__cleanup(e){if(this.cleanupExecutions!==0)throw Error(`Cleanup must be called exactly once, and should never be called by a script directly.`);if(this.setupExecutions!==1)throw Error(`Cleanup was called before setup`);this.cleanupExecutions++,this.setIndicator(`none`);let t=performance.now();this.isDebug&&this.console.log(`Script execution took ${String(t-this.executionTimer)}ms`),this.done(this.preserve,e)}setIndicator(e=`none`){this.internalState.indicator=e,this.setState({indicator:e})}wait(e){return new Promise(t=>setTimeout(t,e))}done(t,n){this.instance.postMessage(JSON.stringify({action:e.DONE,result:n,preserve:t}))}setState(t){this.instance.postMessage(JSON.stringify({action:e.SETSTATE,state:t}))}isRelativeUrl(e){return e.startsWith(`/`)}buildHeaders(e={}){return{...e,"X-Request-Type":`kizen-ui-scripting-api`}}refreshTimelineForId(t){t&&this.instance.postMessage(JSON.stringify({action:e.REFRESH_TIMELINE,entityId:t}))}refreshEntityForId(e){if(e)return this.refreshEntityHandler(e)}async installThirdPartyScript(e){try{let t=await this.installThirdPartyScriptHandler(e,this.args);return new s(this.instance,t.url)}catch{this.onError(Error(`Third party script ${e} could not be installed.`))}}releaseBlockingScript(){this.instance.postMessage(JSON.stringify({action:e.RELEASE_BLOCKING_SCRIPT}))}copyToClipboard(t){this.instance.postMessage(JSON.stringify({action:e.COPY_TO_CLIPBOARD,text:t}))}createDateObject(e){if(typeof e!=`string`)throw Error(`Invalid date string ${String(e)}`);if(!/^\d{4}-\d{2}-\d{2}$/.test(e))throw Error(`Date string ${e} is not in the format YYYY-MM-DD`);let t=e.split(`-`).map(e=>parseInt(e,10));if(t.length<3)throw Error(`Date string ${e} could not be parsed into valid date parts`);return new Date(t[0],t[1]-1,t[2])}formatDateForResponse(e){return e.getTime()}get console(){let t=new Set([`log`,`warn`,`error`,`info`,`debug`]);return new Proxy({},{get:(n,r)=>{let i=t.has(String(r))?String(r):`log`;return(...t)=>{try{let n=t.map(e=>{try{return h(e)}catch{return null}}),r;try{r=JSON.stringify({action:e.CONSOLE_LOG,level:i,args:n})}catch{r=JSON.stringify({action:e.CONSOLE_LOG,level:i,args:[`[unserializable log payload]`]})}this.instance.postMessage(r)}catch{}}}})}},j=new d({isDebug:!1}),M=null,N=e=>()=>new Promise((t,n)=>{n(Error(`${e} is not supported in calendar source scripts`))}),P=e=>()=>{throw Error(`${e} is not supported in calendar source scripts`)};self.onmessage=async t=>{let{action:n,script:r,setup:i,args:a,sessionData:o={},pluginComponentId:s,pluginApiName:c,location:l}=JSON.parse(t.data);if(n===e.RUN&&i&&r){let{fn:e,functionBody:t}=u(r);M=new A({user:i.user,teamMember:i.teamMember,business:i.business,clientObject:i.clientObject,isDebug:i.isDebug,appPath:i.appPath,scriptBody:r,functionBody:t,instance:self,kizenRequest:x(self,j),postFormData:S(self,j),uploadFile:N(`uploadFile`),installThirdPartyScript:N(`installThirdPartyScript`),args:a??``,sessionData:o,pluginComponentId:s,prompt:C(self,j),dynamicPrompt:w(self,j),refreshEntity:N(`refreshEntity`),openCreateRecord:N(`openCreateRecord`),openCreateRelatedRecord:N(`openCreateRelatedRecord`),showViewInModal:N(`showViewInModal`),closeModal:P(`closeModal`),pluginApiName:c,location:l}),await e.bind(M)()}else T(n,t,j)}})();
@@ -1 +1 @@
1
- import{a as e,i as t}from"./storageKeys-C6c8YF5Y.js";import{s as n}from"./api-DtXiAEKW.js";function r(e){function t(t){try{let n=localStorage.getItem(e(t));return n?JSON.parse(n):null}catch{return null}}function r(t,r,i){let a={__kizen_setup_assistant_values:r,__kizen_clean_config:n(i,r)};localStorage.setItem(e(t),JSON.stringify(a))}function i(t,n){let r={__kizen_setup_assistant_values:{},__kizen_clean_config:n};localStorage.setItem(e(t),JSON.stringify(r))}function a(t){localStorage.removeItem(e(t))}return{load:t,save:r,saveRaw:i,clear:a}}var i=r(t),a=r(e),o=i.load,s=i.save,c=i.saveRaw,l=i.clear,u=a.load,d=a.save,f=a.clear;function p(e,t){return i.load(e)?.__kizen_clean_config||(t??null)}export{p as a,d as c,u as i,f as n,s as o,o as r,c as s,l as t};
1
+ import{a as e,i as t}from"./storageKeys-CSWy3aiP.js";import{_ as n}from"./api--yBCib3R.js";function r(e){function t(t){try{let n=localStorage.getItem(e(t));return n?JSON.parse(n):null}catch{return null}}function r(t,r,i){let a={__kizen_setup_assistant_values:r,__kizen_clean_config:n(i,r)};localStorage.setItem(e(t),JSON.stringify(a))}function i(t,n){let r={__kizen_setup_assistant_values:{},__kizen_clean_config:n};localStorage.setItem(e(t),JSON.stringify(r))}function a(t){localStorage.removeItem(e(t))}return{load:t,save:r,saveRaw:i,clear:a}}var i=r(t),a=r(e),o=i.load,s=i.save,c=i.saveRaw,l=i.clear,u=a.load,d=a.save,f=a.clear;function p(e,t){return i.load(e)?.__kizen_clean_config||(t??null)}export{p as a,d as c,u as i,f as n,s as o,o as r,c as s,l as t};
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./rolldown-runtime-DF2fYuay.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function ee(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return T(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ee,ee):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function D(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,D(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),D(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=D(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=D(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return D(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function O(e,t,n){if(e==null)return e;var r=[],i=0;return D(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function k(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},A={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=A,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!w.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return T(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)w.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:k}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ee,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.5`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),a=t(((e,t)=>{t.exports=i()})),o=e(r(),1);function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if(Array.isArray(e))return e}function l(e){if(Array.isArray(e))return s(e)}function u(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function p(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ import{r as e,t}from"./rolldown-runtime-Dw2cE7zH.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function ee(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return T(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ee,ee):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function D(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,D(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),D(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=D(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=D(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return D(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function O(e,t,n){if(e==null)return e;var r=[],i=0;return D(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function k(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},A={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=A,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!w.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return T(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)w.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:k}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ee,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.5`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),a=t(((e,t)=>{t.exports=i()})),o=e(r(),1);function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if(Array.isArray(e))return e}function l(e){if(Array.isArray(e))return s(e)}function u(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function p(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function m(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function g(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(){throw TypeError(`Invalid attempt to spread non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?y(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x(e,t){return c(e)||g(e,t)||T(e,t)||_()}function S(e){return l(e)||h(e)||T(e)||v()}function ee(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C(e){var t=ee(e,`string`);return typeof t==`symbol`?t:t+``}function w(e){"@babel/helpers - typeof";return w=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},w(e)}function T(e,t){if(e){if(typeof e==`string`)return s(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}var te=function(){},E={},ne={},re=null,ie={mark:te,measure:te};try{typeof window<`u`&&(E=window),typeof document<`u`&&(ne=document),typeof MutationObserver<`u`&&(re=MutationObserver),typeof performance<`u`&&(ie=performance)}catch{}var ae=(E.navigator||{}).userAgent,D=ae===void 0?``:ae,O=E,k=ne,oe=re,A=ie;O.document;var j=!!k.documentElement&&!!k.head&&typeof k.addEventListener==`function`&&typeof k.createElement==`function`,se=~D.indexOf(`MSIE`)||~D.indexOf(`Trident/`),ce,le=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|gt|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,ue=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Graphite|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,de={classic:{fa:`solid`,fas:`solid`,"fa-solid":`solid`,far:`regular`,"fa-regular":`regular`,fal:`light`,"fa-light":`light`,fat:`thin`,"fa-thin":`thin`,fab:`brands`,"fa-brands":`brands`},duotone:{fa:`solid`,fad:`solid`,"fa-solid":`solid`,"fa-duotone":`solid`,fadr:`regular`,"fa-regular":`regular`,fadl:`light`,"fa-light":`light`,fadt:`thin`,"fa-thin":`thin`},sharp:{fa:`solid`,fass:`solid`,"fa-solid":`solid`,fasr:`regular`,"fa-regular":`regular`,fasl:`light`,"fa-light":`light`,fast:`thin`,"fa-thin":`thin`},"sharp-duotone":{fa:`solid`,fasds:`solid`,"fa-solid":`solid`,fasdr:`regular`,"fa-regular":`regular`,fasdl:`light`,"fa-light":`light`,fasdt:`thin`,"fa-thin":`thin`},slab:{"fa-regular":`regular`,faslr:`regular`},"slab-press":{"fa-regular":`regular`,faslpr:`regular`},thumbprint:{"fa-light":`light`,fatl:`light`},whiteboard:{"fa-semibold":`semibold`,fawsb:`semibold`},notdog:{"fa-solid":`solid`,fans:`solid`},"notdog-duo":{"fa-solid":`solid`,fands:`solid`},etch:{"fa-solid":`solid`,faes:`solid`},graphite:{"fa-thin":`thin`,fagt:`thin`},jelly:{"fa-regular":`regular`,fajr:`regular`},"jelly-fill":{"fa-regular":`regular`,fajfr:`regular`},"jelly-duo":{"fa-regular":`regular`,fajdr:`regular`},chisel:{"fa-regular":`regular`,facr:`regular`},utility:{"fa-semibold":`semibold`,fausb:`semibold`},"utility-duo":{"fa-semibold":`semibold`,faudsb:`semibold`},"utility-fill":{"fa-semibold":`semibold`,faufsb:`semibold`}},fe={GROUP:`duotone-group`,SWAP_OPACITY:`swap-opacity`,PRIMARY:`primary`,SECONDARY:`secondary`},pe=[`fa-classic`,`fa-duotone`,`fa-sharp`,`fa-sharp-duotone`,`fa-thumbprint`,`fa-whiteboard`,`fa-notdog`,`fa-notdog-duo`,`fa-chisel`,`fa-etch`,`fa-graphite`,`fa-jelly`,`fa-jelly-fill`,`fa-jelly-duo`,`fa-slab`,`fa-slab-press`,`fa-utility`,`fa-utility-duo`,`fa-utility-fill`],M=`classic`,me=`duotone`,he=`sharp`,ge=`sharp-duotone`,_e=`chisel`,ve=`etch`,ye=`graphite`,be=`jelly`,xe=`jelly-duo`,Se=`jelly-fill`,Ce=`notdog`,we=`notdog-duo`,Te=`slab`,Ee=`slab-press`,De=`thumbprint`,Oe=`utility`,ke=`utility-duo`,Ae=`utility-fill`,je=`whiteboard`,Me=`Classic`,Ne=`Duotone`,Pe=`Sharp`,Fe=`Sharp Duotone`,Ie=`Chisel`,Le=`Etch`,Re=`Graphite`,ze=`Jelly`,Be=`Jelly Duo`,Ve=`Jelly Fill`,He=`Notdog`,Ue=`Notdog Duo`,We=`Slab`,Ge=`Slab Press`,Ke=`Thumbprint`,qe=`Utility`,Je=`Utility Duo`,Ye=`Utility Fill`,Xe=`Whiteboard`,Ze=[M,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je];ce={},m(m(m(m(m(m(m(m(m(m(ce,M,Me),me,Ne),he,Pe),ge,Fe),_e,Ie),ve,Le),ye,Re),be,ze),xe,Be),Se,Ve),m(m(m(m(m(m(m(m(m(ce,Ce,He),we,Ue),Te,We),Ee,Ge),De,Ke),Oe,qe),ke,Je),Ae,Ye),je,Xe);var Qe={classic:{900:`fas`,400:`far`,normal:`far`,300:`fal`,100:`fat`},duotone:{900:`fad`,400:`fadr`,300:`fadl`,100:`fadt`},sharp:{900:`fass`,400:`fasr`,300:`fasl`,100:`fast`},"sharp-duotone":{900:`fasds`,400:`fasdr`,300:`fasdl`,100:`fasdt`},slab:{400:`faslr`},"slab-press":{400:`faslpr`},whiteboard:{600:`fawsb`},thumbprint:{300:`fatl`},notdog:{900:`fans`},"notdog-duo":{900:`fands`},etch:{900:`faes`},graphite:{100:`fagt`},chisel:{400:`facr`},jelly:{400:`fajr`},"jelly-fill":{400:`fajfr`},"jelly-duo":{400:`fajdr`},utility:{600:`fausb`},"utility-duo":{600:`faudsb`},"utility-fill":{600:`faufsb`}},$e={"Font Awesome 7 Free":{900:`fas`,400:`far`},"Font Awesome 7 Pro":{900:`fas`,400:`far`,normal:`far`,300:`fal`,100:`fat`},"Font Awesome 7 Brands":{400:`fab`,normal:`fab`},"Font Awesome 7 Duotone":{900:`fad`,400:`fadr`,normal:`fadr`,300:`fadl`,100:`fadt`},"Font Awesome 7 Sharp":{900:`fass`,400:`fasr`,normal:`fasr`,300:`fasl`,100:`fast`},"Font Awesome 7 Sharp Duotone":{900:`fasds`,400:`fasdr`,normal:`fasdr`,300:`fasdl`,100:`fasdt`},"Font Awesome 7 Jelly":{400:`fajr`,normal:`fajr`},"Font Awesome 7 Jelly Fill":{400:`fajfr`,normal:`fajfr`},"Font Awesome 7 Jelly Duo":{400:`fajdr`,normal:`fajdr`},"Font Awesome 7 Slab":{400:`faslr`,normal:`faslr`},"Font Awesome 7 Slab Press":{400:`faslpr`,normal:`faslpr`},"Font Awesome 7 Thumbprint":{300:`fatl`,normal:`fatl`},"Font Awesome 7 Notdog":{900:`fans`,normal:`fans`},"Font Awesome 7 Notdog Duo":{900:`fands`,normal:`fands`},"Font Awesome 7 Etch":{900:`faes`,normal:`faes`},"Font Awesome 7 Graphite":{100:`fagt`,normal:`fagt`},"Font Awesome 7 Chisel":{400:`facr`,normal:`facr`},"Font Awesome 7 Whiteboard":{600:`fawsb`,normal:`fawsb`},"Font Awesome 7 Utility":{600:`fausb`,normal:`fausb`},"Font Awesome 7 Utility Duo":{600:`faudsb`,normal:`faudsb`},"Font Awesome 7 Utility Fill":{600:`faufsb`,normal:`faufsb`}},et=new Map([[`classic`,{defaultShortPrefixId:`fas`,defaultStyleId:`solid`,styleIds:[`solid`,`regular`,`light`,`thin`,`brands`],futureStyleIds:[],defaultFontWeight:900}],[`duotone`,{defaultShortPrefixId:`fad`,defaultStyleId:`solid`,styleIds:[`solid`,`regular`,`light`,`thin`],futureStyleIds:[],defaultFontWeight:900}],[`sharp`,{defaultShortPrefixId:`fass`,defaultStyleId:`solid`,styleIds:[`solid`,`regular`,`light`,`thin`],futureStyleIds:[],defaultFontWeight:900}],[`sharp-duotone`,{defaultShortPrefixId:`fasds`,defaultStyleId:`solid`,styleIds:[`solid`,`regular`,`light`,`thin`],futureStyleIds:[],defaultFontWeight:900}],[`chisel`,{defaultShortPrefixId:`facr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`etch`,{defaultShortPrefixId:`faes`,defaultStyleId:`solid`,styleIds:[`solid`],futureStyleIds:[],defaultFontWeight:900}],[`graphite`,{defaultShortPrefixId:`fagt`,defaultStyleId:`thin`,styleIds:[`thin`],futureStyleIds:[],defaultFontWeight:100}],[`jelly`,{defaultShortPrefixId:`fajr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`jelly-duo`,{defaultShortPrefixId:`fajdr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`jelly-fill`,{defaultShortPrefixId:`fajfr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`notdog`,{defaultShortPrefixId:`fans`,defaultStyleId:`solid`,styleIds:[`solid`],futureStyleIds:[],defaultFontWeight:900}],[`notdog-duo`,{defaultShortPrefixId:`fands`,defaultStyleId:`solid`,styleIds:[`solid`],futureStyleIds:[],defaultFontWeight:900}],[`slab`,{defaultShortPrefixId:`faslr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`slab-press`,{defaultShortPrefixId:`faslpr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`thumbprint`,{defaultShortPrefixId:`fatl`,defaultStyleId:`light`,styleIds:[`light`],futureStyleIds:[],defaultFontWeight:300}],[`utility`,{defaultShortPrefixId:`fausb`,defaultStyleId:`semibold`,styleIds:[`semibold`],futureStyleIds:[],defaultFontWeight:600}],[`utility-duo`,{defaultShortPrefixId:`faudsb`,defaultStyleId:`semibold`,styleIds:[`semibold`],futureStyleIds:[],defaultFontWeight:600}],[`utility-fill`,{defaultShortPrefixId:`faufsb`,defaultStyleId:`semibold`,styleIds:[`semibold`],futureStyleIds:[],defaultFontWeight:600}],[`whiteboard`,{defaultShortPrefixId:`fawsb`,defaultStyleId:`semibold`,styleIds:[`semibold`],futureStyleIds:[],defaultFontWeight:600}]]),tt={chisel:{regular:`facr`},classic:{brands:`fab`,light:`fal`,regular:`far`,solid:`fas`,thin:`fat`},duotone:{light:`fadl`,regular:`fadr`,solid:`fad`,thin:`fadt`},etch:{solid:`faes`},graphite:{thin:`fagt`},jelly:{regular:`fajr`},"jelly-duo":{regular:`fajdr`},"jelly-fill":{regular:`fajfr`},notdog:{solid:`fans`},"notdog-duo":{solid:`fands`},sharp:{light:`fasl`,regular:`fasr`,solid:`fass`,thin:`fast`},"sharp-duotone":{light:`fasdl`,regular:`fasdr`,solid:`fasds`,thin:`fasdt`},slab:{regular:`faslr`},"slab-press":{regular:`faslpr`},thumbprint:{light:`fatl`},utility:{semibold:`fausb`},"utility-duo":{semibold:`faudsb`},"utility-fill":{semibold:`faufsb`},whiteboard:{semibold:`fawsb`}},nt=[`fak`,`fa-kit`,`fakd`,`fa-kit-duotone`],rt={kit:{fak:`kit`,"fa-kit":`kit`},"kit-duotone":{fakd:`kit-duotone`,"fa-kit-duotone":`kit-duotone`}},it=[`kit`];m(m({},`kit`,`Kit`),`kit-duotone`,`Kit Duotone`);var at={kit:{"fa-kit":`fak`},"kit-duotone":{"fa-kit-duotone":`fakd`}},ot={"Font Awesome Kit":{400:`fak`,normal:`fak`},"Font Awesome Kit Duotone":{400:`fakd`,normal:`fakd`}},st={kit:{fak:`fa-kit`},"kit-duotone":{fakd:`fa-kit-duotone`}},ct={kit:{kit:`fak`},"kit-duotone":{"kit-duotone":`fakd`}},lt,ut={GROUP:`duotone-group`,SWAP_OPACITY:`swap-opacity`,PRIMARY:`primary`,SECONDARY:`secondary`},dt=[`fa-classic`,`fa-duotone`,`fa-sharp`,`fa-sharp-duotone`,`fa-thumbprint`,`fa-whiteboard`,`fa-notdog`,`fa-notdog-duo`,`fa-chisel`,`fa-etch`,`fa-graphite`,`fa-jelly`,`fa-jelly-fill`,`fa-jelly-duo`,`fa-slab`,`fa-slab-press`,`fa-utility`,`fa-utility-duo`,`fa-utility-fill`];lt={},m(m(m(m(m(m(m(m(m(m(lt,`classic`,`Classic`),`duotone`,`Duotone`),`sharp`,`Sharp`),`sharp-duotone`,`Sharp Duotone`),`chisel`,`Chisel`),`etch`,`Etch`),`graphite`,`Graphite`),`jelly`,`Jelly`),`jelly-duo`,`Jelly Duo`),`jelly-fill`,`Jelly Fill`),m(m(m(m(m(m(m(m(m(lt,`notdog`,`Notdog`),`notdog-duo`,`Notdog Duo`),`slab`,`Slab`),`slab-press`,`Slab Press`),`thumbprint`,`Thumbprint`),`utility`,`Utility`),`utility-duo`,`Utility Duo`),`utility-fill`,`Utility Fill`),`whiteboard`,`Whiteboard`),m(m({},`kit`,`Kit`),`kit-duotone`,`Kit Duotone`);var ft={classic:{"fa-brands":`fab`,"fa-duotone":`fad`,"fa-light":`fal`,"fa-regular":`far`,"fa-solid":`fas`,"fa-thin":`fat`},duotone:{"fa-regular":`fadr`,"fa-light":`fadl`,"fa-thin":`fadt`},sharp:{"fa-solid":`fass`,"fa-regular":`fasr`,"fa-light":`fasl`,"fa-thin":`fast`},"sharp-duotone":{"fa-solid":`fasds`,"fa-regular":`fasdr`,"fa-light":`fasdl`,"fa-thin":`fasdt`},slab:{"fa-regular":`faslr`},"slab-press":{"fa-regular":`faslpr`},whiteboard:{"fa-semibold":`fawsb`},thumbprint:{"fa-light":`fatl`},notdog:{"fa-solid":`fans`},"notdog-duo":{"fa-solid":`fands`},etch:{"fa-solid":`faes`},graphite:{"fa-thin":`fagt`},jelly:{"fa-regular":`fajr`},"jelly-fill":{"fa-regular":`fajfr`},"jelly-duo":{"fa-regular":`fajdr`},chisel:{"fa-regular":`facr`},utility:{"fa-semibold":`fausb`},"utility-duo":{"fa-semibold":`faudsb`},"utility-fill":{"fa-semibold":`faufsb`}},pt={classic:[`fas`,`far`,`fal`,`fat`,`fad`],duotone:[`fadr`,`fadl`,`fadt`],sharp:[`fass`,`fasr`,`fasl`,`fast`],"sharp-duotone":[`fasds`,`fasdr`,`fasdl`,`fasdt`],slab:[`faslr`],"slab-press":[`faslpr`],whiteboard:[`fawsb`],thumbprint:[`fatl`],notdog:[`fans`],"notdog-duo":[`fands`],etch:[`faes`],graphite:[`fagt`],jelly:[`fajr`],"jelly-fill":[`fajfr`],"jelly-duo":[`fajdr`],chisel:[`facr`],utility:[`fausb`],"utility-duo":[`faudsb`],"utility-fill":[`faufsb`]},mt={classic:{fab:`fa-brands`,fad:`fa-duotone`,fal:`fa-light`,far:`fa-regular`,fas:`fa-solid`,fat:`fa-thin`},duotone:{fadr:`fa-regular`,fadl:`fa-light`,fadt:`fa-thin`},sharp:{fass:`fa-solid`,fasr:`fa-regular`,fasl:`fa-light`,fast:`fa-thin`},"sharp-duotone":{fasds:`fa-solid`,fasdr:`fa-regular`,fasdl:`fa-light`,fasdt:`fa-thin`},slab:{faslr:`fa-regular`},"slab-press":{faslpr:`fa-regular`},whiteboard:{fawsb:`fa-semibold`},thumbprint:{fatl:`fa-light`},notdog:{fans:`fa-solid`},"notdog-duo":{fands:`fa-solid`},etch:{faes:`fa-solid`},graphite:{fagt:`fa-thin`},jelly:{fajr:`fa-regular`},"jelly-fill":{fajfr:`fa-regular`},"jelly-duo":{fajdr:`fa-regular`},chisel:{facr:`fa-regular`},utility:{fausb:`fa-semibold`},"utility-duo":{faudsb:`fa-semibold`},"utility-fill":{faufsb:`fa-semibold`}},ht=`fa.fas.far.fal.fat.fad.fadr.fadl.fadt.fab.fass.fasr.fasl.fast.fasds.fasdr.fasdl.fasdt.faslr.faslpr.fawsb.fatl.fans.fands.faes.fagt.fajr.fajfr.fajdr.facr.fausb.faudsb.faufsb`.split(`.`).concat(dt,[`fa-solid`,`fa-regular`,`fa-light`,`fa-thin`,`fa-duotone`,`fa-brands`,`fa-semibold`]),gt=[`solid`,`regular`,`light`,`thin`,`duotone`,`brands`,`semibold`],_t=[1,2,3,4,5,6,7,8,9,10],vt=_t.concat([11,12,13,14,15,16,17,18,19,20]),yt=[].concat(S(Object.keys(pt)),gt,[`aw`,`fw`,`pull-left`,`pull-right`],[`2xs`,`xs`,`sm`,`lg`,`xl`,`2xl`,`beat`,`border`,`fade`,`beat-fade`,`bounce`,`flip-both`,`flip-horizontal`,`flip-vertical`,`flip`,`inverse`,`layers`,`layers-bottom-left`,`layers-bottom-right`,`layers-counter`,`layers-text`,`layers-top-left`,`layers-top-right`,`li`,`pull-end`,`pull-start`,`pulse`,`rotate-180`,`rotate-270`,`rotate-90`,`rotate-by`,`shake`,`spin-pulse`,`spin-reverse`,`spin`,`stack-1x`,`stack-2x`,`stack`,`ul`,`width-auto`,`width-fixed`,ut.GROUP,ut.SWAP_OPACITY,ut.PRIMARY,ut.SECONDARY],_t.map(function(e){return`${e}x`}),vt.map(function(e){return`w-${e}`})),bt={"Font Awesome 5 Free":{900:`fas`,400:`far`},"Font Awesome 5 Pro":{900:`fas`,400:`far`,normal:`far`,300:`fal`},"Font Awesome 5 Brands":{400:`fab`,normal:`fab`},"Font Awesome 5 Duotone":{900:`fad`}},N=`___FONT_AWESOME___`,xt=16,St=`fa`,Ct=`svg-inline--fa`,P=`data-fa-i2svg`,wt=`data-fa-pseudo-element`,Tt=`data-fa-pseudo-element-pending`,Et=`data-prefix`,Dt=`data-icon`,Ot=`fontawesome-i2svg`,kt=`async`,At=[`HTML`,`HEAD`,`STYLE`,`SCRIPT`],jt=[`::before`,`::after`,`:before`,`:after`],Mt=function(){try{return!0}catch{return!1}}();function Nt(e){return new Proxy(e,{get:function(e,t){return t in e?e[t]:e[M]}})}var Pt=b({},de);Pt[M]=b(b(b(b({},{"fa-duotone":`duotone`}),de[M]),rt.kit),rt[`kit-duotone`]);var Ft=Nt(Pt),It=b({},tt);It[M]=b(b(b(b({},{duotone:`fad`}),It[M]),ct.kit),ct[`kit-duotone`]);var Lt=Nt(It),Rt=b({},mt);Rt[M]=b(b({},Rt[M]),st.kit);var zt=Nt(Rt),Bt=b({},ft);Bt[M]=b(b({},Bt[M]),at.kit),Nt(Bt);var Vt=le,Ht=`fa-layers-text`,Ut=ue;Nt(b({},Qe));var Wt=[`class`,`data-prefix`,`data-icon`,`data-fa-transform`,`data-fa-mask`],Gt=fe,Kt=[].concat(S(it),S(yt)),qt=O.FontAwesomeConfig||{};function Jt(e){var t=k.querySelector(`script[`+e+`]`);if(t)return t.getAttribute(e)}function Yt(e){return e===``?!0:e===`false`?!1:e===`true`?!0:e}k&&typeof k.querySelector==`function`&&[[`data-family-prefix`,`familyPrefix`],[`data-css-prefix`,`cssPrefix`],[`data-family-default`,`familyDefault`],[`data-style-default`,`styleDefault`],[`data-replacement-class`,`replacementClass`],[`data-auto-replace-svg`,`autoReplaceSvg`],[`data-auto-add-css`,`autoAddCss`],[`data-search-pseudo-elements`,`searchPseudoElements`],[`data-search-pseudo-elements-warnings`,`searchPseudoElementsWarnings`],[`data-search-pseudo-elements-full-scan`,`searchPseudoElementsFullScan`],[`data-observe-mutations`,`observeMutations`],[`data-mutate-approach`,`mutateApproach`],[`data-keep-original-source`,`keepOriginalSource`],[`data-measure-performance`,`measurePerformance`],[`data-show-missing-icons`,`showMissingIcons`]].forEach(function(e){var t=x(e,2),n=t[0],r=t[1],i=Yt(Jt(n));i!=null&&(qt[r]=i)});var Xt={styleDefault:`solid`,familyDefault:M,cssPrefix:St,replacementClass:Ct,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:`async`,keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};qt.familyPrefix&&(qt.cssPrefix=qt.familyPrefix);var F=b(b({},Xt),qt);F.autoReplaceSvg||(F.observeMutations=!1);var I={};Object.keys(Xt).forEach(function(e){Object.defineProperty(I,e,{enumerable:!0,set:function(t){F[e]=t,L.forEach(function(e){return e(I)})},get:function(){return F[e]}})}),Object.defineProperty(I,`familyPrefix`,{enumerable:!0,set:function(e){F.cssPrefix=e,L.forEach(function(e){return e(I)})},get:function(){return F.cssPrefix}}),O.FontAwesomeConfig=I;var L=[];function Zt(e){return L.push(e),function(){L.splice(L.indexOf(e),1)}}var R=xt,z={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Qt(e){if(!(!e||!j)){var t=k.createElement(`style`);t.setAttribute(`type`,`text/css`),t.innerHTML=e;for(var n=k.head.childNodes,r=null,i=n.length-1;i>-1;i--){var a=n[i],o=(a.tagName||``).toUpperCase();[`STYLE`,`LINK`].indexOf(o)>-1&&(r=a)}return k.head.insertBefore(t,r),e}}var $t=`0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`;function en(){for(var e=12,t=``;e-- >0;)t+=$t[Math.random()*62|0];return t}function B(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function tn(e){return e.classList?B(e.classList):(e.getAttribute(`class`)||``).split(` `).filter(function(e){return e})}function nn(e){return`${e}`.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function rn(e){return Object.keys(e||{}).reduce(function(t,n){return t+`${n}="${nn(e[n])}" `},``).trim()}function an(e){return Object.keys(e||{}).reduce(function(t,n){return t+`${n}: ${e[n].trim()};`},``)}function on(e){return e.size!==z.size||e.x!==z.x||e.y!==z.y||e.rotate!==z.rotate||e.flipX||e.flipY}function sn(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth;return{outer:{transform:`translate(${n/2} 256)`},inner:{transform:`${`translate(${t.x*32}, ${t.y*32}) `} ${`scale(${t.size/16*(t.flipX?-1:1)}, ${t.size/16*(t.flipY?-1:1)}) `} ${`rotate(${t.rotate} 0 0)`}`},path:{transform:`translate(${r/2*-1} -256)`}}}function cn(e){var t=e.transform,n=e.width,r=n===void 0?xt:n,i=e.height,a=i===void 0?xt:i,o=e.startCentered,s=o===void 0?!1:o,c=``;return s&&se?c+=`translate(${t.x/R-r/2}em, ${t.y/R-a/2}em) `:s?c+=`translate(calc(-50% + ${t.x/R}em), calc(-50% + ${t.y/R}em)) `:c+=`translate(${t.x/R}em, ${t.y/R}em) `,c+=`scale(${t.size/R*(t.flipX?-1:1)}, ${t.size/R*(t.flipY?-1:1)}) `,c+=`rotate(${t.rotate}deg) `,c}var ln=`:root, :host {