ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
11 lines • 4.73 MB
JavaScript
var n=this,a=function(){"use strict";var ranui=(function(vr){Object.defineProperty(vr,Symbol.toStringTag,{value:"Module"});var C0t=Object.create,ck=Object.defineProperty,k0t=Object.getOwnPropertyDescriptor,E0t=Object.getOwnPropertyNames,S0t=Object.getPrototypeOf,L0t=Object.prototype.hasOwnProperty,J=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}},Fl=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Zr=(e,t)=>{let r={};for(var i in e)ck(r,i,{get:e[i],enumerable:!0});return t||ck(r,Symbol.toStringTag,{value:"Module"}),r},I0t=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var n=E0t(t),a=0,s=n.length,o;a<s;a++)o=n[a],!L0t.call(e,o)&&o!==r&&ck(e,o,{get:(l=>t[l]).bind(null,o),enumerable:!(i=k0t(t,o))||i.enumerable});return e},sf=(e,t,r)=>(r=e!=null?C0t(S0t(e)):{},I0t(t||!e||!e.__esModule?ck(r,"default",{value:e,enumerable:!0}):r,e)),Fx,Rv,_v,$x,bM,Lhe,hk,xM,AM,wM,Ihe,Rhe,TM=J((()=>{Fx="ran-theme",Rv=null,_v=null,$x=e=>{if(e&&"style"in e)return e;if(e&&"documentElement"in e)return e.documentElement;if(!(typeof document>"u"))return document.documentElement},bM=e=>{const t=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;e.setAttribute("data-ran-theme",t?"dark":"light"),e.setAttribute("theme",t?"dark":"light")},Lhe=()=>{Rv&&_v&&(Rv.removeEventListener("change",_v),Rv=null,_v=null)},hk=(e,t)=>{const r=$x(t);if(r){if(Lhe(),e==="system"){if(typeof window>"u")return;bM(r),Rv=window.matchMedia("(prefers-color-scheme: dark)"),_v=()=>bM(r),Rv.addEventListener("change",_v);try{localStorage.setItem(Fx,"system")}catch{}return}r.setAttribute("data-ran-theme",e),r.setAttribute("theme",e);try{localStorage.setItem(Fx,e)}catch{}}},xM=e=>{const t=$x(e);if(!t)return"";const r=t.getAttribute("data-ran-theme")||t.getAttribute("theme")||"";if(r==="light"||r==="dark"){try{if(localStorage.getItem(Fx)==="system")return"system"}catch{}return r}return""},AM=(e,t,r)=>{const i=$x(r);i&&i.style.setProperty(e,String(t))},wM=(e,t)=>{const r=$x(t);r&&r.style.removeProperty(e)},Ihe=(e,t)=>{Object.entries(e).forEach(([r,i])=>{if(i==null){wM(r,t);return}AM(r,i,t)})},Rhe=e=>{if(!(typeof localStorage>"u"))try{const t=localStorage.getItem(Fx);(t==="light"||t==="dark"||t==="system")&&hk(t,e)}catch{}}})),CM,_he=J((()=>{CM=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for("NEW_LISTENER")&&this.call(Symbol.for("NEW_LISTENER"),e);const r=this._events.get(e)||new Set;return typeof t=="function"?r.add({name:e,callback:t}):r.add(t),this._events.set(e,r),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(r=>{const{callback:i}=r;i(...t)}),this);callSync=async(e,...t)=>{const r=this._events.get(e)||new Set;for(const i of r){const{callback:n}=i;await n(...t)}return this};once=(e,t)=>{let r;if(typeof t=="function")r={name:e,callback:(...i)=>{t(...i),this.off(e,r)},initialCallback:t};else{const{callback:i}=t;r={name:e,callback:(...n)=>{i(...n),this.off(e,r)},initialCallback:i}}return this.tap(e,r),this};off=(e,t)=>{const r=[...this._events.get(e)||new Set].filter(i=>{if(typeof t=="function")return i.callback!==t&&i.initialCallback!==t;{const{callback:n}=t;return i.callback!==n&&i.initialCallback!==n}});return this._events.set(e,new Set(r)),this}}})),uk,R0t=J((()=>{uk=(e=8)=>Math.random().toString(36).substring(2,e+2)}));function dk(e){return e<10?`0${e}`:e}var kM,$l,Dhe,X0,EM,SM,Dv,Bv,Bhe,Mhe,Ohe,LM,Nhe,Phe,_0t,D0t,$r,rr,B0t,M0t,Mv,Ih,Nu,IM,fk,O0t,N0t=J((()=>{_he(),R0t(),kM=(e="")=>{if(e.length===0)return 0;if(e.endsWith("%")){const t=Number(e.replace("%",""));return t>1?t/100:t}return Number(e)},$l=(e,t=0,r=1)=>Math.min(r,Math.max(t,e)),Dhe=e=>typeof e=="function",X0=e=>{if(e===0)return"00:00";if(!e)return"";const t=Math.trunc(e/3600),r=Math.trunc(e%3600/60),i=dk(Math.trunc(e-3600*t-60*r));return t===0?`${dk(r)}:${i}`:`${dk(t)}:${dk(r)}:${i}`},EM=()=>{if(typeof window<"u"){const e=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(e)?"ipad":/android/.test(e)?"android":/iphone/.test(e)?"iphone":"pc"}return"pc"},SM=typeof window<"u",Dv=()=>{if(!SM)return!1;const e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},Bv=e=>{const t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||1;return(SM&&window.devicePixelRatio||1)/t},Bhe=12e4,Mhe="__ranuts_bridge__",Ohe="default",LM=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(const 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)}},Nhe=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t="*",r=Ohe){this.targetOrigin=t,this.channel=r,this.senderId=uk(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<"u",this.available?(this.targetWindow=e??window,LM.add(this)):this.targetWindow=void 0}post(e,t){const r={...t,__bridge:Mhe,channel:this.channel,senderId:this.senderId};e.postMessage(r,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!=="*"&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;const t=e.data;if(!t||typeof t!="object"||t.__bridge!=="__ranuts_bridge__"||(t.channel??"default")!==this.channel)return;const{type:r,payload:i,id:n,isResponse:a,isError:s,senderId:o}=t;if(a&&n){const h=this.pendingRequests.get(n);h&&(s?h.reject(new Error(typeof i=="string"?i:"Bridge request failed")):h.resolve(i),this.pendingRequests.delete(n));return}if(o&&o===this.senderId||typeof r!="string"||!this.messageHandlers.has(r))return;const l=this.messageHandlers.get(r);if(Dhe(l)){const h=e.source??this.targetWindow;Promise.resolve(l(i)).then(u=>{n&&this.post(h,{type:r,payload:u,id:n,isResponse:!0})}).catch(u=>{n&&this.post(h,{type:r,payload:u instanceof Error?u.message:String(u),id:n,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(new Error("PostMessageBridge is unavailable outside a browser environment"));const r=uk(10);return new Promise((i,n)=>{const a=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),n(new Error("Request timeout")))},Bhe),s=o=>{clearTimeout(a),n(o)};this.pendingRequests.set(r,{resolve:o=>{clearTimeout(a),i(o)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(o){this.pendingRequests.delete(r),s(o instanceof Error?o:new Error("Failed to post message"))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{LM.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(new Error("Bridge destroyed"))}),this.pendingRequests.clear()}},Phe=class lk{static instance;bridges=new Map;constructor(){}static getInstance(){return lk.instance||(lk.instance=new lk),lk.instance}connectClient=({id:t,targetOrigin:r,targetWindow:i,channel:n})=>{const a=new Nhe(i,r,n);if(t||(t=uk(10)),this.bridges.has(t))throw new Error(`Bridge ${t} already exists`);return this.bridges.set(t,a),{bridge:a,id:t}};getClient=t=>this.bridges.get(t);removeClient=t=>{const r=this.bridges.get(t);r&&(r.destroy(),this.bridges.delete(t))};removeAllClient=()=>{this.bridges.forEach(t=>{t.destroy()}),this.bridges.clear()};broadcast=t=>{this.bridges.forEach(r=>{r.broadcast(t)})};sendTo=(t,r,i)=>{const n=this.getClient(t);return n?n.send(r,i):Promise.reject(new Error(`Bridge ${t} not found`))}},_0t=Phe.getInstance(),D0t=new CM,$r=[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],rr=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}},B0t=[new rr($r[0],3609767458),new rr($r[1],602891725),new rr($r[2],3964484399),new rr($r[3],2173295548),new rr($r[4],4081628472),new rr($r[5],3053834265),new rr($r[6],2937671579),new rr($r[7],3664609560),new rr($r[8],2734883394),new rr($r[9],1164996542),new rr($r[10],1323610764),new rr($r[11],3590304994),new rr($r[12],4068182383),new rr($r[13],991336113),new rr($r[14],633803317),new rr($r[15],3479774868),new rr($r[16],2666613458),new rr($r[17],944711139),new rr($r[18],2341262773),new rr($r[19],2007800933),new rr($r[20],1495990901),new rr($r[21],1856431235),new rr($r[22],3175218132),new rr($r[23],2198950837),new rr($r[24],3999719339),new rr($r[25],766784016),new rr($r[26],2566594879),new rr($r[27],3203337956),new rr($r[28],1034457026),new rr($r[29],2466948901),new rr($r[30],3758326383),new rr($r[31],168717936),new rr($r[32],1188179964),new rr($r[33],1546045734),new rr($r[34],1522805485),new rr($r[35],2643833823),new rr($r[36],2343527390),new rr($r[37],1014477480),new rr($r[38],1206759142),new rr($r[39],344077627),new rr($r[40],1290863460),new rr($r[41],3158454273),new rr($r[42],3505952657),new rr($r[43],106217008),new rr($r[44],3606008344),new rr($r[45],1432725776),new rr($r[46],1467031594),new rr($r[47],851169720),new rr($r[48],3100823752),new rr($r[49],1363258195),new rr($r[50],3750685593),new rr($r[51],3785050280),new rr($r[52],3318307427),new rr($r[53],3812723403),new rr($r[54],2003034995),new rr($r[55],3602036899),new rr($r[56],1575990012),new rr($r[57],1125592928),new rr($r[58],2716904306),new rr($r[59],442776044),new rr($r[60],593698344),new rr($r[61],3733110249),new rr($r[62],2999351573),new rr($r[63],3815920427),new rr(3391569614,3928383900),new rr(3515267271,566280711),new rr(3940187606,3454069534),new rr(4118630271,4000239992),new rr(116418474,1914138554),new rr(174292421,2731055270),new rr(289380356,3203993006),new rr(460393269,320620315),new rr(685471733,587496836),new rr(852142971,1086792851),new rr(1017036298,365543100),new rr(1126000580,2618297676),new rr(1288033470,3409855158),new rr(1501505948,4234509866),new rr(1607167915,987167468),new rr(1816402316,1246189591)],M0t=[new rr(0,1),new rr(0,32898),new rr(2147483648,32906),new rr(2147483648,2147516416),new rr(0,32907),new rr(0,2147483649),new rr(2147483648,2147516545),new rr(2147483648,32777),new rr(0,138),new rr(0,136),new rr(0,2147516425),new rr(0,2147483658),new rr(0,2147516555),new rr(2147483648,139),new rr(2147483648,32905),new rr(2147483648,32771),new rr(2147483648,32770),new rr(2147483648,128),new rr(0,32778),new rr(2147483648,2147483658),new rr(2147483648,2147516545),new rr(2147483648,32896),new rr(0,2147483649),new rr(2147483648,2147516424)],Mv=(e,t=500)=>{let r;return(...i)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(void 0,i)},t)}},Ih=(e,t)=>{if(typeof document>"u")return;const r=e.classList;r.contains(t)||r.add(t)},Nu=(e,t)=>{if(typeof document>"u")return;const r=e.classList;r.contains(t)&&r.remove(t)},IM=()=>{let e=0,t=null;return function(r,i=300){return function(...n){const a=Date.now();a-e>=i?(t!=null&&(clearTimeout(t),t=null),e=a,r.apply(this,n)):t??=window.setTimeout(()=>{e=Date.now(),r.apply(this,n),t=null},i-(a-e))}}},fk=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"]]),O0t={message:fk,code:(function(e){const t=new Map;for(const[r,i]of e)t.set(i.toLowerCase(),r);return t})(fk),codes:(function(e){const t=[];for(const[r,i]of e)t.push(r);return t})(fk),redirect:{300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},empty:{204:!0,205:!0,304:!0},retry:{502:!0,503:!0,504:!0}}})),dc=J((()=>{_he(),N0t()}));dc();var P0t='.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host{box-sizing:var(--ran-btn-box-sizing, border-box);position:var(--ran-btn-position, relative);display:var(--ran-btn-display, inline-flex);background-image:var(--ran-btn-background-image, none);box-shadow:var(--ran-btn-box-shadow, var(--ran-skin-raised-shadow, 0 2px #00000004));cursor:var(--ran-btn-cursor, pointer);-webkit-user-select:var(--ran-btn-user-select, none);user-select:var(--ran-btn-user-select, none);touch-action:var(--ran-btn-touch-action, manipulation);overflow:var(--ran-btn-overflow, hidden);pointer-events:var(--ran-btn-pointer-events, auto)}:host .ran-btn{box-sizing:var(--ran-btn-contain-box-sizing, border-box);position:var(--ran-btn-contain-position, relative);display:var(--ran-btn-contain-display, block);background-image:var(--ran-btn-contain-background-image, none);cursor:var(--ran-btn-contain-cursor, pointer);transition:var(--ran-btn-contain-transition, opacity var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-standard, cubic-bezier(.645, .045, .355, 1)));-webkit-user-select:var(--ran-btn-contain-user-select, none);user-select:var(--ran-btn-contain-user-select, none);touch-action:var(--ran-btn-contain-touch-action, manipulation);border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));background:var(--ran-btn-contain-background, var(--ran-color-bg-elevated, #fff))}:host,:host(:active),:host(:focus){outline:0;-webkit-tap-highlight-color:transparent}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-contain-outline, 0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline, 2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset, 2px)}:host([type="primary"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, var(--ran-color-primary, #171717));background-image:var(--ran-btn-content-background-image, none);border-color:var(--ran-btn-content-border-color, var(--ran-color-primary, #171717));color:var(--ran-btn-content-color, var(--ran-color-primary-text, #fff))}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, var(--ran-color-primary-text, #fff) 10%, transparent 10.01%))}:host([type="primary"]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-content-active-background-color, var(--ran-color-primary-active, #4d4d4d));border-color:var(--ran-btn-content-active-border-color, var(--ran-color-primary-active, #4d4d4d))}@media(min-width:1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-border-hover, #c9c9c9));color:var(--ran-btn-content-hover-color, var(--ran-color-text, #171717))}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, var(--ran-color-primary-hover, #383838));border-color:var(--ran-btn-content-hover-border-color, var(--ran-color-primary-hover, #383838));color:var(--ran-btn-content-hover-color, var(--ran-color-primary-text, #fff))}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));color:var(--ran-btn-content-warning-color, #fff)}}:host([type="warning"]) .ran-btn-content{border-color:var(--ran-btn-content-warning-border-color, var(--ran-color-danger, #ff4d4f));background-color:var(--ran-btn-content-warning-background-color, var(--ran-color-danger, #ff4d4f));background-image:var(--ran-btn-content-background-image, none);color:var(--ran-btn-content-warning-color, #fff)}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="text"]) .ran-btn-content{border:var(--ran-btn-content-text-border, none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events, all);opacity:var(--ran-btn-disabled-opacity, .6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-disabled-container-cursor, not-allowed);pointer-events:var(--ran-btn-disabled-container-pointer-events, all);opacity:var(--ran-btn-disabled-container-opacity, .6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform, translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity, .3);transition:var(--ran-btn-after-transition, 0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-content-active-transform, scale(.96))}@media(min-width:1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,var(--ran-gray-alpha-400, #00000014) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:var(--ran-btn-slot-display, block)}.ran-btn-content{display:var(--ran-btn-content-display, flex);justify-content:var(--ran-btn-content-display, space-between);align-items:var(--ran-btn-content-align-items, center);padding:var(--ran-btn-content-padding, 4px 15px);border:var(--ran-btn-content-border, 1px solid transparent);border-image-source:var(--ran-btn-content-border-image-source, none);border-image-slice:var(--ran-btn-content-border-image-slice, 8);border-image-width:var(--ran-btn-content-border-image-width, 4px);border-image-outset:0;border-image-repeat:stretch;border-radius:var(--ran-btn-content-border-radius, var(--ran-radius-sm, 6px));border-color:var(--ran-btn-content-border-color, var(--ran-color-border, #eaeaea));color:var(--ran-btn-content-color, var(--ran-color-text, #000000d9));line-height:var(--ran-btn-content-line-height, 22px);font-size:var(--ran-btn-content-font-size, 14px);font-weight:var(--ran-btn-content-font-weight, 400);font-family:var(--ran-btn-content-font-family, var(--ran-skin-font-family, inherit));white-space:var(--ran-btn-content-white-space, nowrap);text-align:var(--ran-btn-content-text-align, center);box-sizing:var(--ran-btn-content-box-sizing, border-box);transition:var(--ran-btn-content-transition, transform var(--ran-motion-duration-base, .2s) var(--ran-motion-ease-spring, cubic-bezier(.34, 1.26, .5, 1)))}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right, 2px)}@media(prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}',zl,RM=J((()=>{zl=typeof document>"u"})),ks,F0t=J((()=>{ks=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,r,i){return e.addEventListener(t,r,{...i,signal:this.ac.signal}),this}delegate(e,t,r,i,n){return e.addEventListener(r,a=>{const s=a.target?.closest(t);s&&e.contains(s)&&i(a,s)},{...n,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}}}));function _M(e,t){const r=t?.equals??Object.is,i={value:e,observers:new Set};return[()=>(U0t(i),i.value),s=>{const o=typeof s=="function"?s(i.value):s;if(!r(i.value,o)){i.value=o;for(const l of i.observers)DM(l,Ux);OM===0&&G0t()}}]}function jp(e){const t=$0t(e,!0);return z0t(t),$he(t),()=>BM(t)}function pk(e){const t={owned:[],cleanups:[],owner:fc},r=fc,i=Pu;fc=t,Pu=null;try{return e(()=>H0t(t))}finally{fc=r,Pu=i}}function gk(e){fc&&fc.cleanups.push(e)}function $0t(e,t,r){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:Ux,observers:new Set,value:void 0,equals:r??Object.is,owned:[],cleanups:[],owner:fc}}function z0t(e){fc&&fc.owned.push(e)}function U0t(e){Pu&&(Pu.sources.add(e),e.observers.add(Pu))}function DM(e,t){if(e.disposed||e.state>=t)return;const r=e.state===zx;if(e.state=t,e.isEffect)Gx.add(e);else if(r)for(const i of e.observers)DM(i,MM)}function G0t(){if(!(OM>0||mk)){mk=!0;try{for(;Gx.size>0;){const e=[...Gx];Gx.clear();for(const t of e)t.disposed||Fhe(t)}}finally{mk=!1}}}function Fhe(e){if(!(e.disposed||e.state===zx)){if(e.state===MM)for(const t of e.sources)"fn"in t&&Fhe(t);e.state===Ux&&$he(e),e.state=zx}}function $he(e){if(e.running)throw new Error("ranui reactivity: cyclic dependency detected (a computation triggered itself).");zhe(e);const t=Pu,r=fc;Pu=e,fc=e,e.running=!0,e.state=zx;try{const i=e.fn();if(e.isEffect)typeof i=="function"&&e.cleanups.push(i);else{const n=e.value;if(e.value=i,e.observers.size>0&&!e.equals(n,i))for(const a of e.observers)DM(a,Ux)}}finally{e.running=!1,Pu=t,fc=r}}function zhe(e){for(const t of e.owned)BM(t);e.owned.length=0;for(const t of e.cleanups)t();e.cleanups.length=0;for(const t of e.sources)t.observers.delete(e);e.sources.clear()}function BM(e){e.disposed||(e.disposed=!0,zhe(e),e.observers.clear())}function H0t(e){for(const t of e.owned)BM(t);e.owned.length=0;for(const t of e.cleanups)t();e.cleanups.length=0}var zx,MM,Ux,Pu,fc,OM,Gx,mk,NM=J((()=>{zx=0,MM=1,Ux=2,Pu=null,fc=null,OM=0,Gx=new Set,mk=!1}));function Ov(e){return typeof e!="string"?String(e):e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Uhe(e){return Ov(e)}var Ghe=J((()=>{})),Hhe,Yhe,Hx,Vhe=J((()=>{Hhe=e=>typeof e=="string"?!1:"tagName"in e&&"childrenList"in e,Yhe=(e,t)=>{const r=t.trim();if(!r)return!1;if(r.startsWith("."))return e.classList.contains(r.slice(1));if(r.startsWith("#"))return e.getAttribute("id")===r.slice(1);if(r.startsWith("[")&&r.endsWith("]")){const[i,n]=r.slice(1,-1).trim().split("="),a=(i||"").trim();if(!a)return!1;if(n==null)return e.hasAttribute(a);const s=n.trim().replace(/^['"]|['"]$/g,"");return e.getAttribute(a)===s}return e.tagName===r.toLowerCase()},Hx=(e,t,r)=>{for(const i of e)Hhe(i)&&(Yhe(i,t)&&r.push(i),Hx(i.childrenList,t,r))}})),yk,vk,qhe,Whe=J((()=>{Ghe(),Vhe(),yk=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e=="string"?Ov(e):e.serialize()).join("")}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}},vk=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{const r=e.startsWith("--")?e:e.replace(/([A-Z])/g,"-$1").toLowerCase();this.inlineStyles.set(r,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{const t=this.attributes.get("class")||"",r=new Set([...t.split(" ").filter(Boolean),...e]);this.attributes.set("class",Array.from(r).join(" "))},remove:(...e)=>{const t=(this.attributes.get("class")||"").split(" ").filter(r=>!e.includes(r));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 yk)}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 qhe(this,e),this.shadowRoot}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}addEventListener(e,t){const r=this.eventListeners.get(e)||new Set;r.add(t),this.eventListeners.set(e,r)}removeEventListener(e,t){const r=this.eventListeners.get(e);r&&(r.delete(t),r.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){const t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(const r of t)typeof r=="function"?r.call(this,e):r.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize=="function"&&this._preSerialize();const t=e||this._ssrTag||this.tagName,r=Array.from(this.attributes.entries()).map(([s,o])=>` ${s}="${Uhe(o)}"`).join(""),i=Array.from(this.inlineStyles.entries()).map(([s,o])=>`${s}:${o}`).join(";"),n=i?` style="${Uhe(i)}"`:"";let a="";return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent!==null?a+=Ov(this.textContent):this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(s=>typeof s=="string"?Ov(s):(s instanceof yk,s.serialize())).join(""),["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(t)&&!a?`<${t}${r}${n} />`:`<${t}${r}${n}>${a}</${t}>`}},qhe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){const t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){const t=[];return Hx(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?" shadowrootdelegatesfocus":""}>${this.adoptedStyleSheets.map(e=>`<style>${Ov(e)}</style>`).join("")}${this.childrenList.map(e=>typeof e=="string"?Ov(e):(e instanceof yk,e.serialize())).join("")}</template>`}}})),PM,Nv,Khe,Qhe,Xhe,jhe,FM,Zhe,Jhe,eue,tue,rue,Yx,$M,iue,nue=J((()=>{RM(),Whe(),NM(),PM=e=>e.reduce((t,r)=>Array.isArray(r)?t.concat(PM(r)):t.concat(r),[]),Nv=e=>e==null?null:e instanceof $M?e.build():typeof e=="string"?zl?e:document.createTextNode(e):e,Khe=(e,t)=>{if(zl){Yx(e,[t()]);return}const r=document.createComment(""),i=document.createComment("");e.appendChild(r),e.appendChild(i);let n=null;const a=()=>{n?.(),n=null;let s=r.nextSibling;for(;s&&s!==i;){const o=s.nextSibling;s.parentNode?.removeChild(s),s=o}};jp(()=>{const s=t();a();const o=document.createDocumentFragment();n=pk(l=>(Yx(o,[s]),l)),i.parentNode?.insertBefore(o,i)}),gk(()=>n?.())},Qhe="__ranFor",Xhe=e=>typeof e=="object"&&e!==null&&e[Qhe]===!0,jhe=(e,t,r)=>{const[i,n]=_M(t);let a=null;const s=pk(o=>{const l=Nv(r(e,i));return a=typeof l=="string"?document.createTextNode(l):l,o});return{node:a,index:n,dispose:s}},FM=(e,t)=>{const r=e.parentNode;if(!r)return;let i=e;for(const n of t)i.nextSibling!==n&&r.insertBefore(n,i.nextSibling),i=n},Zhe=(e,t)=>{if(zl){(t.each()??[]).forEach((n,a)=>{const s=Nv(t.render(n,()=>a));s!=null&&e.appendChild(s)});return}const r=document.createComment("");e.appendChild(r);let i=new Map;gk(()=>{for(const n of i.values())n.dispose();i.clear()}),jp(()=>{const n=t.each()??[],a=new Map,s=[];n.forEach((o,l)=>{const h=t.key(o,l);if(a.has(h))return;let u=i.get(h);u?(i.delete(h),u.index(l)):u=jhe(o,l,t.render),a.set(h,u),u.node&&s.push(u.node)});for(const o of i.values())o.node?.parentNode?.removeChild(o.node),o.dispose();FM(r,s),i=a})},Jhe="__ranIndex",eue=e=>typeof e=="object"&&e!==null&&e[Jhe]===!0,tue=(e,t,r)=>{const[i,n]=_M(e);let a=null;const s=pk(o=>{const l=Nv(r(i,t));return a=typeof l=="string"?document.createTextNode(l):l,o});return{node:a,setItem:n,dispose:s}},rue=(e,t)=>{if(zl){(t.each()??[]).forEach((n,a)=>{const s=Nv(t.render(()=>n,a));s!=null&&e.appendChild(s)});return}const r=document.createComment("");e.appendChild(r);let i=[];gk(()=>{for(const n of i)n.dispose();i=[]}),jp(()=>{const n=t.each()??[];for(let a=0;a<n.length;a++)a<i.length?i[a].setItem(n[a]):i.push(tue(n[a],a,t.render));for(let a=i.length-1;a>=n.length;a--){const{node:s}=i[a];s?.parentNode?.removeChild(s),i[a].dispose(),i.pop()}FM(r,i.map(a=>a.node).filter(a=>a!=null))})},Yx=(e,t)=>{PM(t).forEach(r=>{if(Xhe(r)){Zhe(e,r);return}if(eue(r)){rue(e,r);return}if(typeof r=="function"){Khe(e,r);return}const i=Nv(r);i!=null&&e.appendChild(i)})},$M=class{el;constructor(e){this.el=zl?new vk(e):document.createElement(e)}id(e){return this.el.setAttribute("id",e),this}bind(e,t){typeof e=="function"?jp(()=>t(e())):t(e)}class(e){return this.bind(e,t=>{zl?this.el.attributes.set("class",t):this.el.className=t}),this}addClass(...e){return e.forEach(t=>this.el.classList.add(t)),this}removeClass(...e){return e.forEach(t=>this.el.classList.remove(t)),this}attr(e,t){return this.bind(t,r=>this.el.setAttribute(e,r)),this}attrs(e){return Object.entries(e).forEach(([t,r])=>{r!=null&&this.el.setAttribute(t,String(r))}),this}boolAttr(e,t,r=""){return this.bind(t,i=>{i?this.el.setAttribute(e,r):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??"",r=>this.el.style.setProperty(e,r)):Object.entries(e).forEach(([r,i])=>this.el.style.setProperty(r,i)),this}cssVar(e,t){const r=e.startsWith("--")?e:`--${e}`;return this.style(r,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,r){return this.el.addEventListener(e,t,r),this}listen(e,t,r,i){return e.on(this.el,t,r,i),this}delegate(e,t,r,i,n){return e.delegate(this.el,t,r,i,n),this}children(...e){return Yx(this.el,e),this}replaceChildren(...e){if(zl){const t=this.el;t.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,t=>{this.el.textContent=t}),this}ref(e){return e.current=this.el,this}shadow(e={mode:"closed"}){const t=this.el.attachShadow(e);return new iue(this.el,t,e)}build(){return this.el}serialize(){if(zl)return this.el.serialize();const e=document.createElement("div");return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},iue=class{root;hostEl;options;constructor(e,t,r){this.hostEl=e,this.root=t,this.options=r}children(...e){return Yx(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(zl)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<"u")try{const r=new CSSStyleSheet;return r.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,r],this}catch{}const t=document.createElement("style");return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return zl?this.root.serialize():this.root.innerHTML}}})),Mi,Ct,of,ja,bk,xk,aue,sue,Y0t=J((()=>{nue(),Mi=e=>new $M(e),Ct=()=>Mi("div"),of=()=>Mi("span"),ja=()=>Mi("slot"),bk=()=>Mi("button"),xk=()=>Mi("input"),aue=()=>Mi("style"),sue=()=>Mi("label")})),an=J((()=>{RM(),F0t(),NM(),Vhe(),Whe(),nue(),Y0t()})),Rh,aa,V0t=J((()=>{Rh=[!1,"false",null,void 0],aa=e=>{const t=e.hasAttribute("disabled"),r=e.getAttribute("disabled");return!!(t&&!Rh.includes(r))}})),q0t=J((()=>{}));function wn(e,t){zl?(zM.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}function W0t(){return zM}var zM,pn=J((()=>{RM(),zM=new Map})),UM,gn,oue,lue,cue=J((()=>{an(),pn(),UM=()=>typeof document<"u"?HTMLElement:vk,gn=UM(),oue=e=>{if(e.tagName&&e.tagName!=="div")return e.tagName;const t=W0t();for(const[r,i]of t)if(e instanceof i)return r;return e.constructor.name.toLowerCase()},lue=e=>{if(!e)return"";const t=oue(e);return typeof e.serialize=="function"||e instanceof vk?e.serialize(t):""}})),K0t=J((()=>{})),Ak,wk,hue,uue,Q0t=J((()=>{Ak=new Map,wk=new Map,hue=(e,t)=>{if(!(typeof document>"u")&&t){if(typeof CSSStyleSheet<"u")try{if(!Ak.has(t)){const i=new CSSStyleSheet;i.replaceSync(t),Ak.set(t,i)}const r=Ak.get(t);e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return}catch{}if(!e.querySelector("style[data-ranui]")){const r=document.createElement("style");r.setAttribute("data-ranui",""),r.textContent=t,e.appendChild(r)}}},uue=(e,t)=>{if(!(typeof document>"u")&&t){if(typeof CSSStyleSheet<"u")try{if(!wk.has(t)){const i=new CSSStyleSheet;i.replaceSync(t),wk.set(t,i)}const r=wk.get(t);e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return}catch{}if(!Array.from(e.querySelectorAll("style[data-ranui-sheet]")).some(r=>r.textContent===t)){const r=document.createElement("style");r.setAttribute("data-ranui-sheet",""),r.textContent=t,e.appendChild(r)}}}})),GM,HM,mn,Tn,Wr,ai,Tk,Cn,yn=J((()=>{Q0t(),GM=new WeakMap,HM="@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}",mn=(e,t="",r={mode:"closed"})=>{const i=e.shadowRoot||GM.get(e)||e.attachShadow(r);return GM.set(e,i),hue(i,t?`${t}
${HM}`:HM),i},Tn=(e,t,r)=>{const i=e.querySelector(t);if(i)return i;const n=r();return e.appendChild(n),n},Wr=(e,t,r="")=>e.getAttribute(t)??r,ai=(e,t,r,i={})=>{if(i.removeEmpty&&!r){e.removeAttribute(t);return}e.setAttribute(t,r??"")},Tk=(e,t,r,i={})=>{if(r){e.setAttribute(t,""),i.aria&&e.setAttribute(`aria-${i.aria}`,"true");return}e.removeAttribute(t),i.aria&&e.removeAttribute(`aria-${i.aria}`)},Cn=(e,t,r,i,n)=>{if(r!=="sheet"||i===n)return;const a=e.getAttribute("sheet")||"";a&&uue(t,a)}})),kn=J((()=>{an(),V0t(),q0t(),NM(),cue(),K0t(),yn(),TM()}));dc(),kn(),an(),pn(),yn();var due=class extends gn{_btn;_btnContent;_iconElement;_slot;_shadowDom;_events=new ks;debounceTimeId;static get observedAttributes(){return["disabled","icon","effect","iconSize","type","sheet"]}constructor(){super(),this._shadowDom=mn(this,P0t);const e=Tn(this._shadowDom,".ran-btn",()=>Ct().class("ran-btn").attr("part","button").role("button").tabIndex(0).children(Ct().class("ran-btn-content").attr("part","content").children(ja().class("slot"))).build());this._btn=e,this._btnContent=e.querySelector(".ran-btn-content"),this._slot=e.querySelector("slot")}get sheet(){return this.getAttribute("sheet")||""}set sheet(e){this.setAttribute("sheet",e||""),this.handlerExternalCss()}get disabled(){return aa(this)}set disabled(e){!e||e==="false"?(this.removeAttribute("disabled"),this.removeAttribute("aria-disabled")):(this.setAttribute("disabled",""),this.setAttribute("aria-disabled","true"))}get iconSize(){return this.getAttribute("iconSize")||""}set iconSize(e){!e||e==="false"?this.removeAttribute("iconSize"):(this.setAttribute("iconSize",e),this.setIcon())}get icon(){return this.getAttribute("icon")||""}set icon(e){!e||e==="false"?this.removeAttribute("icon"):(this.setAttribute("icon",e),this.setIcon())}get effect(){return this.getAttribute("effect")||""}set effect(e){Rh.includes(e)||!e?this.removeAttribute("effect"):this.setAttribute("effect",e)}get type(){return this.getAttribute("type")||""}set type(e){e?this.setAttribute("type",e):this.removeAttribute("type")}setIcon=()=>{if(typeof document>"u"||!this._slot)return;const e=this.icon;if(!e){this._iconElement&&(this._iconElement.remove(),this._iconElement=void 0);return}if(this._iconElement)this._iconElement.setAttribute("name",e);else{let a=this._shadowDom.querySelector("r-icon");a||(a=Mi("r-icon").attr("color","currentColor").class("icon").build(),this._slot.insertAdjacentElement("beforebegin",a)),this._iconElement=a,this._iconElement.setAttribute("name",e)}const{width:t,height:r}=this._slot.getBoundingClientRect(),i=Math.min(t,r)||16,n=this.iconSize||`${i>5?i-5:i}`;this._iconElement.setAttribute("size",String(n))};mousedown=e=>{if(EM()==="pc"&&!this.disabled){this.debounceMouseEvent();const{left:t,top:r}=this.getBoundingClientRect();this._btn.style.setProperty("--ran-x",`${e.clientX-t}px`),this._btn.style.setProperty("--ran-y",`${e.clientY-r}px`)}};mouseup=()=>{EM()==="pc"&&(this.debounceTimeId||(this.debounceTimeId=setTimeout(()=>{this._btn.style.removeProperty("--ran-x"),this._btn.style.removeProperty("--ran-y"),this.debounceMouseEvent()},600)))};keydown=e=>{aa(this)||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&(clearTimeout(this.debounceTimeId),this.debounceTimeId=void 0)};handlerExternalCss=()=>{Cn(this,this._shadowDom,"sheet",null,this.sheet)};syncA11yState=()=>{const e=aa(this);this._btn.setAttribute("aria-disabled",e?"true":"false"),this._btn.tabIndex=e?-1:0,e?(this.setAttribute("aria-disabled","true"),this._btnContent.setAttribute("disabled","true")):(this.removeAttribute("aria-disabled"),this._btnContent.removeAttribute("disabled"))};connectedCallback(){this.handlerExternalCss(),this.setIcon(),this.syncA11yState(),this._events.on(this._btn,"mousedown",this.mousedown).on(this._btn,"mouseup",this.mouseup).on(this._btn,"keydown",this.keydown)}disconnectedCallback(){this.debounceMouseEvent(),this._events.abort()}attributeChangedCallback(e,t,r){t!==r&&(e==="disabled"&&this._btnContent&&this.syncA11yState(),(e==="icon"||e==="iconSize")&&this.setIcon(),e==="sheet"&&this.handlerExternalCss())}};wn("r-button",due);var X0t=".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}: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))}}",fue={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>'},pue={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>'},gue={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>'},mue={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>'},yue={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>'},vue={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>'},bue={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>'},j0t={copy:fue,check:pue,download:gue,fullscreen:mue,"zoom-in":yue,"zoom-out":vue,refresh:bue};kn(),an(),pn(),yn();var Z0t=!1,xue=new Map,YM=!1,Vx=e=>/<svg[\s>]/i.test(e),J0t=e=>{if(typeof e=="string")return Vx(e)?e:void 0;if(!e||typeof e!="object")return;const t=e,r=t.data;if(typeof r=="string"&&Vx(r))return r;const i=t.default;if(typeof i=="string"&&Vx(i))return i;if(i&&typeof i=="object"){const n=i;if(typeof n.data=="string"&&Vx(n.data))return n.data}},VM=(e,t)=>{YM=!0;const r=J0t(t);r&&(xue.set(`inline:${e}`,r),typeof window<"u"&&window.dispatchEvent(new CustomEvent("ranui-icon-registered",{detail:{name:e}})))},Ck=e=>{YM=!0,Object.entries(e).forEach(([t,r])=>{VM(t,r)})};Ck(j0t);var emt=["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"],Aue=class extends gn{isDev=Z0t;_events=new ks;static get observedAttributes(){return["name","size","color","spin","decorative","aria-label","sheet"]}_icon;_div;_shadowDom;_onIconRegistered=e=>{const t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=mn(this,X0t);const e=Tn(this._shadowDom,".ran-icon",()=>Ct().class("ran-icon").part("ran-icon").build());this._div=e}get name(){return Wr(this,"name")}set name(e){e&&this.setAttribute("name",e)}get size(){return Wr(this,"size")}set size(e){e&&this.setAttribute("size",e)}get color(){return Wr(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(){const 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 Wr(this,"aria-label")}set ariaLabel(e){ai(this,"aria-label",e,{removeEmpty:!0})}get sheet(){return Wr(this,"sheet")}set sheet(e){ai(this,"sheet",e)}handlerExternalCss=()=>{Cn(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(),this._icon=void 0);const e=this.name;if(e)if(e.startsWith("<svg"))this.renderSvg(e,e);else try{const t=`inline:${e}`,r=xue.get(t);if(!r){this.isDev&&YM&&console.warn(`[ranui-icon] icon not registered: ${e}`);return}r&&this.isSvgText(r)?this.renderSvg(r,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=>Vx(e);parseSvg=e=>{const t=new window.DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.tagName.toLowerCase()==="parsererror"||t.tagName.toLowerCase()!=="svg")return;const r=new XMLSerializer().serializeToString(t),i=Mi("template").build();i.innerHTML=r.trim();const n=i.content.firstElementChild;if(!(!n||n.tagName.toLowerCase()!=="svg"))return n};renderSvg=(e,t)=>{const r=this.parseSvg(e);r?(this._icon=r,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){const e=this.size||"1em";this._icon.setAttribute("width",e),this._icon.setAttribute("height",e);const t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty("width",t),this._icon.style.setProperty("height",t)}};setColor=()=>{if(this._icon){const 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,r){t!==r&&(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())}};wn("r-icon",Aue);var tmt={success:!0,_identification:!0,data:`<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="8046" width="200" height="200">
<path
d="M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h0.1c3 0 4.4-3.6 2.2-5.6-30.8-27.6-65.6-49.7-103.7-65.8-0.4-0.2-0.8-0.3-1.2-0.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-0.4 0.2-0.8 0.3-1.2 0.5-44.7 18.9-84.8 46-119.3 80.6-34.5 34.5-61.5 74.7-80.4 119.5C147.9 794.5 138 841 137 888.8c-0.1 4.5 3.5 8.2 8 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1 2.5 1.5 5.5 1.7 8.1 0.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4-32.4-32.5-50.3-75.7-50.3-121.6 0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4c32.4 32.5 50.3 75.7 50.3 121.6 0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"
p-id="8047"></path>
</svg>`},wue={success:!0,_identification:!0,data:`<svg viewBox="0 0 1024 1024" width="200" height="200" version="1.1"
fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path>
</svg>`},rmt={success:!0,_identification:!0,data:'<svg t="1667110830636" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8464" width="200" height="200"><path d="M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32z m-260 72h96v209.9L621.5 312 572 347.4V136z m220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3 5.1 7.2 15.1 8.9 22.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z" p-id="8465"></path></svg>'},Tue={success:!0,_identification:!0,data:'<svg t="1667965185400" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8572" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m193.5 301.7l-210.6 292c-12.7 17.7-39 17.7-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" p-id="8573"></path></svg>'},imt={success:!0,_identification:!0,data:'<svg t="1667483538687" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8683" width="200