okno 1.0.0-beta.54 → 1.0.0-beta.56

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 (83) hide show
  1. package/dist/DateInput-xykizuTE.js +5 -0
  2. package/dist/Doc-_8PDryTi.js +1 -0
  3. package/dist/{DocNote-CDSIRU5f.js → DocNote-Dz_ZcNuT.js} +1 -1
  4. package/dist/Files-JdMZMJBp.js +1 -0
  5. package/dist/Strings-D2QMjQqZ.js +1 -0
  6. package/dist/UI-BxtWNmLv.js +3 -0
  7. package/dist/ViewModeToggle-BoOtpxSR.js +6 -0
  8. package/dist/Windows-c6P1sOv4.js +135 -0
  9. package/dist/astro/index.js +1 -1
  10. package/dist/boot.js +89 -81
  11. package/dist/cli.js +2 -2
  12. package/dist/codegen/modules.d.ts.map +1 -1
  13. package/dist/contracts/bootstrap.d.ts +3 -0
  14. package/dist/contracts/bootstrap.d.ts.map +1 -1
  15. package/dist/contracts/index.d.ts +1 -1
  16. package/dist/contracts/index.d.ts.map +1 -1
  17. package/dist/contracts/permissions.d.ts +22 -6
  18. package/dist/contracts/permissions.d.ts.map +1 -1
  19. package/dist/contracts/routes.d.ts +1 -1
  20. package/dist/contracts/routes.d.ts.map +1 -1
  21. package/dist/core/index.d.ts +3 -0
  22. package/dist/core/index.d.ts.map +1 -1
  23. package/dist/core/label.d.ts +4 -0
  24. package/dist/core/label.d.ts.map +1 -0
  25. package/dist/core/operations.d.ts.map +1 -1
  26. package/dist/core/permissions.d.ts +26 -0
  27. package/dist/core/permissions.d.ts.map +1 -0
  28. package/dist/core/sample.d.ts +5 -0
  29. package/dist/core/sample.d.ts.map +1 -0
  30. package/dist/core/usage.d.ts +4 -0
  31. package/dist/core/usage.d.ts.map +1 -1
  32. package/dist/dispatch-8J1U5XmC.js +1419 -0
  33. package/dist/editor/index.js +1 -1
  34. package/dist/{encode-BHFEUCZ7.js → encode-EHnvycZZ.js} +18 -17
  35. package/dist/engine/index.js +91 -81
  36. package/dist/format-BLz4SuAo.js +120 -0
  37. package/dist/index-BJZ4AAWw.js +21 -0
  38. package/dist/{index-DKF0siIz.js → index-CfLK4WZQ.js} +8 -8
  39. package/dist/{index-q-7MEoHz.js → index-CoUiiRXQ.js} +1 -1
  40. package/dist/{index-B1PShnsc.js → index-CyH92tZh.js} +1 -1
  41. package/dist/index-_HDmM7wX.js +106 -0
  42. package/dist/index-lOMQLdGq.js +5 -0
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +1 -1
  46. package/dist/init.js +191 -187
  47. package/dist/mcp.js +4 -4
  48. package/dist/{merge-CmFBEzjm.js → merge-BP8xUT4T.js} +3 -3
  49. package/dist/merge-record-CiDd442J.js +39 -0
  50. package/dist/next/index.js +133 -133
  51. package/dist/okno.css +1 -1
  52. package/dist/operations-BTS0mCeT.js +1526 -0
  53. package/dist/permissions-thKetw54.js +153 -0
  54. package/dist/plugin-DbsQpw-O.js +573 -0
  55. package/dist/runtime/wrap.d.ts +1 -0
  56. package/dist/runtime/wrap.d.ts.map +1 -1
  57. package/dist/runtime/wrap.js +1617 -1524
  58. package/dist/storage-Cleq_BRM.js +137 -0
  59. package/dist/{store-BrJmX6JO.js → store-CJ2sqOKN.js} +6 -3
  60. package/dist/{upgrade-BVtnTG2H.js → upgrade-B2SR31KG.js} +1 -1
  61. package/dist/{usage-DQVm2KRP.js → usage-BqXS8PNM.js} +557 -552
  62. package/dist/vite/index.js +1 -1
  63. package/package.json +1 -1
  64. package/skills/connect-okno/SKILL.md +1 -1
  65. package/skills/connect-okno/references/content.md +3 -2
  66. package/src/runtime/wrap.ts +1 -0
  67. package/dist/DateInput-D2XRLTX-.js +0 -5
  68. package/dist/Doc-BLDgXNzl.js +0 -1
  69. package/dist/Files-Cvf0Qow0.js +0 -1
  70. package/dist/Strings-BwFrZV87.js +0 -1
  71. package/dist/UI-CxrqEmPx.js +0 -3
  72. package/dist/ViewModeToggle-TpusM90L.js +0 -6
  73. package/dist/Windows-Crz6gCb8.js +0 -129
  74. package/dist/dispatch-BgrxQuCC.js +0 -1393
  75. package/dist/format-BciVkjz-.js +0 -118
  76. package/dist/icon-symbol-D82I2EAb.js +0 -13
  77. package/dist/index-B2WzdTzI.js +0 -106
  78. package/dist/index-BLgOnMsp.js +0 -20
  79. package/dist/index-ButdD9Pf.js +0 -5
  80. package/dist/merge-record-C2RFnApc.js +0 -36
  81. package/dist/operations-SUiVw_7i.js +0 -1482
  82. package/dist/plugin-CMG6WRo0.js +0 -563
  83. package/dist/storage-Be89zpgh.js +0 -136
