ranui 0.2.1-alpha.3 → 0.2.1-alpha.4

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 (98) hide show
  1. package/dist/builder.js +1 -1
  2. package/dist/{builtin-BkM0LLof.js → builtin-1lUEp_ro.js} +1 -1
  3. package/dist/{button-D0zcnKnG.js → button-Cj-XSCsd.js} +1 -1
  4. package/dist/button.js +1 -1
  5. package/dist/{card-CygMndQS.js → card-BHN9Xp4S.js} +1 -1
  6. package/dist/card.js +1 -1
  7. package/dist/{checkbox-D5om9aJO.js → checkbox-O_J_n1_W.js} +1 -1
  8. package/dist/checkbox.js +1 -1
  9. package/dist/{colorpicker-qWnaTlYX.js → colorpicker-mebH0XLm.js} +4 -4
  10. package/dist/colorpicker.js +1 -1
  11. package/dist/{content-Rry-U6ir.js → content-YOKzMoc7.js} +1 -1
  12. package/dist/content.js +1 -1
  13. package/dist/{dropdown-DzdAR1nI.js → dropdown-CzGAVWYC.js} +1 -1
  14. package/dist/dropdown.js +1 -1
  15. package/dist/{factory-BkvRcCOx.js → factory-ZNhcQ4tf.js} +127 -127
  16. package/dist/{form-CUJpeQ7Q.js → form-B8afuJlF.js} +1 -1
  17. package/dist/form.js +1 -1
  18. package/dist/{glass-Bj1Zf8Hy.js → glass-BniIptBE.js} +1 -1
  19. package/dist/glass.js +1 -1
  20. package/dist/{icon-CtlZJISZ.js → icon-GZrfSeon.js} +1 -1
  21. package/dist/icon.js +1 -1
  22. package/dist/icons.js +1 -1
  23. package/dist/iife/button.iife.js +1 -1
  24. package/dist/iife/card.iife.js +1 -1
  25. package/dist/iife/checkbox.iife.js +1 -1
  26. package/dist/iife/colorpicker.iife.js +2 -2
  27. package/dist/iife/content.iife.js +1 -1
  28. package/dist/iife/dropdown.iife.js +1 -1
  29. package/dist/iife/form.iife.js +1 -1
  30. package/dist/iife/glass.iife.js +1 -1
  31. package/dist/iife/icon.iife.js +1 -1
  32. package/dist/iife/image.iife.js +1 -1
  33. package/dist/iife/input.iife.js +1 -1
  34. package/dist/iife/loading.iife.js +1 -1
  35. package/dist/iife/math.iife.js +1 -1
  36. package/dist/iife/mermaid.iife.js +1 -1
  37. package/dist/iife/message.iife.js +1 -1
  38. package/dist/iife/modal.iife.js +1 -1
  39. package/dist/iife/player.iife.js +1 -1
  40. package/dist/iife/popover.iife.js +1 -1
  41. package/dist/iife/progress.iife.js +1 -1
  42. package/dist/iife/radar.iife.js +1 -1
  43. package/dist/iife/route.iife.js +1 -1
  44. package/dist/iife/router.iife.js +1 -1
  45. package/dist/iife/scratch.iife.js +1 -1
  46. package/dist/iife/section.iife.js +1 -1
  47. package/dist/iife/select.iife.js +2 -2
  48. package/dist/iife/skeleton.iife.js +1 -1
  49. package/dist/iife/tab.iife.js +1 -1
  50. package/dist/iife/tabpane.iife.js +1 -1
  51. package/dist/iife/theme-switch.iife.js +1 -1
  52. package/dist/{image-ILZNlaGc.js → image-CqoQfJoV.js} +1 -1
  53. package/dist/image.js +1 -1
  54. package/dist/index.cjs +17 -17
  55. package/dist/index.iife.js +204 -204
  56. package/dist/index.js +29 -29
  57. package/dist/{input-CDH6zY9I.js → input-BlwAXu7I.js} +2 -2
  58. package/dist/input.js +1 -1
  59. package/dist/{loading-DJWGih1g.js → loading-M6gWxLbm.js} +1 -1
  60. package/dist/loading.js +1 -1
  61. package/dist/{math-DRmkEDSQ.js → math-8E-45Y8e.js} +1 -1
  62. package/dist/math.js +1 -1
  63. package/dist/{mermaid-CMhm7npE.js → mermaid-C1oQyPE3.js} +2 -2
  64. package/dist/mermaid.js +1 -1
  65. package/dist/{message-BpYJBvYn.js → message-CNdmbeLf.js} +2 -2
  66. package/dist/message.js +1 -1
  67. package/dist/{modal-BeQlDYDP.js → modal-gRagDkTb.js} +1 -1
  68. package/dist/modal.js +1 -1
  69. package/dist/{player-CQ4e3Yeo.js → player-CAQ5Og2P.js} +2 -2
  70. package/dist/player.js +1 -1
  71. package/dist/{popover-eZMnL1F3.js → popover-BZKSLe3D.js} +3 -3
  72. package/dist/popover.js +1 -1
  73. package/dist/{progress-DyHgW4Ep.js → progress-vk40tuhm.js} +1 -1
  74. package/dist/progress.js +1 -1
  75. package/dist/{radar-D21Rccap.js → radar-Bg0cexzU.js} +1 -1
  76. package/dist/radar.js +1 -1
  77. package/dist/{route-pR5P4ann.js → route-CGwS0cd_.js} +1 -1
  78. package/dist/route.js +1 -1
  79. package/dist/{router-CewzSH7O.js → router-BK6DEkcN.js} +1 -1
  80. package/dist/router.js +1 -1
  81. package/dist/{scratch-BFVsgl-7.js → scratch-ClF1awGi.js} +1 -1
  82. package/dist/scratch.js +1 -1
  83. package/dist/{section-DSPCsIxv.js → section-BL0V7Kjf.js} +1 -1
  84. package/dist/section.js +1 -1
  85. package/dist/{select-B58nMfB1.js → select-BIFVbQIj.js} +4 -4
  86. package/dist/select.js +1 -1
  87. package/dist/{skeleton-DoHYMsTn.js → skeleton-D7JIbROq.js} +1 -1
  88. package/dist/skeleton.js +1 -1
  89. package/dist/{tab-BRPdZ9Ws.js → tab-DFVtDJb2.js} +1 -1
  90. package/dist/tab.js +1 -1
  91. package/dist/{tabpane-Owf72hw_.js → tabpane-C3qZGN-D.js} +1 -1
  92. package/dist/tabpane.js +1 -1
  93. package/dist/test/ssr/stream.test.d.ts +1 -0
  94. package/dist/{theme-switch-CZDIIonc.js → theme-switch-BXNH5uPD.js} +44 -44
  95. package/dist/theme-switch.js +1 -1
  96. package/dist/utils/builder/core.d.ts +15 -13
  97. package/docs/BUILDER.md +15 -0
  98. package/package.json +1 -1
@@ -1 +1 @@
1
- var ranui_icon=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},i=0,a=1,o=2,s=null,c=null,l=0,u=new Set,d=!1;function f(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,o);l===0&&re()}}]}function p(e){let t=ee(e,!0);return te(t),v(t),()=>b(t)}function m(e){let t={owned:[],cleanups:[],owner:c},n=c,r=s;c=t,s=null;try{return e(()=>ie(t))}finally{c=n,s=r}}function h(e){c&&c.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:o,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:c}}function te(e){c&&c.owned.push(e)}function ne(e){s&&(s.sources.add(e),e.observers.add(s))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===i;if(e.state=t,e.isEffect)u.add(e);else if(n)for(let t of e.observers)g(t,a)}function re(){if(!(l>0||d)){d=!0;try{for(;u.size>0;){let e=[...u];u.clear();for(let t of e)t.disposed||_(t)}}finally{d=!1}}}function _(e){if(!(e.disposed||e.state===i)){if(e.state===a)for(let t of e.sources)`fn`in t&&_(t);e.state===o&&v(e),e.state=i}}function v(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);y(e);let t=s,n=c;s=e,c=e,e.running=!0,e.state=i;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,o)}}finally{e.running=!1,s=t,c=n}}function y(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function b(e){e.disposed||(e.disposed=!0,y(e),e.observers.clear())}function ie(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function x(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function S(e){return x(e)}var ae=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,oe=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},C=(e,t,n)=>{for(let r of e)ae(r)&&(oe(r,t)&&n.push(r),C(r.childrenList,t,n))},w=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?x(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}},T=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new w)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new se(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${S(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${S(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?x(e):(e instanceof w,e.serialize())).join(``):a+=x(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},se=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${x(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?x(e):(e instanceof w,e.serialize())).join(``)}</template>`}},E=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(E(t)):e.concat(t),[]),D=e=>e==null?null:e instanceof j?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,O=(e,t)=>{if(n){E([t()]).forEach(t=>{let n=D(t);n!=null&&e.appendChild(n)});return}let r=document.createComment(``);e.appendChild(r);let i=[];p(()=>{let e=E([t()]);for(let e of i)e.parentNode?.removeChild(e);let n=[],a=r;for(let t of e){let e=D(t);e!=null&&(a.after(e),a=e,n.push(e))}i=n})},ce=`__ranFor`,le=e=>typeof e==`object`&&!!e&&e[ce]===!0,ue=(e,t,n)=>{let[r,i]=f(t),a=null,o=m(t=>{let i=D(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},k=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},de=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=D(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;h(()=>{for(let e of i.values())e.dispose();i.clear()}),p(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=ue(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();k(r,a),i=n})},fe=`__ranIndex`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=f(e),a=null,o=m(e=>{let i=D(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},he=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=D(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];h(()=>{for(let e of i)e.dispose();i=[]}),p(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(me(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}k(r,i.map(e=>e.node).filter(e=>e!=null))})},A=(e,t)=>{E(t).forEach(t=>{if(le(t)){de(e,t);return}if(pe(t)){he(e,t);return}if(typeof t==`function`){O(e,t);return}let n=D(t);n!=null&&e.appendChild(n)})},j=class{el;constructor(e){this.el=n?new T(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?p(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return A(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ge(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ge=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return A(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},M=e=>new j(e),_e=()=>M(`div`),N=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},P=(e=8)=>Math.random().toString(36).substring(2,e+2),F=e=>typeof e==`function`,I=12e4,ve=`__ranuts_bridge__`,L=`default`,R=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},ye=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=L){this.targetOrigin=t,this.channel=n,this.senderId=P(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,R.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:ve,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(F(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=P(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},I),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{R.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new ye(n,t,r);if(e||=P(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new N;var z=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],B=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new B(z[0],3609767458),new B(z[1],602891725),new B(z[2],3964484399),new B(z[3],2173295548),new B(z[4],4081628472),new B(z[5],3053834265),new B(z[6],2937671579),new B(z[7],3664609560),new B(z[8],2734883394),new B(z[9],1164996542),new B(z[10],1323610764),new B(z[11],3590304994),new B(z[12],4068182383),new B(z[13],991336113),new B(z[14],633803317),new B(z[15],3479774868),new B(z[16],2666613458),new B(z[17],944711139),new B(z[18],2341262773),new B(z[19],2007800933),new B(z[20],1495990901),new B(z[21],1856431235),new B(z[22],3175218132),new B(z[23],2198950837),new B(z[24],3999719339),new B(z[25],766784016),new B(z[26],2566594879),new B(z[27],3203337956),new B(z[28],1034457026),new B(z[29],2466948901),new B(z[30],3758326383),new B(z[31],168717936),new B(z[32],1188179964),new B(z[33],1546045734),new B(z[34],1522805485),new B(z[35],2643833823),new B(z[36],2343527390),new B(z[37],1014477480),new B(z[38],1206759142),new B(z[39],344077627),new B(z[40],1290863460),new B(z[41],3158454273),new B(z[42],3505952657),new B(z[43],106217008),new B(z[44],3606008344),new B(z[45],1432725776),new B(z[46],1467031594),new B(z[47],851169720),new B(z[48],3100823752),new B(z[49],1363258195),new B(z[50],3750685593),new B(z[51],3785050280),new B(z[52],3318307427),new B(z[53],3812723403),new B(z[54],2003034995),new B(z[55],3602036899),new B(z[56],1575990012),new B(z[57],1125592928),new B(z[58],2716904306),new B(z[59],442776044),new B(z[60],593698344),new B(z[61],3733110249),new B(z[62],2999351573),new B(z[63],3815920427),new B(3391569614,3928383900),new B(3515267271,566280711),new B(3940187606,3454069534),new B(4118630271,4000239992),new B(116418474,1914138554),new B(174292421,2731055270),new B(289380356,3203993006),new B(460393269,320620315),new B(685471733,587496836),new B(852142971,1086792851),new B(1017036298,365543100),new B(1126000580,2618297676),new B(1288033470,3409855158),new B(1501505948,4234509866),new B(1607167915,987167468),new B(1816402316,1246189591),new B(0,1),new B(0,32898),new B(2147483648,32906),new B(2147483648,2147516416),new B(0,32907),new B(0,2147483649),new B(2147483648,2147516545),new B(2147483648,32777),new B(0,138),new B(0,136),new B(0,2147516425),new B(0,2147483658),new B(0,2147516555),new B(2147483648,139),new B(2147483648,32905),new B(2147483648,32771),new B(2147483648,32770),new B(2147483648,128),new B(0,32778),new B(2147483648,2147483658),new B(2147483648,2147516545),new B(2147483648,32896),new B(0,2147483649),new B(2147483648,2147516424);var V=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(V),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(V);var be=new Map;function xe(e,t){n?(be.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Se=typeof document<`u`?HTMLElement:T,H=new Map,U=new Map,Ce=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!H.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),H.set(t,e)}let n=H.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},we=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!U.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),U.set(t,e)}let n=U.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},W=new WeakMap,G=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Te=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||W.get(e)||e.attachShadow(n);return W.set(e,r),Ce(r,t?`${t}\n${G}`:G),r},Ee=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},K=(e,t,n=``)=>e.getAttribute(t)??n,q=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},De=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&we(t,a)},Oe={copy:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`},check:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`},download:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`},fullscreen:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`},"zoom-in":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},"zoom-out":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},refresh:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}},ke=!1,J=new Map,Y=!1,X=e=>/<svg[\s>]/i.test(e),Ae=e=>{if(typeof e==`string`)return X(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&X(n))return n;let r=t.default;if(typeof r==`string`&&X(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&X(e.data))return e.data}},Z=(e,t)=>{Y=!0;let n=Ae(t);n&&(J.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},Q=e=>{Y=!0,Object.entries(e).forEach(([e,t])=>{Z(e,t)})};Q(Oe);var je=`add-user.arrow-down.book.check.check-circle.check-circle-fill.close.close-circle.close-circle-fill.copy.download.drop.eye.eye-close.fullscreen.github.globe.home.info-circle.info-circle-fill.issue.loading.loading-scene.lock.menu.message.more.plus.power-off.preview.refresh.search.setting.sort.team.unlock.user.warning-circle.warning-circle-fill.without-content.zoom-in.zoom-out`.split(`.`),$=class extends Se{isDev=ke;_events=new r;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=Te(this,t);let e=Ee(this._shadowDom,`.ran-icon`,()=>_e().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return K(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return K(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return K(this,`color`)}set color(e){e&&this.setAttribute(`color`,e)}get spin(){return this.hasAttribute(`spin`)}set spin(e){e?this.setAttribute(`spin`,``):this.removeAttribute(`spin`)}get decorative(){let e=this.getAttribute(`decorative`);return e==null?!this.hasAttribute(`aria-label`):e!==`false`&&e!==`0`}set decorative(e){this.setAttribute(`decorative`,e?`true`:`false`)}get ariaLabel(){return K(this,`aria-label`)}set ariaLabel(e){q(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return K(this,`sheet`)}set sheet(e){q(this,`sheet`,e)}handlerExternalCss=()=>{De(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`);return}this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)}};setIcon=()=>{if(typeof document>`u`)return;this._icon&&=(this._icon.remove(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=J.get(t);if(!n){this.isDev&&Y&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}n&&this.isSvgText(n)?this.renderSvg(n,e):this.isDev&&console.warn(`[ranui-icon] invalid svg text: ${e}`)}catch(t){this.isDev&&console.warn(`[ranui-icon] render icon failed: ${e}`,t)}};isSvgText=e=>X(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=M(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,this._icon.setAttribute(`part`,`icon-svg`),this._icon.setAttribute(`data-name`,t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let e=this.color||`currentColor`;this._icon.style.setProperty(`color`,e),this._icon.style.setProperty(`fill`,e),this._icon.style.setProperty(`stroke`,e)}};setSpin=()=>{this.spin?this._div.classList.add(`ran-icon-spin`):this._div.classList.remove(`ran-icon-spin`)};connectedCallback(){this._events.on(window,`ranui-icon-registered`,this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`name`&&this.setIcon(),e===`size`&&this.setSize(),e===`color`&&this.setColor(),e===`spin`&&this.setSpin(),(e===`decorative`||e===`aria-label`)&&this.syncA11y(),e===`sheet`&&this.handlerExternalCss())}};return xe(`r-icon`,$),e.Icon=$,e.RAN_ICON_NAMES=je,e.registerIcon=Z,e.registerIcons=Q,e})({});
1
+ var ranui_icon=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},i=0,a=1,o=2,s=null,c=null,l=0,u=new Set,d=!1;function f(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,o);l===0&&re()}}]}function p(e){let t=ee(e,!0);return te(t),v(t),()=>b(t)}function m(e){let t={owned:[],cleanups:[],owner:c},n=c,r=s;c=t,s=null;try{return e(()=>ie(t))}finally{c=n,s=r}}function h(e){c&&c.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:o,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:c}}function te(e){c&&c.owned.push(e)}function ne(e){s&&(s.sources.add(e),e.observers.add(s))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===i;if(e.state=t,e.isEffect)u.add(e);else if(n)for(let t of e.observers)g(t,a)}function re(){if(!(l>0||d)){d=!0;try{for(;u.size>0;){let e=[...u];u.clear();for(let t of e)t.disposed||_(t)}}finally{d=!1}}}function _(e){if(!(e.disposed||e.state===i)){if(e.state===a)for(let t of e.sources)`fn`in t&&_(t);e.state===o&&v(e),e.state=i}}function v(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);y(e);let t=s,n=c;s=e,c=e,e.running=!0,e.state=i;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,o)}}finally{e.running=!1,s=t,c=n}}function y(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function b(e){e.disposed||(e.disposed=!0,y(e),e.observers.clear())}function ie(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function x(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function S(e){return x(e)}var ae=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,oe=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},C=(e,t,n)=>{for(let r of e)ae(r)&&(oe(r,t)&&n.push(r),C(r.childrenList,t,n))},w=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?x(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}},T=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new w)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new se(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${S(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${S(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?x(e):(e instanceof w,e.serialize())).join(``):a+=x(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},se=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${x(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?x(e):(e instanceof w,e.serialize())).join(``)}</template>`}},E=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(E(t)):e.concat(t),[]),D=e=>e==null?null:e instanceof j?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ce=(e,t)=>{if(n){A(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};p(()=>{let e=t();o();let n=document.createDocumentFragment();a=m(t=>(A(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),h(()=>a?.())},le=`__ranFor`,O=e=>typeof e==`object`&&!!e&&e[le]===!0,ue=(e,t,n)=>{let[r,i]=f(t),a=null,o=m(t=>{let i=D(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},k=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},de=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=D(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;h(()=>{for(let e of i.values())e.dispose();i.clear()}),p(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=ue(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();k(r,a),i=n})},fe=`__ranIndex`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=f(e),a=null,o=m(e=>{let i=D(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},he=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=D(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];h(()=>{for(let e of i)e.dispose();i=[]}),p(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(me(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}k(r,i.map(e=>e.node).filter(e=>e!=null))})},A=(e,t)=>{E(t).forEach(t=>{if(O(t)){de(e,t);return}if(pe(t)){he(e,t);return}if(typeof t==`function`){ce(e,t);return}let n=D(t);n!=null&&e.appendChild(n)})},j=class{el;constructor(e){this.el=n?new T(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?p(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return A(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ge(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ge=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return A(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},M=e=>new j(e),_e=()=>M(`div`),N=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},P=(e=8)=>Math.random().toString(36).substring(2,e+2),F=e=>typeof e==`function`,I=12e4,ve=`__ranuts_bridge__`,ye=`default`,L=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},R=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=ye){this.targetOrigin=t,this.channel=n,this.senderId=P(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,L.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:ve,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(F(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=P(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},I),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{L.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new R(n,t,r);if(e||=P(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new N;var z=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],B=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new B(z[0],3609767458),new B(z[1],602891725),new B(z[2],3964484399),new B(z[3],2173295548),new B(z[4],4081628472),new B(z[5],3053834265),new B(z[6],2937671579),new B(z[7],3664609560),new B(z[8],2734883394),new B(z[9],1164996542),new B(z[10],1323610764),new B(z[11],3590304994),new B(z[12],4068182383),new B(z[13],991336113),new B(z[14],633803317),new B(z[15],3479774868),new B(z[16],2666613458),new B(z[17],944711139),new B(z[18],2341262773),new B(z[19],2007800933),new B(z[20],1495990901),new B(z[21],1856431235),new B(z[22],3175218132),new B(z[23],2198950837),new B(z[24],3999719339),new B(z[25],766784016),new B(z[26],2566594879),new B(z[27],3203337956),new B(z[28],1034457026),new B(z[29],2466948901),new B(z[30],3758326383),new B(z[31],168717936),new B(z[32],1188179964),new B(z[33],1546045734),new B(z[34],1522805485),new B(z[35],2643833823),new B(z[36],2343527390),new B(z[37],1014477480),new B(z[38],1206759142),new B(z[39],344077627),new B(z[40],1290863460),new B(z[41],3158454273),new B(z[42],3505952657),new B(z[43],106217008),new B(z[44],3606008344),new B(z[45],1432725776),new B(z[46],1467031594),new B(z[47],851169720),new B(z[48],3100823752),new B(z[49],1363258195),new B(z[50],3750685593),new B(z[51],3785050280),new B(z[52],3318307427),new B(z[53],3812723403),new B(z[54],2003034995),new B(z[55],3602036899),new B(z[56],1575990012),new B(z[57],1125592928),new B(z[58],2716904306),new B(z[59],442776044),new B(z[60],593698344),new B(z[61],3733110249),new B(z[62],2999351573),new B(z[63],3815920427),new B(3391569614,3928383900),new B(3515267271,566280711),new B(3940187606,3454069534),new B(4118630271,4000239992),new B(116418474,1914138554),new B(174292421,2731055270),new B(289380356,3203993006),new B(460393269,320620315),new B(685471733,587496836),new B(852142971,1086792851),new B(1017036298,365543100),new B(1126000580,2618297676),new B(1288033470,3409855158),new B(1501505948,4234509866),new B(1607167915,987167468),new B(1816402316,1246189591),new B(0,1),new B(0,32898),new B(2147483648,32906),new B(2147483648,2147516416),new B(0,32907),new B(0,2147483649),new B(2147483648,2147516545),new B(2147483648,32777),new B(0,138),new B(0,136),new B(0,2147516425),new B(0,2147483658),new B(0,2147516555),new B(2147483648,139),new B(2147483648,32905),new B(2147483648,32771),new B(2147483648,32770),new B(2147483648,128),new B(0,32778),new B(2147483648,2147483658),new B(2147483648,2147516545),new B(2147483648,32896),new B(0,2147483649),new B(2147483648,2147516424);var V=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(V),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(V);var be=new Map;function xe(e,t){n?(be.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Se=typeof document<`u`?HTMLElement:T,H=new Map,U=new Map,Ce=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!H.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),H.set(t,e)}let n=H.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},we=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!U.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),U.set(t,e)}let n=U.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},W=new WeakMap,G=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Te=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||W.get(e)||e.attachShadow(n);return W.set(e,r),Ce(r,t?`${t}\n${G}`:G),r},Ee=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},K=(e,t,n=``)=>e.getAttribute(t)??n,q=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},De=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&we(t,a)},Oe={copy:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`},check:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`},download:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`},fullscreen:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`},"zoom-in":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},"zoom-out":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},refresh:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}},ke=!1,J=new Map,Y=!1,X=e=>/<svg[\s>]/i.test(e),Ae=e=>{if(typeof e==`string`)return X(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&X(n))return n;let r=t.default;if(typeof r==`string`&&X(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&X(e.data))return e.data}},Z=(e,t)=>{Y=!0;let n=Ae(t);n&&(J.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},Q=e=>{Y=!0,Object.entries(e).forEach(([e,t])=>{Z(e,t)})};Q(Oe);var je=`add-user.arrow-down.book.check.check-circle.check-circle-fill.close.close-circle.close-circle-fill.copy.download.drop.eye.eye-close.fullscreen.github.globe.home.info-circle.info-circle-fill.issue.loading.loading-scene.lock.menu.message.more.plus.power-off.preview.refresh.search.setting.sort.team.unlock.user.warning-circle.warning-circle-fill.without-content.zoom-in.zoom-out`.split(`.`),$=class extends Se{isDev=ke;_events=new r;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=Te(this,t);let e=Ee(this._shadowDom,`.ran-icon`,()=>_e().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return K(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return K(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return K(this,`color`)}set color(e){e&&this.setAttribute(`color`,e)}get spin(){return this.hasAttribute(`spin`)}set spin(e){e?this.setAttribute(`spin`,``):this.removeAttribute(`spin`)}get decorative(){let e=this.getAttribute(`decorative`);return e==null?!this.hasAttribute(`aria-label`):e!==`false`&&e!==`0`}set decorative(e){this.setAttribute(`decorative`,e?`true`:`false`)}get ariaLabel(){return K(this,`aria-label`)}set ariaLabel(e){q(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return K(this,`sheet`)}set sheet(e){q(this,`sheet`,e)}handlerExternalCss=()=>{De(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`);return}this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)}};setIcon=()=>{if(typeof document>`u`)return;this._icon&&=(this._icon.remove(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=J.get(t);if(!n){this.isDev&&Y&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}n&&this.isSvgText(n)?this.renderSvg(n,e):this.isDev&&console.warn(`[ranui-icon] invalid svg text: ${e}`)}catch(t){this.isDev&&console.warn(`[ranui-icon] render icon failed: ${e}`,t)}};isSvgText=e=>X(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=M(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,this._icon.setAttribute(`part`,`icon-svg`),this._icon.setAttribute(`data-name`,t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let e=this.color||`currentColor`;this._icon.style.setProperty(`color`,e),this._icon.style.setProperty(`fill`,e),this._icon.style.setProperty(`stroke`,e)}};setSpin=()=>{this.spin?this._div.classList.add(`ran-icon-spin`):this._div.classList.remove(`ran-icon-spin`)};connectedCallback(){this._events.on(window,`ranui-icon-registered`,this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`name`&&this.setIcon(),e===`size`&&this.setSize(),e===`color`&&this.setColor(),e===`spin`&&this.setSpin(),(e===`decorative`||e===`aria-label`)&&this.syncA11y(),e===`sheet`&&this.handlerExternalCss())}};return xe(`r-icon`,$),e.Icon=$,e.RAN_ICON_NAMES=je,e.registerIcon=Z,e.registerIcons=Q,e})({});
@@ -1,3 +1,3 @@
1
1
  var ranui_image=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`
2
2
  data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==
3
- `,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(te(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,a);c===0&&_()}}]}function f(e){let t=h(e,!0);return ee(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function h(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function ee(e){s&&s.owned.push(e)}function te(e){o&&(o.sources.add(e),e.observers.add(o))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)g(t,i)}function _(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function S(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function C(e){return S(e)}var re=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,w=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},T=(e,t,n)=>{for(let r of e)re(r)&&(w(r,t)&&n.push(r),T(r.childrenList,t,n))},E=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?S(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}},D=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new E)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ie(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${C(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${C(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof E,e.serialize())).join(``):a+=S(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},ie=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${S(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof E,e.serialize())).join(``)}</template>`}},O=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(O(t)):e.concat(t),[]),k=e=>e==null?null:e instanceof N?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ae=(e,t)=>{if(n){O([t()]).forEach(t=>{let n=k(t);n!=null&&e.appendChild(n)});return}let r=document.createComment(``);e.appendChild(r);let i=[];f(()=>{let e=O([t()]);for(let e of i)e.parentNode?.removeChild(e);let n=[],a=r;for(let t of e){let e=k(t);e!=null&&(a.after(e),a=e,n.push(e))}i=n})},oe=`__ranFor`,se=e=>typeof e==`object`&&!!e&&e[oe]===!0,ce=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=k(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},A=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},le=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=k(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=ce(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();A(r,a),i=n})},ue=`__ranIndex`,de=e=>typeof e==`object`&&!!e&&e[ue]===!0,fe=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=k(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},j=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=k(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(fe(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}A(r,i.map(e=>e.node).filter(e=>e!=null))})},M=(e,t)=>{O(t).forEach(t=>{if(se(t)){le(e,t);return}if(de(t)){j(e,t);return}if(typeof t==`function`){ae(e,t);return}let n=k(t);n!=null&&e.appendChild(n)})},N=class{el;constructor(e){this.el=n?new D(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return M(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new P(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},P=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return M(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},F=e=>new N(e),I=()=>F(`div`),L=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},R=(e=8)=>Math.random().toString(36).substring(2,e+2),z=e=>typeof e==`function`,B=12e4,V=`__ranuts_bridge__`,pe=`default`,H=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},me=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=pe){this.targetOrigin=t,this.channel=n,this.senderId=R(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,H.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:V,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(z(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=R(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},B),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{H.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new me(n,t,r);if(e||=R(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new L;var U=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],W=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new W(U[0],3609767458),new W(U[1],602891725),new W(U[2],3964484399),new W(U[3],2173295548),new W(U[4],4081628472),new W(U[5],3053834265),new W(U[6],2937671579),new W(U[7],3664609560),new W(U[8],2734883394),new W(U[9],1164996542),new W(U[10],1323610764),new W(U[11],3590304994),new W(U[12],4068182383),new W(U[13],991336113),new W(U[14],633803317),new W(U[15],3479774868),new W(U[16],2666613458),new W(U[17],944711139),new W(U[18],2341262773),new W(U[19],2007800933),new W(U[20],1495990901),new W(U[21],1856431235),new W(U[22],3175218132),new W(U[23],2198950837),new W(U[24],3999719339),new W(U[25],766784016),new W(U[26],2566594879),new W(U[27],3203337956),new W(U[28],1034457026),new W(U[29],2466948901),new W(U[30],3758326383),new W(U[31],168717936),new W(U[32],1188179964),new W(U[33],1546045734),new W(U[34],1522805485),new W(U[35],2643833823),new W(U[36],2343527390),new W(U[37],1014477480),new W(U[38],1206759142),new W(U[39],344077627),new W(U[40],1290863460),new W(U[41],3158454273),new W(U[42],3505952657),new W(U[43],106217008),new W(U[44],3606008344),new W(U[45],1432725776),new W(U[46],1467031594),new W(U[47],851169720),new W(U[48],3100823752),new W(U[49],1363258195),new W(U[50],3750685593),new W(U[51],3785050280),new W(U[52],3318307427),new W(U[53],3812723403),new W(U[54],2003034995),new W(U[55],3602036899),new W(U[56],1575990012),new W(U[57],1125592928),new W(U[58],2716904306),new W(U[59],442776044),new W(U[60],593698344),new W(U[61],3733110249),new W(U[62],2999351573),new W(U[63],3815920427),new W(3391569614,3928383900),new W(3515267271,566280711),new W(3940187606,3454069534),new W(4118630271,4000239992),new W(116418474,1914138554),new W(174292421,2731055270),new W(289380356,3203993006),new W(460393269,320620315),new W(685471733,587496836),new W(852142971,1086792851),new W(1017036298,365543100),new W(1126000580,2618297676),new W(1288033470,3409855158),new W(1501505948,4234509866),new W(1607167915,987167468),new W(1816402316,1246189591),new W(0,1),new W(0,32898),new W(2147483648,32906),new W(2147483648,2147516416),new W(0,32907),new W(0,2147483649),new W(2147483648,2147516545),new W(2147483648,32777),new W(0,138),new W(0,136),new W(0,2147516425),new W(0,2147483658),new W(0,2147516555),new W(2147483648,139),new W(2147483648,32905),new W(2147483648,32771),new W(2147483648,32770),new W(2147483648,128),new W(0,32778),new W(2147483648,2147483658),new W(2147483648,2147516545),new W(2147483648,32896),new W(0,2147483649),new W(2147483648,2147516424);var G=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(G),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(G);var he=new Map;function ge(e,t){n?(he.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var _e=typeof document<`u`?HTMLElement:D,K=new Map,q=new Map,ve=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!K.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),K.set(t,e)}let n=K.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},J=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!q.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),q.set(t,e)}let n=q.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},Y=new WeakMap,X=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,ye=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Y.get(e)||e.attachShadow(n);return Y.set(e,r),ve(r,t?`${t}\n${X}`:X),r},be=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Z=(e,t,n=``)=>e.getAttribute(t)??n,Q=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},xe=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&J(t,a)},Se=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}`,$=class extends _e{static get observedAttributes(){return[`src`,`fallback`,`sheet`,`alt`]}_image;_container;_shadowDom;constructor(){super(),this._shadowDom=ye(this,Se);let e=be(this._shadowDom,`.ran-image`,()=>I().class(`ran-image`).build());this._container=e}get fallback(){return Z(this,`fallback`,t)}set fallback(e){Q(this,`fallback`,e,{removeEmpty:!0})}get sheet(){return Z(this,`sheet`)}set sheet(e){Q(this,`sheet`,e)}get alt(){return Z(this,`alt`)}set alt(e){Q(this,`alt`,e)}handlerExternalCss=()=>{xe(this,this._shadowDom,`sheet`,null,this.sheet)};listenFallback(e,t){e===`fallback`&&this._image&&(t?this._image.setAttribute(`fallback`,t):this._image.removeAttribute(`fallback`))}updateSrc=()=>{this._image&&(this._image.src=this.getAttribute(`src`)||``)};connectedCallback(){this.handlerExternalCss(),this._image=new Image,this._image.alt=this.alt,this._image.addEventListener(`error`,()=>{this._image&&this.fallback&&(this._image.src=this.fallback)}),this._image.addEventListener(`load`,()=>{this._image&&this._container.appendChild(this._image)}),this.updateSrc()}attributeChangedCallback(e,t,n){t!==n&&(this.listenFallback(e,n),e===`src`&&this.updateSrc(),e===`alt`&&this._image&&(this._image.alt=n??``),e===`sheet`&&this.handlerExternalCss())}};return ge(`r-img`,$),e.ImageElement=$,e.default=$,e})({});
3
+ `,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(te(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,a);c===0&&_()}}]}function f(e){let t=h(e,!0);return ee(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function h(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function ee(e){s&&s.owned.push(e)}function te(e){o&&(o.sources.add(e),e.observers.add(o))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)g(t,i)}function _(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function S(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function C(e){return S(e)}var re=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,w=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},T=(e,t,n)=>{for(let r of e)re(r)&&(w(r,t)&&n.push(r),T(r.childrenList,t,n))},E=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?S(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}},D=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new E)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ie(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${C(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${C(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof E,e.serialize())).join(``):a+=S(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},ie=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${S(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof E,e.serialize())).join(``)}</template>`}},O=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(O(t)):e.concat(t),[]),k=e=>e==null?null:e instanceof N?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ae=(e,t)=>{if(n){M(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=t();o();let n=document.createDocumentFragment();a=p(t=>(M(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},oe=`__ranFor`,se=e=>typeof e==`object`&&!!e&&e[oe]===!0,ce=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=k(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},A=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},le=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=k(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=ce(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();A(r,a),i=n})},ue=`__ranIndex`,de=e=>typeof e==`object`&&!!e&&e[ue]===!0,fe=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=k(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},j=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=k(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(fe(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}A(r,i.map(e=>e.node).filter(e=>e!=null))})},M=(e,t)=>{O(t).forEach(t=>{if(se(t)){le(e,t);return}if(de(t)){j(e,t);return}if(typeof t==`function`){ae(e,t);return}let n=k(t);n!=null&&e.appendChild(n)})},N=class{el;constructor(e){this.el=n?new D(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return M(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new P(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},P=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return M(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},F=e=>new N(e),I=()=>F(`div`),L=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},R=(e=8)=>Math.random().toString(36).substring(2,e+2),z=e=>typeof e==`function`,B=12e4,V=`__ranuts_bridge__`,pe=`default`,H=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},me=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=pe){this.targetOrigin=t,this.channel=n,this.senderId=R(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,H.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:V,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(z(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=R(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},B),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{H.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new me(n,t,r);if(e||=R(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new L;var U=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],W=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new W(U[0],3609767458),new W(U[1],602891725),new W(U[2],3964484399),new W(U[3],2173295548),new W(U[4],4081628472),new W(U[5],3053834265),new W(U[6],2937671579),new W(U[7],3664609560),new W(U[8],2734883394),new W(U[9],1164996542),new W(U[10],1323610764),new W(U[11],3590304994),new W(U[12],4068182383),new W(U[13],991336113),new W(U[14],633803317),new W(U[15],3479774868),new W(U[16],2666613458),new W(U[17],944711139),new W(U[18],2341262773),new W(U[19],2007800933),new W(U[20],1495990901),new W(U[21],1856431235),new W(U[22],3175218132),new W(U[23],2198950837),new W(U[24],3999719339),new W(U[25],766784016),new W(U[26],2566594879),new W(U[27],3203337956),new W(U[28],1034457026),new W(U[29],2466948901),new W(U[30],3758326383),new W(U[31],168717936),new W(U[32],1188179964),new W(U[33],1546045734),new W(U[34],1522805485),new W(U[35],2643833823),new W(U[36],2343527390),new W(U[37],1014477480),new W(U[38],1206759142),new W(U[39],344077627),new W(U[40],1290863460),new W(U[41],3158454273),new W(U[42],3505952657),new W(U[43],106217008),new W(U[44],3606008344),new W(U[45],1432725776),new W(U[46],1467031594),new W(U[47],851169720),new W(U[48],3100823752),new W(U[49],1363258195),new W(U[50],3750685593),new W(U[51],3785050280),new W(U[52],3318307427),new W(U[53],3812723403),new W(U[54],2003034995),new W(U[55],3602036899),new W(U[56],1575990012),new W(U[57],1125592928),new W(U[58],2716904306),new W(U[59],442776044),new W(U[60],593698344),new W(U[61],3733110249),new W(U[62],2999351573),new W(U[63],3815920427),new W(3391569614,3928383900),new W(3515267271,566280711),new W(3940187606,3454069534),new W(4118630271,4000239992),new W(116418474,1914138554),new W(174292421,2731055270),new W(289380356,3203993006),new W(460393269,320620315),new W(685471733,587496836),new W(852142971,1086792851),new W(1017036298,365543100),new W(1126000580,2618297676),new W(1288033470,3409855158),new W(1501505948,4234509866),new W(1607167915,987167468),new W(1816402316,1246189591),new W(0,1),new W(0,32898),new W(2147483648,32906),new W(2147483648,2147516416),new W(0,32907),new W(0,2147483649),new W(2147483648,2147516545),new W(2147483648,32777),new W(0,138),new W(0,136),new W(0,2147516425),new W(0,2147483658),new W(0,2147516555),new W(2147483648,139),new W(2147483648,32905),new W(2147483648,32771),new W(2147483648,32770),new W(2147483648,128),new W(0,32778),new W(2147483648,2147483658),new W(2147483648,2147516545),new W(2147483648,32896),new W(0,2147483649),new W(2147483648,2147516424);var G=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(G),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(G);var he=new Map;function ge(e,t){n?(he.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var _e=typeof document<`u`?HTMLElement:D,K=new Map,q=new Map,ve=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!K.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),K.set(t,e)}let n=K.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},J=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!q.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),q.set(t,e)}let n=q.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},Y=new WeakMap,X=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,ye=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Y.get(e)||e.attachShadow(n);return Y.set(e,r),ve(r,t?`${t}\n${X}`:X),r},be=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Z=(e,t,n=``)=>e.getAttribute(t)??n,Q=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},xe=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&J(t,a)},Se=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}`,$=class extends _e{static get observedAttributes(){return[`src`,`fallback`,`sheet`,`alt`]}_image;_container;_shadowDom;constructor(){super(),this._shadowDom=ye(this,Se);let e=be(this._shadowDom,`.ran-image`,()=>I().class(`ran-image`).build());this._container=e}get fallback(){return Z(this,`fallback`,t)}set fallback(e){Q(this,`fallback`,e,{removeEmpty:!0})}get sheet(){return Z(this,`sheet`)}set sheet(e){Q(this,`sheet`,e)}get alt(){return Z(this,`alt`)}set alt(e){Q(this,`alt`,e)}handlerExternalCss=()=>{xe(this,this._shadowDom,`sheet`,null,this.sheet)};listenFallback(e,t){e===`fallback`&&this._image&&(t?this._image.setAttribute(`fallback`,t):this._image.removeAttribute(`fallback`))}updateSrc=()=>{this._image&&(this._image.src=this.getAttribute(`src`)||``)};connectedCallback(){this.handlerExternalCss(),this._image=new Image,this._image.alt=this.alt,this._image.addEventListener(`error`,()=>{this._image&&this.fallback&&(this._image.src=this.fallback)}),this._image.addEventListener(`load`,()=>{this._image&&this._container.appendChild(this._image)}),this.updateSrc()}attributeChangedCallback(e,t,n){t!==n&&(this.listenFallback(e,n),e===`src`&&this.updateSrc(),e===`alt`&&this._image&&(this._image.alt=n??``),e===`sheet`&&this.handlerExternalCss())}};return ge(`r-img`,$),e.ImageElement=$,e.default=$,e})({});
@@ -1 +1 @@
1
- var ranui_input=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=typeof document>`u`,n=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)h(e,a);c===0&&re()}}]}function f(e){let t=ee(e,!0);return te(t),_(t),()=>y(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ie(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function te(e){s&&s.owned.push(e)}function ne(e){o&&(o.sources.add(e),e.observers.add(o))}function h(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)h(t,i)}function re(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||g(t)}}finally{u=!1}}}function g(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&g(t);e.state===a&&_(e),e.state=r}}function _(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);v(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)h(t,a)}}finally{e.running=!1,o=t,s=n}}function v(e){for(let t of e.owned)y(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function y(e){e.disposed||(e.disposed=!0,v(e),e.observers.clear())}function ie(e){for(let t of e.owned)y(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function b(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function x(e){return b(e)}var ae=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,oe=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},S=(e,t,n)=>{for(let r of e)ae(r)&&(oe(r,t)&&n.push(r),S(r.childrenList,t,n))},C=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?b(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return S(this.childrenList,e,t),t}},w=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new C)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new se(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return S(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${x(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${x(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?b(e):(e instanceof C,e.serialize())).join(``):a+=b(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},se=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return S(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${b(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?b(e):(e instanceof C,e.serialize())).join(``)}</template>`}},T=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(T(t)):e.concat(t),[]),E=e=>e==null?null:e instanceof k?e.build():typeof e==`string`?t?e:document.createTextNode(e):e,ce=(e,n)=>{if(t){T([n()]).forEach(t=>{let n=E(t);n!=null&&e.appendChild(n)});return}let r=document.createComment(``);e.appendChild(r);let i=[];f(()=>{let e=T([n()]);for(let e of i)e.parentNode?.removeChild(e);let t=[],a=r;for(let n of e){let e=E(n);e!=null&&(a.after(e),a=e,t.push(e))}i=t})},le=`__ranFor`,ue=e=>typeof e==`object`&&!!e&&e[le]===!0,de=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=E(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},D=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},fe=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=E(n.render(t,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=n.each()??[],t=new Map,a=[];e.forEach((e,r)=>{let o=n.key(e,r);if(t.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=de(e,r,n.render),t.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();D(r,a),i=t})},pe=`__ranIndex`,me=e=>typeof e==`object`&&!!e&&e[pe]===!0,he=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=E(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},ge=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=E(n.render(()=>t,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=n.each()??[];for(let t=0;t<e.length;t++)t<i.length?i[t].setItem(e[t]):i.push(he(e[t],t,n.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}D(r,i.map(e=>e.node).filter(e=>e!=null))})},O=(e,t)=>{T(t).forEach(t=>{if(ue(t)){fe(e,t);return}if(me(t)){ge(e,t);return}if(typeof t==`function`){ce(e,t);return}let n=E(t);n!=null&&e.appendChild(n)})},k=class{el;constructor(e){this.el=t?new w(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{t?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return O(this.el,e),this}replaceChildren(...e){if(t){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new _e(this.el,t,e)}build(){return this.el}serialize(){if(t)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},_e=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return O(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(t)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let n=document.createElement(`style`);return n.textContent=e,this.root.appendChild(n),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return t?this.root.serialize():this.root.innerHTML}},A=e=>new k(e),j=()=>A(`div`),ve=()=>A(`input`),ye=()=>A(`label`),be=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},M=(e=8)=>Math.random().toString(36).substring(2,e+2),xe=e=>typeof e==`function`,Se=12e4,Ce=`__ranuts_bridge__`,we=`default`,N=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},Te=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=we){this.targetOrigin=t,this.channel=n,this.senderId=M(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,N.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:Ce,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(xe(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=M(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},Se),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{N.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new Te(n,t,r);if(e||=M(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new be;var P=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],F=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new F(P[0],3609767458),new F(P[1],602891725),new F(P[2],3964484399),new F(P[3],2173295548),new F(P[4],4081628472),new F(P[5],3053834265),new F(P[6],2937671579),new F(P[7],3664609560),new F(P[8],2734883394),new F(P[9],1164996542),new F(P[10],1323610764),new F(P[11],3590304994),new F(P[12],4068182383),new F(P[13],991336113),new F(P[14],633803317),new F(P[15],3479774868),new F(P[16],2666613458),new F(P[17],944711139),new F(P[18],2341262773),new F(P[19],2007800933),new F(P[20],1495990901),new F(P[21],1856431235),new F(P[22],3175218132),new F(P[23],2198950837),new F(P[24],3999719339),new F(P[25],766784016),new F(P[26],2566594879),new F(P[27],3203337956),new F(P[28],1034457026),new F(P[29],2466948901),new F(P[30],3758326383),new F(P[31],168717936),new F(P[32],1188179964),new F(P[33],1546045734),new F(P[34],1522805485),new F(P[35],2643833823),new F(P[36],2343527390),new F(P[37],1014477480),new F(P[38],1206759142),new F(P[39],344077627),new F(P[40],1290863460),new F(P[41],3158454273),new F(P[42],3505952657),new F(P[43],106217008),new F(P[44],3606008344),new F(P[45],1432725776),new F(P[46],1467031594),new F(P[47],851169720),new F(P[48],3100823752),new F(P[49],1363258195),new F(P[50],3750685593),new F(P[51],3785050280),new F(P[52],3318307427),new F(P[53],3812723403),new F(P[54],2003034995),new F(P[55],3602036899),new F(P[56],1575990012),new F(P[57],1125592928),new F(P[58],2716904306),new F(P[59],442776044),new F(P[60],593698344),new F(P[61],3733110249),new F(P[62],2999351573),new F(P[63],3815920427),new F(3391569614,3928383900),new F(3515267271,566280711),new F(3940187606,3454069534),new F(4118630271,4000239992),new F(116418474,1914138554),new F(174292421,2731055270),new F(289380356,3203993006),new F(460393269,320620315),new F(685471733,587496836),new F(852142971,1086792851),new F(1017036298,365543100),new F(1126000580,2618297676),new F(1288033470,3409855158),new F(1501505948,4234509866),new F(1607167915,987167468),new F(1816402316,1246189591),new F(0,1),new F(0,32898),new F(2147483648,32906),new F(2147483648,2147516416),new F(0,32907),new F(0,2147483649),new F(2147483648,2147516545),new F(2147483648,32777),new F(0,138),new F(0,136),new F(0,2147516425),new F(0,2147483658),new F(0,2147516555),new F(2147483648,139),new F(2147483648,32905),new F(2147483648,32771),new F(2147483648,32770),new F(2147483648,128),new F(0,32778),new F(2147483648,2147483658),new F(2147483648,2147516545),new F(2147483648,32896),new F(0,2147483649),new F(2147483648,2147516424);var I=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(I),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(I);var L=[!1,`false`,null,void 0],R=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!L.includes(n))},Ee=new Map;function z(e,n){t?(Ee.set(e,n),n.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,n)}var B=typeof document<`u`?HTMLElement:w,V=new Map,H=new Map,De=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!V.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),V.set(t,e)}let n=V.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},Oe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!H.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),H.set(t,e)}let n=H.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},U=new WeakMap,W=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,G=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||U.get(e)||e.attachShadow(n);return U.set(e,r),De(r,t?`${t}\n${W}`:W),r},K=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},q=(e,t,n=``)=>e.getAttribute(t)??n,J=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Y=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Oe(t,a)},ke=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,Ae={copy:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`},check:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`},download:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`},fullscreen:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`},"zoom-in":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},"zoom-out":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},refresh:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}},je=!1,X=new Map,Z=!1,Q=e=>/<svg[\s>]/i.test(e),Me=e=>{if(typeof e==`string`)return Q(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Q(n))return n;let r=t.default;if(typeof r==`string`&&Q(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Q(e.data))return e.data}},Ne=(e,t)=>{Z=!0;let n=Me(t);n&&(X.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))};(e=>{Z=!0,Object.entries(e).forEach(([e,t])=>{Ne(e,t)})})(Ae),z(`r-icon`,class extends B{isDev=je;_events=new n;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=G(this,ke);let e=K(this._shadowDom,`.ran-icon`,()=>j().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return q(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return q(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return q(this,`color`)}set color(e){e&&this.setAttribute(`color`,e)}get spin(){return this.hasAttribute(`spin`)}set spin(e){e?this.setAttribute(`spin`,``):this.removeAttribute(`spin`)}get decorative(){let e=this.getAttribute(`decorative`);return e==null?!this.hasAttribute(`aria-label`):e!==`false`&&e!==`0`}set decorative(e){this.setAttribute(`decorative`,e?`true`:`false`)}get ariaLabel(){return q(this,`aria-label`)}set ariaLabel(e){J(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return q(this,`sheet`)}set sheet(e){J(this,`sheet`,e)}handlerExternalCss=()=>{Y(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`);return}this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)}};setIcon=()=>{if(typeof document>`u`)return;this._icon&&=(this._icon.remove(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=X.get(t);if(!n){this.isDev&&Z&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}n&&this.isSvgText(n)?this.renderSvg(n,e):this.isDev&&console.warn(`[ranui-icon] invalid svg text: ${e}`)}catch(t){this.isDev&&console.warn(`[ranui-icon] render icon failed: ${e}`,t)}};isSvgText=e=>Q(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=A(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,this._icon.setAttribute(`part`,`icon-svg`),this._icon.setAttribute(`data-name`,t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let e=this.color||`currentColor`;this._icon.style.setProperty(`color`,e),this._icon.style.setProperty(`fill`,e),this._icon.style.setProperty(`stroke`,e)}};setSpin=()=>{this.spin?this._div.classList.add(`ran-icon-spin`):this._div.classList.remove(`ran-icon-spin`)};connectedCallback(){this._events.on(window,`ranui-icon-registered`,this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`name`&&this.setIcon(),e===`size`&&this.setSize(),e===`color`&&this.setColor(),e===`spin`&&this.setSpin(),(e===`decorative`||e===`aria-label`)&&this.syncA11y(),e===`sheet`&&this.handlerExternalCss())}});var Pe=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,block);box-sizing:var(--ran-input-host-box-sizing,border-box)}:host([placeholder]) .ran-input-label{transform:var(--ran-input-label-placeholder-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-label-placeholder-top,0)}:host .ran-input-label{transform:var(--ran-input-label-transform,translateY(-50%));top:var(--ran-input-label-top,50%)}.ran-input{box-sizing:var(--ran-input-box-sizing,border-box);position:var(--ran-input-position,relative);display:var(--ran-input-display,flex);width:var(--ran-input-width,100%);height:var(--ran-input-height,auto);min-width:var(--ran-input-min-width,0);padding:var(--ran-input-padding,0px 0px 0px 4px);color:var(--ran-input-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-font-size,12px);font-family:var(--ran-input-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-input-line-height,1.5715);background-color:var(--ran-input-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-background-image,none);border:var(--ran-input-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-input-border-image-source,none);border-image-slice:var(--ran-input-border-image-slice,8);border-image-width:var(--ran-input-border-image-width,4px);border-radius:var(--ran-input-border-radius,var(--ran-radius-sm,6px));transition:var(--ran-input-transition,none);min-height:var(--ran-input-min-height,32px);border-image-outset:0;border-image-repeat:stretch}.ran-input .ran-icon{display:var(--ran-input-icon-display,flex);align-items:var(--ran-input-icon-align-items,center);justify-content:var(--ran-input-icon-justify-content,center)}.ran-input:focus-within{border-color:var(--ran-input-active-border-color,var(--ran-color-primary,#006bff));box-shadow:var(--ran-input-active-box-shadow,0 0 0 2px var(--ran-blue-400,#cae7ff));border-right-width:var(--ran-input-active-border-right-width,1px);outline:var(--ran-input-active-outline,0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color,var(--ran-color-primary,#006bff));border-right-width:var(--ran-input-hover-border-right-width,1px)}.ran-input>.ran-input-content:hover~.ran-input-label{color:var(--ran-input-label-hover-color,var(--ran-color-primary,#006bff))}.ran-input[value]>.ran-input-label{transform:var(--ran-input-label-value-transform,translateY(calc(-50% - .43em)) scale(.8));color:var(--ran-input-label-value-color,var(--ran-color-text-disabled,#00000040))}.ran-input[status=error] .ran-input-content,.ran-input[status=warning] .ran-input-content{padding-right:var(--ran-input-content-status-padding-right,28px)}.ran-input[status=error]:after,.ran-input[status=warning]:after{content:"";pointer-events:none;width:16px;height:16px;position:absolute;top:50%;right:10px;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ran-input[status=error]{border-color:var(--ran-input-status-error-border-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-error-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#ff4d4f);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[status=warning]{border-color:var(--ran-input-status-warning-border-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-warning-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#faad14);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[disabled]{color:var(--ran-input-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-disabled-box-shadow,none);cursor:var(--ran-input-disabled-cursor,not-allowed);opacity:var(--ran-input-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-content-disabled-box-shadow,none);cursor:var(--ran-input-content-disabled-cursor,not-allowed);opacity:var(--ran-input-content-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-label-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5))}.ran-input[disabled]>.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#999));border-color:var(--ran-input-label-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-label-disabled-box-shadow,none);cursor:var(--ran-input-label-disabled-cursor,not-allowed)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode,horizontal-tb);text-rendering:var(--ran-input-content-text-rendering,auto);letter-spacing:var(--ran-input-content-letter-spacing,normal);word-spacing:var(--ran-input-content-word-spacing,normal);text-transform:var(--ran-input-content-text-transform,none);text-indent:var(--ran-input-content-text-indent,0px);text-shadow:var(--ran-input-content-text-shadow,none);text-align:var(--ran-input-content-text-align,start);cursor:var(--ran-input-content-cursor,text);touch-action:var(--ran-input-content-touch-action,manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance,none);text-overflow:var(--ran-input-content-text-overflow,ellipsis);box-sizing:var(--ran-input-content-box-sizing,border-box);margin:var(--ran-input-content-margin,0);font-variant:var(--ran-input-content-font-variant,tabular-nums);list-style:var(--ran-input-content-list-style,none);font-feature-settings:var(--ran-input-content-font-feature-settings,"tnum");position:var(--ran-input-content-position,relative);border:var(--ran-input-content-border,none);width:var(--ran-input-content-width,100%);height:var(--ran-input-content-height,100%);min-height:var(--ran-input-content-min-height,30px);min-width:var(--ran-input-content-min-width,0);color:var(--ran-input-content-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-content-font-size,14px);line-height:var(--ran-input-content-line-height,1.48);background-color:var(--ran-input-content-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-content-background-image,none);transition:var(--ran-input-content-transition,none);outline:var(--ran-input-content-outline,none);border-radius:var(--ran-input-content-border-radius,var(--ran-radius-sm,6px));padding:var(--ran-input-content-padding,0 0 0 2px);font-weight:var(--ran-input-content-font-weight,400)}.ran-input-content:focus,.ran-input-content:hover{border:var(--ran-input-content-hover-border,none);outline:var(--ran-input-content-hover-outline,0)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color,var(--ran-color-text-disabled,#999))}.ran-input-content:placeholder-shown~.ran-input-label{transform:var(--ran-input-content-placeholder-label-transform,translateY(calc(-50% - .43em)) scale(.8))}.ran-input-content:focus~.ran-input-label{transform:var(--ran-input-content-focus-label-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-content-focus-label-top,0px)}.ran-input-content::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ran-input-label{box-sizing:var(--ran-input-label-box-sizing,border-box);pointer-events:var(--ran-input-label-pointer-events,none);position:var(--ran-input-label-position,absolute);font-size:var(--ran-input-label-font-size,14px);left:var(--ran-input-label-left,8px);transition:var(--ran-input-label-transition,transform .3s, top .3s, font-size .3s);transform-origin:var(--ran-input-label-transform-origin,left);padding:var(--ran-input-label-padding,0 0);color:var(--ran-input-label-color,var(--ran-color-text-disabled,#999));background:var(--ran-input-label-background,var(--ran-color-bg-elevated,#fff));opacity:var(--ran-input-label-opacity,.9)}.ran-input-message{margin-top:var(--ran-input-message-margin-top,4px);font-size:var(--ran-input-message-font-size,12px);line-height:var(--ran-input-message-line-height,1.5);color:var(--ran-input-message-color,var(--ran-color-text-secondary,#8c8c8c))}.ran-input-message:empty{display:none}:host([status=error]) .ran-input-message{color:var(--ran-input-message-error-color,var(--ran-color-danger,#ff4d4f))}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning,#faad14))}`,Fe=0,$=class extends B{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`]}_events=new n;_shadowDom;_input;_label;_inputContent;_icon;_message;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=G(this,Pe);let e=K(this._shadowDom,`.ran-input`,()=>j().class(`ran-input`).part(`input`).children(ve().class(`ran-input-content`).part(`content`)).build());this._input=e,this._inputContent=e.querySelector(`.ran-input-content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++Fe}`)}get value(){return this.getAttribute(`value`)||``}set value(e){!R(this)&&e?(this.setAttribute(`value`,e),this._input.setAttribute(`value`,e)):(this.removeAttribute(`value`),this._input.removeAttribute(`value`)),this._internals?.setFormValue?.(this.getAttribute(`value`)??``)}get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`)}get required(){return this.hasAttribute(`required`)}set required(e){!e||e===`false`?this.removeAttribute(`required`):this.setAttribute(`required`,``)}get disabled(){return R(this)}set disabled(e){L.includes(e)?(this.removeAttribute(`disabled`),this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this.setAttribute(`disabled`,``),this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get status(){return this.getAttribute(`status`)||``}set status(e){e?(this.setAttribute(`status`,e),this._input.setAttribute(`status`,e)):(this.removeAttribute(`status`),this._input.removeAttribute(`status`))}get message(){return this.getAttribute(`message`)||``}set message(e){e?this.setAttribute(`message`,e):this.removeAttribute(`message`)}get name(){return this.getAttribute(`name`)||``}set name(e){this.setAttribute(`name`,e)}get min(){return this.getAttribute(`min`)||``}set min(e){this.type===`number`&&this.setAttribute(`min`,e)}get max(){return this.getAttribute(`max`)||``}set max(e){this.type===`number`&&this.setAttribute(`max`,e)}get step(){return this.getAttribute(`step`)||``}set step(e){this.type===`number`&&this.setAttribute(`step`,e)}get icon(){return this.getAttribute(`icon`)||``}set icon(e){e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}get sheet(){return q(this,`sheet`)}set sheet(e){J(this,`sheet`,e)}handlerExternalCss=()=>{Y(this,this._shadowDom,`sheet`,null,this.sheet)};customInput=e=>{e.stopPropagation(),e.preventDefault();let{target:t,data:n=``}=e;this.value=t?.value||n||``,this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value}}))};customChange=()=>{this.value=this._inputContent?.value??this.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value}}))};listenPlaceholder=(e,t)=>{e===`placeholder`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`placeholder`):this._inputContent.setAttribute(`placeholder`,t))};listenLabel=(e,t)=>{e===`label`&&this._inputContent&&(t==null?(this._input.removeAttribute(`label`),this._label&&=(this._input.removeChild(this._label),void 0)):this._label?this._label.innerHTML=t:(this._label=ye().class(`ran-input-label`).part(`label`).text(t).build(),this._label.htmlFor=this._inputContent.id,this._input.appendChild(this._label)))};listenType=(e,t)=>{e===`type`&&this._inputContent&&(t?this._inputContent.setAttribute(`type`,t):(this._inputContent.removeAttribute(`type`),this._inputContent.removeAttribute(`min`),this._inputContent.removeAttribute(`max`),this._inputContent.removeAttribute(`step`)))};listenStatus=(e,t)=>{e===`status`&&this._input&&(t?this._input.setAttribute(`status`,t):this._input.removeAttribute(`status`))};listenMessage=(e,t)=>{e===`message`&&(t?(this._message||(this._message=j().class(`ran-input-message`).part(`message`).build(),this._shadowDom.appendChild(this._message)),this._message.textContent=t):this._message&&=(this._message.remove(),void 0))};listenNumericConstraint=(e,t)=>{(e===`min`||e===`max`||e===`step`)&&this._inputContent&&(this.type===`number`&&t!=null?this._inputContent.setAttribute(e,t):this._inputContent.removeAttribute(e))};listenRequired=(e,t)=>{e===`required`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`required`):this._inputContent.setAttribute(`required`,``))};listenDisabled=(e,t)=>{e===`disabled`&&this._input&&(L.includes(t)?this._input.removeAttribute(`disabled`):(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)))};listenIcon=(e,t,n)=>{e===`icon`&&t&&t!==n&&(this.removeAttribute(`label`),this.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=A(`r-icon`).class(`ran-icon`).build(),this._inputContent.insertAdjacentElement(`beforebegin`,this._icon)),this.icon&&this._icon.setAttribute(`name`,this.icon)};listenEvent=(e,t,n)=>{this.listenPlaceholder(e,n),this.listenLabel(e,n),this.listenStatus(e,n),this.listenMessage(e,n),this.listenNumericConstraint(e,n),this.listenRequired(e,n),this.listenDisabled(e,n),this.listenIcon(e,n,t),e===`value`&&t!==n&&(this._inputContent.value=n,this._input.setAttribute(`value`,n))};connectedCallback(){this.handlerExternalCss(),this.value&&(this._inputContent.value=this.value,this._input.setAttribute(`value`,this.value)),this._internals?.setFormValue?.(this.value),this.status&&this._input.setAttribute(`status`,this.status),this.message&&this.listenMessage(`message`,this.message),R(this)&&(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this.type&&this._inputContent.setAttribute(`type`,this.type),this.type===`number`&&(this.min&&this._inputContent.setAttribute(`min`,this.min),this.max&&this._inputContent.setAttribute(`max`,this.max),this.step&&this._inputContent.setAttribute(`step`,this.step)),this.required&&this._inputContent.setAttribute(`required`,``),this._events.on(this._inputContent,`input`,this.customInput),this._events.on(this._inputContent,`change`,this.customChange),document.readyState===`complete`&&this.dealIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.listenEvent(e,t,n),e===`sheet`&&this.handlerExternalCss())}};return z(`r-input`,$),e.Input=$,e.default=$,e})({});
1
+ var ranui_input=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=typeof document>`u`,n=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)h(e,a);c===0&&re()}}]}function f(e){let t=ee(e,!0);return te(t),_(t),()=>y(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ie(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function te(e){s&&s.owned.push(e)}function ne(e){o&&(o.sources.add(e),e.observers.add(o))}function h(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)h(t,i)}function re(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||g(t)}}finally{u=!1}}}function g(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&g(t);e.state===a&&_(e),e.state=r}}function _(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);v(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)h(t,a)}}finally{e.running=!1,o=t,s=n}}function v(e){for(let t of e.owned)y(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function y(e){e.disposed||(e.disposed=!0,v(e),e.observers.clear())}function ie(e){for(let t of e.owned)y(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function b(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function x(e){return b(e)}var ae=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,oe=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},S=(e,t,n)=>{for(let r of e)ae(r)&&(oe(r,t)&&n.push(r),S(r.childrenList,t,n))},C=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?b(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return S(this.childrenList,e,t),t}},w=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new C)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new se(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return S(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${x(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${x(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?b(e):(e instanceof C,e.serialize())).join(``):a+=b(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},se=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return S(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${b(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?b(e):(e instanceof C,e.serialize())).join(``)}</template>`}},T=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(T(t)):e.concat(t),[]),E=e=>e==null?null:e instanceof k?e.build():typeof e==`string`?t?e:document.createTextNode(e):e,ce=(e,n)=>{if(t){O(e,[n()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=n();o();let t=document.createDocumentFragment();a=p(n=>(O(t,[e]),n)),i.parentNode?.insertBefore(t,i)}),m(()=>a?.())},le=`__ranFor`,ue=e=>typeof e==`object`&&!!e&&e[le]===!0,de=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=E(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},D=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},fe=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=E(n.render(t,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=n.each()??[],t=new Map,a=[];e.forEach((e,r)=>{let o=n.key(e,r);if(t.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=de(e,r,n.render),t.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();D(r,a),i=t})},pe=`__ranIndex`,me=e=>typeof e==`object`&&!!e&&e[pe]===!0,he=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=E(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},ge=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=E(n.render(()=>t,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=n.each()??[];for(let t=0;t<e.length;t++)t<i.length?i[t].setItem(e[t]):i.push(he(e[t],t,n.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}D(r,i.map(e=>e.node).filter(e=>e!=null))})},O=(e,t)=>{T(t).forEach(t=>{if(ue(t)){fe(e,t);return}if(me(t)){ge(e,t);return}if(typeof t==`function`){ce(e,t);return}let n=E(t);n!=null&&e.appendChild(n)})},k=class{el;constructor(e){this.el=t?new w(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{t?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return O(this.el,e),this}replaceChildren(...e){if(t){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new _e(this.el,t,e)}build(){return this.el}serialize(){if(t)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},_e=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return O(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(t)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let n=document.createElement(`style`);return n.textContent=e,this.root.appendChild(n),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return t?this.root.serialize():this.root.innerHTML}},A=e=>new k(e),j=()=>A(`div`),ve=()=>A(`input`),ye=()=>A(`label`),be=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},M=(e=8)=>Math.random().toString(36).substring(2,e+2),xe=e=>typeof e==`function`,Se=12e4,Ce=`__ranuts_bridge__`,we=`default`,N=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},Te=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=we){this.targetOrigin=t,this.channel=n,this.senderId=M(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,N.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:Ce,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(xe(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=M(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},Se),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{N.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new Te(n,t,r);if(e||=M(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new be;var P=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],F=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new F(P[0],3609767458),new F(P[1],602891725),new F(P[2],3964484399),new F(P[3],2173295548),new F(P[4],4081628472),new F(P[5],3053834265),new F(P[6],2937671579),new F(P[7],3664609560),new F(P[8],2734883394),new F(P[9],1164996542),new F(P[10],1323610764),new F(P[11],3590304994),new F(P[12],4068182383),new F(P[13],991336113),new F(P[14],633803317),new F(P[15],3479774868),new F(P[16],2666613458),new F(P[17],944711139),new F(P[18],2341262773),new F(P[19],2007800933),new F(P[20],1495990901),new F(P[21],1856431235),new F(P[22],3175218132),new F(P[23],2198950837),new F(P[24],3999719339),new F(P[25],766784016),new F(P[26],2566594879),new F(P[27],3203337956),new F(P[28],1034457026),new F(P[29],2466948901),new F(P[30],3758326383),new F(P[31],168717936),new F(P[32],1188179964),new F(P[33],1546045734),new F(P[34],1522805485),new F(P[35],2643833823),new F(P[36],2343527390),new F(P[37],1014477480),new F(P[38],1206759142),new F(P[39],344077627),new F(P[40],1290863460),new F(P[41],3158454273),new F(P[42],3505952657),new F(P[43],106217008),new F(P[44],3606008344),new F(P[45],1432725776),new F(P[46],1467031594),new F(P[47],851169720),new F(P[48],3100823752),new F(P[49],1363258195),new F(P[50],3750685593),new F(P[51],3785050280),new F(P[52],3318307427),new F(P[53],3812723403),new F(P[54],2003034995),new F(P[55],3602036899),new F(P[56],1575990012),new F(P[57],1125592928),new F(P[58],2716904306),new F(P[59],442776044),new F(P[60],593698344),new F(P[61],3733110249),new F(P[62],2999351573),new F(P[63],3815920427),new F(3391569614,3928383900),new F(3515267271,566280711),new F(3940187606,3454069534),new F(4118630271,4000239992),new F(116418474,1914138554),new F(174292421,2731055270),new F(289380356,3203993006),new F(460393269,320620315),new F(685471733,587496836),new F(852142971,1086792851),new F(1017036298,365543100),new F(1126000580,2618297676),new F(1288033470,3409855158),new F(1501505948,4234509866),new F(1607167915,987167468),new F(1816402316,1246189591),new F(0,1),new F(0,32898),new F(2147483648,32906),new F(2147483648,2147516416),new F(0,32907),new F(0,2147483649),new F(2147483648,2147516545),new F(2147483648,32777),new F(0,138),new F(0,136),new F(0,2147516425),new F(0,2147483658),new F(0,2147516555),new F(2147483648,139),new F(2147483648,32905),new F(2147483648,32771),new F(2147483648,32770),new F(2147483648,128),new F(0,32778),new F(2147483648,2147483658),new F(2147483648,2147516545),new F(2147483648,32896),new F(0,2147483649),new F(2147483648,2147516424);var I=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(I),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(I);var L=[!1,`false`,null,void 0],R=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!L.includes(n))},Ee=new Map;function z(e,n){t?(Ee.set(e,n),n.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,n)}var B=typeof document<`u`?HTMLElement:w,V=new Map,H=new Map,De=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!V.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),V.set(t,e)}let n=V.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},Oe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!H.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),H.set(t,e)}let n=H.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},U=new WeakMap,W=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,G=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||U.get(e)||e.attachShadow(n);return U.set(e,r),De(r,t?`${t}\n${W}`:W),r},K=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},q=(e,t,n=``)=>e.getAttribute(t)??n,J=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Y=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Oe(t,a)},ke=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,Ae={copy:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`},check:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`},download:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`},fullscreen:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`},"zoom-in":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},"zoom-out":{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`},refresh:{success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}},je=!1,X=new Map,Z=!1,Q=e=>/<svg[\s>]/i.test(e),Me=e=>{if(typeof e==`string`)return Q(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Q(n))return n;let r=t.default;if(typeof r==`string`&&Q(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Q(e.data))return e.data}},Ne=(e,t)=>{Z=!0;let n=Me(t);n&&(X.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))};(e=>{Z=!0,Object.entries(e).forEach(([e,t])=>{Ne(e,t)})})(Ae),z(`r-icon`,class extends B{isDev=je;_events=new n;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=G(this,ke);let e=K(this._shadowDom,`.ran-icon`,()=>j().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return q(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return q(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return q(this,`color`)}set color(e){e&&this.setAttribute(`color`,e)}get spin(){return this.hasAttribute(`spin`)}set spin(e){e?this.setAttribute(`spin`,``):this.removeAttribute(`spin`)}get decorative(){let e=this.getAttribute(`decorative`);return e==null?!this.hasAttribute(`aria-label`):e!==`false`&&e!==`0`}set decorative(e){this.setAttribute(`decorative`,e?`true`:`false`)}get ariaLabel(){return q(this,`aria-label`)}set ariaLabel(e){J(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return q(this,`sheet`)}set sheet(e){J(this,`sheet`,e)}handlerExternalCss=()=>{Y(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`);return}this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)}};setIcon=()=>{if(typeof document>`u`)return;this._icon&&=(this._icon.remove(),void 0);let e=this.name;if(e)if(e.startsWith(`<svg`))this.renderSvg(e,e);else try{let t=`inline:${e}`,n=X.get(t);if(!n){this.isDev&&Z&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}n&&this.isSvgText(n)?this.renderSvg(n,e):this.isDev&&console.warn(`[ranui-icon] invalid svg text: ${e}`)}catch(t){this.isDev&&console.warn(`[ranui-icon] render icon failed: ${e}`,t)}};isSvgText=e=>Q(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=A(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,this._icon.setAttribute(`part`,`icon-svg`),this._icon.setAttribute(`data-name`,t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let e=this.color||`currentColor`;this._icon.style.setProperty(`color`,e),this._icon.style.setProperty(`fill`,e),this._icon.style.setProperty(`stroke`,e)}};setSpin=()=>{this.spin?this._div.classList.add(`ran-icon-spin`):this._div.classList.remove(`ran-icon-spin`)};connectedCallback(){this._events.on(window,`ranui-icon-registered`,this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`name`&&this.setIcon(),e===`size`&&this.setSize(),e===`color`&&this.setColor(),e===`spin`&&this.setSpin(),(e===`decorative`||e===`aria-label`)&&this.syncA11y(),e===`sheet`&&this.handlerExternalCss())}});var Pe=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,block);box-sizing:var(--ran-input-host-box-sizing,border-box)}:host([placeholder]) .ran-input-label{transform:var(--ran-input-label-placeholder-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-label-placeholder-top,0)}:host .ran-input-label{transform:var(--ran-input-label-transform,translateY(-50%));top:var(--ran-input-label-top,50%)}.ran-input{box-sizing:var(--ran-input-box-sizing,border-box);position:var(--ran-input-position,relative);display:var(--ran-input-display,flex);width:var(--ran-input-width,100%);height:var(--ran-input-height,auto);min-width:var(--ran-input-min-width,0);padding:var(--ran-input-padding,0px 0px 0px 4px);color:var(--ran-input-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-font-size,12px);font-family:var(--ran-input-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-input-line-height,1.5715);background-color:var(--ran-input-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-background-image,none);border:var(--ran-input-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-input-border-image-source,none);border-image-slice:var(--ran-input-border-image-slice,8);border-image-width:var(--ran-input-border-image-width,4px);border-radius:var(--ran-input-border-radius,var(--ran-radius-sm,6px));transition:var(--ran-input-transition,none);min-height:var(--ran-input-min-height,32px);border-image-outset:0;border-image-repeat:stretch}.ran-input .ran-icon{display:var(--ran-input-icon-display,flex);align-items:var(--ran-input-icon-align-items,center);justify-content:var(--ran-input-icon-justify-content,center)}.ran-input:focus-within{border-color:var(--ran-input-active-border-color,var(--ran-color-primary,#006bff));box-shadow:var(--ran-input-active-box-shadow,0 0 0 2px var(--ran-blue-400,#cae7ff));border-right-width:var(--ran-input-active-border-right-width,1px);outline:var(--ran-input-active-outline,0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color,var(--ran-color-primary,#006bff));border-right-width:var(--ran-input-hover-border-right-width,1px)}.ran-input>.ran-input-content:hover~.ran-input-label{color:var(--ran-input-label-hover-color,var(--ran-color-primary,#006bff))}.ran-input[value]>.ran-input-label{transform:var(--ran-input-label-value-transform,translateY(calc(-50% - .43em)) scale(.8));color:var(--ran-input-label-value-color,var(--ran-color-text-disabled,#00000040))}.ran-input[status=error] .ran-input-content,.ran-input[status=warning] .ran-input-content{padding-right:var(--ran-input-content-status-padding-right,28px)}.ran-input[status=error]:after,.ran-input[status=warning]:after{content:"";pointer-events:none;width:16px;height:16px;position:absolute;top:50%;right:10px;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ran-input[status=error]{border-color:var(--ran-input-status-error-border-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-error-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#ff4d4f);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[status=warning]{border-color:var(--ran-input-status-warning-border-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-warning-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#faad14);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[disabled]{color:var(--ran-input-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-disabled-box-shadow,none);cursor:var(--ran-input-disabled-cursor,not-allowed);opacity:var(--ran-input-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-content-disabled-box-shadow,none);cursor:var(--ran-input-content-disabled-cursor,not-allowed);opacity:var(--ran-input-content-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-label-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5))}.ran-input[disabled]>.ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#999));border-color:var(--ran-input-label-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-label-disabled-box-shadow,none);cursor:var(--ran-input-label-disabled-cursor,not-allowed)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode,horizontal-tb);text-rendering:var(--ran-input-content-text-rendering,auto);letter-spacing:var(--ran-input-content-letter-spacing,normal);word-spacing:var(--ran-input-content-word-spacing,normal);text-transform:var(--ran-input-content-text-transform,none);text-indent:var(--ran-input-content-text-indent,0px);text-shadow:var(--ran-input-content-text-shadow,none);text-align:var(--ran-input-content-text-align,start);cursor:var(--ran-input-content-cursor,text);touch-action:var(--ran-input-content-touch-action,manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance,none);text-overflow:var(--ran-input-content-text-overflow,ellipsis);box-sizing:var(--ran-input-content-box-sizing,border-box);margin:var(--ran-input-content-margin,0);font-variant:var(--ran-input-content-font-variant,tabular-nums);list-style:var(--ran-input-content-list-style,none);font-feature-settings:var(--ran-input-content-font-feature-settings,"tnum");position:var(--ran-input-content-position,relative);border:var(--ran-input-content-border,none);width:var(--ran-input-content-width,100%);height:var(--ran-input-content-height,100%);min-height:var(--ran-input-content-min-height,30px);min-width:var(--ran-input-content-min-width,0);color:var(--ran-input-content-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-content-font-size,14px);line-height:var(--ran-input-content-line-height,1.48);background-color:var(--ran-input-content-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-content-background-image,none);transition:var(--ran-input-content-transition,none);outline:var(--ran-input-content-outline,none);border-radius:var(--ran-input-content-border-radius,var(--ran-radius-sm,6px));padding:var(--ran-input-content-padding,0 0 0 2px);font-weight:var(--ran-input-content-font-weight,400)}.ran-input-content:focus,.ran-input-content:hover{border:var(--ran-input-content-hover-border,none);outline:var(--ran-input-content-hover-outline,0)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color,var(--ran-color-text-disabled,#999))}.ran-input-content:placeholder-shown~.ran-input-label{transform:var(--ran-input-content-placeholder-label-transform,translateY(calc(-50% - .43em)) scale(.8))}.ran-input-content:focus~.ran-input-label{transform:var(--ran-input-content-focus-label-transform,translateY(calc(-50% - .43em)) scale(.8));top:var(--ran-input-content-focus-label-top,0px)}.ran-input-content::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ran-input-label{box-sizing:var(--ran-input-label-box-sizing,border-box);pointer-events:var(--ran-input-label-pointer-events,none);position:var(--ran-input-label-position,absolute);font-size:var(--ran-input-label-font-size,14px);left:var(--ran-input-label-left,8px);transition:var(--ran-input-label-transition,transform .3s, top .3s, font-size .3s);transform-origin:var(--ran-input-label-transform-origin,left);padding:var(--ran-input-label-padding,0 0);color:var(--ran-input-label-color,var(--ran-color-text-disabled,#999));background:var(--ran-input-label-background,var(--ran-color-bg-elevated,#fff));opacity:var(--ran-input-label-opacity,.9)}.ran-input-message{margin-top:var(--ran-input-message-margin-top,4px);font-size:var(--ran-input-message-font-size,12px);line-height:var(--ran-input-message-line-height,1.5);color:var(--ran-input-message-color,var(--ran-color-text-secondary,#8c8c8c))}.ran-input-message:empty{display:none}:host([status=error]) .ran-input-message{color:var(--ran-input-message-error-color,var(--ran-color-danger,#ff4d4f))}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning,#faad14))}`,Fe=0,$=class extends B{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`]}_events=new n;_shadowDom;_input;_label;_inputContent;_icon;_message;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=G(this,Pe);let e=K(this._shadowDom,`.ran-input`,()=>j().class(`ran-input`).part(`input`).children(ve().class(`ran-input-content`).part(`content`)).build());this._input=e,this._inputContent=e.querySelector(`.ran-input-content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++Fe}`)}get value(){return this.getAttribute(`value`)||``}set value(e){!R(this)&&e?(this.setAttribute(`value`,e),this._input.setAttribute(`value`,e)):(this.removeAttribute(`value`),this._input.removeAttribute(`value`)),this._internals?.setFormValue?.(this.getAttribute(`value`)??``)}get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`)}get required(){return this.hasAttribute(`required`)}set required(e){!e||e===`false`?this.removeAttribute(`required`):this.setAttribute(`required`,``)}get disabled(){return R(this)}set disabled(e){L.includes(e)?(this.removeAttribute(`disabled`),this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this.setAttribute(`disabled`,``),this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get status(){return this.getAttribute(`status`)||``}set status(e){e?(this.setAttribute(`status`,e),this._input.setAttribute(`status`,e)):(this.removeAttribute(`status`),this._input.removeAttribute(`status`))}get message(){return this.getAttribute(`message`)||``}set message(e){e?this.setAttribute(`message`,e):this.removeAttribute(`message`)}get name(){return this.getAttribute(`name`)||``}set name(e){this.setAttribute(`name`,e)}get min(){return this.getAttribute(`min`)||``}set min(e){this.type===`number`&&this.setAttribute(`min`,e)}get max(){return this.getAttribute(`max`)||``}set max(e){this.type===`number`&&this.setAttribute(`max`,e)}get step(){return this.getAttribute(`step`)||``}set step(e){this.type===`number`&&this.setAttribute(`step`,e)}get icon(){return this.getAttribute(`icon`)||``}set icon(e){e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}get sheet(){return q(this,`sheet`)}set sheet(e){J(this,`sheet`,e)}handlerExternalCss=()=>{Y(this,this._shadowDom,`sheet`,null,this.sheet)};customInput=e=>{e.stopPropagation(),e.preventDefault();let{target:t,data:n=``}=e;this.value=t?.value||n||``,this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value}}))};customChange=()=>{this.value=this._inputContent?.value??this.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value}}))};listenPlaceholder=(e,t)=>{e===`placeholder`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`placeholder`):this._inputContent.setAttribute(`placeholder`,t))};listenLabel=(e,t)=>{e===`label`&&this._inputContent&&(t==null?(this._input.removeAttribute(`label`),this._label&&=(this._input.removeChild(this._label),void 0)):this._label?this._label.innerHTML=t:(this._label=ye().class(`ran-input-label`).part(`label`).text(t).build(),this._label.htmlFor=this._inputContent.id,this._input.appendChild(this._label)))};listenType=(e,t)=>{e===`type`&&this._inputContent&&(t?this._inputContent.setAttribute(`type`,t):(this._inputContent.removeAttribute(`type`),this._inputContent.removeAttribute(`min`),this._inputContent.removeAttribute(`max`),this._inputContent.removeAttribute(`step`)))};listenStatus=(e,t)=>{e===`status`&&this._input&&(t?this._input.setAttribute(`status`,t):this._input.removeAttribute(`status`))};listenMessage=(e,t)=>{e===`message`&&(t?(this._message||(this._message=j().class(`ran-input-message`).part(`message`).build(),this._shadowDom.appendChild(this._message)),this._message.textContent=t):this._message&&=(this._message.remove(),void 0))};listenNumericConstraint=(e,t)=>{(e===`min`||e===`max`||e===`step`)&&this._inputContent&&(this.type===`number`&&t!=null?this._inputContent.setAttribute(e,t):this._inputContent.removeAttribute(e))};listenRequired=(e,t)=>{e===`required`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`required`):this._inputContent.setAttribute(`required`,``))};listenDisabled=(e,t)=>{e===`disabled`&&this._input&&(L.includes(t)?this._input.removeAttribute(`disabled`):(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)))};listenIcon=(e,t,n)=>{e===`icon`&&t&&t!==n&&(this.removeAttribute(`label`),this.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=A(`r-icon`).class(`ran-icon`).build(),this._inputContent.insertAdjacentElement(`beforebegin`,this._icon)),this.icon&&this._icon.setAttribute(`name`,this.icon)};listenEvent=(e,t,n)=>{this.listenPlaceholder(e,n),this.listenLabel(e,n),this.listenStatus(e,n),this.listenMessage(e,n),this.listenNumericConstraint(e,n),this.listenRequired(e,n),this.listenDisabled(e,n),this.listenIcon(e,n,t),e===`value`&&t!==n&&(this._inputContent.value=n,this._input.setAttribute(`value`,n))};connectedCallback(){this.handlerExternalCss(),this.value&&(this._inputContent.value=this.value,this._input.setAttribute(`value`,this.value)),this._internals?.setFormValue?.(this.value),this.status&&this._input.setAttribute(`status`,this.status),this.message&&this.listenMessage(`message`,this.message),R(this)&&(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this.type&&this._inputContent.setAttribute(`type`,this.type),this.type===`number`&&(this.min&&this._inputContent.setAttribute(`min`,this.min),this.max&&this._inputContent.setAttribute(`max`,this.max),this.step&&this._inputContent.setAttribute(`step`,this.step)),this.required&&this._inputContent.setAttribute(`required`,``),this._events.on(this._inputContent,`input`,this.customInput),this._events.on(this._inputContent,`change`,this.customChange),document.readyState===`complete`&&this.dealIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.listenEvent(e,t,n),e===`sheet`&&this.handlerExternalCss())}};return z(`r-input`,$),e.Input=$,e.default=$,e})({});