ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
5 lines • 85.5 kB
JavaScript
var ranui_select=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=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}},n=(e=8)=>Math.random().toString(36).substring(2,e+2),r=e=>typeof e==`function`,i=typeof window<`u`,a=()=>{if(!i)return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},o=12e4,s=`__ranuts_bridge__`,c=`default`,l=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},ee=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=c){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,l.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:s,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:i,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof i==`string`?i:`Bridge request failed`)):e.resolve(i),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(r(l)){let t=e.source??this.targetWindow;Promise.resolve(l(i)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,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 r=n(10);return new Promise((n,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),i(Error(`Request timeout`)))},o),s=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(a),n(e)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),s(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{l.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new ee(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new d(u[0],3609767458),new d(u[1],602891725),new d(u[2],3964484399),new d(u[3],2173295548),new d(u[4],4081628472),new d(u[5],3053834265),new d(u[6],2937671579),new d(u[7],3664609560),new d(u[8],2734883394),new d(u[9],1164996542),new d(u[10],1323610764),new d(u[11],3590304994),new d(u[12],4068182383),new d(u[13],991336113),new d(u[14],633803317),new d(u[15],3479774868),new d(u[16],2666613458),new d(u[17],944711139),new d(u[18],2341262773),new d(u[19],2007800933),new d(u[20],1495990901),new d(u[21],1856431235),new d(u[22],3175218132),new d(u[23],2198950837),new d(u[24],3999719339),new d(u[25],766784016),new d(u[26],2566594879),new d(u[27],3203337956),new d(u[28],1034457026),new d(u[29],2466948901),new d(u[30],3758326383),new d(u[31],168717936),new d(u[32],1188179964),new d(u[33],1546045734),new d(u[34],1522805485),new d(u[35],2643833823),new d(u[36],2343527390),new d(u[37],1014477480),new d(u[38],1206759142),new d(u[39],344077627),new d(u[40],1290863460),new d(u[41],3158454273),new d(u[42],3505952657),new d(u[43],106217008),new d(u[44],3606008344),new d(u[45],1432725776),new d(u[46],1467031594),new d(u[47],851169720),new d(u[48],3100823752),new d(u[49],1363258195),new d(u[50],3750685593),new d(u[51],3785050280),new d(u[52],3318307427),new d(u[53],3812723403),new d(u[54],2003034995),new d(u[55],3602036899),new d(u[56],1575990012),new d(u[57],1125592928),new d(u[58],2716904306),new d(u[59],442776044),new d(u[60],593698344),new d(u[61],3733110249),new d(u[62],2999351573),new d(u[63],3815920427),new d(3391569614,3928383900),new d(3515267271,566280711),new d(3940187606,3454069534),new d(4118630271,4000239992),new d(116418474,1914138554),new d(174292421,2731055270),new d(289380356,3203993006),new d(460393269,320620315),new d(685471733,587496836),new d(852142971,1086792851),new d(1017036298,365543100),new d(1126000580,2618297676),new d(1288033470,3409855158),new d(1501505948,4234509866),new d(1607167915,987167468),new d(1816402316,1246189591),new d(0,1),new d(0,32898),new d(2147483648,32906),new d(2147483648,2147516416),new d(0,32907),new d(0,2147483649),new d(2147483648,2147516545),new d(2147483648,32777),new d(0,138),new d(0,136),new d(0,2147516425),new d(0,2147483658),new d(0,2147516555),new d(2147483648,139),new d(2147483648,32905),new d(2147483648,32771),new d(2147483648,32770),new d(2147483648,128),new d(0,32778),new d(2147483648,2147483658),new d(2147483648,2147516545),new d(2147483648,32896),new d(0,2147483649),new d(2147483648,2147516424);var f=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},p=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},te=()=>{let e=0,t=null;return function(n,r=300){return function(...i){let a=Date.now();a-e>=r?(t!=null&&(clearTimeout(t),t=null),e=a,n.apply(this,i)):t??=window.setTimeout(()=>{e=Date.now(),n.apply(this,i),t=null},r-(a-e))}}},ne=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})(ne),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(ne);var re=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-select-host-position,relative);display:var(--ran-select-host-display,inline-block);cursor:var(--ran-select-host-cursor,pointer);height:var(--ran-select-host-height,32px);outline:var(--ran-select-host-outline,0);-webkit-tap-highlight-color:var(--ran-select-host-tap-highlight-color,transparent)}:host,:host(:focus),:host(:active){outline:var(--ran-select-host-focus-outline,0);-webkit-tap-highlight-color:transparent}:host ::slotted(r-option){display:var(--ran-select-option-display,none)}:host([disabled]){cursor:var(--ran-select-host-disabled-cursor,not-allowed);pointer-events:var(--ran-select-host-disabled-pointer-events,all);opacity:var(--ran-select-host-disabled-opacity,.6)}:host(:not([disabled]):hover) .ran-select{cursor:var(--ran-select-host-hover-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection{border:var(--ran-select-selection-hover-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):hover) .selection-search{cursor:var(--ran-select-selection-hover-search-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection-item{cursor:var(--ran-select-selection-hover-item-cursor,pointer);color:var(--ran-select-selection-hover-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host([type=text]) .selection{border:var(--ran-select-selection-text-border,none);background:var(--ran-select-selection-text-background,transparent)}:host([type=text]) .icon{display:var(--ran-select-icon-text-display,none)}:host(:not([disabled],[type=text]):focus) .selection{border:var(--ran-select-selection-focus-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):focus) .selection-search{cursor:var(--ran-select-selection-focus-search-cursor,pointer)}:host(:not([disabled],[type=text]):focus) .selection-item{cursor:var(--ran-select-selection-focus-item-cursor,pointer);color:var(--ran-select-selection-focus-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host .selection-search{display:var(--ran-select-selection-search-display,none)}:host([showSearch]:not([disabled])) .selection-search{cursor:var(--ran-select-selection-search-visible-cursor,text);display:var(--ran-select-selection-search-visible-display,block)}:host([showSearch]:not([disabled])) .selection-item{cursor:var(--ran-select-selection-search-visible-item-cursor,pointer)}:host([showSearch]:not([disabled]):focus) .selection-search{display:var(--ran-select-selection-search-visible-display,block);cursor:var(--ran-select-selection-search-visible-cursor,text);opacity:var(--ran-select-selection-search-visible-opacity,1)}.ran-select{width:var(--ran-select-root-width,100%);height:var(--ran-select-root-height,100%);font-size:var(--ran-select-root-font-size,14px);box-sizing:var(--ran-select-root-box-sizing,border-box);margin:var(--ran-select-root-margin,0);padding:var(--ran-select-root-padding,0);color:var(--ran-select-root-color,var(--ran-color-text,#000000e0));line-height:var(--ran-select-root-line-height,1.57143);list-style:var(--ran-select-root-list-style,none);font-family:var(--ran-select-root-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));position:var(--ran-select-root-position,relative);display:var(--ran-select-root-display,inline-block)}.ran-select .selection{position:var(--ran-select-selection-position,relative);background-color:var(--ran-select-selection-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-select-selection-background-image,none);border:var(--ran-select-selection-border,1px solid var(--ran-color-border,#eaeaea));transition:var(--ran-select-selection-transition,none);width:var(--ran-select-selection-width,100%);height:var(--ran-select-selection-height,100%);padding:var(--ran-select-selection-padding,0 11px);box-sizing:var(--ran-select-selection-box-sizing,border-box);margin:var(--ran-select-selection-margin,0);color:var(--ran-select-selection-color,var(--ran-color-text,#000000e0));font-size:var(--ran-select-selection-font-size,14px);line-height:var(--ran-select-selection-line-height,1.57143);list-style:var(--ran-select-selection-list-style,none);font-family:var(--ran-select-selection-font-family,inherit);display:var(--ran-select-selection-display,flex);border-radius:var(--ran-select-selection-border-radius,var(--ran-radius-sm,6px))}.ran-select .selection-search{position:var(--ran-select-selection-search-position,absolute);opacity:var(--ran-select-selection-search-opacity,0);top:var(--ran-select-selection-search-top,0);left:var(--ran-select-selection-search-left,0);height:var(--ran-select-selection-search-height,100%);margin:var(--ran-select-selection-search-margin,0);padding:var(--ran-select-selection-search-padding,0);background:var(--ran-select-selection-search-background,transparent);border:var(--ran-select-selection-search-border,none);outline:var(--ran-select-selection-search-outline,none);appearance:var(--ran-select-selection-search-appearance,none);font-family:var(--ran-select-selection-search-font-family,inherit);cursor:var(--ran-select-selection-search-cursor,not-allowed);inset-inline-start:var(--ran-select-selection-search-inset-inline-start,11px);inset-inline-end:var(--ran-select-selection-search-inset-inline-end,11px)}.ran-select .selection-search::-webkit-search-cancel-button{display:var(--ran-select-selection-search-cancel-display,none);-webkit-appearance:var(--ran-select-selection-search-cancel-appearance,none)}.ran-select .selection-search::part(input){border:var(--ran-select-selection-search-input-border,none);padding:var(--ran-select-selection-search-input-padding,0);box-sizing:border-box;outline:var(--ran-select-selection-search-input-outline,none);height:100%;min-height:100%}.ran-select .selection-search::part(input):active{border:var(--ran-select-selection-search-input-active-border,none);padding:var(--ran-select-selection-search-input-active-padding,0);height:var(--ran-select-selection-search-input-active-height,100%);outline:var(--ran-select-selection-search-input-active-outline,none);border-color:var(--ran-select-selection-search-input-active-border-color,transparent);box-shadow:var(--ran-select-selection-search-input-active-box-shadow,none);border-right-width:var(--ran-select-selection-search-input-active-border-right-width,0px)}.ran-select .selection-search::part(content){min-height:var(--ran-select-selection-search-input-content-min-height,0)}.ran-select .selection-item{position:var(--ran-select-selection-item-position,absolute);top:var(--ran-select-selection-item-top,0);left:var(--ran-select-selection-item-left,12px);right:var(--ran-select-selection-item-right,28px);margin:var(--ran-select-selection-item-margin,0);padding:var(--ran-select-selection-item-padding,0);background:var(--ran-select-selection-item-background,transparent);border:var(--ran-select-selection-item-border,none);outline:var(--ran-select-selection-item-outline,none);appearance:var(--ran-select-selection-item-appearance,none);font-family:var(--ran-select-selection-item-font-family,inherit);height:var(--ran-select-selection-item-height,100%);display:var(--ran-select-selection-item-display,flex);align-items:var(--ran-select-selection-item-align-items,center);user-select:var(--ran-select-selection-item-user-select,none);overflow:var(--ran-select-selection-item-overflow,hidden);white-space:var(--ran-select-selection-item-white-space,nowrap);text-overflow:var(--ran-select-selection-item-text-overflow,ellipsis);cursor:var(--ran-select-selection-item-cursor,pointer)}.ran-select .selection-select{color:var(--ran-select-selection-select-color,var(--ran-color-text-disabled,#00000040))}.ran-select .selection .icon{display:var(--ran-select-selection-icon-display,flex);align-items:var(--ran-select-selection-icon-align-items,center);color:var(--ran-select-selection-icon-color,var(--ran-color-text-disabled,#00000040));font-style:var(--ran-select-selection-icon-font-style,normal);text-align:var(--ran-select-selection-icon-text-align,center);text-transform:var(--ran-select-selection-icon-text-transform,none);text-rendering:var(--ran-select-selection-icon-text-rendering,optimizeLegibility);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:var(--ran-select-selection-icon-position,absolute);top:var(--ran-select-selection-icon-top,50%);height:var(--ran-select-selection-icon-height,16px);transform:var(--ran-select-selection-icon-transform,translateY(-50%));margin-top:var(--ran-select-selection-icon-margin-top,0);font-size:var(--ran-select-selection-icon-font-size,12px);pointer-events:var(--ran-select-selection-icon-pointer-events,none);inset-inline-start:var(--ran-select-selection-icon-inset-inline-start,auto);inset-inline-end:var(--ran-select-selection-icon-inset-inline-end,8px)}`,ie={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>`},m=typeof document>`u`,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}},g=0,_=1,v=2,y=null,b=null,ae=0,x=new Set,S=!1;function oe(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(le(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)E(e,v);ae===0&&ue()}}]}function C(e){let t=se(e,!0);return ce(t),fe(t),()=>D(t)}function w(e){let t={owned:[],cleanups:[],owner:b},n=b,r=y;b=t,y=null;try{return e(()=>me(t))}finally{b=n,y=r}}function T(e){b&&b.cleanups.push(e)}function se(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:v,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:b}}function ce(e){b&&b.owned.push(e)}function le(e){y&&(y.sources.add(e),e.observers.add(y))}function E(e,t){if(e.disposed||e.state>=t)return;let n=e.state===g;if(e.state=t,e.isEffect)x.add(e);else if(n)for(let t of e.observers)E(t,_)}function ue(){if(!(ae>0||S)){S=!0;try{for(;x.size>0;){let e=[...x];x.clear();for(let t of e)t.disposed||de(t)}}finally{S=!1}}}function de(e){if(!(e.disposed||e.state===g)){if(e.state===_)for(let t of e.sources)`fn`in t&&de(t);e.state===v&&fe(e),e.state=g}}function fe(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);pe(e);let t=y,n=b;y=e,b=e,e.running=!0,e.state=g;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)E(t,v)}}finally{e.running=!1,y=t,b=n}}function pe(e){for(let t of e.owned)D(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 D(e){e.disposed||(e.disposed=!0,pe(e),e.observers.clear())}function me(e){for(let t of e.owned)D(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function O(e){return typeof e==`string`?e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`):String(e)}function he(e){return O(e)}var ge=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,_e=(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()},k=(e,t,n)=>{for(let r of e)ge(r)&&(_e(r,t)&&n.push(r),k(r.childrenList,t,n))},A=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?O(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return k(this.childrenList,e,t),t}},ve=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 A)}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 ye(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return k(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}="${he(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${he(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`?O(e):(e instanceof A,e.serialize())).join(``):a+=O(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}>`}},ye=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 k(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${O(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?O(e):(e instanceof A,e.serialize())).join(``)}</template>`}},j=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(j(t)):e.concat(t),[]),M=e=>e==null?null:e instanceof F?e.build():typeof e==`string`?m?e:document.createTextNode(e):e,be=(e,t)=>{if(m){P(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}};C(()=>{let e=t();a();let n=document.createDocumentFragment();i=w(t=>(P(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),T(()=>i?.())},xe=`__ranFor`,Se=e=>typeof e==`object`&&!!e&&e[xe]===!0,Ce=(e,t,n)=>{let[r,i]=oe(t),a=null,o=w(t=>{let i=M(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},N=(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},we=(e,t)=>{if(m){(t.each()??[]).forEach((n,r)=>{let i=M(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;T(()=>{for(let e of r.values())e.dispose();r.clear()}),C(()=>{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=Ce(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();N(n,a),r=i})},Te=`__ranIndex`,Ee=e=>typeof e==`object`&&!!e&&e[Te]===!0,De=(e,t,n)=>{let[r,i]=oe(e),a=null,o=w(e=>{let i=M(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Oe=(e,t)=>{if(m){(t.each()??[]).forEach((n,r)=>{let i=M(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];T(()=>{for(let e of r)e.dispose();r=[]}),C(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(De(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()}N(n,r.map(e=>e.node).filter(e=>e!=null))})},P=(e,t)=>{j(t).forEach(t=>{if(Se(t)){we(e,t);return}if(Ee(t)){Oe(e,t);return}if(typeof t==`function`){be(e,t);return}let n=M(t);n!=null&&e.appendChild(n)})},F=class{el;constructor(e){this.el=m?new ve(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?C(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{m?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 P(this.el,e),this}replaceChildren(...e){if(m){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 ke(this.el,t,e)}build(){return this.el}serialize(){if(m)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ke=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return P(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(m)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 m?this.root.serialize():this.root.innerHTML}},I=e=>new F(e),L=()=>I(`div`),Ae=()=>I(`span`),R=()=>I(`slot`),je=()=>I(`input`),Me=()=>I(`label`),z=[!1,`false`,null,void 0],B=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!z.includes(n))},Ne=new Map;function V(e,t){m?(Ne.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var H=typeof document<`u`?HTMLElement:ve,U=new Map,W=new Map,Pe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!U.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),U.set(t,e)}let n=U.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},Fe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!W.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),W.set(t,e)}let n=W.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)}}},Ie=new WeakMap,Le=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,G=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Ie.get(e)||e.attachShadow(n);return Ie.set(e,r),Pe(r,t?`${t}\n${Le}`:Le),r},K=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},q=(e,t,n=``)=>e.getAttribute(t)??n,J=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Y=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Fe(t,a)};V(`r-option`,class extends H{_option;_optionContent;_shadowDom;_slot;static get observedAttributes(){return[`disabled`,`sheet`,`value`]}constructor(){super(),this._shadowDom=G(this);let e=K(this._shadowDom,`.ran-select-dropdown-option`,()=>{let e=R().build(),t=L().class(`ran-select-dropdown-option-content`).children(e).build();return L().class(`ran-select-dropdown-option`).children(t).build()}),t=e.querySelector(`.ran-select-dropdown-option-content`),n=e.querySelector(`slot`);this._slot=n,this._optionContent=t,this._option=e}get value(){return this.getAttribute(`value`)}set value(e){J(this,`value`,e)}get sheet(){return this.getAttribute(`sheet`)}set sheet(e){J(this,`sheet`,e)}get disabled(){return B(this)}set disabled(e){!e||e===`false`?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}handlerExternalCss(){Y(this,this._shadowDom,`sheet`,null,this.sheet)}connectedCallback(){this.classList.contains(`ran-option`)||this.classList.add(`ran-option`)}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._option&&(!n||n===`false`?this._option.setAttribute(`disabled`,``):this._option.removeAttribute(`disabled`)),e===`sheet`&&this._shadowDom&&this.handlerExternalCss())}});var Re=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:.1s forwards ranui-dropdown-down-in}.ran-dropdown-down-out{animation:.1s forwards ranui-dropdown-down-out}.ran-dropdown-up-in{animation:.1s forwards ranui-dropdown-up-in}.ran-dropdown-up-out{animation:.1s forwards ranui-dropdown-up-out}.ran-dropdown-left-in{animation:.1s forwards ranui-dropdown-left-in}.ran-dropdown-left-out{animation:.1s forwards ranui-dropdown-left-out}.ran-dropdown-right-in{animation:.1s forwards ranui-dropdown-right-in}.ran-dropdown-right-out{animation:.1s forwards ranui-dropdown-right-out}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,14px);list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0}.ranui-dropdown-container .bottom{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);top:max(0px, calc(var(--ran-dropdown-min-height,100%) - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-overlap,2px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(0) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-overlap,2px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background,var(--ran-color-bg-elevated,#fff));position:var(--ran-dropdown-arrow-before-position,absolute);bottom:var(--ran-dropdown-arrow-before-bottom,0);width:var(--ran-dropdown-arrow-before-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-before-height,calc(var(--ran-dropdown-arrow-width,16px) / 2));clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:var(--ran-dropdown-arrow-before-content,"");inset-inline-start:0}.ranui-dropdown-arrow:after{content:var(--ran-dropdown-arrow-after-content,"");position:var(--ran-dropdown-arrow-after-position,absolute);width:var(--ran-dropdown-arrow-after-width,9px);height:var(--ran-dropdown-arrow-after-height,9px);bottom:var(--ran-dropdown-arrow-after-bottom,0);margin:var(--ran-dropdown-arrow-after-margin,auto);border-radius:var(--ran-dropdown-arrow-after-border-radius,0 0 2px 0);transform:var(--ran-dropdown-arrow-after-transform,translateY(50%) rotate(-135deg));box-shadow:var(--ran-dropdown-arrow-after-box-shadow,2px 2px 5px #0000000d);z-index:var(--ran-dropdown-arrow-after-z-index,0);background:var(--ran-dropdown-arrow-after-background,var(--ran-color-bg-elevated,#fff));inset-inline:0}`,ze=300;V(`r-dropdown`,class extends H{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=G(this,Re);let e=K(this._shadowDom,`.ranui-dropdown-container`,()=>L().class(`ranui-dropdown-container`).children(L().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).part(`dropdown`).children(R().class(`slot`))).build());this.container=e,this.dropdown=e.querySelector(`.ranui-dropdown`),this._slot=e.querySelector(`.slot`)}get transit(){return q(this,`transit`)}set transit(e){J(this,`transit`,e,{removeEmpty:!0})}get arrow(){return q(this,`arrow`)}set arrow(e){J(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return q(this,`sheet`)}set sheet(e){J(this,`sheet`,e)}handlerExternalCss=()=>{Y(this,this._shadowDom,`sheet`,null,this.sheet)};handlerTransit=()=>{this.transit&&this.dropdown&&(f(this.dropdown,this.transit),setTimeout(()=>{p(this.dropdown,this.transit)},ze))};handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=L().class(`ranui-dropdown-arrow`).build(),this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&n&&(f(this.dropdown,this.transit),setTimeout(()=>{p(this.dropdown,this.transit)},ze)),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}});var Be=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ranui-dropdown-option-item{position:var(--ran-dropdown-option-item-position,relative);display:var(--ran-dropdown-option-item-display,block);padding:var(--ran-dropdown-option-item-padding,5px 12px);color:var(--ran-dropdown-option-item-color,var(--ran-color-text,#000000e0));font-weight:var(--ran-dropdown-option-item-font-weight,normal);font-size:var(--ran-dropdown-option-item-font-size,14px);transition:var(--ran-dropdown-option-item-transition,none);border-radius:var(--ran-dropdown-option-item-border-radius,var(--ran-radius-sm,6px));cursor:var(--ran-dropdown-option-item-cursor,pointer)}.ranui-dropdown-option-item:hover{background-color:var(--ran-dropdown-option-item-hover-background-color,var(--ran-gray-alpha-100,#0000000a))}.ranui-dropdown-option-item-content{text-align:var(--ran-dropdown-option-item-content-text-align,left);overflow:var(--ran-dropdown-option-item-content-overflow,hidden);white-space:var(--ran-dropdown-option-item-content-white-space,nowrap);text-overflow:var(--ran-dropdown-option-item-content-text-overflow,ellipsis);color:var(--ran-dropdown-option-item-content-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-option-item-content-font-size,14px);line-height:var(--ran-dropdown-option-item-content-line-height,1.57143);box-sizing:var(--ran-dropdown-option-item-content-box-sizing,border-box);list-style:var(--ran-dropdown-option-item-content-list-style,none);font-family:var(--ran-dropdown-option-item-content-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-variant:var(--ran-dropdown-option-item-content-font-variant,initial)}.ranui-dropdown-option-active{background-color:var(--ran-dropdown-option-active-background-color,var(--ran-blue-100,#e6f7ff));font-weight:var(--ran-dropdown-option-active-font-weight,bold)}.ranui-dropdown-option-active:hover{background-color:var(--ran-dropdown-option-active-hover-background-color,var(--ran-blue-100,#e6f7ff))}`;V(`r-dropdown-item`,class extends H{ionDropdownItem;_slot;_shadowDom;ionDropdownItemContent;static get observedAttributes(){return[`active`,`value`,`title`,`sheet`]}constructor(){super(),this._shadowDom=G(this,Be);let e=K(this._shadowDom,`.ranui-dropdown-option-item`,()=>{let e=R().class(`slot`).build(),t=L().class(`ranui-dropdown-option-item-content`).part(`content`).children(e).build();return L().class(`ranui-dropdown-option-item`).part(`item`).children(t).build()}),t=e.querySelector(`.ranui-dropdown-option-item-content`),n=e.querySelector(`slot`);this._slot=n,this.ionDropdownItemContent=t,this.ionDropdownItem=e}get value(){return q(this,`value`)}set value(e){!B(this)&&e?this.setAttribute(`value`,e):this.removeAttribute(`value`)}get active(){return q(this,`active`)}set active(e){e?this.setAttribute(`active`,e):this.removeAttribute(`active`)}get title(){return q(this,`title`)}set title(e){e?this.setAttribute(`title`,e):this.removeAttribute(`title`)}get sheet(){return q(this,`sheet`)}set sheet(e){J(this,`sheet`,e)}handlerExternalCss=()=>{Y(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss(),this.active&&f(this.ionDropdownItem,`ranui-dropdown-option-active`)}attributeChangedCallback(e,t,n){if(e===`sheet`){this.handlerExternalCss();return}e===`active`&&n?f(this.ionDropdownItem,`ranui-dropdown-option-active`):p(this.ionDropdownItem,`ranui-dropdown-option-active`)}});var Ve=`.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))}}`,He={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>`}},Ue=!1,We=new Map,X=!1,Z=e=>/<svg[\s>]/i.test(e),Ge=e=>{if(typeof e==`string`)return Z(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Z(n))return n;let r=t.default;if(typeof r==`string`&&Z(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Z(e.data))return e.data}},Q=(e,t)=>{X=!0;let n=Ge(t);n&&(We.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEv