ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
1 lines • 3.45 MB
JavaScript
var ranui_mermaid=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},l=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},d=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var l=i(t),u=0,d=l.length,f;u<d;u++)f=l[u],!o.call(e,f)&&f!==a&&n(e,f,{get:(e=>t[e]).bind(null,f),enumerable:!(s=r(t,f))||s.enumerable});return e},f=(e,r,i)=>(i=e==null?{}:t(a(e)),d(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),p,m=s((()=>{p=typeof document>`u`})),h,g=s((()=>{h=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}}}));function _(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(C(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)w(e,N);I===0&&T()}}]}function v(e){let t=x(e,!0);return S(t),D(t),()=>k(t)}function y(e){let t={owned:[],cleanups:[],owner:F},n=F,r=P;F=t,P=null;try{return e(()=>A(t))}finally{F=n,P=r}}function b(e){F&&F.cleanups.push(e)}function x(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:N,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:F}}function S(e){F&&F.owned.push(e)}function C(e){P&&(P.sources.add(e),e.observers.add(P))}function w(e,t){if(e.disposed||e.state>=t)return;let n=e.state===j;if(e.state=t,e.isEffect)L.add(e);else if(n)for(let t of e.observers)w(t,M)}function T(){if(!(I>0||R)){R=!0;try{for(;L.size>0;){let e=[...L];L.clear();for(let t of e)t.disposed||E(t)}}finally{R=!1}}}function E(e){if(!(e.disposed||e.state===j)){if(e.state===M)for(let t of e.sources)`fn`in t&&E(t);e.state===N&&D(e),e.state=j}}function D(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);O(e);let t=P,n=F;P=e,F=e,e.running=!0,e.state=j;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)w(t,N)}}finally{e.running=!1,P=t,F=n}}function O(e){for(let t of e.owned)k(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 k(e){e.disposed||(e.disposed=!0,O(e),e.observers.clear())}function A(e){for(let t of e.owned)k(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var j,M,N,P,F,I,L,R,ee=s((()=>{j=0,M=1,N=2,P=null,F=null,I=0,L=new Set,R=!1}));function te(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function z(e){return te(e)}var ne=s((()=>{})),re,ie,ae,oe=s((()=>{re=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ie=(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()},ae=(e,t,n)=>{for(let r of e)re(r)&&(ie(r,t)&&n.push(r),ae(r.childrenList,t,n))}})),se,ce,le,ue=s((()=>{ne(),oe(),se=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?te(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return ae(this.childrenList,e,t),t}},ce=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 se)}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 le(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return ae(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}="${z(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${z(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`?te(e):(e instanceof se,e.serialize())).join(``):a+=te(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}>`}},le=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 ae(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${te(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?te(e):(e instanceof se,e.serialize())).join(``)}</template>`}}})),de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee=s((()=>{m(),ue(),ee(),de=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(de(t)):e.concat(t),[]),fe=e=>e==null?null:e instanceof we?e.build():typeof e==`string`?p?e:document.createTextNode(e):e,pe=(e,t)=>{if(p){Ce(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};v(()=>{let e=t();a();let n=document.createDocumentFragment();i=y(t=>(Ce(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),b(()=>i?.())},me=`__ranFor`,he=e=>typeof e==`object`&&!!e&&e[me]===!0,ge=(e,t,n)=>{let[r,i]=_(t),a=null,o=y(t=>{let i=fe(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},_e=(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},ve=(e,t)=>{if(p){(t.each()??[]).forEach((n,r)=>{let i=fe(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;b(()=>{for(let e of r.values())e.dispose();r.clear()}),v(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=ge(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();_e(n,a),r=i})},ye=`__ranIndex`,be=e=>typeof e==`object`&&!!e&&e[ye]===!0,xe=(e,t,n)=>{let[r,i]=_(e),a=null,o=y(e=>{let i=fe(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Se=(e,t)=>{if(p){(t.each()??[]).forEach((n,r)=>{let i=fe(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];b(()=>{for(let e of r)e.dispose();r=[]}),v(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(xe(e[n],n,t.render));for(let t=r.length-1;t>=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}_e(n,r.map(e=>e.node).filter(e=>e!=null))})},Ce=(e,t)=>{de(t).forEach(t=>{if(he(t)){ve(e,t);return}if(be(t)){Se(e,t);return}if(typeof t==`function`){pe(e,t);return}let n=fe(t);n!=null&&e.appendChild(n)})},we=class{el;constructor(e){this.el=p?new ce(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?v(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{p?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 Ce(this.el,e),this}replaceChildren(...e){if(p){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 Te(this.el,t,e)}build(){return this.el}serialize(){if(p)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Te=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return Ce(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(p)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 p?this.root.serialize():this.root.innerHTML}}})),De,Oe,ke,Ae,je=s((()=>{Ee(),De=e=>new we(e),Oe=()=>De(`div`),ke=()=>De(`slot`),Ae=()=>De(`button`)})),Me=s((()=>{m(),g(),ee(),oe(),ue(),Ee(),je()})),Ne,Pe=s((()=>{Ne=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}}})),Fe,Ie=s((()=>{Fe=(e=8)=>Math.random().toString(36).substring(2,e+2)})),Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe=s((()=>{Pe(),Ie(),Le=e=>typeof e==`function`,Re=12e4,ze=`__ranuts_bridge__`,Be=`default`,Ve=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)}},He=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=Be){this.targetOrigin=t,this.channel=n,this.senderId=Fe(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,Ve.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:ze,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 l=this.messageHandlers.get(n);if(Le(l)){let t=e.source??this.targetWindow;Promise.resolve(l(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=Fe(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},Re),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=()=>{Ve.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}},Ue=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 He(n,t,r);if(e||=Fe(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`))}},Ue.getInstance(),new Ne,We=[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],Ge=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}},new Ge(We[0],3609767458),new Ge(We[1],602891725),new Ge(We[2],3964484399),new Ge(We[3],2173295548),new Ge(We[4],4081628472),new Ge(We[5],3053834265),new Ge(We[6],2937671579),new Ge(We[7],3664609560),new Ge(We[8],2734883394),new Ge(We[9],1164996542),new Ge(We[10],1323610764),new Ge(We[11],3590304994),new Ge(We[12],4068182383),new Ge(We[13],991336113),new Ge(We[14],633803317),new Ge(We[15],3479774868),new Ge(We[16],2666613458),new Ge(We[17],944711139),new Ge(We[18],2341262773),new Ge(We[19],2007800933),new Ge(We[20],1495990901),new Ge(We[21],1856431235),new Ge(We[22],3175218132),new Ge(We[23],2198950837),new Ge(We[24],3999719339),new Ge(We[25],766784016),new Ge(We[26],2566594879),new Ge(We[27],3203337956),new Ge(We[28],1034457026),new Ge(We[29],2466948901),new Ge(We[30],3758326383),new Ge(We[31],168717936),new Ge(We[32],1188179964),new Ge(We[33],1546045734),new Ge(We[34],1522805485),new Ge(We[35],2643833823),new Ge(We[36],2343527390),new Ge(We[37],1014477480),new Ge(We[38],1206759142),new Ge(We[39],344077627),new Ge(We[40],1290863460),new Ge(We[41],3158454273),new Ge(We[42],3505952657),new Ge(We[43],106217008),new Ge(We[44],3606008344),new Ge(We[45],1432725776),new Ge(We[46],1467031594),new Ge(We[47],851169720),new Ge(We[48],3100823752),new Ge(We[49],1363258195),new Ge(We[50],3750685593),new Ge(We[51],3785050280),new Ge(We[52],3318307427),new Ge(We[53],3812723403),new Ge(We[54],2003034995),new Ge(We[55],3602036899),new Ge(We[56],1575990012),new Ge(We[57],1125592928),new Ge(We[58],2716904306),new Ge(We[59],442776044),new Ge(We[60],593698344),new Ge(We[61],3733110249),new Ge(We[62],2999351573),new Ge(We[63],3815920427),new Ge(3391569614,3928383900),new Ge(3515267271,566280711),new Ge(3940187606,3454069534),new Ge(4118630271,4000239992),new Ge(116418474,1914138554),new Ge(174292421,2731055270),new Ge(289380356,3203993006),new Ge(460393269,320620315),new Ge(685471733,587496836),new Ge(852142971,1086792851),new Ge(1017036298,365543100),new Ge(1126000580,2618297676),new Ge(1288033470,3409855158),new Ge(1501505948,4234509866),new Ge(1607167915,987167468),new Ge(1816402316,1246189591),new Ge(0,1),new Ge(0,32898),new Ge(2147483648,32906),new Ge(2147483648,2147516416),new Ge(0,32907),new Ge(0,2147483649),new Ge(2147483648,2147516545),new Ge(2147483648,32777),new Ge(0,138),new Ge(0,136),new Ge(0,2147516425),new Ge(0,2147483658),new Ge(0,2147516555),new Ge(2147483648,139),new Ge(2147483648,32905),new Ge(2147483648,32771),new Ge(2147483648,32770),new Ge(2147483648,128),new Ge(0,32778),new Ge(2147483648,2147483658),new Ge(2147483648,2147516545),new Ge(2147483648,32896),new Ge(0,2147483649),new Ge(2147483648,2147516424),Ke=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}(Ke),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(Ke)})),Je=s((()=>{qe()})),Ye,Xe=s((()=>{Je(),Ye=[!1,`false`,null,void 0]})),Ze=s((()=>{}));function Qe(e,t){p?($e.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var $e,et=s((()=>{m(),$e=new Map})),tt,nt,rt=s((()=>{Me(),tt=()=>typeof document<`u`?HTMLElement:ce,nt=tt()})),it=s((()=>{})),at,ot,st,ct,lt=s((()=>{at=new Map,ot=new Map,st=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!at.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),at.set(t,e)}let n=at.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)}}},ct=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!ot.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),ot.set(t,e)}let n=ot.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)}}}})),ut,dt,ft,pt,mt,ht,gt,_t,vt=s((()=>{lt(),ut=new WeakMap,dt=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,ft=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||ut.get(e)||e.attachShadow(n);return ut.set(e,r),st(r,t?`${t}\n${dt}`:dt),r},pt=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},mt=(e,t,n=``)=>e.getAttribute(t)??n,ht=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},gt=(e,t,n,r={})=>{if(n){e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`);return}e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`)},_t=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&ct(t,a)}})),yt=s((()=>{})),bt=s((()=>{Me(),Xe(),Ze(),ee(),rt(),it(),vt(),yt()}));bt();var xt=`.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))}}`,St={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>`}};Me(),et(),vt();var Ct=!1,wt=new Map,Tt=!1,Et=e=>/<svg[\s>]/i.test(e),eee=e=>{if(typeof e==`string`)return Et(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Et(n))return n;let r=t.default;if(typeof r==`string`&&Et(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Et(e.data))return e.data}},Dt=(e,t)=>{Tt=!0;let n=eee(t);n&&(wt.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))};(e=>{Tt=!0,Object.entries(e).forEach(([e,t])=>{Dt(e,t)})})(St),Qe(`r-icon`,class extends nt{isDev=Ct;_events=new h;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=ft(this,xt);let e=pt(this._shadowDom,`.ran-icon`,()=>Oe().class(`ran-icon`).part(`ran-icon`).build());this._div=e}get name(){return mt(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return mt(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return mt(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 mt(this,`aria-label`)}set ariaLabel(e){ht(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return mt(this,`sheet`)}set sheet(e){ht(this,`sheet`,e)}handlerExternalCss=()=>{_t(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=wt.get(t);if(!n){this.isDev&&Tt&&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=>Et(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=De(`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 Ot=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:block}.ran-mermaid{padding:var(--ran-mermaid-padding,0);position:relative}.ran-mermaid-diagram{justify-content:center;display:flex;overflow-x:auto}.ran-mermaid-diagram svg{max-width:100%;height:auto}.ran-mermaid-toolbar{top:var(--ran-mermaid-toolbar-top,8px);right:var(--ran-mermaid-toolbar-right,8px);gap:var(--ran-mermaid-toolbar-gap,4px);border-radius:var(--ran-radius-md,8px);background:var(--ran-mermaid-toolbar-background,var(--ran-color-bg-elevated,#fff));box-shadow:var(--ran-mermaid-toolbar-shadow,var(--ran-shadow-menu,0 2px 8px #0000001f));opacity:0;pointer-events:none;padding:4px;transition:opacity .15s;display:none;position:absolute}.ran-mermaid.has-controls .ran-mermaid-toolbar{display:flex}.ran-mermaid:hover .ran-mermaid-toolbar,.ran-mermaid-toolbar:focus-within{opacity:1;pointer-events:auto}.ran-mermaid-btn{width:var(--ran-mermaid-button-size,28px);height:var(--ran-mermaid-button-size,28px);border-radius:var(--ran-radius-sm,6px);color:var(--ran-mermaid-button-color,var(--ran-color-text-secondary,#666));cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.ran-mermaid-btn:hover{background:var(--ran-mermaid-button-hover-background,var(--ran-color-bg-muted,#0000000f));color:var(--ran-mermaid-button-hover-color,var(--ran-color-text,#222))}.ran-mermaid-btn:focus-visible{outline:var(--ran-mermaid-button-focus-outline,2px solid var(--ran-color-primary,#1890ff));outline-offset:1px}.ran-mermaid-menu{top:var(--ran-mermaid-menu-top,44px);right:var(--ran-mermaid-toolbar-right,8px);border-radius:var(--ran-radius-md,8px);background:var(--ran-mermaid-toolbar-background,var(--ran-color-bg-elevated,#fff));min-width:132px;box-shadow:var(--ran-mermaid-toolbar-shadow,var(--ran-shadow-menu,0 2px 8px #0000001f));z-index:1;flex-direction:column;padding:4px;display:flex;position:absolute}.ran-mermaid-menu-item{border-radius:var(--ran-radius-sm,6px);color:var(--ran-mermaid-menu-item-color,var(--ran-color-text,#222));text-align:left;cursor:pointer;background:0 0;border:none;padding:6px 10px;font-size:13px}.ran-mermaid-menu-item:hover{background:var(--ran-mermaid-button-hover-background,var(--ran-color-bg-muted,#0000000f))}.ran-mermaid-error{color:var(--ran-mermaid-error-color,#c0392b);white-space:pre-wrap;margin:0;padding:12px;font-size:13px}`,kt,B,At,jt=s((()=>{kt=Object.defineProperty,B=(e,t)=>kt(e,`name`,{value:t,configurable:!0}),At=(e,t)=>{for(var n in t)kt(e,n,{get:t[n],enumerable:!0})}})),Mt=l(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,l=`week`,u=`month`,d=`quarter`,f=`year`,p=`date`,m=`Invalid Date`,h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+v(r,2,`0`)+`:`+v(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,u),a=n-i<0,o=t.clone().add(r+(a?-1:1),u);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:l,d:s,D:p,h:o,m:a,s:i,ms:r,Q:d}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},b=`en`,x={};x[b]=_;var S=`$isDayjsObject`,C=function(e){return e instanceof D||!(!e||!e[S])},w=function e(t,n,r){var i;if(!t)return b;if(typeof t==`string`){var a=t.toLowerCase();x[a]&&(i=a),n&&(x[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;x[s]=t,i=s}return!r&&i&&(b=i),i||!r&&b},T=function(e,t){if(C(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new D(n)},E=y;E.l=w,E.i=C,E.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function _(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var v=_.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return this.$d.toString()!==m},v.isSame=function(e,t){var n=T(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return T(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<T(e)},v.$g=function(e,t,n){return E.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!E.u(t)||t,d=E.p(e),m=function(e,t){var i=E.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},h=function(e,t){return E.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,_=this.$M,v=this.$D,y=`set`+(this.$u?`UTC`:``);switch(d){case f:return r?m(1,0):m(31,11);case u:return r?m(1,_):m(0,_+1);case l:var b=this.$locale().weekStart||0,x=(g<b?g+7:g)-b;return m(r?v-x:v+(6-x),_);case s:case p:return h(y+`Hours`,0);case o:return h(y+`Minutes`,1);case a:return h(y+`Seconds`,2);case i:return h(y+`Milliseconds`,3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,l=E.p(e),d=`set`+(this.$u?`UTC`:``),m=(n={},n[s]=d+`Date`,n[p]=d+`Date`,n[u]=d+`Month`,n[f]=d+`FullYear`,n[o]=d+`Hours`,n[a]=d+`Minutes`,n[i]=d+`Seconds`,n[r]=d+`Milliseconds`,n)[l],h=l===s?this.$D+(t-this.$W):t;if(l===u||l===f){var g=this.clone().set(p,1);g.$d[m](h),g.init(),this.$d=g.set(p,Math.min(this.$D,g.daysInMonth())).$d}else m&&this.$d[m](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[E.p(e)]()},v.add=function(r,d){var p,m=this;r=Number(r);var h=E.p(d),g=function(e){var t=T(m);return E.w(t.date(t.date()+Math.round(e*r)),m)};if(h===u)return this.set(u,this.$M+r);if(h===f)return this.set(f,this.$y+r);if(h===s)return g(1);if(h===l)return g(7);var _=(p={},p[a]=t,p[o]=n,p[i]=e,p)[h]||1,v=this.$d.getTime()+r*_;return E.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||m;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=E.z(this),a=this.$H,o=this.$m,s=this.$M,l=n.weekdays,u=n.months,d=n.meridiem,f=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},p=function(e){return E.s(a%12||12,e,`0`)},h=d||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(g,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return E.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return E.s(s+1,2,`0`);case`MMM`:return f(n.monthsShort,s,u,3);case`MMMM`:return f(u,s);case`D`:return t.$D;case`DD`:return E.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return f(n.weekdaysMin,t.$W,l,2);case`ddd`:return f(n.weekdaysShort,t.$W,l,3);case`dddd`:return l[t.$W];case`H`:return String(a);case`HH`:return E.s(a,2,`0`);case`h`:return p(1);case`hh`:return p(2);case`a`:return h(a,o,!0);case`A`:return h(a,o,!1);case`m`:return String(o);case`mm`:return E.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return E.s(t.$s,2,`0`);case`SSS`:return E.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,p,m){var h,g=this,_=E.p(p),v=T(r),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,x=function(){return E.m(g,v)};switch(_){case f:h=x()/12;break;case u:h=x();break;case d:h=x()/3;break;case l:h=(b-y)/6048e5;break;case s:h=(b-y)/864e5;break;case o:h=b/n;break;case a:h=b/t;break;case i:h=b/e;break;default:h=b}return m?h:E.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return x[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=w(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return E.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},_}(),O=D.prototype;return T.prototype=O,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,u],[`$y`,f],[`$D`,p]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||=(e(t,D,T),!0),T},T.locale=w,T.isDayjs=C,T.unix=function(e){return T(1e3*e)},T.en=x[b],T.Ls=x,T.p={},T}))})),Nt,Pt,V,Ft,It,Lt=s((()=>{jt(),Nt=f(Mt(),1),Pt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},V={trace:B((...e)=>{},`trace`),debug:B((...e)=>{},`debug`),info:B((...e)=>{},`info`),warn:B((...e)=>{},`warn`),error:B((...e)=>{},`error`),fatal:B((...e)=>{},`fatal`)},Ft=B(function(e=`fatal`){let t=Pt.fatal;typeof e==`string`?e.toLowerCase()in Pt&&(t=Pt[e]):typeof e==`number`&&(t=e),V.trace=()=>{},V.debug=()=>{},V.info=()=>{},V.warn=()=>{},V.error=()=>{},V.fatal=()=>{},t<=Pt.fatal&&(V.fatal=console.error?console.error.bind(console,It(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,It(`FATAL`))),t<=Pt.error&&(V.error=console.error?console.error.bind(console,It(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,It(`ERROR`))),t<=Pt.warn&&(V.warn=console.warn?console.warn.bind(console,It(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,It(`WARN`))),t<=Pt.info&&(V.info=console.info?console.info.bind(console,It(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,It(`INFO`))),t<=Pt.debug&&(V.debug=console.debug?console.debug.bind(console,It(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,It(`DEBUG`))),t<=Pt.trace&&(V.trace=console.debug?console.debug.bind(console,It(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,It(`TRACE`)))},`setLogLevel`),It=B(e=>`%c${(0,Nt.default)().format(`ss.SSS`)} : ${e} : `,`format`)})),Rt,tee=s((()=>{Rt={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return Rt.hue2rgb(a,i,e+1/3)*255;case`g`:return Rt.hue2rgb(a,i,e)*255;case`b`:return Rt.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,l=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return l*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}}})),nee,ree=s((()=>{nee={clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10}})),iee,aee=s((()=>{iee={dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}})),zt,Bt=s((()=>{tee(),ree(),aee(),zt={channel:Rt,lang:nee,unit:iee}})),Vt,Ht,Ut=s((()=>{Bt(),Vt={};for(let e=0;e<=255;e++)Vt[e]=zt.unit.dec2hex(e);Ht={ALL:0,RGB:1,HSL:2}})),oee,see=s((()=>{Ut(),oee=class{constructor(){this.type=Ht.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=Ht.ALL}is(e){return this.type===e}}})),cee,lee=s((()=>{Bt(),see(),Ut(),cee=class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new oee}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Ht.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=zt.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=zt.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=zt.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=zt.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=zt.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=zt.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(Ht.HSL)&&t!==void 0?t:(this._ensureHSL(),zt.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(Ht.HSL)&&t!==void 0?t:(this._ensureHSL(),zt.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(Ht.HSL)&&t!==void 0?t:(this._ensureHSL(),zt.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(Ht.RGB)&&t!==void 0?t:(this._ensureRGB(),zt.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(Ht.RGB)&&t!==void 0?t:(this._ensureRGB(),zt.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(Ht.RGB)&&t!==void 0?t:(this._ensureRGB(),zt.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(Ht.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ht.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ht.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ht.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ht.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ht.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}})),Wt,Gt=s((()=>{lee(),Wt=new cee({r:0,g:0,b:0,a:0},`transparent`)})),Kt,uee=s((()=>{Gt(),Ut(),Kt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(Kt.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,l=o?8:4,u=a?0:-1,d=o?255:15;return Wt.set({r:(r>>l*(u+3)&d)*s,g:(r>>l*(u+2)&d)*s,b:(r>>l*(u+1)&d)*s,a:a?(r&d)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${Vt[Math.round(t)]}${Vt[Math.round(n)]}${Vt[Math.round(r)]}${Vt[Math.round(i*255)]}`:`#${Vt[Math.round(t)]}${Vt[Math.round(n)]}${Vt[Math.round(r)]}`}}})),qt,dee=s((()=>{Bt(),Gt(),qt={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(qt.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return zt.channel.clamp.h(parseFloat(e)*.9);case`rad`:return zt.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return zt.channel.clamp.h(parseFloat(e)*360)}}return zt.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(qt.re);if(!n)return;let[,r,i,a,o,s]=n;return Wt.set({h:qt._hue2deg(r),s:zt.channel.clamp.s(parseFloat(i)),l:zt.channel.clamp.l(parseFloat(a)),a:o?zt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${zt.lang.round(t)}, ${zt.lang.round(n)}%, ${zt.lang.round(r)}%, ${i})`:`hsl(${zt.lang.round(t)}, ${zt.lang.round(n)}%, ${zt.lang.round(r)}%)`}}})),Jt,fee=s((()=>{uee(),Jt={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,