@@ -0,0 +1,5 @@
1
+ var Js=Object.defineProperty,un=e=>{throw TypeError(e)},qs=(e,t,n)=>t in e?Js(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t,n)=>qs(e,typeof t!="symbol"?t+"":t,n),br=(e,t,n)=>t.has(e)||un("Cannot "+n),p=(e,t,n)=>(br(e,t,"read from private field"),n?n.call(e):t.get(e)),b=(e,t,n)=>t.has(e)?un("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),St=(e,t,n,s)=>(br(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),Nt=(e,t,n)=>(br(e,t,"access private method"),n);import"svelte/internal/disclose-version";import"svelte/internal/flags/async";import*as r from"svelte/internal/client";import{a6 as Ks,a7 as Gs,y as Qs,a8 as Xs,F as hn,I as pn,o as fn,D as mn,B as ce,u as gn,z as ti}from"./index-BJZ4AAWw.js";import{tick as vn,untrack as at,hasContext as ei,getContext as de,setContext as ri,onMount as ni}from"svelte";import{on as yn}from"svelte/events";import{createSubscriber as si}from"svelte/reactivity";import{createAttachmentKey as ii}from"svelte/attachments";function wr(e){return e!==null&&typeof e=="object"}const ai=["string","number","bigint","boolean"];function Mr(e){return e==null||ai.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Mr(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Dr=Symbol("box"),oi=Symbol("is-writable");function M(e,t){const n=r.derived(e);return t?{[Dr]:!0,[oi]:!0,get current(){return r.get(n)},set current(s){t(s)}}:{[Dr]:!0,get current(){return e()}}}function li(e){return wr(e)&&Dr in e}function ci(...e){return function(t){var n;for(const s of e)if(s){if(t.defaultPrevented)return;typeof s=="function"?s.call(this,t):(n=s.current)==null||n.call(this,t)}}}var bn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,di=/\n/g,ui=/^\s*/,hi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,pi=/^:\s*/,fi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,mi=/^[;\s]*/,gi=/^\s+|\s+$/g,vi=`
2
+ `,wn="/",Mn="*",mt="",yi="comment",bi="declaration";function wi(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,s=1;function i(u){var m=u.match(di);m&&(n+=m.length);var $=u.lastIndexOf(vi);s=~$?u.length-$:s+u.length}function a(){var u={line:n,column:s};return function(m){return m.position=new o(u),f(),m}}function o(u){this.start=u,this.end={line:n,column:s},this.source=t.source}o.prototype.content=e;function c(u){var m=new Error(t.source+":"+n+":"+s+": "+u);if(m.reason=u,m.filename=t.source,m.line=n,m.column=s,m.source=e,!t.silent)throw m}function h(u){var m=u.exec(e);if(m){var $=m[0];return i($),e=e.slice($.length),m}}function f(){h(ui)}function g(u){var m;for(u=u||[];m=y();)m!==!1&&u.push(m);return u}function y(){var u=a();if(!(wn!=e.charAt(0)||Mn!=e.charAt(1))){for(var m=2;mt!=e.charAt(m)&&(Mn!=e.charAt(m)||wn!=e.charAt(m+1));)++m;if(m+=2,mt===e.charAt(m-1))return c("End of comment missing");var $=e.slice(2,m-2);return s+=2,i($),e=e.slice(m),s+=2,u({type:yi,comment:$})}}function d(){var u=a(),m=h(hi);if(m){if(y(),!h(pi))return c("property missing ':'");var $=h(fi),k=u({type:bi,property:Dn(m[0].replace(bn,mt)),value:$?Dn($[0].replace(bn,mt)):mt});return h(mi),k}}function l(){var u=[];g(u);for(var m;m=d();)m!==!1&&(u.push(m),g(u));return u}return f(),l()}function Dn(e){return e?e.replace(gi,mt):mt}function Mi(e,t){let n=null;if(!e||typeof e!="string")return n;const s=wi(e),i=typeof t=="function";return s.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:c}=a;i?t(o,c,a):c&&(n=n||{},n[o]=c)}),n}const Di=/\d/,ki=["-","_","/","."];function $i(e=""){if(!Di.test(e))return e!==e.toLowerCase()}function xi(e){const t=[];let n="",s,i;for(const a of e){const o=ki.includes(a);if(o===!0){t.push(n),n="",s=void 0;continue}const c=$i(a);if(i===!1){if(s===!1&&c===!0){t.push(n),n=a,s=c;continue}if(s===!0&&c===!1&&n.length>1){const h=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=h+a,s=c;continue}}n+=a,s=c,i=o}return t.push(n),t}function kn(e){return e?xi(e).map(t=>Ai(t)).join(""):""}function Si(e){return Ci(kn(e||""))}function Ai(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ci(e){return e?e[0].toLowerCase()+e.slice(1):""}function ue(e){if(!e)return{};const t={};function n(s,i){if(s.startsWith("-moz-")||s.startsWith("-webkit-")||s.startsWith("-ms-")||s.startsWith("-o-")){t[kn(s)]=i;return}if(s.startsWith("--")){t[s]=i;return}t[Si(s)]=i}return Mi(e,n),t}function _i(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function $n(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=$n(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function kr(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$n(e))&&(s&&(s+=" "),s+=t);return s}function Oi(e,t){const n=RegExp(e,"g");return s=>{if(typeof s!="string")throw new TypeError(`expected an argument of type string, but got ${typeof s}`);return s.match(n)?s.replace(n,t):s}}const Wi=Oi(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Ii(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Wi(t)}: ${e[t]};`).join(`
3
+ `)}function $r(e={}){return Ii(e).replace(`
4
+ `," ")}const Ei=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],Ti=new Set(Ei);function Vi(e){return Ti.has(e)}function H(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const s=e[n];if(s){for(const i of Object.keys(s)){const a=t[i],o=s[i],c=typeof a=="function",h=typeof o=="function";if(c&&Vi(i)){const f=a,g=o;t[i]=ci(f,g)}else if(c&&h)t[i]=_i(a,o);else if(i==="class"){const f=Mr(a),g=Mr(o);f&&g?t[i]=kr(a,o):f?t[i]=kr(a):g&&(t[i]=kr(o))}else if(i==="style"){const f=typeof a=="object",g=typeof o=="object",y=typeof a=="string",d=typeof o=="string";if(f&&g)t[i]={...a,...o};else if(f&&d){const l=ue(o);t[i]={...a,...l}}else if(y&&g){const l=ue(a);t[i]={...l,...o}}else if(y&&d){const l=ue(a),u=ue(o);t[i]={...l,...u}}else f?t[i]=a:g?t[i]=o:y?t[i]=a:d&&(t[i]=o)}else t[i]=o!==void 0?o:a}for(const i of Object.getOwnPropertySymbols(s)){const a=t[i],o=s[i];t[i]=o!==void 0?o:a}}}return typeof t.style=="object"&&(t.style=$r(t.style).replaceAll(`
5
+ `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const Fi={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},Pi=$r(Fi);function xn(e){vn().then(e)}const Bi=9;function Yi(e){return wr(e)&&e.nodeType===Bi}function Ui(e){var t;return wr(e)&&((t=e.constructor)==null?void 0:t.name)==="VisualViewport"}function Sn(e){return Yi(e)?e:Ui(e)?e.document:e?.ownerDocument??document}function Li(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var he;class Ni{constructor(t){w(this,"element"),b(this,he,r.derived(()=>this.element.current?this.element.current.getRootNode()??document:document)),w(this,"getDocument",()=>Sn(this.root)),w(this,"getWindow",()=>this.getDocument().defaultView??window),w(this,"getActiveElement",()=>Li(this.root)),w(this,"isActiveElement",n=>n===this.getActiveElement()),w(this,"querySelector",n=>this.root?this.root.querySelector(n):null),w(this,"querySelectorAll",n=>this.root?this.root.querySelectorAll(n):[]),w(this,"setTimeout",(n,s)=>this.getWindow().setTimeout(n,s)),w(this,"clearTimeout",n=>this.getWindow().clearTimeout(n)),typeof t=="function"?this.element=M(t):this.element=t}get root(){return r.get(p(this,he))}set root(t){r.set(p(this,he),t)}getElementById(t){return this.root.getElementById(t)}}he=new WeakMap;function z(e,t){return{[ii()]:n=>li(e)?(e.current=n,at(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e.current=null)}):(e(n),at(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||e(null)})}}const Zi=typeof window<"u"?window:void 0;function Ri(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var Zt,pe;class ji{constructor(t={}){b(this,Zt),b(this,pe);const{window:n=Zi,document:s=n?.document}=t;n!==void 0&&(St(this,Zt,s),St(this,pe,si(i=>{const a=yn(n,"focusin",i),o=yn(n,"focusout",i);return()=>{a(),o()}})))}get current(){var t;return(t=p(this,pe))==null||t.call(this),p(this,Zt)?Ri(p(this,Zt)):null}}Zt=new WeakMap,pe=new WeakMap,new ji;var fe,ot;class xr{constructor(t){b(this,fe),b(this,ot),St(this,fe,t),St(this,ot,Symbol(t))}get key(){return p(this,ot)}exists(){return ei(p(this,ot))}get(){const t=de(p(this,ot));if(t===void 0)throw new Error(`Context "${p(this,fe)}" not found`);return t}getOr(t){const n=de(p(this,ot));return n===void 0?t:n}set(t){return ri(p(this,ot),t)}}fe=new WeakMap,ot=new WeakMap;function Hi(e,t){switch(e){case"post":r.user_effect(t);break;case"pre":r.user_pre_effect(t);break}}function An(e,t,n,s={}){const{lazy:i=!1}=s;let a=!i,o=Array.isArray(e)?[]:void 0;Hi(t,()=>{const c=Array.isArray(e)?e.map(f=>f()):e();if(!a){a=!0,o=c;return}const h=at(()=>n(c,o));return o=c,h})}function At(e,t,n){An(e,"post",t,n)}function zi(e,t,n){An(e,"pre",t,n)}At.pre=zi;function gt(e){return e?"true":"false"}function Ji(e){return e?"true":void 0}function W(e){return e?"":void 0}var Rt,me;class qi{constructor(t){b(this,Rt),b(this,me),w(this,"attrs"),St(this,Rt,t.getVariant?t.getVariant():null),St(this,me,p(this,Rt)?`data-${p(this,Rt)}-`:`data-${t.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(n=>[n,this.getAttr(n)]))}getAttr(t,n){return n?`data-${n}-${t}`:`${p(this,me)}${t}`}selector(t,n){return`[${this.getAttr(t,n)}]`}}Rt=new WeakMap,me=new WeakMap;function Ki(e){const t=new qi(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Cn="ArrowDown",_n="ArrowLeft",On="ArrowRight",Wn="ArrowUp",Gi="Enter",Qi=" ",Sr=typeof document<"u";function jt(e){return e instanceof HTMLElement}function In(){}function q(e,t){return`bits-${e}`}const Xi=new xr("BitsConfig");function ta(){const e=new ea(null,{});return Xi.getOr(e).opts}class ea{constructor(t,n){w(this,"opts");const s=ra(t,n);this.opts={defaultPortalTo:s(i=>i.defaultPortalTo),defaultLocale:s(i=>i.defaultLocale)}}}function ra(e,t){return n=>M(()=>{var s,i;const a=(s=n(t))==null?void 0:s.current;if(a!==void 0)return a;if(e!==null)return(i=n(e.opts))==null?void 0:i.current})}function na(e,t){return n=>{const s=ta();return M(()=>{const i=n();if(i!==void 0)return i;const a=e(s).current;return a!==void 0?a:t})}}const sa=na(e=>e.defaultLocale,"en");function ia(e,t){const n=[];for(let s=0;s<e.length;s+=t)n.push(e.slice(s,s+t));return n}function Ar(e,t){return e>=0&&e<t.length}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function En(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}function Cr(e,t){return e-t*Math.floor(e/t)}const Tn=1721426;function ge(e,t,n,s){t=_r(e,t);let i=t-1,a=-2;return n<=2?a=0:ve(t)&&(a=-1),Tn-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+s)}function ve(e){return e%4===0&&(e%100!==0||e%400===0)}function _r(e,t){return e==="BC"?1-t:t}function aa(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const oa={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Ct{fromJulianDay(t){let n=t,s=n-Tn,i=Math.floor(s/146097),a=Cr(s,146097),o=Math.floor(a/36524),c=Cr(a,36524),h=Math.floor(c/1461),f=Cr(c,1461),g=Math.floor(f/365),y=i*400+o*100+h*4+g+(o!==4&&g!==4?1:0),[d,l]=aa(y),u=n-ge(d,l,1,1),m=2;n<ge(d,l,3,1)?m=0:ve(l)&&(m=1);let $=Math.floor(((u+m)*12+373)/367),k=n-ge(d,l,$,1)+1;return new yt(d,l,$,k)}toJulianDay(t){return ge(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return oa[ve(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return ve(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const la={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function lt(e,t){return t=N(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Or(e,t){return t=N(t,e.calendar),e=Ir(e),t=Ir(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function ca(e,t){var n,s;return((n=e.isEqual)==null?void 0:n.call(e,t))??((s=t.isEqual)==null?void 0:s.call(t,e))??e.identifier===t.identifier}function da(e,t){return lt(e,Fn(t))}function Vn(e,t,n){let s=e.calendar.toJulianDay(e),i=ga(t),a=Math.ceil(s+1-i)%7;return a<0&&(a+=7),a}function ua(e){return Q(Date.now(),e)}function Fn(e){return ba(ua(e))}function Pn(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ha(e,t){return Bn(e)-Bn(t)}function Bn(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Wr=null,pa=!1;function K(){return Wr==null&&(Wr=new Intl.DateTimeFormat().resolvedOptions().timeZone),Wr}function Yn(){return pa}function Ir(e){return e.subtract({days:e.day-1})}function fa(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}const Un=new Map,Er=new Map;function ma(e){if(Intl.Locale){let n=Un.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&Un.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function ga(e){let t=Er.get(e);if(!t){if(Intl.Locale){let s=new Intl.Locale(e);if("getWeekInfo"in s&&(t=s.getWeekInfo(),t))return Er.set(e,t),t.firstDay}let n=ma(e);if(e.includes("-fw-")){let s=e.split("-fw-")[1].split("-")[0];s==="mon"?t={firstDay:1}:s==="tue"?t={firstDay:2}:s==="wed"?t={firstDay:3}:s==="thu"?t={firstDay:4}:s==="fri"?t={firstDay:5}:s==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&la[n]||0};Er.set(e,t)}return t.firstDay}function ct(e){e=N(e,new Ct);let t=_r(e.era,e.year);return Ln(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Ln(e,t,n,s,i,a,o){let c=new Date;return c.setUTCHours(s,i,a,o),c.setUTCFullYear(e,t-1,n),c.getTime()}function Ht(e,t){if(t==="UTC")return 0;if(e>0&&t===K()&&!Yn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:s,day:i,hour:a,minute:o,second:c}=Zn(e,t);return Ln(n,s,i,a,o,c,0)-Math.floor(e/1e3)*1e3}const Nn=new Map;function Zn(e,t){let n=Nn.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Nn.set(t,n));let s=n.formatToParts(new Date(e)),i={};for(let a of s)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const ye=864e5;function va(e,t){let n=ct(e),s=n-Ht(n-ye,t),i=n-Ht(n+ye,t);return Rn(e,t,s,i)}function Rn(e,t,n,s){return(n===s?[n]:[n,s]).filter(i=>ya(e,t,i))}function ya(e,t,n){let s=Zn(n,t);return e.year===s.year&&e.month===s.month&&e.day===s.day&&e.hour===s.hour&&e.minute===s.minute&&e.second===s.second}function G(e,t,n="compatible"){let s=F(e);if(t==="UTC")return ct(s);if(t===K()&&n==="compatible"&&!Yn()){s=N(s,new Ct);let h=new Date,f=_r(s.era,s.year);return h.setFullYear(f,s.month-1,s.day),h.setHours(s.hour,s.minute,s.second,s.millisecond),h.getTime()}let i=ct(s),a=Ht(i-ye,t),o=Ht(i+ye,t),c=Rn(s,t,i-a,i-o);if(c.length===1)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-o);case"compatible":case"later":return Math.max(i-a,i-o);case"reject":throw new RangeError("No such absolute time found")}}function jn(e,t,n="compatible"){return new Date(G(e,t,n))}function Q(e,t){let n=Ht(e,t),s=new Date(e+n),i=s.getUTCFullYear(),a=s.getUTCMonth()+1,o=s.getUTCDate(),c=s.getUTCHours(),h=s.getUTCMinutes(),f=s.getUTCSeconds(),g=s.getUTCMilliseconds();return new dt(i<1?"BC":"AD",i<1?-i+1:i,a,o,t,n,c,h,f,g)}function ba(e){return new yt(e.calendar,e.era,e.year,e.month,e.day)}function F(e,t){let n=0,s=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:s,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:s,second:i,millisecond:a}=t),new _t(e.calendar,e.era,e.year,e.month,e.day,n,s,i,a)}function N(e,t){if(ca(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),s=e.copy();return s.calendar=t,s.era=n.era,s.year=n.year,s.month=n.month,s.day=n.day,vt(s),s}function wa(e,t,n){if(e instanceof dt)return e.timeZone===t?e:Hn(e,t);let s=G(e,t,n);return Q(s,t)}function Ma(e){let t=ct(e)-e.offset;return new Date(t)}function Hn(e,t){let n=ct(e)-e.offset;return N(Q(n,t),e.calendar)}const zt=36e5;function be(e,t){var n,s;let i=e.copy(),a="hour"in i?xa(i,t):0;Tr(i,t.years||0),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e),i.month+=t.months||0,Vr(i),zn(i),i.day+=(t.weeks||0)*7,i.day+=t.days||0,i.day+=a,Da(i),i.calendar.balanceDate&&i.calendar.balanceDate(i),i.year<1&&(i.year=1,i.month=1,i.day=1);let o=i.calendar.getYearsInEra(i);if(i.year>o){let h=(s=(n=i.calendar).isInverseEra)==null?void 0:s.call(n,i);i.year=o,i.month=h?1:i.calendar.getMonthsInYear(i),i.day=h?1:i.calendar.getDaysInMonth(i)}i.month<1&&(i.month=1,i.day=1);let c=i.calendar.getMonthsInYear(i);return i.month>c&&(i.month=c,i.day=i.calendar.getDaysInMonth(i)),i.day=Math.max(1,Math.min(i.calendar.getDaysInMonth(i),i.day)),i}function Tr(e,t){var n,s;(s=(n=e.calendar).isInverseEra)!=null&&s.call(n,e)&&(t=-t),e.year+=t}function Vr(e){for(;e.month<1;)Tr(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Tr(e,1)}function Da(e){for(;e.day<1;)e.month--,Vr(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Vr(e)}function zn(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function vt(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),zn(e)}function Jn(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function qn(e,t){return be(e,Jn(t))}function Fr(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),vt(n),n}function we(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),$a(n),n}function ka(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Me(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Me(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Me(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Me(e.hour,24),t}function $a(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Me(e,t){let n=e%t;return n<0&&(n+=t),n}function xa(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,ka(e)}function Pr(e,t,n,s){var i,a;let o=e.copy();switch(t){case"era":{let c=e.calendar.getEras(),h=c.indexOf(e.era);if(h<0)throw new Error("Invalid era: "+e.era);h=rt(h,n,0,c.length-1,s?.round),o.era=c[h],vt(o);break}case"year":(a=(i=o.calendar).isInverseEra)!=null&&a.call(i,o)&&(n=-n),o.year=rt(e.year,n,-1/0,9999,s?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=rt(e.month,n,1,e.calendar.getMonthsInYear(e),s?.round);break;case"day":o.day=rt(e.day,n,1,e.calendar.getDaysInMonth(e),s?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),vt(o),o}function Kn(e,t,n,s){let i=e.copy();switch(t){case"hour":{let a=e.hour,o=0,c=23;if(s?.hourCycle===12){let h=a>=12;o=h?12:0,c=h?23:11}i.hour=rt(a,n,o,c,s?.round);break}case"minute":i.minute=rt(e.minute,n,0,59,s?.round);break;case"second":i.second=rt(e.second,n,0,59,s?.round);break;case"millisecond":i.millisecond=rt(e.millisecond,n,0,999,s?.round);break;default:throw new Error("Unsupported field "+t)}return i}function rt(e,t,n,s,i=!1){if(i){e+=Math.sign(t),e<n&&(e=s);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>s&&(e=n)}else e+=t,e<n?e=s-(n-e-1):e>s&&(e=n+(e-s-1));return e}function Gn(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=be(F(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=G(i,e.timeZone)}else n=ct(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let s=Q(n,e.timeZone);return N(s,e.calendar)}function Sa(e,t){return Gn(e,Jn(t))}function Aa(e,t,n,s){switch(t){case"hour":{let i=0,a=23;if(s?.hourCycle===12){let u=e.hour>=12;i=u?12:0,a=u?23:11}let o=F(e),c=N(we(o,{hour:i}),new Ct),h=[G(c,e.timeZone,"earlier"),G(c,e.timeZone,"later")].filter(u=>Q(u,e.timeZone).day===c.day)[0],f=N(we(o,{hour:a}),new Ct),g=[G(f,e.timeZone,"earlier"),G(f,e.timeZone,"later")].filter(u=>Q(u,e.timeZone).day===f.day).pop(),y=ct(e)-e.offset,d=Math.floor(y/zt),l=y%zt;return y=rt(d,n,Math.floor(h/zt),Math.floor(g/zt),s?.round)*zt+l,N(Q(y,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Kn(e,t,n,s);case"era":case"year":case"month":case"day":{let i=Pr(F(e),t,n,s),a=G(i,e.timeZone);return N(Q(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function Ca(e,t,n){let s=F(e),i=we(Fr(s,t),t);if(i.compare(s)===0)return e;let a=G(i,e.timeZone,n);return N(Q(a,e.timeZone),e.calendar)}const _a=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Oa=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Wa=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Br=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function De(e){let t=e.match(_a);if(!t)throw Br.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let n=new yt(x(t[1],0,9999),x(t[2],1,12),1);return n.day=x(t[3],1,n.calendar.getDaysInMonth(n)),n}function Qn(e){let t=e.match(Oa);if(!t)throw Br.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let n=x(t[1],-9999,9999),s=n<1?"BC":"AD",i=new _t(s,n<1?-n+1:n,x(t[2],1,12),1,t[4]?x(t[4],0,23):0,t[5]?x(t[5],0,59):0,t[6]?x(t[6],0,59):0,t[7]?x(t[7],0,1/0)*1e3:0);return i.day=x(t[3],0,i.calendar.getDaysInMonth(i)),i}function Xn(e,t){let n=e.match(Wa);if(!n)throw new Error("Invalid ISO 8601 date time string: "+e);let s=x(n[1],-9999,9999),i=s<1?"BC":"AD",a=new dt(i,s<1?-s+1:s,x(n[2],1,12),1,n[11],0,n[4]?x(n[4],0,23):0,n[5]?x(n[5],0,59):0,n[6]?x(n[6],0,59):0,n[7]?x(n[7],0,1/0)*1e3:0);a.day=x(n[3],0,a.calendar.getDaysInMonth(a));let o=F(a),c;if(n[8]){let h=x(n[8],-23,23);if(a.offset=Math.sign(h)*(Math.abs(h)*36e5+x(n[9]??"0",0,59)*6e4+x(n[10]??"0",0,59)*1e3),c=ct(a)-a.offset,!va(o,a.timeZone).includes(c))throw new Error(`Offset ${es(a.offset)} is invalid for ${Yr(a)} in ${a.timeZone}`)}else c=G(F(o),a.timeZone,t);return Q(c,a.timeZone)}function Ia(e,t){let n=e.match(Br);if(!n)throw new Error("Invalid ISO 8601 date time string: "+e);let s=x(n[1],-9999,9999),i=s<1?"BC":"AD",a=new dt(i,s<1?-s+1:s,x(n[2],1,12),1,t,0,n[4]?x(n[4],0,23):0,n[5]?x(n[5],0,59):0,n[6]?x(n[6],0,59):0,n[7]?x(n[7],0,1/0)*1e3:0);return a.day=x(n[3],0,a.calendar.getDaysInMonth(a)),n[8]&&(a.offset=x(n[8],-23,23)*36e5+x(n[9]??"0",0,59)*6e4),Hn(a,t)}function x(e,t,n){let s=Number(e);if(s<t||s>n)throw new RangeError(`Value out of range: ${t} <= ${s} <= ${n}`);return s}function Ea(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function ts(e){let t=N(e,new Ct),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Yr(e){return`${ts(e)}T${Ea(e)}`}function es(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),s=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,"0")}:${String(s).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function Ta(e){return`${Yr(e)}${es(e.offset)}[${e.timeZone}]`}function Ur(e){let t=typeof e[0]=="object"?e.shift():new Ct,n;if(typeof e[0]=="string")n=e.shift();else{let o=t.getEras();n=o[o.length-1]}let s=e.shift(),i=e.shift(),a=e.shift();return[t,n,s,i,a]}var rs;const Va=class Kr{constructor(...t){b(this,rs);let[n,s,i,a,o]=Ur(t);this.calendar=n,this.era=s,this.year=i,this.month=a,this.day=o,vt(this)}copy(){return this.era?new Kr(this.calendar,this.era,this.year,this.month,this.day):new Kr(this.calendar,this.year,this.month,this.day)}add(t){return be(this,t)}subtract(t){return qn(this,t)}set(t){return Fr(this,t)}cycle(t,n,s){return Pr(this,t,n,s)}toDate(t){return jn(this,t)}toString(){return ts(this)}compare(t){return Pn(this,t)}};rs=new WeakMap;let yt=Va;var ns;const Fa=class Gr{constructor(...t){b(this,ns);let[n,s,i,a,o]=Ur(t);this.calendar=n,this.era=s,this.year=i,this.month=a,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,vt(this)}copy(){return this.era?new Gr(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Gr(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return be(this,t)}subtract(t){return qn(this,t)}set(t){return Fr(we(this,t),t)}cycle(t,n,s){switch(t){case"era":case"year":case"month":case"day":return Pr(this,t,n,s);default:return Kn(this,t,n,s)}}toDate(t,n){return jn(this,t,n)}toString(){return Yr(this)}compare(t){let n=Pn(this,t);return n===0?ha(this,F(t)):n}};ns=new WeakMap;let _t=Fa;var ss;const Pa=class Qr{constructor(...t){b(this,ss);let[n,s,i,a,o]=Ur(t),c=t.shift(),h=t.shift();this.calendar=n,this.era=s,this.year=i,this.month=a,this.day=o,this.timeZone=c,this.offset=h,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,vt(this)}copy(){return this.era?new Qr(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Qr(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return Gn(this,t)}subtract(t){return Sa(this,t)}set(t,n){return Ca(this,t,n)}cycle(t,n,s){return Aa(this,t,n,s)}toDate(){return Ma(this)}toString(){return Ta(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-wa(t,this.timeZone).toDate().getTime()}};ss=new WeakMap;let dt=Pa,Lr=new Map;class X{constructor(t,n={}){this.formatter=is(t,n),this.options=n}format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} \u2013 ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let s=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...s.map(a=>({...a,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return Ua()&&(this.resolvedHourCycle||(this.resolvedHourCycle=La(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}}const Ba={true:{ja:"h11"},false:{}};function is(e,t={}){if(typeof t.hour12=="boolean"&&Ya()){t={...t};let i=Ba[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Lr.has(n))return Lr.get(n);let s=new Intl.DateTimeFormat(e,t);return Lr.set(n,s),s}let Nr=null;function Ya(){return Nr==null&&(Nr=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Nr}let Zr=null;function Ua(){return Zr==null&&(Zr=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Zr}function La(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=is(e,{...t,timeZone:void 0}),s=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(s===0&&i===23)return"h23";if(s===24&&i===23)return"h24";if(s===0&&i===11)return"h11";if(s===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function Na(e){if(!Sr||!e)return null;let t=e.querySelector("[data-bits-announcer]");const n=s=>{const i=e.createElement("div");return i.role="log",i.ariaLive=s,i.setAttribute("aria-relevant","additions"),i};if(!jt(t)){const s=e.createElement("div");s.style.cssText=Pi,s.setAttribute("data-bits-announcer",""),s.appendChild(n("assertive")),s.appendChild(n("polite")),t=s,e.body.insertBefore(t,e.body.firstChild)}return{getLog:s=>{if(!jt(t))return null;const i=t.querySelector(`[aria-live="${s}"]`);return jt(i)?i:null}}}function as(e){const t=Na(e);function n(s,i="assertive",a=7500){if(!t||!Sr||!e)return;const o=t.getLog(i),c=e.createElement("div");return typeof s=="number"?s=s.toString():s===null?s="Empty":s=s.trim(),c.innerText=s,i==="assertive"?o?.replaceChildren(c):o?.appendChild(c),setTimeout(()=>{c.remove()},a)}return{announce:n}}const Za={defaultValue:void 0,granularity:"day"};function Ra(e){const t={...Za,...e},{defaultValue:n,granularity:s,minValue:i,maxValue:a}=t;if(Array.isArray(n)&&n.length)return n[n.length-1];if(n&&!Array.isArray(n))return n;{let o=new Date;i&&o<i.toDate(K())?o=i.toDate(K()):a&&o>a.toDate(K())&&(o=a.toDate(K()));const c=o.getFullYear(),h=o.getMonth()+1,f=o.getDate();return["hour","minute","second"].includes(s??"day")?new _t(c,h,f,0,0,0):new yt(c,h,f)}}function os(e,t){let n;return t instanceof dt?n=Xn(e):t instanceof _t?n=Qn(e):n=De(e),n.calendar!==t.calendar?N(n,t.calendar):n}function nt(e,t=K()){return e instanceof dt?e.toDate():e.toDate(t)}function ja(e){if(e instanceof yt)return"date";if(e instanceof _t)return"datetime";if(e instanceof dt)return"zoneddatetime";throw new Error("Unknown date type")}function Ha(e,t){switch(t){case"date":return De(e);case"datetime":return Qn(e);case"zoneddatetime":return Xn(e);default:throw new Error(`Unknown date type: ${t}`)}}function za(e){return e instanceof _t}function ls(e){return e instanceof dt}function Rr(e){return za(e)||ls(e)}function Ja(e){if(e instanceof Date){const t=e.getFullYear(),n=e.getMonth()+1;return new Date(t,n,0).getDate()}else return e.set({day:100}).day}function Jt(e,t){return e.compare(t)<0}function qa(e,t){return e.compare(t)>0}function cs(e,t,n){const s=Vn(e,n);return t>s?e.subtract({days:s+7-t}):t===s?e:e.subtract({days:s-t})}function ds(e,t,n){const s=Vn(e,n),i=t===0?6:t-1;return s===i?e:s>i?e.add({days:7-s+i}):e.add({days:i-s})}const Ka={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function Ga(e){let t=e.initialLocale;function n(l){t=l}function s(){return t}function i(l,u){return new X(t,u).format(l)}function a(l,u=!0){return Rr(l)&&u?i(nt(l),{dateStyle:"long",timeStyle:"long"}):i(nt(l),{dateStyle:"long"})}function o(l){if(typeof e.monthFormat.current!="function"&&typeof e.yearFormat.current!="function")return new X(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(l);const u=typeof e.monthFormat.current=="function"?e.monthFormat.current(l.getMonth()+1):new X(t,{month:e.monthFormat.current}).format(l),m=typeof e.yearFormat.current=="function"?e.yearFormat.current(l.getFullYear()):new X(t,{year:e.yearFormat.current}).format(l);return`${u} ${m}`}function c(l){return new X(t,{month:"long"}).format(l)}function h(l){return new X(t,{year:"numeric"}).format(l)}function f(l,u){return ls(l)?new X(t,{...u,timeZone:l.timeZone}).formatToParts(nt(l)):new X(t,u).formatToParts(nt(l))}function g(l,u="narrow"){return new X(t,{weekday:u}).format(l)}function y(l,u=void 0){var m;return((m=new X(t,{hour:"numeric",minute:"numeric",hourCycle:u===24?"h23":void 0}).formatToParts(l).find($=>$.type==="dayPeriod"))==null?void 0:m.value)==="PM"?"PM":"AM"}function d(l,u,m={}){const $={...Ka,...m},k=f(l,$).find(C=>C.type===u);return k?k.value:""}return{setLocale:n,getLocale:s,fullMonth:c,fullYear:h,fullMonthAndYear:o,toParts:f,custom:i,part:d,dayPeriod:y,selectedDate:a,dayOfWeek:g}}function Qa(e){return!(!jt(e)||!e.hasAttribute("data-bits-day"))}function us(e,t){const n=[];let s=e.add({days:1});const i=t;for(;s.compare(i)<0;)n.push(s),s=s.add({days:1});return n}function jr(e){const{dateObj:t,weekStartsOn:n,fixedWeeks:s,locale:i}=e,a=Ja(t),o=Array.from({length:a},($,k)=>t.set({day:k+1})),c=Ir(t),h=fa(t),f=n!==void 0?cs(c,n,"en-US"):cs(c,0,i),g=n!==void 0?ds(h,n,"en-US"):ds(h,0,i),y=us(f.subtract({days:1}),c),d=us(h,g.add({days:1})),l=y.length+o.length+d.length;if(s&&l<42){const $=42-l;let k=d[d.length-1];k||(k=t.add({months:1}).set({day:1}));let C=$;d.length===0&&(C=$-1,d.push(k));const S=Array.from({length:C},(P,B)=>{const et=B+1;return k.add({days:et})});d.push(...S)}const u=y.concat(o,d),m=ia(u,7);return{value:t,dates:u,weeks:m}}function qt(e){const{numberOfMonths:t,dateObj:n,...s}=e,i=[];if(!t||t===1)return i.push(jr({...s,dateObj:n})),i;i.push(jr({...s,dateObj:n}));for(let a=1;a<t;a++){const o=n.add({months:a});i.push(jr({...s,dateObj:o}))}return i}function Hr(e){return e?Array.from(e.querySelectorAll("[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])")).filter(t=>jt(t)):[]}function hs(e,t){const n=e.getAttribute("data-value");n&&(t.current=os(n,t.current))}function Xa({node:e,add:t,placeholder:n,calendarNode:s,isPrevButtonDisabled:i,isNextButtonDisabled:a,months:o,numberOfMonths:c}){var h,f;const g=Hr(s);if(!g.length)return;const y=g.indexOf(e)+t;if(Ar(y,g)){const d=g[y];return hs(d,n),d.focus()}if(y<0){if(i)return;const d=(h=o[0])==null?void 0:h.value;if(!d)return;n.current=d.subtract({months:c}),xn(()=>{const l=Hr(s);if(!l.length)return;const u=l.length-Math.abs(y);if(Ar(u,l)){const m=l[u];return hs(m,n),m.focus()}})}if(y>=g.length){if(a)return;const d=(f=o[0])==null?void 0:f.value;if(!d)return;n.current=d.add({months:c}),xn(()=>{const l=Hr(s);if(!l.length)return;const u=y-g.length;if(Ar(u,l))return l[u].focus()})}}const ps=[Cn,Wn,_n,On],fs=[Gi,Qi];function to({event:e,handleCellClick:t,shiftFocus:n,placeholderValue:s}){const i=e.target;if(!Qa(i)||!ps.includes(e.key)&&!fs.includes(e.key))return;e.preventDefault();const a={[Cn]:7,[Wn]:-7,[_n]:-1,[On]:1};if(ps.includes(e.key)){const o=a[e.key];o!==void 0&&n(i,o)}if(fs.includes(e.key)){const o=i.getAttribute("data-value");if(!o)return;t(e,os(o,s))}}function eo({months:e,setMonths:t,numberOfMonths:n,pagedNavigation:s,weekStartsOn:i,locale:a,fixedWeeks:o,setPlaceholder:c}){var h;const f=(h=e[0])==null?void 0:h.value;if(f)if(s)c(f.add({months:n}));else{const g=f.add({months:1}),y=qt({dateObj:g,weekStartsOn:i,locale:a,fixedWeeks:o,numberOfMonths:n});c(g),t(y)}}function ro({months:e,setMonths:t,numberOfMonths:n,pagedNavigation:s,weekStartsOn:i,locale:a,fixedWeeks:o,setPlaceholder:c}){var h;const f=(h=e[0])==null?void 0:h.value;if(f)if(s)c(f.subtract({months:n}));else{const g=f.subtract({months:1}),y=qt({dateObj:g,weekStartsOn:i,locale:a,fixedWeeks:o,numberOfMonths:n});c(g),t(y)}}function no({months:e,formatter:t,weekdayFormat:n}){if(!e.length)return[];const s=e[0].weeks[0];return s?s.map(i=>t.dayOfWeek(nt(i),n)):[]}function so(e){r.user_effect(()=>{const t=e.weekStartsOn.current,n=e.locale.current,s=e.fixedWeeks.current,i=e.numberOfMonths.current;at(()=>{const a=e.placeholder.current;if(!a)return;const o={weekStartsOn:t,locale:n,fixedWeeks:s,numberOfMonths:i};e.setMonths(qt({...o,dateObj:a}))})})}function io({calendarNode:e,label:t,accessibleHeadingId:n}){const s=Sn(e),i=s.createElement("div");i.style.cssText=$r({border:"0px",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute",whiteSpace:"nowrap",width:"1px"});const a=s.createElement("div");return a.textContent=t,a.id=n,a.role="heading",a.ariaLevel="2",e.insertBefore(i,e.firstChild),i.appendChild(a),()=>{var o;const c=s.getElementById(n);c&&((o=i.parentElement)==null||o.removeChild(i),c.remove())}}function ao({placeholder:e,getVisibleMonths:t,weekStartsOn:n,locale:s,fixedWeeks:i,numberOfMonths:a,setMonths:o}){r.user_effect(()=>{e.current,at(()=>{if(t().some(h=>Or(h,e.current)))return;const c={weekStartsOn:n.current,locale:s.current,fixedWeeks:i.current,numberOfMonths:a.current};o(qt({...c,dateObj:e.current}))})})}function oo({maxValue:e,months:t,disabled:n}){var s;if(!e||!t.length)return!1;if(n)return!0;const i=(s=t[t.length-1])==null?void 0:s.value;if(!i)return!1;const a=i.add({months:1}).set({day:1});return qa(a,e)}function lo({minValue:e,months:t,disabled:n}){var s;if(!e||!t.length)return!1;if(n)return!0;const i=(s=t[0])==null?void 0:s.value;if(!i)return!1;const a=i.subtract({months:1}).set({day:35});return Jt(a,e)}function co({months:e,locale:t,formatter:n}){if(!e.length)return"";if(t!==n.getLocale()&&n.setLocale(t),e.length===1){const f=nt(e[0].value);return`${n.fullMonthAndYear(f)}`}const s=nt(e[0].value),i=nt(e[e.length-1].value),a=n.fullMonth(s),o=n.fullMonth(i),c=n.fullYear(s),h=n.fullYear(i);return c===h?`${a} - ${o} ${h}`:`${a} ${c} - ${o} ${h}`}function uo({fullCalendarLabel:e,id:t,isInvalid:n,disabled:s,readonly:i}){return{id:t,role:"application","aria-label":e,"data-invalid":W(n),"data-disabled":W(s),"data-readonly":W(i)}}function ho(e){if(!Sr)return;const t=Array.from(e.querySelectorAll("[data-bits-day]:not([aria-disabled=true])"));if(t.length===0)return;const n=t[0],s=n?.getAttribute("data-value"),i=n?.getAttribute("data-type");if(!(!s||!i))return Ha(s,i)}function po({ref:e,placeholder:t,defaultPlaceholder:n,minValue:s,maxValue:i,isDateDisabled:a}){function o(c){return!!(a.current(c)||s.current&&Jt(c,s.current)||i.current&&Jt(i.current,c))}At(()=>e.current,()=>{e.current&&t.current&&lt(t.current,n)&&o(n)&&(t.current=ho(e.current)??n)})}function fo(e,t){return!e||!t?e:Rr(e)&&Rr(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}const mo=Ki({component:"calendar",parts:["root","grid","cell","next-button","prev-button","day","grid-body","grid-head","grid-row","head-cell","header","heading","month-select","year-select"]});function go(e){const t=new Date().getFullYear(),n=Math.max(e.placeholderYear,t);let s,i;if(e.minValue)s=e.minValue.year;else{const o=n-100;s=e.placeholderYear<o?e.placeholderYear-10:o}e.maxValue?i=e.maxValue.year:i=n+10,s>i&&(s=i);const a=i-s+1;return Array.from({length:a},(o,c)=>s+c)}const tt=new xr("Calendar.Root | RangeCalender.Root");var ke,$e,xe,Se,Ae,bt,ms,gs,vs,Ce,_e,Oe,We,Ie,zr,Ee,Te;const vo=class Ms{constructor(t){b(this,bt),w(this,"opts"),b(this,ke,r.derived(()=>this.months.map(n=>n.value))),w(this,"formatter"),w(this,"accessibleHeadingId",En()),w(this,"domContext"),w(this,"attachment"),b(this,$e,r.state(r.proxy([]))),w(this,"announcer"),b(this,xe,r.derived(()=>no({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}))),b(this,Se,r.derived(()=>at(()=>this.opts.placeholder.current.year))),b(this,Ae,r.derived(()=>go({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}))),b(this,Ce,r.derived(()=>oo({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}))),b(this,_e,r.derived(()=>lo({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}))),b(this,Oe,r.derived(()=>{const n=this.opts.value.current,s=this.opts.isDateDisabled.current,i=this.opts.isDateUnavailable.current;if(Array.isArray(n)){if(!n.length)return!1;for(const a of n)if(s(a)||i(a))return!0}else{if(!n)return!1;if(s(n)||i(n))return!0}return!1})),b(this,We,r.derived(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,co({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})))),b(this,Ie,r.derived(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`)),b(this,Ee,r.derived(()=>({months:this.months,weekdays:this.weekdays}))),w(this,"getBitsAttr",n=>mo.getAttr(n)),b(this,Te,r.derived(()=>({...uo({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr("root")]:"",onkeydown:this.onkeydown,...this.attachment}))),this.opts=t,this.attachment=z(this.opts.ref),this.domContext=new Ni(t.ref),this.announcer=as(null),this.formatter=Ga({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),ni(()=>{this.announcer=as(this.domContext.getDocument())}),this.months=qt({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),Nt(this,bt,ms).call(this),Nt(this,bt,gs).call(this),Nt(this,bt,vs).call(this),ao({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:n=>this.months=n}),so({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),At(()=>this.fullCalendarLabel,n=>{const s=this.domContext.getElementById(this.accessibleHeadingId);s&&(s.textContent=n)}),At(()=>this.opts.value.current,()=>{const n=this.opts.value.current;if(Array.isArray(n)&&n.length){const s=n[n.length-1];s&&this.opts.placeholder.current!==s&&(this.opts.placeholder.current=s)}else!Array.isArray(n)&&n&&this.opts.placeholder.current!==n&&(this.opts.placeholder.current=n)}),po({placeholder:t.placeholder,defaultPlaceholder:t.defaultPlaceholder,isDateDisabled:t.isDateDisabled,maxValue:t.maxValue,minValue:t.minValue,ref:t.ref})}static create(t){return tt.set(new Ms(t))}get visibleMonths(){return r.get(p(this,ke))}set visibleMonths(t){r.set(p(this,ke),t)}get months(){return r.get(p(this,$e))}set months(t){r.set(p(this,$e),t,!0)}setMonths(t){this.months=t}get weekdays(){return r.get(p(this,xe))}set weekdays(t){r.set(p(this,xe),t)}get initialPlaceholderYear(){return r.get(p(this,Se))}set initialPlaceholderYear(t){r.set(p(this,Se),t)}get defaultYears(){return r.get(p(this,Ae))}set defaultYears(t){r.set(p(this,Ae),t)}nextPage(){eo({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){ro({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:t=>this.opts.placeholder.current=t,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(t){this.opts.placeholder.current=this.opts.placeholder.current.set({year:t})}setMonth(t){this.opts.placeholder.current=this.opts.placeholder.current.set({month:t})}get isNextButtonDisabled(){return r.get(p(this,Ce))}set isNextButtonDisabled(t){r.set(p(this,Ce),t)}get isPrevButtonDisabled(){return r.get(p(this,_e))}set isPrevButtonDisabled(t){r.set(p(this,_e),t)}get isInvalid(){return r.get(p(this,Oe))}set isInvalid(t){r.set(p(this,Oe),t)}get headingValue(){return r.get(p(this,We))}set headingValue(t){r.set(p(this,We),t)}get fullCalendarLabel(){return r.get(p(this,Ie))}set fullCalendarLabel(t){r.set(p(this,Ie),t)}isOutsideVisibleMonths(t){return!this.visibleMonths.some(n=>Or(t,n))}isDateDisabled(t){if(this.opts.isDateDisabled.current(t)||this.opts.disabled.current)return!0;const n=this.opts.minValue.current,s=this.opts.maxValue.current;return!!(n&&Jt(t,n)||s&&Jt(s,t))}isDateSelected(t){const n=this.opts.value.current;return Array.isArray(n)?n.some(s=>lt(s,t)):n?lt(n,t):!1}shiftFocus(t,n){return Xa({node:t,add:n,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}handleCellClick(t,n){var s,i,a,o,c,h;if(this.opts.readonly.current||(i=(s=this.opts.isDateDisabled).current)!=null&&i.call(s,n)||(o=(a=this.opts.isDateUnavailable).current)!=null&&o.call(a,n))return;const f=this.opts.value.current;if(this.opts.type.current==="multiple")(Array.isArray(f)||f===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(f,n));else if(!Array.isArray(f)){const g=this.handleSingleUpdate(f,n);g?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(g,!1)}`,"polite"):this.announcer.announce("Selected date is now empty.","polite",5e3),this.opts.value.current=fo(g,f),g!==void 0&&((h=(c=this.opts.onDateSelect)==null?void 0:c.current)==null||h.call(c))}}handleMultipleUpdate(t,n){if(!t){const a=[n];return Nt(this,bt,zr).call(this,a)?a:[n]}if(!Array.isArray(t))return;const s=t.findIndex(a=>lt(a,n)),i=this.opts.preventDeselect.current;if(s===-1){const a=[...t,n];return Nt(this,bt,zr).call(this,a)?a:[n]}else{if(i)return t;{const a=t.filter(o=>!lt(o,n));if(!a.length){this.opts.placeholder.current=n;return}return a}}}handleSingleUpdate(t,n){if(!t)return n;if(!this.opts.preventDeselect.current&&lt(t,n)){this.opts.placeholder.current=n;return}return n}onkeydown(t){to({event:t,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}get snippetProps(){return r.get(p(this,Ee))}set snippetProps(t){r.set(p(this,Ee),t)}get props(){return r.get(p(this,Te))}set props(t){r.set(p(this,Te),t)}};ke=new WeakMap,$e=new WeakMap,xe=new WeakMap,Se=new WeakMap,Ae=new WeakMap,bt=new WeakSet,ms=function(){r.user_effect(()=>{var e;if(at(()=>this.opts.initialFocus.current)){const t=(e=this.opts.ref.current)==null?void 0:e.querySelector("[data-focused]");t&&t.focus()}})},gs=function(){r.user_effect(()=>this.opts.ref.current?io({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId}):void 0)},vs=function(){r.user_pre_effect(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})},Ce=new WeakMap,_e=new WeakMap,Oe=new WeakMap,We=new WeakMap,Ie=new WeakMap,zr=function(e){if(this.opts.type.current!=="multiple"||!this.opts.maxDays.current)return!0;const t=e.length;return!(this.opts.maxDays.current&&t>this.opts.maxDays.current)},Ee=new WeakMap,Te=new WeakMap;let yo=vo;var Ve;const bo=class Ds{constructor(t,n){w(this,"opts"),w(this,"root"),w(this,"attachment"),b(this,Ve,r.derived(()=>({id:this.opts.id.current,"aria-hidden":Ji(!0),"data-disabled":W(this.root.opts.disabled.current),"data-readonly":W(this.root.opts.readonly.current),[this.root.getBitsAttr("heading")]:"",...this.attachment}))),this.opts=t,this.root=n,this.attachment=z(this.opts.ref)}static create(t){return new Ds(t,tt.get())}get props(){return r.get(p(this,Ve))}set props(t){r.set(p(this,Ve),t)}};Ve=new WeakMap;let wo=bo;const ys=new xr("Calendar.Cell | RangeCalendar.Cell");var Fe,Pe,Be,Ye,Ue,Le,Ne,Ze,Re,je,He,ze,Je;const Mo=class ks{constructor(t,n){w(this,"opts"),w(this,"root"),b(this,Fe,r.derived(()=>nt(this.opts.date.current))),b(this,Pe,r.derived(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current))),b(this,Be,r.derived(()=>da(this.opts.date.current,K()))),b(this,Ye,r.derived(()=>!Or(this.opts.date.current,this.opts.month.current))),b(this,Ue,r.derived(()=>this.root.isOutsideVisibleMonths(this.opts.date.current))),b(this,Le,r.derived(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)),b(this,Ne,r.derived(()=>lt(this.opts.date.current,this.root.opts.placeholder.current))),b(this,Ze,r.derived(()=>this.root.isDateSelected(this.opts.date.current))),b(this,Re,r.derived(()=>this.root.formatter.custom(this.cellDate,{weekday:"long",month:"long",day:"numeric",year:"numeric"}))),w(this,"attachment"),b(this,je,r.derived(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}))),b(this,He,r.derived(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable)),b(this,ze,r.derived(()=>({"data-unavailable":W(this.isUnavailable),"data-today":this.isDateToday?"":void 0,"data-outside-month":this.isOutsideMonth?"":void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?"":void 0,"data-focused":this.isFocusedDate?"":void 0,"data-selected":W(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":ja(this.opts.date.current),"data-disabled":W(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}))),b(this,Je,r.derived(()=>({id:this.opts.id.current,role:"gridcell","aria-selected":gt(this.isSelectedDate),"aria-disabled":gt(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr("cell")]:"",...this.attachment}))),this.opts=t,this.root=n,this.attachment=z(this.opts.ref)}static create(t){return ys.set(new ks(t,tt.get()))}get cellDate(){return r.get(p(this,Fe))}set cellDate(t){r.set(p(this,Fe),t)}get isUnavailable(){return r.get(p(this,Pe))}set isUnavailable(t){r.set(p(this,Pe),t)}get isDateToday(){return r.get(p(this,Be))}set isDateToday(t){r.set(p(this,Be),t)}get isOutsideMonth(){return r.get(p(this,Ye))}set isOutsideMonth(t){r.set(p(this,Ye),t)}get isOutsideVisibleMonths(){return r.get(p(this,Ue))}set isOutsideVisibleMonths(t){r.set(p(this,Ue),t)}get isDisabled(){return r.get(p(this,Le))}set isDisabled(t){r.set(p(this,Le),t)}get isFocusedDate(){return r.get(p(this,Ne))}set isFocusedDate(t){r.set(p(this,Ne),t)}get isSelectedDate(){return r.get(p(this,Ze))}set isSelectedDate(t){r.set(p(this,Ze),t)}get labelText(){return r.get(p(this,Re))}set labelText(t){r.set(p(this,Re),t)}get snippetProps(){return r.get(p(this,je))}set snippetProps(t){r.set(p(this,je),t)}get ariaDisabled(){return r.get(p(this,He))}set ariaDisabled(t){r.set(p(this,He),t)}get sharedDataAttrs(){return r.get(p(this,ze))}set sharedDataAttrs(t){r.set(p(this,ze),t)}get props(){return r.get(p(this,Je))}set props(t){r.set(p(this,Je),t)}};Fe=new WeakMap,Pe=new WeakMap,Be=new WeakMap,Ye=new WeakMap,Ue=new WeakMap,Le=new WeakMap,Ne=new WeakMap,Ze=new WeakMap,Re=new WeakMap,je=new WeakMap,He=new WeakMap,ze=new WeakMap,Je=new WeakMap;let Do=Mo;var Jr,qe,Ke;const ko=class $s{constructor(t,n){w(this,"opts"),w(this,"cell"),w(this,"attachment"),b(this,Jr,r.derived(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1)),b(this,qe,r.derived(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}))),b(this,Ke,r.derived(()=>({id:this.opts.id.current,role:"button","aria-label":this.cell.labelText,"aria-disabled":gt(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:r.get(p(this,Jr)),[this.cell.root.getBitsAttr("day")]:"","data-bits-day":"",onclick:this.onclick,...this.attachment}))),this.opts=t,this.cell=n,this.onclick=this.onclick.bind(this),this.attachment=z(this.opts.ref)}static create(t){return new $s(t,ys.get())}onclick(t){this.cell.isDisabled||this.cell.root.handleCellClick(t,this.cell.opts.date.current)}get snippetProps(){return r.get(p(this,qe))}set snippetProps(t){r.set(p(this,qe),t)}get props(){return r.get(p(this,Ke))}set props(t){r.set(p(this,Ke),t)}};Jr=new WeakMap,qe=new WeakMap,Ke=new WeakMap;let $o=ko;var Ge,Qe;const xo=class xs{constructor(t,n){w(this,"opts"),w(this,"root"),b(this,Ge,r.derived(()=>this.root.isNextButtonDisabled)),w(this,"attachment"),b(this,Qe,r.derived(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Next","aria-disabled":gt(this.isDisabled),"data-disabled":W(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("next-button")]:"",onclick:this.onclick,...this.attachment}))),this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.attachment=z(this.opts.ref)}static create(t){return new xs(t,tt.get())}get isDisabled(){return r.get(p(this,Ge))}set isDisabled(t){r.set(p(this,Ge),t)}onclick(t){this.isDisabled||this.root.nextPage()}get props(){return r.get(p(this,Qe))}set props(t){r.set(p(this,Qe),t)}};Ge=new WeakMap,Qe=new WeakMap;let So=xo;var Xe,tr;const Ao=class Ss{constructor(t,n){w(this,"opts"),w(this,"root"),b(this,Xe,r.derived(()=>this.root.isPrevButtonDisabled)),w(this,"attachment"),b(this,tr,r.derived(()=>({id:this.opts.id.current,role:"button",type:"button","aria-label":"Previous","aria-disabled":gt(this.isDisabled),"data-disabled":W(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr("prev-button")]:"",onclick:this.onclick,...this.attachment}))),this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.attachment=z(this.opts.ref)}static create(t){return new Ss(t,tt.get())}get isDisabled(){return r.get(p(this,Xe))}set isDisabled(t){r.set(p(this,Xe),t)}onclick(t){this.isDisabled||this.root.prevPage()}get props(){return r.get(p(this,tr))}set props(t){r.set(p(this,tr),t)}};Xe=new WeakMap,tr=new WeakMap;let Co=Ao;var er;const _o=class As{constructor(t,n){w(this,"opts"),w(this,"root"),w(this,"attachment"),b(this,er,r.derived(()=>({id:this.opts.id.current,tabindex:-1,role:"grid","aria-readonly":gt(this.root.opts.readonly.current),"aria-disabled":gt(this.root.opts.disabled.current),"data-readonly":W(this.root.opts.readonly.current),"data-disabled":W(this.root.opts.disabled.current),[this.root.getBitsAttr("grid")]:"",...this.attachment}))),this.opts=t,this.root=n,this.attachment=z(this.opts.ref)}static create(t){return new As(t,tt.get())}get props(){return r.get(p(this,er))}set props(t){r.set(p(this,er),t)}};er=new WeakMap;let Oo=_o;var rr;const Wo=class Cs{constructor(t,n){w(this,"opts"),w(this,"root"),w(this,"attachment"),b(this,rr,r.derived(()=>({id:this.opts.id.current,"data-disabled":W(this.root.opts.disabled.current),"data-readonly":W(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-body")]:"",...this.attachment}))),this.opts=t,this.root=n,this.attachment=z(this.opts.ref)}static create(t){return new Cs(t,tt.get())}get props(){return r.get(p(this,rr))}set props(t){r.set(p(this,rr),t)}};rr=new WeakMap;let Io=Wo;var nr;const Eo=class _s{constructor(t,n){w(this,"opts"),w(this,"root"),w(this,"attachment"),b(this,nr,r.derived(()=>({id:this.opts.id.current,"data-disabled":W(this.root.opts.disabled.current),"data-readonly":W(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-head")]:"",...this.attachment}))),this.opts=t,this.root=n,this.attachment=z(this.opts.ref)}static create(t){return new _s(t,tt.get())}get props(){return r.get(p(this,nr))}set props(t){r.set(p(this,nr),t)}};nr=new WeakMap;let To=Eo;var sr;const Vo=class Os{constructor(t,n){w(this,"opts"),w(this,"root"),w(this,"attachment"),b(this,sr,r.derived(()=>({id:this.opts.id.current,"data-disabled":W(this.root.opts.disabled.current),"data-readonly":W(this.root.opts.readonly.current),[this.root.getBitsAttr("grid-row")]:"",...this.attachment}))),this.opts=t,this.root=n,this.attachment=z(this.opts.ref)}static create(t){return new Os(t,tt.get())}get props(){return r.get(p(this,sr))}set props(t){r.set(p(this,sr),t)}};sr=new WeakMap;let Fo=Vo;var ir;const Po=class Ws{constructor(t,n){w(this,"opts"),w(this,"root"),w(this,"attachment"),b(this,ir,r.derived(()=>({id:this.opts.id.current,"data-disabled":W(this.root.opts.disabled.current),"data-readonly":W(this.root.opts.readonly.current),[this.root.getBitsAttr("head-cell")]:"",...this.attachment}))),this.opts=t,this.root=n,this.attachment=z(this.opts.ref)}static create(t){return new Ws(t,tt.get())}get props(){return r.get(p(this,ir))}set props(t){r.set(p(this,ir),t)}};ir=new WeakMap;let Bo=Po;var Yo=new Set(["$$slots","$$events","$$legacy","child","children","id","ref","value","onValueChange","placeholder","onPlaceholderChange","weekdayFormat","weekStartsOn","pagedNavigation","isDateDisabled","isDateUnavailable","fixedWeeks","numberOfMonths","locale","calendarLabel","disabled","readonly","minValue","maxValue","preventDeselect","type","disableDaysOutsideMonth","initialFocus","maxDays","monthFormat","yearFormat"]),Uo=r.from_html("<div><!></div>");function Lo(e,t){r.push(t,!0);let n=r.prop(t,"id",19,En),s=r.prop(t,"ref",15,null),i=r.prop(t,"value",15),a=r.prop(t,"onValueChange",3,In),o=r.prop(t,"placeholder",15),c=r.prop(t,"onPlaceholderChange",3,In),h=r.prop(t,"weekdayFormat",3,"narrow"),f=r.prop(t,"pagedNavigation",3,!1),g=r.prop(t,"isDateDisabled",3,()=>!1),y=r.prop(t,"isDateUnavailable",3,()=>!1),d=r.prop(t,"fixedWeeks",3,!1),l=r.prop(t,"numberOfMonths",3,1),u=r.prop(t,"calendarLabel",3,"Event"),m=r.prop(t,"disabled",3,!1),$=r.prop(t,"readonly",3,!1),k=r.prop(t,"minValue",3,void 0),C=r.prop(t,"maxValue",3,void 0),S=r.prop(t,"preventDeselect",3,!1),P=r.prop(t,"disableDaysOutsideMonth",3,!0),B=r.prop(t,"initialFocus",3,!1),et=r.prop(t,"monthFormat",3,"long"),_=r.prop(t,"yearFormat",3,"numeric"),Kt=r.rest_props(t,Yo);const wt=Ra({defaultValue:i(),minValue:k(),maxValue:C()});function st(){o()===void 0&&o(wt)}st(),At.pre(()=>o(),()=>{st()});function Mt(){i()===void 0&&i(t.type==="single"?void 0:[])}Mt(),At.pre(()=>i(),()=>{Mt()});const Dt=yo.create({id:M(()=>n()),ref:M(()=>s(),O=>s(O)),weekdayFormat:M(()=>h()),weekStartsOn:M(()=>t.weekStartsOn),pagedNavigation:M(()=>f()),isDateDisabled:M(()=>g()),isDateUnavailable:M(()=>y()),fixedWeeks:M(()=>d()),numberOfMonths:M(()=>l()),locale:sa(()=>t.locale),calendarLabel:M(()=>u()),readonly:M(()=>$()),disabled:M(()=>m()),minValue:M(()=>k()),maxValue:M(()=>C()),disableDaysOutsideMonth:M(()=>P()),initialFocus:M(()=>B()),maxDays:M(()=>t.maxDays),placeholder:M(()=>o(),O=>{o(O),c()(O)}),preventDeselect:M(()=>S()),value:M(()=>i(),O=>{i(O),a()(O)}),type:M(()=>t.type),monthFormat:M(()=>et()),yearFormat:M(()=>_()),defaultPlaceholder:wt}),ut=r.derived(()=>H(Kt,Dt.props));var Gt=r.comment(),kt=r.first_child(Gt);{var Qt=O=>{var R=r.comment(),ht=r.first_child(R);{let Ot=r.derived(()=>({props:r.get(ut),...Dt.snippetProps}));r.snippet(ht,()=>t.child,()=>r.get(Ot))}r.append(O,R)},ar=O=>{var R=Uo();r.attribute_effect(R,()=>({...r.get(ut)}));var ht=r.child(R);r.snippet(ht,()=>t.children??r.noop,()=>Dt.snippetProps),r.reset(R),r.append(O,R)};r.if(kt,O=>{t.child?O(Qt):O(ar,-1)})}r.append(e,Gt),r.pop()}var No=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),Zo=r.from_html("<div><!></div>");function Ro(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"ref",15,null),i=r.prop(t,"id",19,()=>q(n)),a=r.rest_props(t,No);const o=$o.create({id:M(()=>i()),ref:M(()=>s(),d=>s(d))}),c=r.derived(()=>H(a,o.props));var h=r.comment(),f=r.first_child(h);{var g=d=>{var l=r.comment(),u=r.first_child(l);{let m=r.derived(()=>({props:r.get(c),...o.snippetProps}));r.snippet(u,()=>t.child,()=>r.get(m))}r.append(d,l)},y=d=>{var l=Zo();r.attribute_effect(l,()=>({...r.get(c)}));var u=r.child(l);{var m=k=>{var C=r.comment(),S=r.first_child(C);r.snippet(S,()=>t.children??r.noop,()=>o.snippetProps),r.append(k,C)},$=k=>{var C=r.text();r.template_effect(()=>r.set_text(C,o.cell.opts.date.current.day)),r.append(k,C)};r.if(u,k=>{t.children?k(m):k($,-1)})}r.reset(l),r.append(d,l)};r.if(f,d=>{t.child?d(g):d(y,-1)})}r.append(e,h),r.pop()}var jo=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),Ho=r.from_html("<table><!></table>");function zo(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"ref",15,null),i=r.prop(t,"id",19,()=>q(n)),a=r.rest_props(t,jo);const o=Oo.create({id:M(()=>i()),ref:M(()=>s(),d=>s(d))}),c=r.derived(()=>H(a,o.props));var h=r.comment(),f=r.first_child(h);{var g=d=>{var l=r.comment(),u=r.first_child(l);r.snippet(u,()=>t.child,()=>({props:r.get(c)})),r.append(d,l)},y=d=>{var l=Ho();r.attribute_effect(l,()=>({...r.get(c)}));var u=r.child(l);r.snippet(u,()=>t.children??r.noop),r.reset(l),r.append(d,l)};r.if(f,d=>{t.child?d(g):d(y,-1)})}r.append(e,h),r.pop()}var Jo=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),qo=r.from_html("<tbody><!></tbody>");function Ko(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"ref",15,null),i=r.prop(t,"id",19,()=>q(n)),a=r.rest_props(t,Jo);const o=Io.create({id:M(()=>i()),ref:M(()=>s(),d=>s(d))}),c=r.derived(()=>H(a,o.props));var h=r.comment(),f=r.first_child(h);{var g=d=>{var l=r.comment(),u=r.first_child(l);r.snippet(u,()=>t.child,()=>({props:r.get(c)})),r.append(d,l)},y=d=>{var l=qo();r.attribute_effect(l,()=>({...r.get(c)}));var u=r.child(l);r.snippet(u,()=>t.children??r.noop),r.reset(l),r.append(d,l)};r.if(f,d=>{t.child?d(g):d(y,-1)})}r.append(e,h),r.pop()}var Go=new Set(["$$slots","$$events","$$legacy","children","child","ref","id","date","month"]),Qo=r.from_html("<td><!></td>");function Xo(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"ref",15,null),i=r.prop(t,"id",19,()=>q(n)),a=r.rest_props(t,Go);const o=Do.create({id:M(()=>i()),ref:M(()=>s(),d=>s(d)),date:M(()=>t.date),month:M(()=>t.month)}),c=r.derived(()=>H(a,o.props));var h=r.comment(),f=r.first_child(h);{var g=d=>{var l=r.comment(),u=r.first_child(l);{let m=r.derived(()=>({props:r.get(c),...o.snippetProps}));r.snippet(u,()=>t.child,()=>r.get(m))}r.append(d,l)},y=d=>{var l=Qo();r.attribute_effect(l,()=>({...r.get(c)}));var u=r.child(l);r.snippet(u,()=>t.children??r.noop,()=>o.snippetProps),r.reset(l),r.append(d,l)};r.if(f,d=>{t.child?d(g):d(y,-1)})}r.append(e,h),r.pop()}var tl=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),el=r.from_html("<thead><!></thead>");function rl(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"ref",15,null),i=r.prop(t,"id",19,()=>q(n)),a=r.rest_props(t,tl);const o=To.create({id:M(()=>i()),ref:M(()=>s(),d=>s(d))}),c=r.derived(()=>H(a,o.props));var h=r.comment(),f=r.first_child(h);{var g=d=>{var l=r.comment(),u=r.first_child(l);r.snippet(u,()=>t.child,()=>({props:r.get(c)})),r.append(d,l)},y=d=>{var l=el();r.attribute_effect(l,()=>({...r.get(c)}));var u=r.child(l);r.snippet(u,()=>t.children??r.noop),r.reset(l),r.append(d,l)};r.if(f,d=>{t.child?d(g):d(y,-1)})}r.append(e,h),r.pop()}var nl=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),sl=r.from_html("<th><!></th>");function il(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"ref",15,null),i=r.prop(t,"id",19,()=>q(n)),a=r.rest_props(t,nl);const o=Bo.create({id:M(()=>i()),ref:M(()=>s(),d=>s(d))}),c=r.derived(()=>H(a,o.props));var h=r.comment(),f=r.first_child(h);{var g=d=>{var l=r.comment(),u=r.first_child(l);r.snippet(u,()=>t.child,()=>({props:r.get(c)})),r.append(d,l)},y=d=>{var l=sl();r.attribute_effect(l,()=>({...r.get(c)}));var u=r.child(l);r.snippet(u,()=>t.children??r.noop),r.reset(l),r.append(d,l)};r.if(f,d=>{t.child?d(g):d(y,-1)})}r.append(e,h),r.pop()}var al=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),ol=r.from_html("<tr><!></tr>");function bs(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"ref",15,null),i=r.prop(t,"id",19,()=>q(n)),a=r.rest_props(t,al);const o=Fo.create({id:M(()=>i()),ref:M(()=>s(),d=>s(d))}),c=r.derived(()=>H(a,o.props));var h=r.comment(),f=r.first_child(h);{var g=d=>{var l=r.comment(),u=r.first_child(l);r.snippet(u,()=>t.child,()=>({props:r.get(c)})),r.append(d,l)},y=d=>{var l=ol();r.attribute_effect(l,()=>({...r.get(c)}));var u=r.child(l);r.snippet(u,()=>t.children??r.noop),r.reset(l),r.append(d,l)};r.if(f,d=>{t.child?d(g):d(y,-1)})}r.append(e,h),r.pop()}var ll=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),cl=r.from_html("<div><!></div>");function dl(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"ref",15,null),i=r.prop(t,"id",19,()=>q(n)),a=r.rest_props(t,ll);const o=wo.create({id:M(()=>i()),ref:M(()=>s(),d=>s(d))}),c=r.derived(()=>H(a,o.props));var h=r.comment(),f=r.first_child(h);{var g=d=>{var l=r.comment(),u=r.first_child(l);r.snippet(u,()=>t.child,()=>({props:r.get(c),headingValue:o.root.headingValue})),r.append(d,l)},y=d=>{var l=cl();r.attribute_effect(l,()=>({...r.get(c)}));var u=r.child(l);{var m=k=>{var C=r.comment(),S=r.first_child(C);r.snippet(S,()=>t.children??r.noop,()=>({headingValue:o.root.headingValue})),r.append(k,C)},$=k=>{var C=r.text();r.template_effect(()=>r.set_text(C,o.root.headingValue)),r.append(k,C)};r.if(u,k=>{t.children?k(m):k($,-1)})}r.reset(l),r.append(d,l)};r.if(f,d=>{t.child?d(g):d(y,-1)})}r.append(e,h),r.pop()}var ul=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","tabindex"]),hl=r.from_html("<button><!></button>");function pl(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"id",19,()=>q(n)),i=r.prop(t,"ref",15,null),a=r.prop(t,"tabindex",3,0),o=r.rest_props(t,ul);const c=So.create({id:M(()=>s()),ref:M(()=>i(),l=>i(l))}),h=r.derived(()=>H(o,c.props,{tabindex:a()}));var f=r.comment(),g=r.first_child(f);{var y=l=>{var u=r.comment(),m=r.first_child(u);r.snippet(m,()=>t.child,()=>({props:r.get(h)})),r.append(l,u)},d=l=>{var u=hl();r.attribute_effect(u,()=>({...r.get(h)}));var m=r.child(u);r.snippet(m,()=>t.children??r.noop),r.reset(u),r.append(l,u)};r.if(g,l=>{t.child?l(y):l(d,-1)})}r.append(e,f),r.pop()}var fl=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","tabindex"]),ml=r.from_html("<button><!></button>");function gl(e,t){const n=r.props_id();r.push(t,!0);let s=r.prop(t,"id",19,()=>q(n)),i=r.prop(t,"ref",15,null),a=r.prop(t,"tabindex",3,0),o=r.rest_props(t,fl);const c=Co.create({id:M(()=>s()),ref:M(()=>i(),l=>i(l))}),h=r.derived(()=>H(o,c.props,{tabindex:a()}));var f=r.comment(),g=r.first_child(f);{var y=l=>{var u=r.comment(),m=r.first_child(u);r.snippet(m,()=>t.child,()=>({props:r.get(h)})),r.append(l,u)},d=l=>{var u=ml();r.attribute_effect(u,()=>({...r.get(h)}));var m=r.child(u);r.snippet(m,()=>t.children??r.noop),r.reset(u),r.append(l,u)};r.if(g,l=>{t.child?l(y):l(d,-1)})}r.append(e,f),r.pop()}function qr(e){const t=e.day.trim(),n=e.month.trim(),s=e.year.trim();if(!t&&!n&&!s)return{status:"empty"};if(!t||!n||!s)return{status:"incomplete"};const i={status:"invalid",message:"Enter a valid date"};if(!/^\d{1,2}$/.test(t)||!/^\d{1,2}$/.test(n)||!/^\d{1,4}$/.test(s))return i;const a=Number(t),o=Number(n),c=Number(s);if(a<1||a>31||o<1||o>12||c<1||c>9999)return i;const h=new yt(c,o,a);return h.day!==a||h.month!==o||h.year!==c?i:{status:"valid",day:a,month:o,year:c}}var vl=r.from_html('<span class="truncate"> </span>'),yl=r.from_html('<div class="mt-8 grid grid-cols-2 gap-6"></div>'),bl=r.from_html('<p class="field-error-text px-0 py-0 mt-8" role="alert"> </p>'),wl=r.from_html("<span> </span>"),Ml=r.from_html('<div class="flex flex-col gap-2"></div>'),ws=r.from_html("<!> <!>",1),Dl=r.from_html('<div class="mb-8 flex items-center justify-between gap-2"><!> <!> <div class="flex min-w-0 items-center"><!> <!></div> <!></div> <!>',1),kl=r.from_html('<figure class="bg-noise" aria-hidden="true"></figure> <div class="p-12"><div class="grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_minmax(0,1.4fr)] gap-6"></div> <!> <!></div> <div class="group-divider w-full! translate-x-0!" role="separator"></div> <!>',1);function $l(e,t){var n,s;r.push(t,!0);let i=r.prop(t,"time",3,!1),a=r.prop(t,"locale",19,()=>typeof navigator<"u"?navigator.language:"en-US"),o=r.prop(t,"invalid",3,!1),c=r.prop(t,"label",3,""),h=r.prop(t,"required",3,!1),f=r.prop(t,"muted",3,!1),g=r.state(!1);Ks((s=(n=de("app"))==null?void 0:n.modules)==null?void 0:s.windowStack,()=>r.set(g,!1));const y=de(Gs);let d=r.state(null);const l=v=>(r.set(d,v,!0),()=>{r.get(d)===v&&r.set(d,null)}),u=r.derived(()=>({"aria-haspopup":"dialog","aria-expanded":r.get(g),"data-state":r.get(g)?"open":"closed",onclick:()=>r.set(g,!r.get(g))}));function m(v){var D;Vs(v),v&&(r.set(g,!1),(D=r.get(d))==null||D.focus())}const $=K();function k(v){if(v)try{return i()?/^\d{4}-\d{2}-\d{2}$/.test(v)?F(De(v)):F(Ia(v,$)):De(v.slice(0,10))}catch{return}}function C(v){return i()?F(v).toDate($,"compatible").toISOString():v.toString()}let S=r.state(r.proxy(k(t.value))),P=r.state(r.proxy(O(r.get(S)))),B=r.state(r.proxy(R(r.get(S)))),et=!1,_=r.state(r.proxy(r.get(S)??Fn(K()))),Kt=t.value,wt=i(),st,Mt=r.state(void 0);const Dt=r.derived(()=>qr(r.get(P))),ut=r.derived(()=>r.get(Dt).status==="invalid"?r.get(Dt).message:""),Gt=r.derived(()=>ht(r.get(B))),kt=r.derived(()=>i()&&r.get(Gt).status==="invalid"?"Enter a valid time":""),Qt=r.derived(()=>Array.from({length:12},(v,D)=>({value:D+1,label:new Intl.DateTimeFormat(a(),{month:"long"}).format(new Date(2e3,D,1))}))),ar=r.derived(()=>Array.from({length:Math.min(9999,r.get(_).year+50)-Math.max(1,r.get(_).year-50)+1},(v,D)=>Math.max(1,r.get(_).year-50)+D));function O(v){return v?{day:String(v.day),month:String(v.month),year:String(v.year)}:{day:"",month:"",year:""}}function R(v){return v&&"hour"in v?{hour:String(v.hour).padStart(2,"0"),minute:String(v.minute).padStart(2,"0")}:{hour:"",minute:""}}function ht(v){const D=v.hour.trim(),A=v.minute.trim();return!D&&!A?{status:"empty"}:!D||!A?{status:"incomplete"}:!/^\d{1,2}$/.test(D)||!/^\d{1,2}$/.test(A)||Number(D)>23||Number(A)>59?{status:"invalid"}:{status:"valid",hour:Number(D),minute:Number(A)}}r.user_effect(()=>{const v=t.value,D=i();at(()=>{if(v===Kt&&D===wt)return;const A=v===st&&D===wt;Kt=v,wt=D,st=void 0,!A&&(r.set(S,k(v),!0),r.set(P,O(r.get(S)),!0),r.set(B,R(r.get(S)),!0),et=!1,r.get(S)&&r.set(_,r.get(S),!0))})}),r.user_effect(()=>{const v=r.get(Mt);if(!v)return;let D=!0;return vn().then(()=>{var A;D&&((A=v.querySelector("[data-current-year]"))==null||A.scrollIntoView({block:"center"}))}),()=>{D=!1}});function Ot(v){if(r.set(S,v,!0),st=v?C(v):"",!v)r.set(B,{hour:"",minute:""},!0),et=!1;else if(i()){const D=k(st);D.compare(v)!==0&&(r.set(S,D,!0),r.set(P,O(D),!0),r.set(_,D,!0)),r.set(B,R(r.get(S)),!0)}t.onchange(st)}function Xr(){const v=qr(r.get(P));if(v.status==="empty"){(r.get(S)||t.value)&&Ot(void 0);return}if(v.status!=="valid")return;let D=r.get(S)?r.get(S).set({day:v.day,month:v.month,year:v.year}):new yt(v.year,v.month,v.day);if(i()){const A=ht(r.get(B));if(A.status==="valid")D=F(D).set({hour:A.hour,minute:A.minute});else if(A.status==="empty"&&!et)D=F(D);else return}r.set(_,D,!0),Ot(D)}function Is(v,D){r.set(P,{...r.get(P),[v]:D},!0),Xr()}function Es(v,D){et=!0,r.set(B,{...r.get(B),[v]:D},!0),qr(r.get(P)).status==="valid"&&Xr()}const Ts=r.derived(()=>r.get(S)?new Intl.DateTimeFormat(a(),{day:"numeric",month:"short",year:"numeric",hour:i()?"2-digit":void 0,minute:i()?"2-digit":void 0,hourCycle:i()?"h23":void 0,timeZone:$}).format(r.get(S).toDate($)):"Select date");function Vs(v){if(i()&&v){let D=F(v);const A=ht(r.get(B));if(A.status==="valid")D=D.set({hour:A.hour,minute:A.minute});else if(et){r.set(S,D,!0),r.set(P,O(D),!0),r.set(_,D,!0);return}v=D}r.set(P,O(v),!0),v&&r.set(_,v,!0),Ot(v)}const Fs="size-32! touch:size-42! p-0! font-normal data-selected:bg-sky-500! data-selected:text-white! data-selected:hover:bg-sky-500! data-today:border data-today:border-(--hairline) data-outside-month:opacity-40 data-unavailable:line-through";var tn=ws(),en=r.first_child(tn);Qs(en,{children:(v,D)=>{{const A=Xt=>{{let It=r.derived(()=>`Choose ${(c()||"date").toLowerCase()}`),Et=r.derived(()=>`gap-8 max-w-220 ${f()?"opacity-55 focus:opacity-100":""}`);ce(Xt,r.spread_props({[r.attachment()]:l},()=>r.get(u),{tone:"idle",ghost:!0,icon:"calendar",get"aria-label"(){return r.get(It)},get"aria-invalid"(){return o()},get class(){return r.get(Et)},children:(te,rn)=>{var Tt=vl(),or=r.child(Tt,!0);r.reset(Tt),r.template_effect(()=>r.set_text(or,r.get(Ts))),r.append(te,Tt)},$$slots:{default:!0}}))}};let Wt=r.derived(()=>c()||"Date");ti(v,{get title(){return r.get(Wt)},get required(){return h()},get titleMenu(){return t.menu},get titleEnd(){return t.titleEnd},paddingEnd:"pr-4",end:A,$$slots:{end:!0}})}}});var Ps=r.sibling(en,2);{let v=r.derived(()=>c()?`${c()} calendar`:"Calendar"),D=r.derived(()=>y?.());Xs(Ps,{get open(){return r.get(g)},get anchor(){return r.get(d)},side:"bottom",align:"end",offset:8,cap:720,ondismiss:A=>{var Wt;r.set(g,!1),A==="escape"&&((Wt=r.get(d))==null||Wt.focus())},role:"dialog",get"aria-label"(){return r.get(v)},get"data-tint"(){return r.get(D)},class:"superellipse surface backdrop-blur-xl z-[calc(var(--infinity,2147480000))] rounded-[28px] w-248 touch:w-318 overflow-clip",children:(A,Wt)=>{var Xt=kl(),It=r.sibling(r.first_child(Xt),2),Et=r.child(It);r.each(Et,20,()=>[{part:"day",label:"Day",min:1,max:31},{part:"month",label:"Month",min:1,max:12},{part:"year",label:"Year",min:0,max:9999}],Y=>Y.part,(Y,E)=>{const T=r.derived(()=>E.part);{let J=r.derived(()=>!!r.get(ut));hn(Y,{get label(){return E.label},get invalid(){return r.get(J)},class:"min-w-0",children:($t,Vt)=>{{let pt=r.derived(()=>o()||!!r.get(ut));pn($t,{class:"min-w-0",get value(){return r.get(P)[r.get(T)]},get"aria-label"(){return E.label},type:"number",get min(){return E.min},get max(){return E.max},step:1,stepButtons:!1,get invalid(){return r.get(pt)},oninput:Ft=>Is(r.get(T),Ft.target.value)})}},$$slots:{default:!0}})}}),r.reset(Et);var te=r.sibling(Et,2);{var rn=Y=>{var E=yl();r.each(E,20,()=>[{part:"hour",label:"Hour",max:23},{part:"minute",label:"Minute",max:59}],T=>T.part,(T,J)=>{const $t=r.derived(()=>J.part);{let Vt=r.derived(()=>!!r.get(kt));hn(T,{get label(){return J.label},get invalid(){return r.get(Vt)},class:"min-w-0",children:(pt,Ft)=>{{let ee=r.derived(()=>o()||!!r.get(kt));pn(pt,{class:"min-w-0",get value(){return r.get(B)[r.get($t)]},get"aria-label"(){return J.label},type:"number",min:0,get max(){return J.max},step:1,stepButtons:!1,get invalid(){return r.get(ee)},oninput:Pt=>Es(r.get($t),Pt.target.value)})}},$$slots:{default:!0}})}}),r.reset(E),r.append(Y,E)};r.if(te,Y=>{i()&&Y(rn)})}var Tt=r.sibling(te,2);{var or=Y=>{var E=bl(),T=r.child(E,!0);r.reset(E),r.template_effect(()=>r.set_text(T,r.get(ut)||r.get(kt))),r.append(Y,E)};r.if(Tt,Y=>{(r.get(ut)||r.get(kt))&&Y(or)})}r.reset(It);var Bs=r.sibling(It,4);{const Y=(E,T)=>{let J=()=>T?.().months,$t=()=>T?.().weekdays;var Vt=Dl(),pt=r.first_child(Vt),Ft=r.child(pt);{const j=(I,V)=>{let U=()=>V?.().props;ce(I,r.spread_props(U,{tone:"idle",iconOnly:!0,children:(L,Z)=>{gn(L,{name:"chevron-left-standard",size:18,strokeWidth:1.5,class:"-translate-x-1"})},$$slots:{default:!0}}))};r.component(Ft,()=>gl,(I,V)=>{V(I,{child:j,$$slots:{child:!0}})})}var ee=r.sibling(Ft,2);r.component(ee,()=>dl,(j,I)=>{I(j,{class:"sr-only"})});var Pt=r.sibling(ee,2),nn=r.child(Pt);{let j=r.derived(()=>{var I;return(I=r.get(Qt)[r.get(_).month-1])==null?void 0:I.label});fn(nn,{get label(){return r.get(j)},"aria-label":"Choose month",ghost:!0,chevron:!1,align:"center",children:(I,V)=>{var U=r.comment(),L=r.first_child(U);r.each(L,17,()=>r.get(Qt),Z=>Z.value,(Z,ft)=>{{let re=r.derived(()=>r.get(_).month===r.get(ft).value);mn(Z,{get selected(){return r.get(re)},onclick:()=>{r.set(_,r.get(_).set({month:r.get(ft).value}),!0)},children:(Bt,it)=>{r.next();var xt=r.text();r.template_effect(()=>r.set_text(xt,r.get(ft).label)),r.append(Bt,xt)},$$slots:{default:!0}})}}),r.append(I,U)},$$slots:{default:!0}})}var Ys=r.sibling(nn,2);{let j=r.derived(()=>String(r.get(_).year));fn(Ys,{get label(){return r.get(j)},"aria-label":"Choose year",ghost:!0,chevron:!1,align:"center",children:(I,V)=>{var U=Ml();r.each(U,20,()=>r.get(ar),L=>L,(L,Z)=>{{let ft=r.derived(()=>r.get(_).year===Z);mn(L,{get selected(){return r.get(ft)},onclick:()=>{r.set(_,r.get(_).set({year:Z}),!0)},children:(re,Bt)=>{var it=wl(),xt=r.child(it,!0);r.reset(it),r.template_effect(()=>{r.set_attribute(it,"data-current-year",r.get(_).year===Z?"":void 0),r.set_text(xt,Z)}),r.append(re,it)},$$slots:{default:!0}})}}),r.reset(U),r.bind_this(U,L=>r.set(Mt,L),()=>r.get(Mt)),r.append(I,U)},$$slots:{default:!0}})}r.reset(Pt);var Us=r.sibling(Pt,2);{const j=(I,V)=>{let U=()=>V?.().props;ce(I,r.spread_props(U,{tone:"idle",iconOnly:!0,children:(L,Z)=>{gn(L,{name:"chevron-right-standard",size:18,strokeWidth:1.5,class:"translate-x-1"})},$$slots:{default:!0}}))};r.component(Us,()=>pl,(I,V)=>{V(I,{child:j,$$slots:{child:!0}})})}r.reset(pt);var Ls=r.sibling(pt,2);r.each(Ls,17,J,r.index,(j,I)=>{var V=r.comment(),U=r.first_child(V);r.component(U,()=>zo,(L,Z)=>{Z(L,{class:"w-full border-collapse",children:(ft,re)=>{var Bt=ws(),it=r.first_child(Bt);r.component(it,()=>rl,(lr,cr)=>{cr(lr,{children:(dr,Ns)=>{var Yt=r.comment(),ur=r.first_child(Yt);r.component(ur,()=>bs,(hr,pr)=>{pr(hr,{class:"flex",children:(ne,sn)=>{var se=r.comment(),fr=r.first_child(se);r.each(fr,16,$t,Ut=>Ut,(Ut,an)=>{var Lt=r.comment(),mr=r.first_child(Lt);r.component(mr,()=>il,(gr,ie)=>{ie(gr,{class:"flex-center size-32 touch:size-42 text-[11px] font-normal text-(--fg-muted)",children:(ae,on)=>{r.next();var oe=r.text();r.template_effect(vr=>r.set_text(oe,vr),[()=>an.slice(0,2)]),r.append(ae,oe)},$$slots:{default:!0}})}),r.append(Ut,Lt)}),r.append(ne,se)},$$slots:{default:!0}})}),r.append(dr,Yt)},$$slots:{default:!0}})});var xt=r.sibling(it,2);r.component(xt,()=>Ko,(lr,cr)=>{cr(lr,{children:(dr,Ns)=>{var Yt=r.comment(),ur=r.first_child(Yt);r.each(ur,17,()=>r.get(I).weeks,r.index,(hr,pr)=>{var ne=r.comment(),sn=r.first_child(ne);r.component(sn,()=>bs,(se,fr)=>{fr(se,{class:"flex",children:(Ut,an)=>{var Lt=r.comment(),mr=r.first_child(Lt);r.each(mr,17,()=>r.get(pr),r.index,(gr,ie)=>{var ae=r.comment(),on=r.first_child(ae);r.component(on,()=>Xo,(oe,vr)=>{vr(oe,{get date(){return r.get(ie)},get month(){return r.get(I).value},class:"p-0",children:(Zs,xl)=>{var ln=r.comment(),Rs=r.first_child(ln);{const js=(yr,le)=>{let cn=()=>le?.().props;{let Hs=r.derived(()=>cn()["aria-disabled"]==="true");ce(yr,r.spread_props(cn,{get disabled(){return r.get(Hs)},tone:"idle",ghost:!0,class:Fs,children:(zs,Sl)=>{r.next();var dn=r.text();r.template_effect(()=>r.set_text(dn,r.get(ie).day)),r.append(zs,dn)},$$slots:{default:!0}}))}};r.component(Rs,()=>Ro,(yr,le)=>{le(yr,{child:js,$$slots:{child:!0}})})}r.append(Zs,ln)},$$slots:{default:!0}})}),r.append(gr,ae)}),r.append(Ut,Lt)},$$slots:{default:!0}})}),r.append(hr,ne)}),r.append(dr,Yt)},$$slots:{default:!0}})}),r.append(ft,Bt)},$$slots:{default:!0}})}),r.append(j,V)}),r.append(E,Vt)};r.component(Bs,()=>Lo,(E,T)=>{T(E,{type:"single",get value(){return r.get(S)},onValueChange:m,get locale(){return a()},weekdayFormat:"short",fixedWeeks:!0,class:"select-none p-12",get placeholder(){return r.get(_)},set placeholder(J){r.set(_,J,!0)},children:Y,$$slots:{default:!0}})})}r.append(A,Xt)},$$slots:{default:!0}})}r.append(e,tn),r.pop()}export{$l as default};
@@ -0,0 +1 @@
1
+ import"svelte/internal/disclose-version";import"svelte/internal/flags/async";import*as t from"svelte/internal/client";import{getContext as a}from"svelte";const _="docs:navigate",d="docs:static",x="docs:topics";function b(){return!!a(d)}function f(){var e;return((e=a(d))==null?void 0:e.text)===!0}function m(){const e=a(d);return e&&`#okno-docs=${e.topic}`}var u=t.from_html('<nav aria-label="Docs" data-doc-topics="" class="-order-1 -mx-10 flex gap-4 overflow-x-auto px-10 [scroll-padding-inline:10px] [scrollbar-width:none] [&amp;>*]:w-auto!"><!></nav>'),g=t.from_html('<div data-doc=""><!> <!></div>');function v(e,p){t.push(p,!0);const r=a(x);var o=g();t.set_class(o,1,t.clsx(["flex flex-col gap-16 px-10 pt-4 pb-10 text-[14px]/[1.6] text-(--fg-muted)","[&>header]:gap-12 [&>header]:-order-2","[&>section:first-child]:mt-12","doc-row:px-24 doc-row:py-6","[&>section_:is(pre,:has(>pre))+*]:pt-12! [&>section_:not(pre,:has(>pre)):has(+:is(pre,:has(>pre)))]:pb-0!","[&_[data-doc-note]]:px-12!","[&_:is(pre:has(+[data-doc-note]),:has(>pre):has(+[data-doc-note])>pre)]:mb-0 [&_:is(pre:has(+[data-doc-note]),:has(>pre):has(+[data-doc-note])>pre)]:rounded-b-none!","[&_:is(pre,:has(>pre))+[data-doc-note]]:pt-0! [&_:is(pre,:has(>pre))+[data-doc-note]]:pb-12! [&_:is(pre,:has(>pre))+[data-doc-note]+*]:pt-12!","[&_:is(pre,:has(>pre))+[data-doc-note]>aside]:rounded-t-none [&_:is(pre,:has(>pre))+[data-doc-note]>aside]:rounded-b-[20px] [&_:is(pre,:has(>pre))+[data-doc-note]>aside]:border-0 [&_:is(pre,:has(>pre))+[data-doc-note]>aside]:shadow-none [&_:is(pre,:has(>pre))+[data-doc-note]>aside]:bg-clip-padding [&_:is(pre,:has(>pre))+[data-doc-note]>aside]:px-12 [&_:is(pre,:has(>pre))+[data-doc-note]>aside]:text-[13px]/[150%]","[&>section_section>:first-child]:pt-26!","doc-text:max-w-none! doc-text:pr-[max(24px,calc(100%-64ch))]","[&_[data-list-header]>header]:mt-0 [&_[data-list-header]>header]:mb-0","[&>header]:px-10","[&_p]:text-balance [&_li]:text-balance [&_h1]:text-balance [&_h2]:text-balance [&_h3]:text-balance","[&_p]:max-w-[64ch] [&_ul]:max-w-[64ch]","[&_h1]:text-[28px]/[1.2] [&_h1]:font-semibold [&_h1]:text-(--fg)","[&_h2]:text-[24px]/[1.25] [&_h2]:font-semibold [&_h2]:text-(--fg)","[&_h3]:text-[20px]/[1.3] [&_h3]:font-medium [&_h3]:text-(--fg)","[&_.h1]:text-[28px]/[1.2] [&_.h1]:font-semibold [&_.h1]:text-(--fg)","[&_.h2]:text-[24px]/[1.25] [&_.h2]:font-semibold [&_.h2]:text-(--fg)","[&_.h3]:text-[20px]/[1.3] [&_.h3]:font-medium [&_.h3]:text-(--fg)","[&_strong]:font-medium [&_strong]:text-(--fg)","[&_em]:text-(--fg) [&_em]:not-italic","[&_a:not([data-button],[data-doc-topics]>a)]:text-primary [&_a:not([data-button],[data-doc-topics]>a)]:underline [&_a:not([data-button],[data-doc-topics]>a)]:underline-offset-2","[&_ul]:flex [&_ul]:list-disc [&_ul]:flex-col [&_ul]:gap-3 [&_ul]:pl-16","[&_:not(pre)>code]:whitespace-nowrap [&_:not(pre)>code]:rounded-[5px] [&_:not(pre)>code]:bg-black/5 [&_:not(pre)>code]:px-5 [&_:not(pre)>code]:py-1 [&_:not(pre)>code]:font-mono [&_:not(pre)>code]:text-[13px] [&_:not(pre)>code]:text-(--fg) dark:[&_:not(pre)>code]:bg-white/8","[&>section]:[corner-shape:superellipse(1.4)] [&>section]:rounded-[32px] [&>section]:max-w-[650px] [&>section]:border-[0.5px] [&>section]:border-black/8 dark:[&>section]:border-white/10 [&>section]:gap-0 [&>section]:relative [&>section]:isolate [&>section]:bg-black/4 dark:[&>section]:bg-white/3","[&>section_:is(section,[data-doc-body])]:contents","[&>section>:first-child]:pt-24! [&>section>:last-child:not(section,pre,:has(>pre),:is(pre,:has(>pre))+[data-doc-note])]:pb-24! [&>section>:is(section,[data-doc-body]):last-child>:last-child:not(pre,:has(>pre),:is(pre,:has(>pre))+[data-doc-note])]:pb-24! [&>section>:is(section,[data-doc-body]):last-child>:is(section,[data-doc-body]):last-child>:last-child:not(pre,:has(>pre),:is(pre,:has(>pre))+[data-doc-note])]:pb-24!","[&_[data-list-header]>div]:hidden","[&_kbd]:rounded-[5px] [&_kbd]:border-[0.5px] [&_kbd]:border-(--hairline) [&_kbd]:px-5 [&_kbd]:py-1 [&_kbd]:font-mono [&_kbd]:text-[12px] [&_kbd]:text-(--fg)"]));var i=t.child(o);t.snippet(i,()=>p.children);var c=t.sibling(i,2);{var h=s=>{var n=u(),l=t.child(n);r(l),t.reset(n),t.append(s,n)};t.if(c,s=>{r&&s(h)})}t.reset(o),t.append(e,o),t.pop()}export{v as D,_ as a,d as b,b as c,f as i,m as l};
@@ -1 +1 @@
1
- import"svelte/internal/disclose-version";import"svelte/internal/flags/async";import*as e from"svelte/internal/client";import{q as A,t as B,g as C,u as I,B as g}from"./index-BLgOnMsp.js";const t=A(B,"tips"),m={isDismissed(r){return t.current.includes(r)},dismiss(r){t.current.includes(r)||(t.current=[...t.current,r])},get count(){return t.current.length},restore(){t.current=[]}};var J=e.from_html('<div class="flex flex-wrap gap-6"><!> <!></div>'),M=e.from_html('<div data-doc-note=""><aside class="superellipse flex w-full items-start gap-6 rounded-[20px] border-[0.5px] border-sky-400/30 bg-sky-400/10 p-10 text-[14px]/[160%] text-sky-950/80 shadow dark:text-sky-100/85 [&amp;_code]:text-[13px] [&amp;_code]:text-sky-300"><!> <div class="flex min-w-0 flex-1 flex-col gap-10"><span><!></span> <!></div></aside></div>');function N(r,s){e.push(s,!0);const{modals:k}=C();var x=e.comment(),w=e.first_child(x);{var y=a=>{var d=M(),v=e.child(d),f=e.child(v);I(f,{name:"info",size:18,class:"mt-px shrink-0 text-sky-400","aria-hidden":"true"});var u=e.sibling(f,2),n=e.child(u),_=e.child(n);e.snippet(_,()=>s.children),e.reset(n);var D=e.sibling(n,2);{var $=p=>{var l=J(),h=e.child(l);{var H=i=>{g(i,{tone:"sky",onclick:()=>k.open("docs",s.docs),children:(o,z)=>{e.next();var c=e.text("How it works");e.append(o,c)},$$slots:{default:!0}})};e.if(h,i=>{s.docs&&i(H)})}var q=e.sibling(h,2);{var j=i=>{g(i,{tone:"idle",ghost:!0,onclick:()=>m.dismiss(s.tip),children:(o,z)=>{e.next();var c=e.text("Dismiss");e.append(o,c)},$$slots:{default:!0}})};e.if(q,i=>{s.tip&&i(j)})}e.reset(l),e.append(p,l)};e.if(D,p=>{(s.docs||s.tip)&&p($)})}e.reset(u),e.reset(v),e.reset(d),e.append(a,d)},b=e.derived(()=>!s.tip||!m.isDismissed(s.tip));e.if(w,a=>{e.get(b)&&a(y)})}e.append(r,x),e.pop()}export{N as D,m as t};
1
+ import"svelte/internal/disclose-version";import"svelte/internal/flags/async";import*as e from"svelte/internal/client";import{q as A,t as B,g as C,u as I,B as g}from"./index-BJZ4AAWw.js";const t=A(B,"tips"),m={isDismissed(r){return t.current.includes(r)},dismiss(r){t.current.includes(r)||(t.current=[...t.current,r])},get count(){return t.current.length},restore(){t.current=[]}};var J=e.from_html('<div class="flex flex-wrap gap-6"><!> <!></div>'),M=e.from_html('<div data-doc-note=""><aside class="superellipse flex w-full items-start gap-6 rounded-[20px] border-[0.5px] border-sky-400/30 bg-sky-400/10 p-10 text-[14px]/[160%] text-sky-950/80 shadow dark:text-sky-100/85 [&amp;_code]:text-[13px] [&amp;_code]:text-sky-300"><!> <div class="flex min-w-0 flex-1 flex-col gap-10"><span><!></span> <!></div></aside></div>');function N(r,s){e.push(s,!0);const{modals:k}=C();var x=e.comment(),w=e.first_child(x);{var y=a=>{var d=M(),v=e.child(d),f=e.child(v);I(f,{name:"info",size:18,class:"mt-px shrink-0 text-sky-400","aria-hidden":"true"});var u=e.sibling(f,2),n=e.child(u),_=e.child(n);e.snippet(_,()=>s.children),e.reset(n);var D=e.sibling(n,2);{var $=p=>{var l=J(),h=e.child(l);{var H=i=>{g(i,{tone:"sky",onclick:()=>k.open("docs",s.docs),children:(o,z)=>{e.next();var c=e.text("How it works");e.append(o,c)},$$slots:{default:!0}})};e.if(h,i=>{s.docs&&i(H)})}var q=e.sibling(h,2);{var j=i=>{g(i,{tone:"idle",ghost:!0,onclick:()=>m.dismiss(s.tip),children:(o,z)=>{e.next();var c=e.text("Dismiss");e.append(o,c)},$$slots:{default:!0}})};e.if(q,i=>{s.tip&&i(j)})}e.reset(l),e.append(p,l)};e.if(D,p=>{(s.docs||s.tip)&&p($)})}e.reset(u),e.reset(v),e.reset(d),e.append(a,d)},b=e.derived(()=>!s.tip||!m.isDismissed(s.tip));e.if(w,a=>{e.get(b)&&a(y)})}e.append(r,x),e.pop()}export{N as D,m as t};
@@ -0,0 +1 @@
1
+ import"svelte/internal/disclose-version";import"svelte/internal/flags/async";import*as e from"svelte/internal/client";import{g as Fe,a as Ce,i as Oe,P as Be,C as Ie,D as f,b as U,S as Pe,c as Te,B as Re,d as De}from"./index-BJZ4AAWw.js";import{F as Me,a as Ue,V as Ee}from"./ViewModeToggle-BoOtpxSR.js";import{cubicOut as Ne}from"svelte/easing";import{slide as ce}from"svelte/transition";var T=e.from_html("<!> <!> <!>",1),A=e.from_html("<!> <!>",1),qe=e.from_html('<div class="flex"><!></div>'),Ve=e.from_html('<div class="shrink-0 border-t-[0.5px] border-(--hairline)"><div class="flex h-36 w-full items-center px-8"><!></div></div>'),je=e.from_html("<!> <!> <!> <!> <!> <!> <!>",1),Ae=e.from_html('<input type="file" multiple="" class="hidden"/> <input type="file" class="hidden"/> <!>',1);function Ge(oe,fe){e.push(fe,!0);const Z=t=>{f(t,{icon:"upload",onclick:()=>n.files.attempt(()=>n.files.restoreSelected()),children:(l,r)=>{e.next();var a=e.text();e.template_effect(()=>e.set_text(a,`Restore ${i.selected.size??""}`)),e.append(l,a)},$$slots:{default:!0}})},ee=t=>{f(t,{icon:"trash-2",variant:"danger",onclick:()=>n.files.attempt(()=>n.files.askDeleteSelectedForever()),children:(l,r)=>{e.next();var a=e.text("Delete forever");e.append(l,a)},$$slots:{default:!0}})},G=t=>{f(t,{icon:"trash-2",variant:"danger",onclick:()=>n.files.attempt(()=>n.files.askEmptyBin()),children:(l,r)=>{e.next();var a=e.text("Empty Trash");e.append(l,a)},$$slots:{default:!0}})},te=t=>{var l=A(),r=e.first_child(l);f(r,{icon:"upload",onclick:()=>{var s;return(s=e.get(J))==null?void 0:s.click()},get disabled(){return g.uploading},children:(s,p)=>{e.next();var $=e.text("Upload");e.append(s,$)},$$slots:{default:!0}});var a=e.sibling(r,2);{var d=s=>{var p=T(),$=e.first_child(p);f($,{icon:"folder-plus",onclick:we,children:(v,h)=>{e.next();var b=e.text("New folder");e.append(v,b)},$$slots:{default:!0}});var I=e.sibling($,2);f(I,{icon:"shape-collection",onclick:ye,children:(v,h)=>{e.next();var b=e.text("New vector set");e.append(v,b)},$$slots:{default:!0}});var P=e.sibling(I,2);{var o=v=>{f(v,{icon:"folder",onclick:()=>H.open("new-disk"),children:(h,b)=>{e.next();var m=e.text("New S3 bucket\u2026");e.append(h,m)},$$slots:{default:!0}})};e.if(P,v=>{pe.editStructure&&!i.cwd&&ve.testingPolicy.localTesting&&v(o)})}e.append(s,p)};e.if(a,s=>{e.get(W)||s(d)})}e.append(t,l)},ie=t=>{var l=e.comment(),r=e.first_child(l);{var a=d=>{var s=T(),p=e.first_child(s);U(p);var $=e.sibling(p,2);f($,{icon:"circle-alert",onclick:()=>i.toggleUnusedOnly(),children:(o,v)=>{e.next();var h=e.text();e.template_effect(()=>e.set_text(h,i.showUnusedOnly?"Show all files":`Show only unused (${e.get(N)})`)),e.append(o,h)},$$slots:{default:!0}});var I=e.sibling($,2);{var P=o=>{f(o,{icon:"trash-2",onclick:()=>n.files.attempt(()=>n.files.askCleanupUnused()),children:(v,h)=>{e.next();var b=e.text();e.template_effect(()=>e.set_text(b,`Clean up unused (${e.get(N)??""})`)),e.append(v,b)},$$slots:{default:!0}})};e.if(I,o=>{e.get(N)>0&&o(P)})}e.append(d,s)};e.if(r,d=>{(e.get(N)>0||i.showUnusedOnly)&&d(a)})}e.append(t,l)},{files:g,modals:H,can:pe,project:ve}=Fe(),i=g.page,n=Ce();let J=e.state(null);const le=e.derived(()=>i.viewingBin||i.cwd!=="");function ue(){i.viewingBin?n.files.enterFolder(""):n.files.enterFolder(g.parentOf(i.cwd))}async function ge(t){const l=t.target,r=Array.from(l.files??[]);l.value="",r.length>0&&await n.files.uploadMany(r,i.viewingBin?"":i.cwd)}const E=e.derived(()=>g.items.filter(t=>i.selected.has(t.path)&&Oe(t.filename)).length),D=e.derived(()=>i.selected.size>0),N=e.derived(()=>g.unusedPaths.length),K=e.derived(()=>[...i.selected].filter(t=>!!t&&t!=="bin"&&g.kindOf(t)==="file").length),L=e.derived(()=>{if(i.selected.size!==1)return null;const[t]=i.selected;return t==="bin"||!t?null:g.kindOf(t)==="folder"?t:null}),ne=e.derived(()=>!!g.clipboard&&g.clipboard.ids.length>0);let R=e.state("empty");function me(t){if(g.editingId)return;const l=t.target,r=l?.closest('[role="option"]');if(!r){e.set(R,"empty");return}const a=Number(r.dataset.i),d=i.visible[a];if(!d){e.set(R,"empty");return}if(d.kind==="bin"){i.selected.clear(),i.focusIndex=a,e.set(R,"bin");return}const s=d.id;i.selected.has(s)||(i.selected.clear(),i.selected.add(s),i.focusIndex=a),e.set(R,"item")}const ae=e.derived(()=>{if(i.selected.size!==1)return null;const[t]=i.selected;return!t||t==="bin"||g.kindOf(t)!=="file"?null:g.items.find(l=>l.path===t)??null});let Q=e.state(null),q=e.state(null);function he(){var t;e.set(q,e.get(ae),!0),e.get(q)&&((t=e.get(Q))==null||t.click())}async function xe(t){var l;const r=t.target,a=(l=r.files)==null?void 0:l[0];r.value="";const d=e.get(q);e.set(q,null),a&&d&&await n.files.attempt(()=>n.files.replaceFile(d,a))}function be(){if(i.selected.size!==1)return;const[t]=i.selected;!t||t==="bin"||n.files.startRename(t)}function $e(){if(i.selected.size!==1)return;const[t]=i.selected;!t||t==="bin"||n.files.openInfo(t)}function _e(t){const l=g.clipboard;if(l)return n.files.attempt(async()=>{await n.files.move(l.ids,t)&&g.clipboard===l&&n.files.clearClipboard()})}function ke(){return n.files.attempt(()=>n.files.paste())}function we(){n.files.attempt(()=>n.files.createFolder())}function ye(){n.files.attempt(()=>n.files.createFolder({set:!0}))}const W=e.derived(()=>g.isVectorSet(i.cwd)),se=e.derived(()=>e.get(W)?".svg,image/svg+xml":"image/*");var re=Ae(),V=e.first_child(re);e.bind_this(V,t=>e.set(J,t),()=>e.get(J));var j=e.sibling(V,2);e.bind_this(j,t=>e.set(Q,t),()=>e.get(Q));var Se=e.sibling(j,2);Be(Se,{lead:t=>{var l=e.comment(),r=e.first_child(l);{var a=d=>{var s=qe(),p=e.child(s);Re(p,{tone:"idle",ghost:!0,iconOnly:!0,"aria-label":"Back",onclick:ue,class:"w-22! touch:w-32!",children:($,I)=>{De($,{back:!0})},$$slots:{default:!0}}),e.reset(s),e.transition(3,s,()=>ce,()=>({axis:"x",duration:200,easing:Ne})),e.append(d,s)};e.if(r,d=>{e.get(le)&&d(a)})}e.append(t,l)},actions:t=>{var l=T(),r=e.first_child(l);Pe(r,{placeholder:"Search files",get value(){return i.query},set value(p){i.query=p}});var a=e.sibling(r,2);{var d=p=>{Ee(p,{get view(){return i}})};e.if(a,p=>{e.get(W)||p(d)})}var s=e.sibling(a,2);{let p=e.derived(()=>e.get(D)?"more-horizontal":"plus");Te(s,{get icon(){return e.get(p)},label:"Files actions",children:($,I)=>{var P=e.comment(),o=e.first_child(P);{var v=m=>{var u=e.comment(),x=e.first_child(u);{var k=_=>{var w=T(),O=e.first_child(w);Z(O);var F=e.sibling(O,2);f(F,{icon:"x",onclick:()=>n.files.clearSelection(),children:(y,S)=>{e.next();var C=e.text("Clear selection");e.append(y,C)},$$slots:{default:!0}});var c=e.sibling(F,2);ee(c),e.append(_,w)},z=_=>{G(_)};e.if(x,_=>{e.get(D)?_(k):_(z,-1)})}e.append(m,u)},h=m=>{var u=T(),x=e.first_child(u);{var k=w=>{f(w,{icon:"zap",onclick:()=>H.open("compress-files"),get disabled(){return g.uploading},children:(O,F)=>{e.next();var c=e.text();e.template_effect(()=>e.set_text(c,`Compress ${e.get(E)??""}`)),e.append(O,c)},$$slots:{default:!0}})};e.if(x,w=>{e.get(E)>0&&w(k)})}var z=e.sibling(x,2);f(z,{icon:"x",onclick:()=>n.files.clearSelection(),children:(w,O)=>{e.next();var F=e.text("Clear selection");e.append(w,F)},$$slots:{default:!0}});var _=e.sibling(z,2);f(_,{icon:"trash-2",variant:"danger",onclick:()=>n.files.attempt(()=>n.files.deleteSelected()),children:(w,O)=>{e.next();var F=e.text();e.template_effect(()=>e.set_text(F,`Delete ${i.selected.size??""}`)),e.append(w,F)},$$slots:{default:!0}}),e.append(m,u)},b=m=>{var u=A(),x=e.first_child(u);te(x);var k=e.sibling(x,2);ie(k),e.append(m,u)};e.if(o,m=>{i.viewingBin?m(v):e.get(D)?m(h,1):m(b,-1)})}e.append($,P)},$$slots:{default:!0}})}e.append(t,l)},footer:t=>{var l=e.comment(),r=e.first_child(l);{var a=d=>{var s=Ve(),p=e.child(s),$=e.child(p);Ue($,{get view(){return i}}),e.reset(p),e.reset(s),e.transition(3,s,()=>ce,()=>({duration:200})),e.append(d,s)};e.if(r,d=>{e.get(le)&&d(a)})}e.append(t,l)},children:(t,l)=>{Ie(t,{trigger:(r,a)=>{let d=()=>a?.().props;Me(r,{get view(){return i},mode:"page",multi:!0,get triggerProps(){return d()},oncontextmenu:me})},children:(r,a)=>{var d=e.comment(),s=e.first_child(d);{var p=o=>{var v=e.comment(),h=e.first_child(v);{var b=u=>{var x=T(),k=e.first_child(x);Z(k);var z=e.sibling(k,2);U(z);var _=e.sibling(z,2);ee(_),e.append(u,x)},m=u=>{G(u)};e.if(h,u=>{e.get(R)==="item"&&e.get(D)?u(b):u(m,-1)})}e.append(o,v)},$=o=>{G(o)},I=o=>{var v=je(),h=e.first_child(v);{var b=c=>{var y=T(),S=e.first_child(y);f(S,{icon:"pen",onclick:be,children:(B,Y)=>{e.next();var M=e.text("Rename");e.append(B,M)},$$slots:{default:!0}});var C=e.sibling(S,2);{var X=B=>{f(B,{icon:"upload",onclick:he,get disabled(){return g.uploading},children:(Y,M)=>{e.next();var ze=e.text("Replace file");e.append(Y,ze)},$$slots:{default:!0}})};e.if(C,B=>{e.get(ae)&&B(X)})}var de=e.sibling(C,2);f(de,{icon:"info",onclick:$e,children:(B,Y)=>{e.next();var M=e.text();e.template_effect(()=>e.set_text(M,e.get(L)?"Folder Info":"File Info")),e.append(B,M)},$$slots:{default:!0}}),e.append(c,y)};e.if(h,c=>{i.selected.size===1&&c(b)})}var m=e.sibling(h,2);{var u=c=>{f(c,{icon:"download",onclick:()=>n.files.downloadSelected(),children:(y,S)=>{e.next();var C=e.text();e.template_effect(()=>e.set_text(C,`Download ${(e.get(K)>1?e.get(K):"")??""}`)),e.append(y,C)},$$slots:{default:!0}})};e.if(m,c=>{e.get(K)>0&&c(u)})}var x=e.sibling(m,2);f(x,{icon:"scissors",onclick:()=>n.files.cutToClipboard(),children:(c,y)=>{e.next();var S=e.text("Cut");e.append(c,S)},$$slots:{default:!0}});var k=e.sibling(x,2);{var z=c=>{f(c,{icon:"clipboard",onclick:()=>_e(e.get(L)),children:(y,S)=>{e.next();var C=e.text("Paste into folder");e.append(y,C)},$$slots:{default:!0}})};e.if(k,c=>{e.get(L)&&e.get(ne)&&c(z)})}var _=e.sibling(k,2);{var w=c=>{var y=A(),S=e.first_child(y);U(S);var C=e.sibling(S,2);f(C,{icon:"zap",onclick:()=>H.open("compress-files"),get disabled(){return g.uploading},children:(X,de)=>{e.next();var B=e.text();e.template_effect(()=>e.set_text(B,`Compress ${e.get(E)??""}`)),e.append(X,B)},$$slots:{default:!0}}),e.append(c,y)};e.if(_,c=>{e.get(E)>0&&c(w)})}var O=e.sibling(_,2);U(O);var F=e.sibling(O,2);f(F,{icon:"trash-2",variant:"danger",onclick:()=>n.files.attempt(()=>n.files.deleteSelected()),children:(c,y)=>{e.next();var S=e.text();e.template_effect(()=>e.set_text(S,`Move ${i.selected.size>1?`${i.selected.size} items`:""} to Trash`)),e.append(c,S)},$$slots:{default:!0}}),e.append(o,v)},P=o=>{var v=T(),h=e.first_child(v);te(h);var b=e.sibling(h,2);{var m=x=>{var k=A(),z=e.first_child(k);U(z);var _=e.sibling(z,2);f(_,{icon:"clipboard",onclick:ke,children:(w,O)=>{e.next();var F=e.text("Paste");e.append(w,F)},$$slots:{default:!0}}),e.append(x,k)};e.if(b,x=>{e.get(ne)&&x(m)})}var u=e.sibling(b,2);ie(u),e.append(o,v)};e.if(s,o=>{i.viewingBin?o(p):e.get(R)==="bin"?o($,1):e.get(R)==="item"&&e.get(D)?o(I,2):o(P,-1)})}e.append(r,d)},$$slots:{trigger:!0,default:!0}})},$$slots:{lead:!0,actions:!0,footer:!0,default:!0}}),e.template_effect(()=>{e.set_attribute(V,"accept",e.get(se)),e.set_attribute(j,"accept",e.get(se))}),e.delegated("change",V,ge),e.delegated("change",j,xe),e.append(oe,re),e.pop()}e.delegate(["change"]);export{Ge as default};
@@ -0,0 +1 @@
1
+ import"svelte/internal/disclose-version";import"svelte/internal/flags/async";import*as e from"svelte/internal/client";import{g as At,a as Lt,s as Kt,P as Rt,F as xe,R as Pe,e as be,I as U,f as Ge,h as Je,j as ye,k as Ze,l as Ct,B as ee,L as Pt,S as Mt,m as He,n as Me,o as qt,D as It,r as Vt,p as Qe}from"./index-BJZ4AAWw.js";import{tick as Dt}from"svelte";import{D as Bt}from"./DocNote-Dz_ZcNuT.js";function Ue(te){try{return new Intl.PluralRules(te).resolvedOptions().pluralCategories}catch{return["other"]}}function Nt(te,z){let E;try{E=new Intl.PluralRules(te)}catch{return z}const re=200,v=Array.from({length:re+1},(p,$)=>$).filter(p=>E.select(p)===z);if(!v.length)return E.select(1.5)===z?"1.5":z;const x=[];for(const p of v){const $=x.at(-1);$&&p===$[1]+1?$[1]=p:x.push([p,p])}return x.slice(0,2).map(([p,$])=>$===re?`${p}+`:p===$?`${p}`:`${p}\u2013${$}`).join(", ")+(x.length>2?", \u2026":"")}var Wt=e.from_html('<label class="flex min-w-0 items-stretch border-b-[0.5px] border-(--hairline) last:border-b-0"><span class="flex w-72 shrink-0 items-center pl-12 text-xs text-(--fg-muted)"> </span> <!></label>'),Xt=e.from_html('<div class="flex min-w-0 flex-1 flex-col"></div>'),Yt=e.from_html('<span class="flex flex-wrap items-center gap-4"><!> <!></span>'),et=e.from_html("<!> <!>",1),zt=e.from_html('<span class="flex items-center gap-4 text-[13px] text-(--fg)"><code> </code> <!></span>'),Et=e.from_html('<div class="flex flex-wrap items-center gap-6 py-6"><!> <!></div>'),Ft=e.from_html('<p class="field-hint-text px-0">Write <code>&#123;name&#125;</code> in the text to add a slot, <code>&#123;count&#125;</code> for a plural.</p>'),Gt=e.from_html('<div class="flex flex-col gap-8 bg-(--field-bg) px-8 pb-8"><!> <!></div>'),Jt=e.from_html('<div><div><div><code class="truncate text-[13px] text-(--fg)"> </code> <!></div> <div><!></div> <div class="flex shrink-0 items-center gap-2 pl-4 pr-8"><!> <!> <!></div> <div data-li-center="" class="pointer-events-none absolute inset-x-0 bottom-0 h-0.5 bg-(--hairline)"></div></div> <!></div>'),Zt=e.from_html("<!> <!> <!>",1),Ht=e.from_html('<p class="px-2 text-xs/[140%] text-(--fg-muted)"> </p>'),tt=e.from_html("<div></div>"),Qt=e.from_html('<div><div class="group/row overflow-hidden rounded-[20px]"><div><label><!></label> <label><!></label> <!></div></div></div>'),Ut=e.from_html('<div class="flex flex-col gap-16 p-10"><!> <!> <div class="flex flex-col gap-8"><!> <div class="flex justify-end"><!></div></div></div>');function er(te,z){e.push(z,!0);const E=(t,r=e.noop,n=e.noop,s=e.noop,o=e.noop,g)=>{let j=e.derived_safe_equal(()=>e.fallback(g?.(),!1));var O=Xt();e.each(O,20,()=>st(n()),L=>L,(L,K)=>{var R=Wt(),k=e.child(R),le=e.child(k,!0);e.reset(k);var ae=e.sibling(k,2);{let D=e.derived(()=>[be,"h-38!",e.get(j)&&"opacity-45"].filter(Boolean).join(" ")),i=e.derived(()=>s()(K));U(ae,{get class(){return e.get(D)},get value(){return e.get(i)},onchange:d=>o()(K,d.currentTarget.value)})}e.reset(R),e.template_effect(D=>{e.set_attribute(R,"title",K),e.set_text(le,D)},[()=>Nt(n(),K)]),e.append(L,R)}),e.reset(O),e.append(t,O)},re=(t,r=e.noop)=>{const n=e.derived(()=>qe(r()));var s=Jt(),o=e.child(s),g=e.child(o),j=e.child(g),O=e.child(j,!0);e.reset(j);var L=e.sibling(j,2);{var K=l=>{var a=Yt(),c=e.child(a);e.each(c,17,()=>Object.entries(e.get(n)??{}),([f,y])=>f,(f,y)=>{var _=e.derived(()=>e.to_array(e.get(y),2));let P=()=>e.get(_)[0],Q=()=>e.get(_)[1];{let M=e.derived(()=>Q()==="count"?"Plural count":He(Q()));Me(f,{tone:"neutral",get title(){return e.get(M)},children:(de,N)=>{e.next();var q=e.text();e.template_effect(()=>e.set_text(q,Q()==="count"?"plural":`{${P()}}`)),e.append(de,q)},$$slots:{default:!0}})}});var u=e.sibling(c,2);{var b=f=>{Me(f,{tone:"neutral",title:"The translation's slots differ from the source",children:(y,_)=>{e.next();var P=e.text("Slots differ");e.append(y,P)},$$slots:{default:!0}})},H=e.derived(()=>Xe(r()));e.if(u,f=>{e.get(H)&&f(b)})}e.reset(a),e.append(l,a)},R=e.derived(()=>e.get(n)||Xe(r()));e.if(L,l=>{e.get(R)&&l(K)})}e.reset(g);var k=e.sibling(g,2),le=e.child(k);{var ae=l=>{{let a=e.derived(()=>ke(r()));E(l,r,()=>e.get(A),()=>c=>gt(r(),c),()=>(c,u)=>ht(r(),c,u),()=>e.get(a))}},D=e.derived(()=>Ie(r())),i=l=>{{let a=e.derived(()=>[be,"h-38!",ke(r())&&"opacity-45"].filter(Boolean).join(" ")),c=e.derived(()=>Z(fe(r()))),u=e.derived(()=>ke(r())?Z(J(r())):"");U(l,{get class(){return e.get(a)},get value(){return e.get(c)},get placeholder(){return e.get(u)},onchange:b=>pt(r(),b.currentTarget.value)})}};e.if(le,l=>{e.get(D)?l(ae):l(i,-1)})}e.reset(k);var d=e.sibling(k,2),h=e.child(d);{var m=l=>{var a=et(),c=e.first_child(a);Me(c,{tone:"neutral",title:"The source text changed after this translation was written",children:(b,H)=>{e.next();var f=e.text("Review");e.append(b,f)},$$slots:{default:!0}});var u=e.sibling(c,2);{let b=e.derived(()=>`Mark ${r()} reviewed`);ee(u,{tone:"idle",ghost:!0,icon:"check",iconVariant:"stroke",get"aria-label"(){return e.get(b)},title:"Mark reviewed",onclick:()=>S.content.approveString(r(),e.get(A))})}e.append(l,a)},w=e.derived(()=>Ve(r()));e.if(h,l=>{e.get(w)&&l(m)})}var B=e.sibling(h,2);{let l=e.derived(()=>`Details for ${r()}`),a=e.derived(()=>e.get(V)===r()),c=e.derived(()=>e.get(V)===r()?"":"-rotate-90");ee(B,{tone:"idle",ghost:!0,icon:"arrow-down",iconVariant:"stroke",get"aria-label"(){return e.get(l)},get"aria-expanded"(){return e.get(a)},title:"All languages and definition",get class(){return e.get(c)},onclick:()=>e.set(V,e.get(V)===r()?null:r(),!0)})}var C=e.sibling(B,2);{let l=e.derived(()=>`Delete ${r()}`);Ge(C,{quiet:!0,onremove:()=>ct(r()),get removeLabel(){return e.get(l)}})}e.reset(d),e.next(2),e.reset(o);var ie=e.sibling(o,2);{var oe=l=>{const a=e.derived(()=>pe(r()));var c=Gt(),u=e.child(c);e.each(u,17,()=>x.hasLocales?x.entries:[{id:x.default,name:x.default}],f=>f.id,(f,y)=>{const _=e.derived(()=>Be(r(),e.get(y).id));xe(f,{get label(){return e.get(y).name},children:(P,Q)=>{var M=e.comment(),de=e.first_child(M);{var N=I=>{E(I,r,()=>e.get(y).id,()=>W=>e.get(_)&&typeof e.get(_)=="object"?String(e.get(_)[W]??""):"",()=>(W,T)=>at(r(),e.get(y).id,W,T))},q=e.derived(()=>Ie(r())),Te=I=>{{let W=e.derived(()=>e.get(_)===void 0?"":Z(e.get(_))),T=e.derived(()=>e.get(_)===void 0?Z(J(r())):"");U(I,{get value(){return e.get(W)},get placeholder(){return e.get(T)},onchange:X=>lt(r(),e.get(y).id,X.currentTarget.value)})}};e.if(de,I=>{e.get(q)?I(N):I(Te,-1)})}e.append(P,M)},$$slots:{default:!0}})});var b=e.sibling(u,2);{var H=f=>{const y=e.derived(()=>Se(r()));var _=et(),P=e.first_child(_);xe(P,{label:"Note",children:(M,de)=>{{let N=e.derived(()=>e.get(a).note??"");U(M,{get value(){return e.get(N)},placeholder:"Context for translators",onchange:q=>we(r(),{...e.get(a),note:q.currentTarget.value})})}},$$slots:{default:!0}});var Q=e.sibling(P,2);xe(Q,{label:"Slots",as:"div",children:(M,de)=>{var N=e.comment(),q=e.first_child(N);{var Te=T=>{var X=Et(),Ye=e.child(X);e.each(Ye,17,()=>Object.entries(e.get(y)),([Y,me])=>Y,(Y,me)=>{var Ae=e.derived(()=>e.to_array(e.get(me),2));let ce=()=>e.get(Ae)[0],ze=()=>e.get(Ae)[1];var Le=zt(),Ke=e.child(Le),yt=e.child(Ke,!0);e.reset(Ke);var _t=e.sibling(Ke,2);{let $t=e.derived(()=>Ne(ze())),kt=e.derived(()=>`Type of slot ${ce()}`);qt(_t,{get label(){return e.get($t)},tone:"idle",ghost:!0,align:"start",sideOffset:4,get"aria-label"(){return e.get(kt)},children:(wt,tr)=>{var Ee=e.comment(),St=e.first_child(Ee);e.each(St,16,()=>["text","number","count"],Re=>Re,(Re,Ce)=>{{let jt=e.derived(()=>Ce===ze());It(Re,{get selected(){return e.get(jt)},onclick:()=>ot(r(),ce(),Ce),children:(Ot,rr)=>{e.next();var Fe=e.text();e.template_effect(Tt=>e.set_text(Fe,Tt),[()=>Ne(Ce)]),e.append(Ot,Fe)},$$slots:{default:!0}})}}),e.append(wt,Ee)},$$slots:{default:!0}})}e.reset(Le),e.template_effect(()=>e.set_text(yt,`{${ce()}}`)),e.append(Y,Le)});var xt=e.sibling(Ye,2);{var bt=Y=>{ee(Y,{tone:"sky",ghost:!0,onclick:()=>dt(r()),children:(me,Ae)=>{e.next();var ce=e.text("Use slots");e.append(me,ce)},$$slots:{default:!0}})};e.if(xt,Y=>{e.get(a).slots||Y(bt)})}e.reset(X),e.append(T,X)},I=e.derived(()=>Object.keys(e.get(y)).length),W=T=>{var X=Ft();e.append(T,X)};e.if(q,T=>{e.get(I)?T(Te):T(W,-1)})}e.append(M,N)},$$slots:{default:!0}}),e.append(f,_)};e.if(b,f=>{$.editStructure&&f(H)})}e.reset(c),e.append(l,c)};e.if(ie,l=>{e.get(V)===r()&&l(oe)})}e.reset(s),e.template_effect(l=>{e.set_attribute(s,"data-skey",r()),e.set_class(s,1,e.clsx(["group/row overflow-hidden first:rounded-t-[20px] last:rounded-b-[20px]",e.get(ve)===r()&&"outline-2 -outline-offset-2 outline-sky-500"])),e.set_class(o,1,e.clsx(Je)),e.set_class(g,1,e.clsx([ye,Ze,"max-w-[40%] cursor-default flex-col justify-center gap-4 px-12 py-8"])),e.set_attribute(j,"title",r()),e.set_text(O,l),e.set_class(k,1,e.clsx(ye))},[()=>ft(r())]),e.append(t,s)},{content:v,locale:x,router:p,can:$,modals:rt}=At(),S=Lt(),A=e.derived(()=>x.current),F=e.derived(()=>e.get(A)===x.default);let _e=e.state("");const $e=e.derived(()=>e.get(_e).trim().toLowerCase());let ne=e.state(!1),G=e.state(""),se=e.state(""),ge=e.state(null),ve=e.state(null);const J=t=>v.strings[t],ue=t=>{var r;return e.get(F)||(r=v.stringsLocale[e.get(A)])==null?void 0:r[t]},fe=t=>{const r=ue(t);return r!==void 0?r:J(t)},ke=t=>!e.get(F)&&ue(t)===void 0,qe=t=>v.stringSlots[t],Ie=t=>Object.values(qe(t)??{}).includes("count"),nt=e.derived(()=>new Set(v.stringsReview[e.get(A)]??[])),Ve=t=>!e.get(F)&&e.get(nt).has(t)&&ue(t)!==void 0,De=e.derived(()=>e.get(F)?0:v.stringKeys.filter(Ve).length);let V=e.state(null);const pe=t=>{var r;return((r=v.schema.strings)==null?void 0:r[t])??{}},Be=(t,r)=>{var n;return r===x.default?v.strings[t]:(n=v.stringsLocale[r])==null?void 0:n[t]},st=Ue;function lt(t,r,n){S.content.saveString(t,r,n)}function at(t,r,n,s){const o=Be(t,r)??v.strings[t],g=o&&typeof o=="object"&&!Array.isArray(o)?{...o}:{};g[n]=s,S.content.saveString(t,r,g)}function we(t,r){var n;const s={};r.slots&&Object.keys(r.slots).length&&(s.slots=r.slots),(n=r.note)!=null&&n.trim()&&(s.note=r.note.trim()),S.content.setStringDef(t,Object.keys(s).length?s:null)}const it=t=>t&&typeof t=="object"?Qe(Object.values(t).map(String).join(" ")):Qe(Z(t)),Se=t=>{const r=pe(t).slots??{};return Vt([...new Set([...it(J(t)),...Object.keys(r)])],r)},Ne=t=>t==="count"?"Plural count":He(t);function ot(t,r,n){const s={...Se(t),[r]:n};if(n==="count")for(const g of Object.keys(s))g!==r&&s[g]==="count"&&(s[g]="text");we(t,{...pe(t),slots:s});const o=J(t);n==="count"&&typeof o=="string"&&S.content.saveString(t,x.default,{other:o})}function dt(t){we(t,{...pe(t),slots:Se(t)})}function ct(t){var r;e.get(V)===t&&e.set(V,null),S.content.deleteString(t),$.editStructure&&(r=v.schema.strings)!=null&&r[t]&&S.content.setStringDef(t,null)}function Z(t){return typeof t=="string"?t:t&&typeof t=="object"&&!Array.isArray(t)?Object.values(t).map(String).join(" / "):t==null?"":String(t)}e.derived(()=>Ue(e.get(A)));const gt=(t,r)=>{const n=fe(t);return n&&typeof n=="object"&&!Array.isArray(n)?String(n[r]??""):""},We=t=>typeof t=="string"?[...t.matchAll(/\{([a-zA-Z0-9_]+)\}/g)].map(r=>r[1]).sort().join(","):"";function Xe(t){if(e.get(F))return!1;const r=ue(t);if(typeof r!="string")return!1;const n=J(t);return typeof n!="string"?!1:We(r)!==We(n)}const vt=e.derived(()=>v.stringKeys.filter(t=>!e.get($e)||t.toLowerCase().includes(e.get($e))||Z(fe(t)).toLowerCase().includes(e.get($e)))),ut=e.derived(()=>{const t=new Map;for(const r of e.get(vt)){const n=r.indexOf("."),s=n>0?r.slice(0,n):"",o=t.get(s);o?o.push(r):t.set(s,[r])}return[...t.entries()].sort((r,n)=>r[0]===""?-1:n[0]===""?1:r[0].localeCompare(n[0]))}),he=e.derived(()=>{if(e.get(F))return null;const t=v.stringKeys.length;if(!t)return null;const r=v.stringKeys.filter(n=>{var s;return((s=v.stringsLocale[e.get(A)])==null?void 0:s[n])!==void 0}).length;return{have:r,total:t,missing:t-r,pct:Math.round(r/t*100)}}),ft=t=>t.includes(".")?t.slice(t.indexOf(".")+1):t;function pt(t,r){S.content.saveString(t,e.get(A),r)}function ht(t,r,n){const s=fe(t),o=s&&typeof s=="object"&&!Array.isArray(s)?{...s}:{};o[r]=n,S.content.saveString(t,e.get(A),o)}async function mt(){var t,r;e.set(ne,!0),await Dt(),(r=(t=e.get(ge))==null?void 0:t.querySelector("[data-new-key]"))==null||r.focus()}function je(){const t=e.get(G).trim();t&&(S.content.saveString(t,x.default,e.get(se)),e.set(G,""),e.set(se,""),e.set(ne,!1))}function Oe(){e.set(ne,!1),e.set(G,""),e.set(se,"")}e.user_effect(()=>{const t=p.field;if(!t||p.view!=="strings")return;e.set(ve,t,!0);const r=requestAnimationFrame(()=>{var s;const o=(s=e.get(ge))==null?void 0:s.querySelector(`[data-skey="${CSS.escape(t)}"]`);o?.scrollIntoView({block:"center",behavior:Kt()})}),n=setTimeout(()=>{e.get(ve)===t&&e.set(ve,null)},2200);return()=>{cancelAnimationFrame(r),clearTimeout(n)}}),Rt(te,{actions:t=>{var r=Zt(),n=e.first_child(r);Pt(n,{});var s=e.sibling(n,2);Mt(s,{placeholder:"Search texts",get value(){return e.get(_e)},set value(g){e.set(_e,g,!0)}});var o=e.sibling(s,2);ee(o,{tone:"idle",icon:"upload",iconVariant:"stroke",title:"Import i18next, Localazy or flat JSON",onclick:()=>rt.open("import-strings"),children:(g,j)=>{e.next();var O=e.text("Import");e.append(g,O)},$$slots:{default:!0}}),e.append(t,r)},children:(t,r)=>{var n=Ut(),s=e.child(n);{var o=i=>{Bt(i,{tip:"texts",docs:{topic:"texts"},children:(d,h)=>{e.next();var m=e.text("This is the place for words that repeat across the site, like \u201CRead more\u201D: written once, translated per language.");e.append(d,m)},$$slots:{default:!0}})},g=i=>{var d=Ht(),h=e.child(d);e.reset(d),e.template_effect(()=>e.set_text(h,`${e.get(he).pct??""}% translated${e.get(he).missing>0?` \xB7 ${e.get(he).missing} missing`:""}${e.get(De)>0?` \xB7 ${e.get(De)} to review`:""}`)),e.append(i,d)};e.if(s,i=>{v.stringKeys.length===0?i(o):e.get(he)&&i(g,1)})}var j=e.sibling(s,2);e.each(j,17,()=>e.get(ut),([i,d])=>i,(i,d)=>{var h=e.derived(()=>e.to_array(e.get(d),2));let m=()=>e.get(h)[0],w=()=>e.get(h)[1];var B=e.comment(),C=e.first_child(B);{var ie=l=>{xe(l,{get label(){return m()},as:"div",variant:"bare",children:(a,c)=>{var u=tt();e.each(u,20,w,b=>b,(b,H)=>{re(b,()=>H)}),e.reset(u),e.template_effect(()=>e.set_class(u,1,e.clsx(["mt-6",Pe]))),e.append(a,u)},$$slots:{default:!0}})},oe=l=>{var a=tt();e.each(a,20,w,c=>c,(c,u)=>{re(c,()=>u)}),e.reset(a),e.template_effect(()=>e.set_class(a,1,e.clsx(Pe))),e.append(l,a)};e.if(C,l=>{m()?l(ie):l(oe,-1)})}e.append(i,B)});var O=e.sibling(j,2),L=e.child(O);{var K=i=>{var d=Qt(),h=e.child(d),m=e.child(h),w=e.child(m),B=e.child(w);{let l=e.derived(()=>`${be} h-38! font-mono`);U(B,{"data-new-key":!0,get class(){return e.get(l)},placeholder:"Key, e.g. nav.home",autocomplete:"off",spellcheck:"false",onkeydown:a=>{a.key==="Enter"&&je(),a.key==="Escape"&&Oe()},get value(){return e.get(G)},set value(a){e.set(G,a,!0)}})}e.reset(w);var C=e.sibling(w,2),ie=e.child(C);{let l=e.derived(()=>`${be} h-38!`);U(ie,{get class(){return e.get(l)},placeholder:"Text",onkeydown:a=>{a.key==="Enter"&&je(),a.key==="Escape"&&Oe()},get value(){return e.get(se)},set value(a){e.set(se,a,!0)}})}e.reset(C);var oe=e.sibling(C,2);Ge(oe,{onremove:Oe,removeLabel:"Discard new text",class:"pr-8"}),e.reset(m),e.reset(h),e.reset(d),e.template_effect(()=>{e.set_class(d,1,e.clsx(Pe)),e.set_class(m,1,e.clsx(Je)),e.set_class(w,1,e.clsx([ye,Ze,"max-w-[40%]"])),e.set_class(C,1,e.clsx(ye))}),e.append(i,d)},R=i=>{Ct(i,{children:(d,h)=>{e.next();var m=e.text("No texts yet");e.append(d,m)}})};e.if(L,i=>{e.get(ne)?i(K):v.stringKeys.length===0&&i(R,1)})}var k=e.sibling(L,2),le=e.child(k);{var ae=i=>{{let d=e.derived(()=>!e.get(G).trim());ee(i,{tone:"green",get disabled(){return e.get(d)},onclick:je,children:(h,m)=>{e.next();var w=e.text("Add");e.append(h,w)},$$slots:{default:!0}})}},D=i=>{ee(i,{tone:"idle",icon:"plus",onclick:mt,children:(d,h)=>{e.next();var m=e.text("Add text");e.append(d,m)},$$slots:{default:!0}})};e.if(le,i=>{e.get(ne)?i(ae):i(D,-1)})}e.reset(k),e.reset(O),e.reset(n),e.bind_this(n,i=>e.set(ge,i),()=>e.get(ge)),e.append(t,n)},$$slots:{actions:!0,default:!0}}),e.pop()}export{er as default};
@@ -0,0 +1,3 @@
1
+ import"svelte/internal/disclose-version";import"svelte/internal/flags/async";import*as e from"svelte/internal/client";import{slide as Pe}from"svelte/transition";import{cubicOut as Te}from"svelte/easing";import{v as ye,w as _e,g as kt,P as wt,x as yt,B as t,o as ue,D as W,b as _t,y as fe,z as be,F as U,I as Z,u as Ze,A as Ge,M as Le,E as ge,G as We,H as Ke,J as Je,K as Ae,T as St,N as Xe,O as Bt}from"./index-BJZ4AAWw.js";import{D as Ct}from"./Doc-_8PDryTi.js";var Pt=e.from_html('<button type="button" role="checkbox" class="superellipse group flex h-30 items-center gap-8 rounded-[10px] pl-6 pr-14 cursor-pointer select-none text-left transition-colors hover:bg-(--hover-fill)"><!> <span> </span></button>'),Tt=e.from_html("<div></div>");function Lt(le,R){e.push(R,!0);let ie=e.prop(R,"options",19,()=>[]),F=e.prop(R,"value",31,()=>e.proxy([])),Q=e.prop(R,"disabled",3,!1);function X(H){var z;Q()||(F(F().includes(H)?F().filter(G=>G!==H):[...F(),H]),(z=R.onchange)==null||z.call(R,F()))}var j=Tt();e.each(j,20,ie,H=>H,(H,z)=>{const G=e.derived(()=>F().includes(z));var Y=Pt(),se=e.child(Y);ye(se,{get checked(){return e.get(G)}});var ee=e.sibling(se,2),pe=e.child(ee,!0);e.reset(ee),e.reset(Y),e.template_effect(()=>{e.set_attribute(Y,"aria-checked",e.get(G)),e.set_class(ee,1,e.clsx(["flex-1 truncate text-left text-[16px]/[110%] transition-colors",e.get(G)?"text-(--fg)":"text-(--fg-muted) group-hover:text-(--fg)"])),e.set_text(pe,z)}),e.delegated("click",Y,()=>X(z)),e.append(H,Y)}),e.reset(j),e.template_effect(()=>e.set_class(j,1,e.clsx(["flex flex-col",Q()&&"pointer-events-none opacity-50"]))),e.append(le,j),e.pop()}e.delegate(["click"]);var At=e.from_html('<button type="button" role="radio" class="superellipse group flex h-30 items-center gap-8 rounded-[10px] pl-6 pr-14 cursor-pointer select-none text-left transition-colors hover:bg-(--hover-fill)"><!> <span> </span></button>'),Mt=e.from_html("<div></div>");function Nt(le,R){e.push(R,!0);let ie=e.prop(R,"options",19,()=>[]),F=e.prop(R,"value",15,""),Q=e.prop(R,"disabled",3,!1);function X(H){var z;Q()||(F(H),(z=R.onchange)==null||z.call(R,F()))}var j=Mt();e.each(j,20,ie,H=>H,(H,z)=>{const G=e.derived(()=>F()===z);var Y=At(),se=e.child(Y);_e(se,{get checked(){return e.get(G)}});var ee=e.sibling(se,2),pe=e.child(ee,!0);e.reset(ee),e.reset(Y),e.template_effect(()=>{e.set_attribute(Y,"aria-checked",e.get(G)),e.set_class(ee,1,e.clsx(["flex-1 truncate text-left text-[16px]/[110%] transition-colors",e.get(G)?"text-(--fg)":"text-(--fg-muted) group-hover:text-(--fg)"])),e.set_text(pe,z)}),e.delegated("click",Y,()=>X(z)),e.append(H,Y)}),e.reset(j),e.template_effect(()=>e.set_class(j,1,e.clsx(["flex flex-col",Q()&&"pointer-events-none opacity-50"]))),e.append(le,j),e.pop()}e.delegate(["click"]);const ne=(le,R=e.noop,ie=e.noop)=>{var F=Ht(),Q=e.child(F);yt(Q,{size:"lg",tight:!0,get title(){return R()}});var X=e.sibling(Q,2);e.snippet(X,ie),e.reset(F),e.append(le,F)},J=(le,R=e.noop,ie=e.noop)=>{var F=It(),Q=e.child(F),X=e.child(Q,!0);e.reset(Q);var j=e.sibling(Q,2),H=e.child(j);e.snippet(H,ie),e.reset(j),e.reset(F),e.template_effect(()=>e.set_text(X,R())),e.append(le,F)};var Ht=e.from_html('<section class="flex flex-col gap-16 py-20 first:pt-4"><!> <!></section>'),It=e.from_html('<div class="flex flex-col gap-7 pl-8"><span class="text-[11px]/none text-neutral-400"> </span> <div class="flex flex-wrap items-center gap-10"><!></div></div>'),xe=e.from_html("<!> <!>",1),me=e.from_html("<!> <!> <!> <!> <!>",1),Ft=e.from_html('<span class="text-center text-[11px]/none font-medium text-neutral-400"> </span>'),qt=e.from_html('<div class="flex justify-center"><!></div>'),Dt=e.from_html('<span class="text-[11px]/none text-neutral-400"> </span> <!>',1),Rt=e.from_html('<div class="flex flex-col gap-20"><div class="grid grid-cols-[4.5rem_repeat(2,minmax(0,1fr))] items-center gap-x-10 gap-y-12"><span></span> <!> <!></div> <!> <!> <!></div>'),he=e.from_html("<!> <!> <!>",1),Ot=e.from_html('<div class="flex flex-wrap items-center gap-10 pl-8"><!> <!> <!> <!> <!></div>'),zt=e.from_html('<div class="self-center"><!></div>'),Vt=e.from_html('<div class="pl-8"><!></div>'),Et=e.from_html('<div><p class="field-error-text" role="alert">Enter a valid email</p></div>'),Ut=e.from_html('<button type="button"><!></button>'),Qt=e.from_html('<div class="flex flex-col gap-10 pl-8"><!> <!> <div><!> <!></div> <!> <!> <!></div>'),jt=e.from_html('<p class="field-hint"><span>HTML detected. <button type="button" class="field-note-action">Enable Renders as HTML</button></span></p>'),Yt=e.from_html('<p class="field-error" role="status">1 item over the limit. Remove it or increase Max items.</p>'),Zt=e.from_html('<p class="field-hint"><span>Shown under the title.</span></p>'),Gt=e.from_html('<span class="text-[11px]/none text-neutral-400"> </span> <p> </p> <p> </p>',1),Wt=e.from_html('<div><p class="field-error-text" role="alert">Required</p></div>'),Kt=e.from_html('<div><p class="field-error-text" role="alert">A value is outside the allowed range.</p></div>'),Jt=e.from_html('<div class="flex flex-col gap-20 pl-8"><div><!></div> <div class="grid grid-cols-[4.5rem_minmax(0,1fr)_minmax(0,1fr)] items-center gap-x-10 gap-y-12"><span></span> <span class="text-[11px]/none font-medium text-neutral-400">bare</span> <span class="text-[11px]/none font-medium text-neutral-400">wrapped</span> <!></div> <div><!> <p class="field-hint-text"></p></div> <div><!> <p class="field-hint-text"> <button type="button" class="field-note-action"> </button></p></div> <div><!> <p class="field-hint-text">HTML detected. <button type="button" class="field-note-action" disabled="">Enabling\u2026</button></p></div> <div><!> <p class="field-hint-text">Save and refresh the page to update this list\u2019s preview.</p></div> <div><!> <p class="field-hint-text">Universal identifier. Locked after save.</p></div> <div><!> <p class="field-warning-text flex flex-wrap items-center gap-x-4"><!><span class="mr-2">Connect in code</span><!></p></div> <div><!> <!></div> <div><!> <!></div> <!> <!> <!></div>'),Xt=e.from_html('<div class="flex flex-col gap-16"><!> <div class="flex flex-col gap-7 pl-8"><span class="text-[11px]/none text-neutral-400">Toggle field</span> <div class="max-w-340"><!></div></div> <div class="flex flex-col gap-7 pl-8"><span class="text-[11px]/none text-neutral-400">Multi-select field \u2014 label + checkbox dropdown</span> <div class="max-w-340"><!></div></div> <div class="flex flex-col gap-7 pl-8"><span class="text-[11px]/none text-neutral-400">Select field \u2014 single-select dropdown (sky tint when set)</span> <div class="max-w-340"><!></div></div> <div class="flex flex-col gap-7 pl-8"><span class="text-[11px]/none text-neutral-400">Toggle field \u2014 grouped in a List</span> <div class="max-w-340"><!></div></div> <div class="flex flex-col gap-7 pl-8"><span class="text-[11px]/none text-neutral-400">Checkbox</span> <div class="flex items-center gap-10"><!> <!> <!></div> <!></div> <div class="flex flex-col gap-7 pl-8"><span class="text-[11px]/none text-neutral-400">Radio</span> <div class="flex items-center gap-10"><!> <!> <!></div> <!></div></div>'),el=e.from_html('<div class="flex flex-col gap-16"><!> <div class="flex flex-col gap-7 pl-8"><span class="text-[11px]/none text-neutral-400">Skeleton</span> <div class="flex flex-col gap-6"><!> <!></div></div></div>'),tl=e.from_html("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ll=e.from_html("<!> <!> <!> <!>",1),il=e.from_html("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),al=e.from_html("<!> <!> <!> <!> <!> <!> <!> <!>",1),nl=e.from_html('<div class="flex flex-col gap-16"><!> <!> <!> <!> <!> <!></div>'),sl=e.from_html(`<h1>The type scale</h1> <p>Body copy sets the rhythm \u2014 fifteen pixels, a calm line height, muted ink. Every other
2
+ level is measured against it.</p> <section class="flex flex-col gap-6"><h2>Section heading</h2> <p>Breaks a topic into parts. Weighted, full-strength ink, no caps. Inline <code>code</code> and <a href="#prose">links</a> sit here too.</p></section> <section class="flex flex-col gap-6"><h3>Sub-heading</h3> <p>The quietest level, for the occasional aside.</p></section> <!>`,1),rl=e.from_html('<div class="pl-8"><div class="superellipse max-w-440 rounded-[14px] border-[0.5px] border-(--hairline)"><!></div></div>'),dl=e.from_html('<div class="mx-auto w-full max-w-760 px-14 py-12"><div class="flex flex-col divide-y-[0.5px] divide-(--hairline)"><!> <!> <!> <!> <!> <!> <!> <!> <!></div></div>');function ol(le,R){e.push(R,!0);const ie=["idle","sky","green","danger"],F=[{label:"filled",ghost:!1},{label:"ghost",ghost:!0}];let Q=e.state("Hello Okno"),X=e.state(!0),j=e.state(!1),H=e.state(!0),z=e.state(!1),G=e.state(e.proxy(["Images","Audio"])),Y=e.state("Draft"),se=e.state(e.proxy(["image"])),ee=e.state(e.proxy([])),pe=e.state("hero"),Me=e.state(""),de=e.state(!0),te=e.state(!0),$e=e.state(!1),Ne=e.state(e.proxy(["Press E.<br/>Edit it live.","Build for free.<br/>Pay when it's live."])),He=e.state(e.proxy(["One","Two","Three","Four"])),Ie=e.state(e.proxy([{text:"Home",url:"/",external:!1},{text:"GitHub",url:"https://github.com/okno-cms/okno",external:!0}]));const et=[{tone:"hint",bare:"field-hint-text",wrapped:"field-hint",text:"Shown in the browser tab."},{tone:"warning",bare:"field-warning-text",wrapped:"field-warning",text:"Connect in code"},{tone:"error",bare:"field-error-text",wrapped:"field-error",text:"Required"}],{modals:tt,confirms:ke,bus:re}=kt();let Fe=e.state("https://example.com");const $=(ce,ve)=>tt.open(ce,ve);function oe(ce={}){return{role:"editor",becomesOwner:!1,createdBy:"gauel",createdByName:"Gabriel Uhl\xED\u0159",login:null,repo:"gauel/okno-test",...ce}}function lt(){ke.ask({title:"Delete this item?",description:"This can't be undone.",confirmText:"Delete",danger:!0,icon:"trash-2"})}function qe(ce=!1){let ve=!0;Bt({get isDirty(){return ve},savePromise:null},{save:()=>{ve=!1},discard:()=>{ve=!1}},ke,{title:"Unsaved changes",description:ce?"Save your edits before editing structure?":"Save your edits before leaving?"})}function it(){ke.askChoice({title:"File already exists",description:"Choose how to handle this duplicate file.",choices:[{key:"cancel",label:"Cancel",variant:"secondary"},{key:"skip",label:"Skip",variant:"secondary"},{key:"keep_both",label:"Keep Both",variant:"primary"},{key:"replace",label:"Replace",variant:"danger"}]})}function at(){ke.ask({title:"Rename field?",description:"Update your markup to match:",confirmText:"Rename",icon:"input-text",codeLang:"html",codeBlocks:[{text:"From",code:"<h1 {...home.title}>"},{text:"to",code:"<h1 {...home.heading}>"}]})}wt(le,{children:(ce,ve)=>{var Se=dl(),De=e.child(Se);{const st=V=>{var f=Rt();{const D=a=>{var l=xe(),s=e.first_child(l);t(s,{children:(i,c)=>{e.next();var o=e.text("Medium");e.append(i,o)},$$slots:{default:!0}});var n=e.sibling(s,2);t(n,{size:"lg",children:(i,c)=>{e.next();var o=e.text("Large");e.append(i,o)},$$slots:{default:!0}}),e.append(a,l)},b=a=>{var l=me(),s=e.first_child(l);t(s,{icon:"upload",children:(v,u)=>{e.next();var p=e.text("Upload");e.append(v,p)},$$slots:{default:!0}});var n=e.sibling(s,2);t(n,{tone:"idle",icon:"images",children:(v,u)=>{e.next();var p=e.text("From Files");e.append(v,p)},$$slots:{default:!0}});var i=e.sibling(n,2);t(i,{tone:"idle",iconRight:"arrow-down",children:(v,u)=>{e.next();var p=e.text("Select");e.append(v,p)},$$slots:{default:!0}});var c=e.sibling(i,2);t(c,{tone:"idle",ghost:!0,icon:"cog","aria-label":"Settings"});var o=e.sibling(c,2);t(o,{icon:"check","aria-label":"Confirm"}),e.append(a,l)},w=a=>{var l=me(),s=e.first_child(l);t(s,{loading:!0,children:(v,u)=>{e.next();var p=e.text("Saving");e.append(v,p)},$$slots:{default:!0}});var n=e.sibling(s,2);t(n,{tone:"idle",loading:!0,icon:"upload",children:(v,u)=>{e.next();var p=e.text("Uploading");e.append(v,p)},$$slots:{default:!0}});var i=e.sibling(n,2);t(i,{loading:!0,"aria-label":"Loading"});var c=e.sibling(i,2);t(c,{disabled:!0,children:(v,u)=>{e.next();var p=e.text("Disabled");e.append(v,p)},$$slots:{default:!0}});var o=e.sibling(c,2);t(o,{tone:"idle",disabled:!0,children:(v,u)=>{e.next();var p=e.text("Disabled");e.append(v,p)},$$slots:{default:!0}}),e.append(a,l)};var C=e.child(f),M=e.sibling(e.child(C),2);e.each(M,17,()=>F,e.index,(a,l)=>{var s=Ft(),n=e.child(s,!0);e.reset(s),e.template_effect(()=>e.set_text(n,e.get(l).label)),e.append(a,s)});var N=e.sibling(M,2);e.each(N,17,()=>ie,e.index,(a,l)=>{var s=Dt(),n=e.first_child(s),i=e.child(n,!0);e.reset(n);var c=e.sibling(n,2);e.each(c,17,()=>F,e.index,(o,v)=>{var u=qt(),p=e.child(u);t(p,{get tone(){return e.get(l)},get ghost(){return e.get(v).ghost},children:(h,y)=>{e.next();var A=e.text("Button");e.append(h,A)},$$slots:{default:!0}}),e.reset(u),e.append(o,u)}),e.template_effect(()=>e.set_text(i,e.get(l))),e.append(a,s)}),e.reset(C);var I=e.sibling(C,2);J(I,()=>"Sizes",()=>D);var L=e.sibling(I,2);J(L,()=>"Icons & icon-only",()=>b);var B=e.sibling(L,2);J(B,()=>"States",()=>w),e.reset(f)}e.append(V,f)},rt=V=>{var f=Ot(),C=e.child(f);ue(C,{label:"Options",children:(B,D)=>{var b=me(),w=e.first_child(b);W(w,{icon:"upload",children:(i,c)=>{e.next();var o=e.text("Replace");e.append(i,o)},$$slots:{default:!0}});var a=e.sibling(w,2);W(a,{icon:"images",children:(i,c)=>{e.next();var o=e.text("From Files");e.append(i,o)},$$slots:{default:!0}});var l=e.sibling(a,2);W(l,{icon:"zap",children:(i,c)=>{e.next();var o=e.text("Compress");e.append(i,o)},$$slots:{default:!0}});var s=e.sibling(l,2);_t(s);var n=e.sibling(s,2);W(n,{icon:"trash-2",variant:"danger",children:(i,c)=>{e.next();var o=e.text("Remove");e.append(i,o)},$$slots:{default:!0}}),e.append(B,b)},$$slots:{default:!0}});var M=e.sibling(C,2);ue(M,{label:"English",icon:"languages",children:(B,D)=>{var b=xe(),w=e.first_child(b);W(w,{selected:!0,children:(l,s)=>{e.next();var n=e.text("English");e.append(l,n)},$$slots:{default:!0}});var a=e.sibling(w,2);W(a,{selected:!1,children:(l,s)=>{e.next();var n=e.text("\u010Ce\u0161tina");e.append(l,n)},$$slots:{default:!0}}),e.append(B,b)},$$slots:{default:!0}});var N=e.sibling(M,2);ue(N,{label:"main",icon:"git-branch",tone:"idle",children:(B,D)=>{var b=xe(),w=e.first_child(b);W(w,{selected:!0,children:(l,s)=>{e.next();var n=e.text("main");e.append(l,n)},$$slots:{default:!0}});var a=e.sibling(w,2);W(a,{selected:!1,children:(l,s)=>{e.next();var n=e.text("production");e.append(l,n)},$$slots:{default:!0}}),e.append(B,b)},$$slots:{default:!0}});var I=e.sibling(N,2);ue(I,{label:"Media",icon:"images",tone:"idle",children:(B,D)=>{var b=he(),w=e.first_child(b);W(w,{indicator:"checkbox",selected:!0,children:(s,n)=>{e.next();var i=e.text("Images");e.append(s,i)},$$slots:{default:!0}});var a=e.sibling(w,2);W(a,{indicator:"checkbox",selected:!1,children:(s,n)=>{e.next();var i=e.text("Videos");e.append(s,i)},$$slots:{default:!0}});var l=e.sibling(a,2);W(l,{indicator:"checkbox",selected:!0,children:(s,n)=>{e.next();var i=e.text("Audio");e.append(s,i)},$$slots:{default:!0}}),e.append(B,b)},$$slots:{default:!0}});var L=e.sibling(I,2);ue(L,{label:"Publish",tone:"sky",chevron:!1,children:(B,D)=>{W(B,{icon:"rocket",children:(b,w)=>{e.next();var a=e.text("Publish now");e.append(b,a)},$$slots:{default:!0}})},$$slots:{default:!0}}),e.reset(f),e.append(V,f)},dt=V=>{var f=Vt(),C=e.child(f);fe(C,{children:(M,N)=>{var I=me(),L=e.first_child(I);be(L,{icon:"file-text",title:"About",subtitle:"/about \u2014 default sky tile",onclick:()=>{}});var B=e.sibling(L,2);be(B,{icon:"layers",iconBadge:"rounded-full glass bg-linear-to-b from-green-500 to-green-600 text-white",title:"Posts",subtitle:"12 entries \u2014 shade override",chevron:!0});var D=e.sibling(B,2);be(D,{title:"Plain row",subtitle:"No leading slot \u2014 balanced pl-12"});var b=e.sibling(D,2);be(b,{icon:"git-branch",title:"With end slot",subtitle:"Action on the right",end:a=>{var l=zt(),s=e.child(l);t(s,{tone:"idle",ghost:!0,icon:"external-link",children:(n,i)=>{e.next();var c=e.text("Open");e.append(n,c)},$$slots:{default:!0}}),e.reset(l),e.append(a,l)},$$slots:{end:!0}});var w=e.sibling(b,2);be(w,{icon:"trash-2",titleClass:"text-rose-500",title:"Disabled",subtitle:"Not selectable",disabled:!0}),e.append(M,I)}}),e.reset(f),e.append(V,f)},ot=V=>{var f=Qt(),C=e.child(f);U(C,{label:"Text",children:(a,l)=>{Z(a,{placeholder:"Type something\u2026",get value(){return e.get(Q)},set value(s){e.set(Q,s,!0)}})},$$slots:{default:!0}});var M=e.sibling(C,2);U(M,{label:"Required",required:!0,children:(a,l)=>{Z(a,{placeholder:"Empty"})},$$slots:{default:!0}});var N=e.sibling(M,2),I=e.child(N);U(I,{label:"With error",children:(a,l)=>{Z(a,{value:"not-an-email",get invalid(){return e.get(te)}})},$$slots:{default:!0}});var L=e.sibling(I,2);{var B=a=>{var l=Et();e.transition(3,l,()=>Pe,()=>({duration:180,easing:Te})),e.append(a,l)};e.if(L,a=>{e.get(te)&&a(B)})}e.reset(N);var D=e.sibling(N,2);U(D,{label:"Disabled",disabled:!0,children:(a,l)=>{Z(a,{value:"Read only",disabled:!0})},$$slots:{default:!0}});var b=e.sibling(D,2);U(b,{label:"Multiline",children:(a,l)=>{Z(a,{multiline:!0,placeholder:"A few lines\u2026"})},$$slots:{default:!0}});var w=e.sibling(b,2);U(w,{label:"Slug",as:"div",action:a=>{var l=Ut(),s=e.child(l);{let n=e.derived(()=>e.get(de)?"lock":"unlock");Ze(s,{get name(){return e.get(n)},variant:"stroke",class:"size-12 pointer-events-none"})}e.reset(l),e.template_effect(()=>{e.set_attribute(l,"aria-pressed",e.get(de)),e.set_attribute(l,"aria-label",e.get(de)?"Unlock":"Lock"),e.set_class(l,1,e.clsx(["flex-center size-24 cursor-pointer rounded-lg transition-colors",e.get(de)?"bg-sky-500/10 text-sky-500 hover:bg-sky-500/15":"bg-black/5 text-neutral-400 hover:bg-black/8 hover:text-neutral-600 dark:bg-white/10 dark:hover:bg-white/15"]))}),e.delegated("click",l,()=>e.set(de,!e.get(de))),e.append(a,l)},children:(a,l)=>{{let s=e.derived(()=>!e.get(de));Z(a,{value:"my-page",placeholder:"slug",get disabled(){return e.get(s)}})}},$$slots:{action:!0,default:!0}}),e.reset(f),e.append(V,f)},ct=V=>{var f=Jt();{const ft=g=>{var S=jt();e.append(g,S)},bt=g=>{var S=Yt();e.append(g,S)},xt=g=>{var S=Zt();e.append(g,S)};var C=e.child(f),M=e.child(C);t(M,{tone:"idle",onclick:()=>e.set(te,!e.get(te)),children:(g,S)=>{e.next();var K=e.text();e.template_effect(()=>e.set_text(K,e.get(te)?"Hide errors":"Show errors")),e.append(g,K)},$$slots:{default:!0}}),e.reset(C);var N=e.sibling(C,2),I=e.sibling(e.child(N),6);e.each(I,17,()=>et,e.index,(g,S)=>{var K=Gt(),ae=e.first_child(K),Be=e.child(ae,!0);e.reset(ae);var we=e.sibling(ae,2),mt=e.child(we,!0);e.reset(we);var Ce=e.sibling(we,2),$t=e.child(Ce,!0);e.reset(Ce),e.template_effect(()=>{e.set_text(Be,e.get(S).tone),e.set_class(we,1,e.clsx([e.get(S).bare,"px-0 py-0"])),e.set_text(mt,e.get(S).text),e.set_class(Ce,1,e.clsx([e.get(S).wrapped,"self-start"])),e.set_text($t,e.get(S).text)}),e.append(g,K)}),e.reset(N);var L=e.sibling(N,2),B=e.child(L);U(B,{label:"Help text",children:(g,S)=>{Z(g,{placeholder:"Page title"})},$$slots:{default:!0}});var D=e.sibling(B,2);D.textContent=`Shown in the browser tab.
3
+ A second line keeps its break.`,e.reset(L);var b=e.sibling(L,2),w=e.child(b);U(w,{label:"HTML detected",children:(g,S)=>{Z(g,{value:"Build for free.<br/>Pay when it's live."})},$$slots:{default:!0}});var a=e.sibling(w,2),l=e.child(a);l.nodeValue="HTML detected. ";var s=e.sibling(l),n=e.child(s,!0);e.reset(s),e.reset(a),e.reset(b);var i=e.sibling(b,2),c=e.child(i);U(c,{label:"Action busy",children:(g,S)=>{Z(g,{value:"<b>Bold</b>"})},$$slots:{default:!0}}),e.next(2),e.reset(i);var o=e.sibling(i,2),v=e.child(o);U(v,{label:"Refresh notice",children:(g,S)=>{Z(g,{value:"Three items"})},$$slots:{default:!0}}),e.next(2),e.reset(o);var u=e.sibling(o,2),p=e.child(u);U(p,{label:"Slug locked",children:(g,S)=>{Z(g,{value:"my-page",disabled:!0})},$$slots:{default:!0}}),e.next(2),e.reset(u);var h=e.sibling(u,2),y=e.child(h);U(y,{label:"Connect in code",children:(g,S)=>{Z(g,{value:"Hello"})},$$slots:{default:!0}});var A=e.sibling(y,2),P=e.child(A);Ze(P,{name:"alert",variant:"solid",size:14,class:"shrink-0"});var E=e.sibling(P,2);Ge(E,{code:"<h1 {...home.title}>",lang:"jsx",copy:!0,inline:!0}),e.reset(A),e.reset(h);var T=e.sibling(h,2),k=e.child(T);U(k,{label:"Required",required:!0,children:(g,S)=>{Z(g,{placeholder:"Empty",get invalid(){return e.get(te)}})},$$slots:{default:!0}});var _=e.sibling(k,2);{var x=g=>{var S=Wt();e.transition(3,S,()=>Pe,()=>({duration:180,easing:Te})),e.append(g,S)};e.if(_,g=>{e.get(te)&&g(x)})}e.reset(T);var q=e.sibling(T,2),O=e.child(q);U(O,{label:"Out of range",children:(g,S)=>{Z(g,{value:"140",get invalid(){return e.get(te)}})},$$slots:{default:!0}});var r=e.sibling(O,2);{var m=g=>{var S=Kt();e.transition(3,S,()=>Pe,()=>({duration:180,easing:Te})),e.append(g,S)};e.if(r,g=>{e.get(te)&&g(m)})}e.reset(q);var d=e.sibling(q,2);U(d,{label:"List \xB7 HTML detected",as:"div",children:(g,S)=>{{let K=e.derived(()=>({path:"ui.htmlList",value:e.get(Ne),def:{type:"string",multiple:!0}}));Le(g,{get field(){return e.get(K)},get note(){return ft},onchange:ae=>e.set(Ne,ae,!0)})}},$$slots:{default:!0}});var Ye=e.sibling(d,2);U(Ye,{label:"List \xB7 over the limit",as:"div",children:(g,S)=>{{let K=e.derived(()=>({path:"ui.overList",value:e.get(He),def:{type:"string",multiple:!0,maxItems:3}})),ae=e.derived(()=>e.get(te)?bt:xt);Le(g,{get field(){return e.get(K)},get note(){return e.get(ae)},onchange:Be=>e.set(He,Be,!0)})}},$$slots:{default:!0}});var ut=e.sibling(Ye,2);U(ut,{label:"Links \xB7 actions on hover",as:"div",children:(g,S)=>{{let K=e.derived(()=>({path:"ui.linkList",value:e.get(Ie),def:{type:"link",multiple:!0}}));Le(g,{get field(){return e.get(K)},onchange:ae=>e.set(Ie,ae,!0)})}},$$slots:{default:!0}}),e.reset(f),e.template_effect(()=>{s.disabled=e.get($e),e.set_text(n,e.get($e)?"Enabling\u2026":"Enable Renders as HTML")}),e.delegated("click",s,()=>e.set($e,!e.get($e)))}e.append(V,f)},pt=V=>{var f=Xt();{const k=_=>{var x=he(),q=e.first_child(x);Ae(q,{get checked(){return e.get(X)},set checked(m){e.set(X,m,!0)}});var O=e.sibling(q,2);Ae(O,{get checked(){return e.get(j)},set checked(m){e.set(j,m,!0)}});var r=e.sibling(O,2);Ae(r,{checked:!0,disabled:!0}),e.append(_,x)};var C=e.child(f);J(C,()=>"Switch",()=>k);var M=e.sibling(C,2),N=e.sibling(e.child(M),2),I=e.child(N);fe(I,{children:(_,x)=>{var q=he(),O=e.first_child(q);ge(O,{label:"Required",get checked(){return e.get(H)},set checked(d){e.set(H,d,!0)}});var r=e.sibling(O,2);ge(r,{label:"Multiple",subtitle:"Allow more than one value.",get checked(){return e.get(z)},set checked(d){e.set(z,d,!0)}});var m=e.sibling(r,2);ge(m,{label:"Integer only",onremove:()=>{},get checked(){return e.get(H)},set checked(d){e.set(H,d,!0)}}),e.append(_,q)}}),e.reset(N),e.reset(M);var L=e.sibling(M,2),B=e.sibling(e.child(L),2),D=e.child(B);fe(D,{children:(_,x)=>{var q=xe(),O=e.first_child(q);We(O,{label:"Allowed types",options:[{value:"image",label:"Images"},{value:"video",label:"Videos"},{value:"audio",label:"Audio"},{value:"document",label:"Files"}],get selected(){return e.get(se)},emptyLabel:"Any file type",onchange:m=>e.set(se,m,!0)});var r=e.sibling(O,2);We(r,{label:"Formatting",groups:[{options:[{value:"bold",label:"Bold"},{value:"italic",label:"Italic"},{value:"link",label:"Link"}]},{options:[{value:"h1",label:"Heading"},{value:"bulletList",label:"Bullet list"},{value:"blockquote",label:"Quote"}]},{options:[{value:"media",label:"Media"},{value:"table",label:"Table"}]}],get selected(){return e.get(ee)},emptyLabel:"No formatting",onchange:m=>e.set(ee,m,!0)}),e.append(_,q)}}),e.reset(B),e.reset(L);var b=e.sibling(L,2),w=e.sibling(e.child(b),2),a=e.child(w);fe(a,{children:(_,x)=>{var q=xe(),O=e.first_child(q);Ke(O,{label:"Block",placeholder:"Pick block",get value(){return e.get(pe)},options:[{value:"hero",label:"Hero"},{value:"gallery",label:"Gallery"},{value:"pricing",label:"Pricing"}],onchange:m=>e.set(pe,m,!0)});var r=e.sibling(O,2);Ke(r,{label:"Collection",placeholder:"Pick collection",get value(){return e.get(Me)},options:[{value:"articles",label:"Articles"},{value:"authors",label:"Authors"}],onchange:m=>e.set(Me,m,!0)}),e.append(_,q)}}),e.reset(w),e.reset(b);var l=e.sibling(b,2),s=e.sibling(e.child(l),2),n=e.child(s);fe(n,{children:(_,x)=>{var q=he(),O=e.first_child(q);ge(O,{label:"Images",get checked(){return e.get(H)},set checked(d){e.set(H,d,!0)}});var r=e.sibling(O,2);ge(r,{label:"Videos",get checked(){return e.get(z)},set checked(d){e.set(z,d,!0)}});var m=e.sibling(r,2);ge(m,{checked:!0,label:"Audio"}),e.append(_,q)}}),e.reset(s),e.reset(l);var i=e.sibling(l,2),c=e.sibling(e.child(i),2),o=e.child(c);ye(o,{checked:!1});var v=e.sibling(o,2);ye(v,{checked:!0});var u=e.sibling(v,2);ye(u,{checked:!0,disabled:!0}),e.reset(c);var p=e.sibling(c,2);Lt(p,{options:["Images","Videos","Audio"],get value(){return e.get(G)},set value(_){e.set(G,_,!0)}}),e.reset(i);var h=e.sibling(i,2),y=e.sibling(e.child(h),2),A=e.child(y);_e(A,{checked:!1});var P=e.sibling(A,2);_e(P,{checked:!0});var E=e.sibling(P,2);_e(E,{checked:!0,disabled:!0}),e.reset(y);var T=e.sibling(y,2);Nt(T,{options:["Draft","Published","Archived"],get value(){return e.get(Y)},set value(_){e.set(Y,_,!0)}}),e.reset(h),e.reset(f)}e.append(V,f)},vt=V=>{var f=el();{const B=D=>{var b=he(),w=e.first_child(b);St(w,{content:"A helpful hint",trigger:(s,n)=>{let i=()=>n?.().props;t(s,e.spread_props(i,{tone:"idle",children:(c,o)=>{e.next();var v=e.text("Hover me");e.append(c,v)},$$slots:{default:!0}}))},$$slots:{trigger:!0}});var a=e.sibling(w,2);Xe(a,{class:"size-16"});var l=e.sibling(a,2);Xe(l,{class:"size-24"}),e.append(D,b)};var C=e.child(f);J(C,()=>"Tooltip & spinner",()=>B);var M=e.sibling(C,2),N=e.sibling(e.child(M),2),I=e.child(N);Je(I,{class:"h-30 w-full rounded-[10px]"});var L=e.sibling(I,2);Je(L,{class:"h-30 w-2/3 rounded-[10px] opacity-60"}),e.reset(N),e.reset(M),e.reset(f)}e.append(V,f)},gt=V=>{var f=nl();{const D=n=>{var i=tl(),c=e.first_child(i);t(c,{tone:"idle",onclick:()=>$("trust-domain"),children:(r,m)=>{e.next();var d=e.text("Trust domain");e.append(r,d)},$$slots:{default:!0}});var o=e.sibling(c,2);t(o,{tone:"idle",onclick:()=>$("publish-needs-domain"),children:(r,m)=>{e.next();var d=e.text("Publish needs domain");e.append(r,d)},$$slots:{default:!0}});var v=e.sibling(o,2);t(v,{tone:"idle",onclick:()=>re.emit("publish:problem",{reason:"conflict",message:"GitHub returned 409 \u2014 the branch is out of date."}),children:(r,m)=>{e.next();var d=e.text("Publish problem");e.append(r,d)},$$slots:{default:!0}});var u=e.sibling(v,2);t(u,{tone:"idle",onclick:()=>$("demo-cta"),children:(r,m)=>{e.next();var d=e.text("Demo CTA");e.append(r,d)},$$slots:{default:!0}});var p=e.sibling(u,2);t(p,{tone:"idle",onclick:()=>$("not-authorized"),children:(r,m)=>{e.next();var d=e.text("Not authorized");e.append(r,d)},$$slots:{default:!0}});var h=e.sibling(p,2);t(h,{tone:"idle",onclick:()=>$("invite-accept",{token:"preview",info:oe()}),children:(r,m)=>{e.next();var d=e.text("Invite \xB7 editor");e.append(r,d)},$$slots:{default:!0}});var y=e.sibling(h,2);t(y,{tone:"idle",onclick:()=>$("invite-accept",{token:"preview",info:oe({role:"developer"})}),children:(r,m)=>{e.next();var d=e.text("Invite \xB7 developer");e.append(r,d)},$$slots:{default:!0}});var A=e.sibling(y,2);t(A,{tone:"idle",onclick:()=>$("invite-accept",{token:"preview",info:oe({becomesOwner:!0})}),children:(r,m)=>{e.next();var d=e.text("Invite \xB7 handoff");e.append(r,d)},$$slots:{default:!0}});var P=e.sibling(A,2);t(P,{tone:"idle",onclick:()=>$("invite-accept",{token:"preview",info:oe({login:"octocat"})}),children:(r,m)=>{e.next();var d=e.text("Invite \xB7 scoped");e.append(r,d)},$$slots:{default:!0}});var E=e.sibling(P,2);t(E,{tone:"idle",onclick:()=>$("invite-accept",{token:"preview",info:oe({createdByName:null})}),children:(r,m)=>{e.next();var d=e.text("Invite \xB7 no name");e.append(r,d)},$$slots:{default:!0}});var T=e.sibling(E,2);t(T,{tone:"idle",onclick:()=>$("invite-accept",{token:"preview",error:"This invitation has already been used, or it's expired."}),children:(r,m)=>{e.next();var d=e.text("Invite \xB7 expired");e.append(r,d)},$$slots:{default:!0}});var k=e.sibling(T,2);t(k,{tone:"idle",onclick:()=>$("invite-accept",{token:"preview",info:oe(),stage:"welcome"}),children:(r,m)=>{e.next();var d=e.text("Invite \xB7 welcome");e.append(r,d)},$$slots:{default:!0}});var _=e.sibling(k,2);t(_,{tone:"idle",onclick:()=>$("invite-accept",{token:"preview",info:oe({becomesOwner:!0}),stage:"welcome",becameOwner:!0}),children:(r,m)=>{e.next();var d=e.text("Invite \xB7 welcome (owner)");e.append(r,d)},$$slots:{default:!0}});var x=e.sibling(_,2);t(x,{tone:"idle",onclick:()=>$("billing-consent",{stage:"consent"}),children:(r,m)=>{e.next();var d=e.text("Billing consent");e.append(r,d)},$$slots:{default:!0}});var q=e.sibling(x,2);t(q,{tone:"idle",onclick:()=>$("billing-consent",{stage:"success",plan:"year"}),children:(r,m)=>{e.next();var d=e.text("Billing success");e.append(r,d)},$$slots:{default:!0}});var O=e.sibling(q,2);t(O,{tone:"idle",onclick:()=>$("billing-year-capped",{cycleEnd:"2026-12-31"}),children:(r,m)=>{e.next();var d=e.text("Year capped");e.append(r,d)},$$slots:{default:!0}}),e.append(n,i)},b=n=>{var i=ll(),c=e.first_child(i);t(c,{tone:"idle",onclick:()=>$("setup-preview",{stage:"signin"}),children:(p,h)=>{e.next();var y=e.text("Setup \xB7 sign-in");e.append(p,y)},$$slots:{default:!0}});var o=e.sibling(c,2);t(o,{tone:"idle",onclick:()=>$("setup-preview",{stage:"install"}),children:(p,h)=>{e.next();var y=e.text("Setup \xB7 repository access");e.append(p,y)},$$slots:{default:!0}});var v=e.sibling(o,2);t(v,{tone:"idle",onclick:()=>$("setup-preview",{stage:"scaffold"}),children:(p,h)=>{e.next();var y=e.text("Setup \xB7 progress");e.append(p,y)},$$slots:{default:!0}});var u=e.sibling(v,2);t(u,{tone:"idle",onclick:()=>$("setup-preview",{stage:"error"}),children:(p,h)=>{e.next();var y=e.text("Setup \xB7 error");e.append(p,y)},$$slots:{default:!0}}),e.append(n,i)},w=n=>{var i=il(),c=e.first_child(i);t(c,{tone:"idle",onclick:()=>$("new-page"),children:(k,_)=>{e.next();var x=e.text("New page");e.append(k,x)},$$slots:{default:!0}});var o=e.sibling(c,2);t(o,{tone:"idle",onclick:()=>$("new-collection"),children:(k,_)=>{e.next();var x=e.text("New collection");e.append(k,x)},$$slots:{default:!0}});var v=e.sibling(o,2);t(v,{tone:"idle",onclick:()=>$("new-global"),children:(k,_)=>{e.next();var x=e.text("New global");e.append(k,x)},$$slots:{default:!0}});var u=e.sibling(v,2);t(u,{tone:"idle",onclick:()=>$("new-block"),children:(k,_)=>{e.next();var x=e.text("New block");e.append(k,x)},$$slots:{default:!0}});var p=e.sibling(u,2);t(p,{tone:"idle",onclick:()=>$("new-folder"),children:(k,_)=>{e.next();var x=e.text("New folder");e.append(k,x)},$$slots:{default:!0}});var h=e.sibling(p,2);t(h,{tone:"idle",onclick:()=>$("add-language"),children:(k,_)=>{e.next();var x=e.text("Add language");e.append(k,x)},$$slots:{default:!0}});var y=e.sibling(h,2);t(y,{tone:"idle",onclick:()=>$("invite-editor"),children:(k,_)=>{e.next();var x=e.text("Invite editor");e.append(k,x)},$$slots:{default:!0}});var A=e.sibling(y,2);t(A,{tone:"idle",onclick:()=>$("compress-files"),children:(k,_)=>{e.next();var x=e.text("Compress files");e.append(k,x)},$$slots:{default:!0}});var P=e.sibling(A,2);t(P,{tone:"idle",onclick:()=>$("prepare-icons",{folder:""}),children:(k,_)=>{e.next();var x=e.text("Prepare icons");e.append(k,x)},$$slots:{default:!0}});var E=e.sibling(P,2);t(E,{tone:"idle",onclick:()=>$("rt-url",{value:e.get(Fe),onapply:k=>{e.set(Fe,k,!0)}}),children:(k,_)=>{e.next();var x=e.text("Rich-text URL");e.append(k,x)},$$slots:{default:!0}});var T=e.sibling(E,2);t(T,{tone:"idle",onclick:()=>$("detected-fields",{kind:"pages",name:"home"}),children:(k,_)=>{e.next();var x=e.text("Detected fields");e.append(k,x)},$$slots:{default:!0}}),e.append(n,i)},a=n=>{var i=me(),c=e.first_child(i);t(c,{tone:"idle",onclick:lt,children:(h,y)=>{e.next();var A=e.text("Confirm (danger)");e.append(h,A)},$$slots:{default:!0}});var o=e.sibling(c,2);t(o,{tone:"idle",onclick:()=>qe(!0),children:(h,y)=>{e.next();var A=e.text("Structure unsaved changes");e.append(h,A)},$$slots:{default:!0}});var v=e.sibling(o,2);t(v,{tone:"idle",onclick:()=>qe(),children:(h,y)=>{e.next();var A=e.text("Unsaved changes (3-way)");e.append(h,A)},$$slots:{default:!0}});var u=e.sibling(v,2);t(u,{tone:"idle",onclick:it,children:(h,y)=>{e.next();var A=e.text("File conflict (4-way)");e.append(h,A)},$$slots:{default:!0}});var p=e.sibling(u,2);t(p,{tone:"idle",onclick:at,children:(h,y)=>{e.next();var A=e.text("Confirm with code");e.append(h,A)},$$slots:{default:!0}}),e.append(n,i)},l=n=>{var i=al(),c=e.first_child(i);t(c,{tone:"idle",onclick:()=>re.emit("write:problem",{kind:"save",message:"The server couldn't save these edits.",offline:!1}),children:(P,E)=>{e.next();var T=e.text("Save problem");e.append(P,T)},$$slots:{default:!0}});var o=e.sibling(c,2);t(o,{tone:"idle",onclick:()=>re.emit("write:problem",{kind:"delete",message:"The server couldn't delete this item.",offline:!1}),children:(P,E)=>{e.next();var T=e.text("Delete problem");e.append(P,T)},$$slots:{default:!0}});var v=e.sibling(o,2);t(v,{tone:"idle",onclick:()=>re.emit("write:problem",{kind:"save",message:"Connection unavailable.",offline:!0}),children:(P,E)=>{e.next();var T=e.text("Offline problem");e.append(P,T)},$$slots:{default:!0}});var u=e.sibling(v,2);t(u,{tone:"idle",onclick:()=>re.emit("write:problem",{kind:"action",title:"Couldn't create invite",message:"The server refused the invite. Nothing was changed.",offline:!1}),children:(P,E)=>{e.next();var T=e.text("Action problem");e.append(P,T)},$$slots:{default:!0}});var p=e.sibling(u,2);t(p,{tone:"idle",onclick:()=>re.emit("write:problem",{kind:"billing",title:"Billing isn't set up yet",message:"Ask a project owner to set up billing in Settings \u2192 Billing. Your edits are kept here."}),children:(P,E)=>{e.next();var T=e.text("Billing not set up");e.append(P,T)},$$slots:{default:!0}});var h=e.sibling(p,2);t(h,{tone:"idle",onclick:()=>re.emit("save:overwrote",{id:0,entry:"pages/home",author:"octocat",fields:[{key:"title",label:"Title",mine:"Hello world",theirs:"Hello"}]}),children:(P,E)=>{e.next();var T=e.text("Save overwrote");e.append(P,T)},$$slots:{default:!0}});var y=e.sibling(h,2);t(y,{tone:"idle",onclick:()=>re.emit("auth:error",{error:"Sign-in was refused for this preview."}),children:(P,E)=>{e.next();var T=e.text("Sign-in problem");e.append(P,T)},$$slots:{default:!0}});var A=e.sibling(y,2);t(A,{tone:"idle",onclick:()=>$("app-missing"),children:(P,E)=>{e.next();var T=e.text("App missing");e.append(P,T)},$$slots:{default:!0}}),e.append(n,i)},s=n=>{var i=he(),c=e.first_child(i);t(c,{tone:"idle",disabled:!0,children:(u,p)=>{e.next();var h=e.text("Edit fields");e.append(u,h)},$$slots:{default:!0}});var o=e.sibling(c,2);t(o,{tone:"idle",disabled:!0,children:(u,p)=>{e.next();var h=e.text("Edit language");e.append(u,h)},$$slots:{default:!0}});var v=e.sibling(o,2);t(v,{tone:"idle",disabled:!0,children:(u,p)=>{e.next();var h=e.text("MCP connect");e.append(u,h)},$$slots:{default:!0}}),e.append(n,i)};var C=e.child(f);J(C,()=>"Celebration dialogs",()=>D);var M=e.sibling(C,2);J(M,()=>"Setup",()=>b);var N=e.sibling(M,2);J(N,()=>"Form windows",()=>w);var I=e.sibling(N,2);J(I,()=>"Confirms",()=>a);var L=e.sibling(I,2);J(L,()=>"Error dialogs",()=>l);var B=e.sibling(L,2);J(B,()=>"Need live context \u2014 open from their real place",()=>s),e.reset(f)}e.append(V,f)},ht=V=>{var f=rl(),C=e.child(f),M=e.child(C);Ct(M,{children:(N,I)=>{var L=sl(),B=e.sibling(e.first_child(L),8);Ge(B,{code:'import { okno } from "okno/vite"'}),e.append(N,L)},$$slots:{default:!0}}),e.reset(C),e.reset(f),e.append(V,f)};var Re=e.child(De);ne(Re,()=>"Buttons",()=>st);var Oe=e.sibling(Re,2);ne(Oe,()=>"Dropdown buttons",()=>rt);var ze=e.sibling(Oe,2);ne(ze,()=>"List items",()=>dt);var Ve=e.sibling(ze,2);ne(Ve,()=>"Inputs",()=>ot);var Ee=e.sibling(Ve,2);ne(Ee,()=>"Field notes",()=>ct);var Ue=e.sibling(Ee,2);ne(Ue,()=>"Toggles",()=>pt);var Qe=e.sibling(Ue,2);ne(Qe,()=>"Feedback",()=>vt);var je=e.sibling(Qe,2);ne(je,()=>"Dialogs",()=>gt);var nt=e.sibling(je,2);ne(nt,()=>"Prose",()=>ht),e.reset(De)}e.reset(Se),e.append(ce,Se)},$$slots:{default:!0}}),e.pop()}e.delegate(["click"]);export{ol as default};