ranui 0.2.0-alpha.0 → 0.2.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +26 -0
  2. package/README.zh-CN.md +26 -0
  3. package/dist/bin/build-iife.d.ts +1 -0
  4. package/dist/button-BstLjXNe.js +117 -0
  5. package/dist/button.js +1 -1
  6. package/dist/colorpicker-CGh8pRqo.js +315 -0
  7. package/dist/colorpicker.js +1 -1
  8. package/dist/components/colorpicker/index.d.ts +11 -0
  9. package/dist/components/dropdown/index.d.ts +0 -2
  10. package/dist/components/image/index.d.ts +6 -0
  11. package/dist/components/input/index.d.ts +13 -20
  12. package/dist/components/player/core/view.d.ts +0 -1
  13. package/dist/components/player/index.d.ts +0 -1
  14. package/dist/components/popover/index.d.ts +0 -2
  15. package/dist/components/select/index.d.ts +15 -0
  16. package/dist/{dropdown-C5362qTy.js → dropdown-RqHMRhFE.js} +0 -6
  17. package/dist/dropdown.js +1 -1
  18. package/dist/{icon-DmoEnao5.js → icon-Blm7AbyY.js} +2 -0
  19. package/dist/icon.js +1 -1
  20. package/dist/iife/button.iife.js +1 -0
  21. package/dist/iife/card.iife.js +1 -0
  22. package/dist/iife/checkbox.iife.js +1 -0
  23. package/dist/iife/colorpicker.iife.js +5 -0
  24. package/dist/iife/dropdown.iife.js +1 -0
  25. package/dist/iife/form.iife.js +1 -0
  26. package/dist/iife/icon.iife.js +1 -0
  27. package/dist/iife/image.iife.js +3 -0
  28. package/dist/iife/input.iife.js +1 -0
  29. package/dist/iife/link.iife.js +1 -0
  30. package/dist/iife/loading.iife.js +1 -0
  31. package/dist/iife/math.iife.js +261 -0
  32. package/dist/iife/message.iife.js +1 -0
  33. package/dist/iife/modal.iife.js +1 -0
  34. package/dist/iife/player.iife.js +31 -0
  35. package/dist/iife/popover.iife.js +1 -0
  36. package/dist/iife/progress.iife.js +1 -0
  37. package/dist/iife/radar.iife.js +1 -0
  38. package/dist/iife/route.iife.js +1 -0
  39. package/dist/iife/router.iife.js +1 -0
  40. package/dist/iife/scratch.iife.js +1 -0
  41. package/dist/iife/section.iife.js +1 -0
  42. package/dist/iife/select.iife.js +5 -0
  43. package/dist/iife/skeleton.iife.js +1 -0
  44. package/dist/iife/tab.iife.js +1 -0
  45. package/dist/iife/tabpane.iife.js +1 -0
  46. package/dist/{image-6GayFDqX.js → image-DKm6z7YQ.js} +17 -15
  47. package/dist/image.js +1 -1
  48. package/dist/index.cjs +16 -16
  49. package/dist/index.iife.js +35 -35
  50. package/dist/index.js +16 -16
  51. package/dist/input-Dskw1bAl.js +186 -0
  52. package/dist/input.js +1 -1
  53. package/dist/{katex-es-Cnq5Pk8K.cjs → katex-es-BTpuCxxV.cjs} +7 -7
  54. package/dist/{katex-es-Bpesphgp.js → katex-es-CKRwcaiU.js} +606 -606
  55. package/dist/{loading-Mko22ncl.js → loading-C4QUpm70.js} +1 -1
  56. package/dist/loading.js +1 -1
  57. package/dist/{math-B5PpSnFR.js → math-Dv4nXSoI.js} +1 -1
  58. package/dist/math.js +1 -1
  59. package/dist/{message-CQENvkoi.js → message-De5e1txT.js} +1 -1
  60. package/dist/message.js +1 -1
  61. package/dist/{player-CvfmwWUa.js → player-CqTAmg_E.js} +636 -638
  62. package/dist/player.js +1 -1
  63. package/dist/{popover-BCvHwLZb.js → popover-BY32HNMl.js} +19 -26
  64. package/dist/popover.js +1 -1
  65. package/dist/{progress-BWkNf2J5.js → progress-gZo0knzu.js} +11 -11
  66. package/dist/progress.js +1 -1
  67. package/dist/{radar-CWsawt2g.js → radar-19P5Mtld.js} +17 -17
  68. package/dist/radar.js +1 -1
  69. package/dist/ranui.css +1 -1
  70. package/dist/{select-BmhCUTLb.js → select-BVdUtQX5.js} +72 -51
  71. package/dist/select.js +1 -1
  72. package/dist/{skeleton-DPv9nFhL.js → skeleton-BAdJ6vyA.js} +1 -1
  73. package/dist/skeleton.js +1 -1
  74. package/dist/{tab-C9swK-hm.js → tab-DH2owP2V.js} +0 -1
  75. package/dist/tab.js +1 -1
  76. package/dist/vite.config.d.ts +4 -0
  77. package/docs/COMPONENTS.md +10 -12
  78. package/docs/DESIGN.md +16 -0
  79. package/package.json +3 -3
  80. package/dist/button-DukaD6uL.js +0 -117
  81. package/dist/colorpicker-Ch67dWa_.js +0 -302
  82. package/dist/input-DoraIb3x.js +0 -198
@@ -0,0 +1 @@
1
+ var ranui_popover=(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();function u(e){return Object.prototype.toString.call(e)}function d(e,t,n=new Map){if(e===t)return!0;if(e==null||t==null)return e===t;if(e!=e&&t!=t)return!0;let r=typeof e;if(r!==typeof t)return!1;if(r!==`object`)return e===t;let i=u(e);if(i!==u(t))return!1;if(n.has(e))return n.get(e)===t;if(n.set(e,t),i===`[object Array]`){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!d(e[r],t[r],n))return!1;return!0}if(i===`[object Date]`)return+e==+t;if(i===`[object RegExp]`)return e.toString()===t.toString();if(i===`[object Map]`){if(e.size!==t.size)return!1;let r=!0;return e.forEach((e,i)=>{r&&(t.has(i)&&d(e,t.get(i),n)||(r=!1))}),r}if(i===`[object Set]`){if(e.size!==t.size)return!1;let r=Array.from(e),i=Array.from(t);return r.every(e=>i.some(t=>d(e,t,n)))}let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||!d(e[r],t[r],n))return!1;return!0}var f=(e,t=new WeakMap)=>{if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r=0;r<e.length;r++)n[r]=f(e[r],t);return n}if(e instanceof Map){let n=new Map;return t.set(e,n),e.forEach((e,r)=>{n.set(typeof r==`object`&&r?f(r,t):r,f(e,t))}),n}if(e instanceof Set){let n=new Set;return t.set(e,n),e.forEach(e=>{n.add(f(e,t))}),n}if(typeof e==`object`&&e.constructor===Object){let n={};return t.set(e,n),[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].forEach(r=>{n[r]=f(e[r],t)}),n}try{let n=new(Object.getPrototypeOf(e)).constructor;t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=f(e[r],t));return n}catch{return console.warn(`Unable to deeply clone object of type ${Object.prototype.toString.call(e)}. Fallback to shallow copy.`),{...e}}};new t;var p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new m(p[0],3609767458),new m(p[1],602891725),new m(p[2],3964484399),new m(p[3],2173295548),new m(p[4],4081628472),new m(p[5],3053834265),new m(p[6],2937671579),new m(p[7],3664609560),new m(p[8],2734883394),new m(p[9],1164996542),new m(p[10],1323610764),new m(p[11],3590304994),new m(p[12],4068182383),new m(p[13],991336113),new m(p[14],633803317),new m(p[15],3479774868),new m(p[16],2666613458),new m(p[17],944711139),new m(p[18],2341262773),new m(p[19],2007800933),new m(p[20],1495990901),new m(p[21],1856431235),new m(p[22],3175218132),new m(p[23],2198950837),new m(p[24],3999719339),new m(p[25],766784016),new m(p[26],2566594879),new m(p[27],3203337956),new m(p[28],1034457026),new m(p[29],2466948901),new m(p[30],3758326383),new m(p[31],168717936),new m(p[32],1188179964),new m(p[33],1546045734),new m(p[34],1522805485),new m(p[35],2643833823),new m(p[36],2343527390),new m(p[37],1014477480),new m(p[38],1206759142),new m(p[39],344077627),new m(p[40],1290863460),new m(p[41],3158454273),new m(p[42],3505952657),new m(p[43],106217008),new m(p[44],3606008344),new m(p[45],1432725776),new m(p[46],1467031594),new m(p[47],851169720),new m(p[48],3100823752),new m(p[49],1363258195),new m(p[50],3750685593),new m(p[51],3785050280),new m(p[52],3318307427),new m(p[53],3812723403),new m(p[54],2003034995),new m(p[55],3602036899),new m(p[56],1575990012),new m(p[57],1125592928),new m(p[58],2716904306),new m(p[59],442776044),new m(p[60],593698344),new m(p[61],3733110249),new m(p[62],2999351573),new m(p[63],3815920427),new m(3391569614,3928383900),new m(3515267271,566280711),new m(3940187606,3454069534),new m(4118630271,4000239992),new m(116418474,1914138554),new m(174292421,2731055270),new m(289380356,3203993006),new m(460393269,320620315),new m(685471733,587496836),new m(852142971,1086792851),new m(1017036298,365543100),new m(1126000580,2618297676),new m(1288033470,3409855158),new m(1501505948,4234509866),new m(1607167915,987167468),new m(1816402316,1246189591),new m(0,1),new m(0,32898),new m(2147483648,32906),new m(2147483648,2147516416),new m(0,32907),new m(0,2147483649),new m(2147483648,2147516545),new m(2147483648,32777),new m(0,138),new m(0,136),new m(0,2147516425),new m(0,2147483658),new m(0,2147516555),new m(2147483648,139),new m(2147483648,32905),new m(2147483648,32771),new m(2147483648,32770),new m(2147483648,128),new m(0,32778),new m(2147483648,2147483658),new m(2147483648,2147516545),new m(2147483648,32896),new m(0,2147483649),new m(2147483648,2147516424);var h=(e,t=500)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(void 0,r)},t)}},g=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},_=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},v=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(v),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(v);var y=typeof document>`u`,te=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}};function b(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function x(e){return b(e)}var S=e=>typeof e==`string`?!1:`tagName`in e&&`childrenList`in e,C=(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()},w=(e,t,n)=>{for(let r of e)S(r)&&(C(r,t)&&n.push(r),w(r.childrenList,t,n))},T=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?b(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return w(this.childrenList,e,t),t}},E=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 T)}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 D(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return w(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${x(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${x(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?b(e):(e instanceof T,e.serialize())).join(``):a+=b(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},D=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 w(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${b(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?b(e):(e instanceof T,e.serialize())).join(``)}</template>`}},O=class e{el;constructor(e){this.el=y?new E(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return y?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let n=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(n(t)):e.concat(t),[]);return n(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?y?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(y){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 ne(this.el,t,e)}build(){return this.el}serialize(){if(y)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ne=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof O?this.root.appendChild(e.build()):typeof e==`string`?y?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(y)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 y?this.root.serialize():this.root.innerHTML}},k=e=>new O(e),A=()=>k(`div`),j=()=>k(`slot`),M=new Map;function N(e,t){y?(M.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var P=typeof document<`u`?HTMLElement:E,F=new Map,I=new Map,L=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!F.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),F.set(t,e)}let n=F.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)}}},R=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!I.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),I.set(t,e)}let n=I.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)}}},z=new WeakMap,B=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,V=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||z.get(e)||e.attachShadow(n);return z.set(e,r),L(r,t?`${t}\n${B}`:B),r},H=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},U=(e,t,n=``)=>e.getAttribute(t)??n,W=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},G=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&R(t,a)},K=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{visibility:hidden;position:absolute}`;N(`r-content`,class extends P{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=V(this,K);let e=H(this._shadowDom,`.slot`,()=>j().class(`slot`).build());this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}});var q=`.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}`,J=300;N(`r-dropdown`,class extends P{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=V(this,q);let e=H(this._shadowDom,`.ranui-dropdown-container`,()=>A().class(`ranui-dropdown-container`).children(A().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).part(`dropdown`).children(j().class(`slot`))).build());this.container=e,this.dropdown=e.querySelector(`.ranui-dropdown`),this._slot=e.querySelector(`.slot`)}get transit(){return U(this,`transit`)}set transit(e){W(this,`transit`,e,{removeEmpty:!0})}get arrow(){return U(this,`arrow`)}set arrow(e){W(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return U(this,`sheet`)}set sheet(e){W(this,`sheet`,e)}handlerExternalCss=()=>{G(this,this._shadowDom,`sheet`,null,this.sheet)};handlerTransit=()=>{this.transit&&this.dropdown&&(g(this.dropdown,this.transit),setTimeout(()=>{_(this.dropdown,this.transit)},J))};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=A().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&&(g(this.dropdown,this.transit),setTimeout(()=>{_(this.dropdown,this.transit)},J)),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&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}:host{display:var(--ran-popover-host-display,block)}.ran-popover{box-sizing:var(--ran-popover-box-sizing,border-box);position:var(--ran-popover-position,relative);display:var(--ran-popover-display,block);margin:var(--ran-popover-margin,0);padding:var(--ran-popover-padding,0)}.ran-popover-block{display:var(--ran-popover-block-display,block)}`,Y=8,X=300,Z=16,Q={bottom:{add:`ran-dropdown-down-in`,remove:`ran-dropdown-down-out`},top:{add:`ran-dropdown-up-in`,remove:`ran-dropdown-up-out`},left:{add:`ran-dropdown-left-in`,remove:`ran-dropdown-left-out`},right:{add:`ran-dropdown-right-in`,remove:`ran-dropdown-right-out`}},ie=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),$=class extends P{_events=new te;_slot;popoverBlock;popoverContent;popoverInner;popoverInnerBlock;_shadowDom;dropDownInTimeId;dropDownOutTimeId;removeTimeId;static get observedAttributes(){return[`placement`,`trigger`,`sheet`]}closePopover=()=>{this.setDropdownDisplayNone()};constructor(){super(),this._shadowDom=V(this,re);let e=H(this._shadowDom,`.ran-popover-block`,()=>A().class(`ran-popover-block`).role(`tooltip`).children(j().class(`slot`)).build());this.popoverBlock=e,this._slot=e.querySelector(`.slot`)}get placement(){return U(this,`placement`,`top`)}set placement(e){W(this,`placement`,e)}get trigger(){return U(this,`trigger`,`hover`)}set trigger(e){W(this,`trigger`,e)}get getPopupContainerId(){return U(this,`getPopupContainerId`)}set getPopupContainerId(e){W(this,`getPopupContainerId`,e)}get sheet(){return U(this,`sheet`)}set sheet(e){W(this,`sheet`,e)}handlerExternalCss=()=>{G(this,this._shadowDom,`sheet`,null,this.sheet)};initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`aria-haspopup`,`dialog`),this.setAttribute(`aria-expanded`,`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};stopPropagation=e=>{e.stopPropagation()};createContent=e=>{if(e){if(!this.popoverContent){this.popoverContent=k(`r-dropdown`).class(`ran-popover-dropdown`).style(`display`,`none`).style(`position`,`absolute`).build(),this.popoverContent?.addEventListener(`click`,this.stopPropagation);let e=A().children(this.popoverContent).build();this.trigger.includes(`hover`)&&!a()&&(this.popoverContent?.addEventListener(`mouseleave`,this.blur),this.popoverContent?.addEventListener(`mouseenter`,this.removeDropDownTimeId)),document.body.appendChild(e)}if(this.popoverContent&&e.length>0){this.popoverContent.innerHTML=``;let t=document.createDocumentFragment();for(let n of e)t.appendChild(n);this.popoverContent.appendChild(t)}}};watchContent=e=>{let{value:t}=e.detail;this.createContent(t.content)};blur=h(()=>{this.removeTimeId&&this.removeDropDownTimeId(),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(),this.setDropdownDisplayNone()},X)},Z);removeDropDownTimeId=h(()=>{this.trigger.includes(`hover`)&&!a()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)},Z);setDropdownDisplayBlock=h(()=>{this.dropDownInTimeId||(clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0,clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0,this.popoverContent&&this.popoverContent.style.display!==`block`&&(this.updateAriaExpanded(!0),this.popoverContent.setAttribute(`transit`,Q[this.placement].add),this.popoverContent?.style.setProperty(`display`,`block`),this.placementPosition(),this.dropDownInTimeId=setTimeout(()=>{this.popoverContent&&this.popoverContent.removeAttribute(`transit`),clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0},X)))},Z);setDropdownDisplayNone=h(()=>{this.dropDownOutTimeId||(clearTimeout(this.dropDownInTimeId),this.dropDownInTimeId=void 0,clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0,this.popoverContent&&this.popoverContent.style.display!==`none`&&(this.updateAriaExpanded(!1),this.popoverContent.setAttribute(`transit`,Q[this.placement].remove),this.dropDownOutTimeId=setTimeout(()=>{this.popoverContent?.style.setProperty(`display`,`none`),this.popoverContent&&this.popoverContent.removeAttribute(`transit`),clearTimeout(this.dropDownOutTimeId),this.dropDownOutTimeId=void 0},X)))},Z);placementPosition=()=>{if(!this.popoverContent)return;let{top:e,left:t,bottom:n,width:r,height:i}=this.getBoundingClientRect(),a=n+window.scrollY+Y,o=t+window.scrollX,s=document.getElementById(this.getPopupContainerId),c=this.popoverContent.getBoundingClientRect();this.placement===`top`&&(a=e+window.scrollY-Math.max(c.height,i)-Y,this.getPopupContainerId&&s&&(o=t-s.getBoundingClientRect().left,a=e-s.getBoundingClientRect().top-this.popoverContent.clientHeight-Y,o=t-s.getBoundingClientRect().left)),this.placement===`left`&&(o=t-Math.max(c.width,r)-Y,a=e+window.scrollY),this.placement===`right`&&(o=t+r+Y,a=e+window.scrollY),this.popoverContent.style.setProperty(`inset`,`${a}px auto auto ${o}px`),this.popoverContent.style.setProperty(`--ran-x`,`${o}px`),this.popoverContent.style.setProperty(`--ran-y`,`${a}px`),this.popoverContent.style.setProperty(`--ran-dropdown-arrow-anchor-width`,`${r}px`),this.popoverContent.style.setProperty(`--ran-dropdown-arrow-anchor-height`,`${i}px`),this.popoverContent.style.setProperty(`--ran-dropdown-min-width`,`${c.width}px`),this.popoverContent.style.setProperty(`--ran-dropdown-min-height`,`${c.height}px`)};hoverPopover=e=>{this.clickPopover(e)};clickContent=e=>{e.stopPropagation()};clickPopover=e=>{e.stopPropagation(),e.preventDefault(),this.setDropdownDisplayBlock()};keydownPopover=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.setDropdownDisplayBlock()),e.key===`Escape`&&(e.preventDefault(),this.setDropdownDisplayNone())};clickRemovePopover=e=>{this.hoverRemovePopover(e)};popoverTrigger=()=>{this._events.abort();for(let e of this.children)e.tagName===`R-CONTENT`&&this._events.on(e,`change`,this.watchContent);this.trigger.includes(`hover`)&&(this._events.on(this,`mouseenter`,this.hoverPopover),this._events.on(this,`mouseleave`,this.blur)),this._events.on(this,`click`,this.clickPopover).on(this,`keydown`,this.keydownPopover).on(document,`click`,this.clickRemovePopover)};hoverRemovePopover=e=>{e.stopPropagation(),this.setDropdownDisplayNone()};changePlacement=h(()=>{this.placement===`top`&&this.popoverContent?.setAttribute(`arrow`,`bottom`),this.placement===`bottom`&&this.popoverContent?.setAttribute(`arrow`,`top`),this.placement===`left`&&this.popoverContent?.setAttribute(`arrow`,`right`),this.placement===`right`&&this.popoverContent?.setAttribute(`arrow`,`left`)},Z);connectedCallback(){this.initAria(),this.handlerExternalCss();for(let e of this.children)e.tagName===`R-CONTENT`&&this.createContent(e.children);this.popoverTrigger(),this.changePlacement()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`trigger`&&this.popoverTrigger(),e===`placement`&&this.changePlacement(),e===`sheet`&&this.handlerExternalCss())}};return N(`r-popover`,$),e.PLACEMENT_TYPE=ie,e.Popover=$,e.default=$,e})({});
@@ -0,0 +1 @@
1
+ var ranui_progress=(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=``)=>{if(e.length===0)return 0;if(e.endsWith(`%`)){let t=Number(e.replace(`%`,``));return t>1?t/100:t}return Number(e)},i=e=>typeof e==`function`,a=12e4,o=`__ranuts_bridge__`,s=`default`,c=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)}},l=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=s){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,c.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:o,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),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(i(l)){let t=e.source??this.targetWindow;Promise.resolve(l(r)).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 o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),i(Error(`Request timeout`)))},a),s=e=>{clearTimeout(o),i(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(o),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=()=>{c.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 l(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();function u(e){return Object.prototype.toString.call(e)}function d(e,t,n=new Map){if(e===t)return!0;if(e==null||t==null)return e===t;if(e!=e&&t!=t)return!0;let r=typeof e;if(r!==typeof t)return!1;if(r!==`object`)return e===t;let i=u(e);if(i!==u(t))return!1;if(n.has(e))return n.get(e)===t;if(n.set(e,t),i===`[object Array]`){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!d(e[r],t[r],n))return!1;return!0}if(i===`[object Date]`)return+e==+t;if(i===`[object RegExp]`)return e.toString()===t.toString();if(i===`[object Map]`){if(e.size!==t.size)return!1;let r=!0;return e.forEach((e,i)=>{r&&(t.has(i)&&d(e,t.get(i),n)||(r=!1))}),r}if(i===`[object Set]`){if(e.size!==t.size)return!1;let r=Array.from(e),i=Array.from(t);return r.every(e=>i.some(t=>d(e,t,n)))}let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||!d(e[r],t[r],n))return!1;return!0}var f=(e,t=new WeakMap)=>{if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r=0;r<e.length;r++)n[r]=f(e[r],t);return n}if(e instanceof Map){let n=new Map;return t.set(e,n),e.forEach((e,r)=>{n.set(typeof r==`object`&&r?f(r,t):r,f(e,t))}),n}if(e instanceof Set){let n=new Set;return t.set(e,n),e.forEach(e=>{n.add(f(e,t))}),n}if(typeof e==`object`&&e.constructor===Object){let n={};return t.set(e,n),[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].forEach(r=>{n[r]=f(e[r],t)}),n}try{let n=new(Object.getPrototypeOf(e)).constructor;t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=f(e[r],t));return n}catch{return console.warn(`Unable to deeply clone object of type ${Object.prototype.toString.call(e)}. Fallback to shallow copy.`),{...e}}};new t;var p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new m(p[0],3609767458),new m(p[1],602891725),new m(p[2],3964484399),new m(p[3],2173295548),new m(p[4],4081628472),new m(p[5],3053834265),new m(p[6],2937671579),new m(p[7],3664609560),new m(p[8],2734883394),new m(p[9],1164996542),new m(p[10],1323610764),new m(p[11],3590304994),new m(p[12],4068182383),new m(p[13],991336113),new m(p[14],633803317),new m(p[15],3479774868),new m(p[16],2666613458),new m(p[17],944711139),new m(p[18],2341262773),new m(p[19],2007800933),new m(p[20],1495990901),new m(p[21],1856431235),new m(p[22],3175218132),new m(p[23],2198950837),new m(p[24],3999719339),new m(p[25],766784016),new m(p[26],2566594879),new m(p[27],3203337956),new m(p[28],1034457026),new m(p[29],2466948901),new m(p[30],3758326383),new m(p[31],168717936),new m(p[32],1188179964),new m(p[33],1546045734),new m(p[34],1522805485),new m(p[35],2643833823),new m(p[36],2343527390),new m(p[37],1014477480),new m(p[38],1206759142),new m(p[39],344077627),new m(p[40],1290863460),new m(p[41],3158454273),new m(p[42],3505952657),new m(p[43],106217008),new m(p[44],3606008344),new m(p[45],1432725776),new m(p[46],1467031594),new m(p[47],851169720),new m(p[48],3100823752),new m(p[49],1363258195),new m(p[50],3750685593),new m(p[51],3785050280),new m(p[52],3318307427),new m(p[53],3812723403),new m(p[54],2003034995),new m(p[55],3602036899),new m(p[56],1575990012),new m(p[57],1125592928),new m(p[58],2716904306),new m(p[59],442776044),new m(p[60],593698344),new m(p[61],3733110249),new m(p[62],2999351573),new m(p[63],3815920427),new m(3391569614,3928383900),new m(3515267271,566280711),new m(3940187606,3454069534),new m(4118630271,4000239992),new m(116418474,1914138554),new m(174292421,2731055270),new m(289380356,3203993006),new m(460393269,320620315),new m(685471733,587496836),new m(852142971,1086792851),new m(1017036298,365543100),new m(1126000580,2618297676),new m(1288033470,3409855158),new m(1501505948,4234509866),new m(1607167915,987167468),new m(1816402316,1246189591),new m(0,1),new m(0,32898),new m(2147483648,32906),new m(2147483648,2147516416),new m(0,32907),new m(0,2147483649),new m(2147483648,2147516545),new m(2147483648,32777),new m(0,138),new m(0,136),new m(0,2147516425),new m(0,2147483658),new m(0,2147516555),new m(2147483648,139),new m(2147483648,32905),new m(2147483648,32771),new m(2147483648,32770),new m(2147483648,128),new m(0,32778),new m(2147483648,2147483658),new m(2147483648,2147516545),new m(2147483648,32896),new m(0,2147483649),new m(2147483648,2147516424);var h=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})(h),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(h);var g=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{height:var(--ran-progress-height,20px);display:block}:host:active,:host:focus{-webkit-tap-highlight-color:transparent;outline:0}:host(:focus-visible){outline:var(--ran-progress-focus-outline,2px solid var(--ran-color-primary,#006bff));outline-offset:var(--ran-progress-focus-outline-offset,2px);border-radius:var(--ran-radius-full,9999px)}.ran-progress{position:var(--ran-progress-position,relative);cursor:var(--ran-progress-cursor,pointer);width:var(--ran-progress-width,100%);height:100%}.ran-progress:active,.ran-progress:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-progress-wrap{width:var(--ran-progress-wrap-width,100%);height:var(--ran-progress-wrap-height,8px);border-radius:var(--ran-progress-wrap-border-radius,20px);background:var(--ran-progress-wrap-background,var(--ran-gray-200,#ebebeb));position:var(--ran-progress-wrap-position,relative);overflow:var(--ran-progress-wrap-overflow,hidden)}.ran-progress-wrap-value{position:var(--ran-progress-wrap-value-position,absolute);top:var(--ran-progress-wrap-value-top,0);left:var(--ran-progress-wrap-value-left,0);height:var(--ran-progress-wrap-value-height,100%);width:var(--ran-progress-wrap-value-width,100%);transform:scaleX(var(--progress-percent,0));transform-origin:var(--ran-progress-wrap-value-transform-origin,0 0);will-change:var(--ran-progress-wrap-value-will-change,transform);background:var(--ran-progress-wrap-value-background,linear-gradient(90deg, #0bc8bb 2.42%, #00d297 98.79%));border-radius:var(--ran-progress-wrap-value-border-radius,20px)}.ran-progress-dot{position:var(--ran-progress-dot-position,absolute);top:var(--ran-progress-dot-top,-5px);left:calc(var(--progress-percent,0) * 100%);border-radius:var(--ran-progress-dot-border-radius,50%);width:var(--ran-progress-dot-width,18px);height:var(--ran-progress-dot-height,18px);background:var(--ran-progress-dot-background,linear-gradient(90deg, #0bc8bb 2.42%, #00d297 98.79%));cursor:var(--ran-progress-dot-cursor,pointer);transform:translate(-50%)}`,_=typeof document>`u`,v=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}};function y(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function b(e){return y(e)}var x=e=>typeof e==`string`?!1:`tagName`in e&&`childrenList`in e,S=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},C=(e,t,n)=>{for(let r of e)x(r)&&(S(r,t)&&n.push(r),C(r.childrenList,t,n))},w=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?y(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}},T=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new w)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new E(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${b(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${b(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`?y(e):(e instanceof w,e.serialize())).join(``):a+=y(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}>`}},E=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${y(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?y(e):(e instanceof w,e.serialize())).join(``)}</template>`}},D=class e{el;constructor(e){this.el=_?new T(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return _?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let n=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(n(t)):e.concat(t),[]);return n(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?_?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(_){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 O(this.el,t,e)}build(){return this.el}serialize(){if(_)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},O=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof D?this.root.appendChild(e.build()):typeof e==`string`?_?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(_)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 _?this.root.serialize():this.root.innerHTML}},k=e=>new D(e),A=()=>k(`div`),j=new Map;function M(e,t){_?(j.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var N=typeof document<`u`?HTMLElement:T,P=new Map,F=new Map,I=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!P.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),P.set(t,e)}let n=P.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)}}},L=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!F.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),F.set(t,e)}let n=F.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)}}},R=new WeakMap,z=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,B=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||R.get(e)||e.attachShadow(n);return R.set(e,r),I(r,t?`${t}\n${z}`:z),r},V=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},H=(e,t,n=``)=>e.getAttribute(t)??n,U=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},W=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&L(t,a)},G=[`percent`,`type`,`total`,`dot`,`sheet`],K=class extends N{_progress;_progressWrap;_progressWrapValue;_progressDot;_shadowDom;_events=new v;moveProgress={mouseDown:!1};static get observedAttributes(){return G}constructor(){super(),this._shadowDom=B(this,g);let e=V(this._shadowDom,`.ran-progress`,()=>A().class(`ran-progress`).role(`progressbar`).children(A().class(`ran-progress-wrap`).part(`track`).children(A().class(`ran-progress-wrap-value`).part(`fill`)),A().class(`ran-progress-dot`).part(`dot`)).build());this._progress=e,this._progressWrap=e.querySelector(`.ran-progress-wrap`),this._progressWrapValue=e.querySelector(`.ran-progress-wrap-value`),this._progressDot=e.querySelector(`.ran-progress-dot`)}get percent(){let e=r(this.getAttribute(`percent`)||`0`),t=Number(this.total);return String(e>t?t:e)}set percent(e){this.setAttribute(`percent`,e||`0`),this.setAttribute(`aria-valuenow`,e||`0`)}get total(){let e=this.getAttribute(`total`);return e?`${r(e)}`:`100`}set total(e){this.setAttribute(`total`,e||`100`)}get type(){let e=this.getAttribute(`type`)||`primary`;return[`primary`,`drag`].includes(e)?e:`primary`}set type(e){this.setAttribute(`type`,e||`primary`)}get dot(){let e=this.getAttribute(`dot`)||`true`;return[`true`,`false`].includes(e)?e:`true`}set dot(e){this.setAttribute(`dot`,e||`true`)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};progressClick=e=>{if(this.type!==`drag`)return;let t=this._progress.getBoundingClientRect(),n=e.clientX-t.left,r=Math.min(1,Math.max(0,n/this._progress.offsetWidth)),i=r*Number(this.total);this.percent=String(i),this.updateUI(r),this.change()};progressDotMouseDown=e=>{this.moveProgress.mouseDown=!0,e.stopPropagation()};progressDotMouseMove=e=>{if(!this.moveProgress.mouseDown)return;let t=this._progress.getBoundingClientRect(),n=e.clientX-t.left,r=Math.min(1,Math.max(0,n/this._progress.offsetWidth)),i=r*Number(this.total);this.percent=String(i),this.updateUI(r),this.change()};progressDotMouseUp=()=>{this.moveProgress.mouseDown=!1};updateUI=e=>{this.style.setProperty(`--progress-percent`,String(e))};_preSerialize(){let e=Number(this.getAttribute(`percent`)||`0`),t=Number(this.getAttribute(`total`)||`100`),n=Math.min(1,Math.max(0,e/t));this.style.setProperty(`--progress-percent`,String(n))}change=()=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.percent,percent:this.percent,total:this.total}}))};appendProgressDot=()=>{if(!this._progress||!this._progressDot)return;let e=this.dot===`true`&&this.type===`drag`;e&&!this._progress.contains(this._progressDot)&&this._progress.appendChild(this._progressDot),!e&&this._progress.contains(this._progressDot)&&this._progress.removeChild(this._progressDot)};updateCurrentProgress=()=>{if(!this._progress)return;let e=Number(this.total)||100,t=Number(this.percent)/e;this.updateUI(t)};dragEvent=()=>{this.type===`drag`&&this._events.on(this._progress,`click`,this.progressClick).on(this._progressDot,`mousedown`,this.progressDotMouseDown).on(document,`mousemove`,this.progressDotMouseMove).on(document,`mouseup`,this.progressDotMouseUp)};resize=()=>{this.updateCurrentProgress()};connectedCallback(){this.handlerExternalCss(),this.hasAttribute(`type`)||this.setAttribute(`type`,`primary`),this.dragEvent(),this.updateCurrentProgress(),this.appendProgressDot(),this._events.on(window,`resize`,this.resize)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&((e===`dot`||e===`type`)&&this.appendProgressDot(),(e===`percent`||e===`total`)&&this.updateCurrentProgress(),e===`sheet`&&this.handlerExternalCss())}};return M(`r-progress`,K),e.Progress=K,e.default=K,e})({});
@@ -0,0 +1 @@
1
+ var ranui_radar=(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=e=>{let t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||1;return(i&&window.devicePixelRatio||1)/t},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)}},u=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 u(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();function d(e){return Object.prototype.toString.call(e)}function f(e,t,n=new Map){if(e===t)return!0;if(e==null||t==null)return e===t;if(e!=e&&t!=t)return!0;let r=typeof e;if(r!==typeof t)return!1;if(r!==`object`)return e===t;let i=d(e);if(i!==d(t))return!1;if(n.has(e))return n.get(e)===t;if(n.set(e,t),i===`[object Array]`){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!f(e[r],t[r],n))return!1;return!0}if(i===`[object Date]`)return+e==+t;if(i===`[object RegExp]`)return e.toString()===t.toString();if(i===`[object Map]`){if(e.size!==t.size)return!1;let r=!0;return e.forEach((e,i)=>{r&&(t.has(i)&&f(e,t.get(i),n)||(r=!1))}),r}if(i===`[object Set]`){if(e.size!==t.size)return!1;let r=Array.from(e),i=Array.from(t);return r.every(e=>i.some(t=>f(e,t,n)))}let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||!f(e[r],t[r],n))return!1;return!0}var p=(e,t=new WeakMap)=>{if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return n}if(e instanceof Map){let n=new Map;return t.set(e,n),e.forEach((e,r)=>{n.set(typeof r==`object`&&r?p(r,t):r,p(e,t))}),n}if(e instanceof Set){let n=new Set;return t.set(e,n),e.forEach(e=>{n.add(p(e,t))}),n}if(typeof e==`object`&&e.constructor===Object){let n={};return t.set(e,n),[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].forEach(r=>{n[r]=p(e[r],t)}),n}try{let n=new(Object.getPrototypeOf(e)).constructor;t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=p(e[r],t));return n}catch{return console.warn(`Unable to deeply clone object of type ${Object.prototype.toString.call(e)}. Fallback to shallow copy.`),{...e}}};new t;var m=[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],h=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new h(m[0],3609767458),new h(m[1],602891725),new h(m[2],3964484399),new h(m[3],2173295548),new h(m[4],4081628472),new h(m[5],3053834265),new h(m[6],2937671579),new h(m[7],3664609560),new h(m[8],2734883394),new h(m[9],1164996542),new h(m[10],1323610764),new h(m[11],3590304994),new h(m[12],4068182383),new h(m[13],991336113),new h(m[14],633803317),new h(m[15],3479774868),new h(m[16],2666613458),new h(m[17],944711139),new h(m[18],2341262773),new h(m[19],2007800933),new h(m[20],1495990901),new h(m[21],1856431235),new h(m[22],3175218132),new h(m[23],2198950837),new h(m[24],3999719339),new h(m[25],766784016),new h(m[26],2566594879),new h(m[27],3203337956),new h(m[28],1034457026),new h(m[29],2466948901),new h(m[30],3758326383),new h(m[31],168717936),new h(m[32],1188179964),new h(m[33],1546045734),new h(m[34],1522805485),new h(m[35],2643833823),new h(m[36],2343527390),new h(m[37],1014477480),new h(m[38],1206759142),new h(m[39],344077627),new h(m[40],1290863460),new h(m[41],3158454273),new h(m[42],3505952657),new h(m[43],106217008),new h(m[44],3606008344),new h(m[45],1432725776),new h(m[46],1467031594),new h(m[47],851169720),new h(m[48],3100823752),new h(m[49],1363258195),new h(m[50],3750685593),new h(m[51],3785050280),new h(m[52],3318307427),new h(m[53],3812723403),new h(m[54],2003034995),new h(m[55],3602036899),new h(m[56],1575990012),new h(m[57],1125592928),new h(m[58],2716904306),new h(m[59],442776044),new h(m[60],593698344),new h(m[61],3733110249),new h(m[62],2999351573),new h(m[63],3815920427),new h(3391569614,3928383900),new h(3515267271,566280711),new h(3940187606,3454069534),new h(4118630271,4000239992),new h(116418474,1914138554),new h(174292421,2731055270),new h(289380356,3203993006),new h(460393269,320620315),new h(685471733,587496836),new h(852142971,1086792851),new h(1017036298,365543100),new h(1126000580,2618297676),new h(1288033470,3409855158),new h(1501505948,4234509866),new h(1607167915,987167468),new h(1816402316,1246189591),new h(0,1),new h(0,32898),new h(2147483648,32906),new h(2147483648,2147516416),new h(0,32907),new h(0,2147483649),new h(2147483648,2147516545),new h(2147483648,32777),new h(0,138),new h(0,136),new h(0,2147516425),new h(0,2147483658),new h(0,2147516555),new h(2147483648,139),new h(2147483648,32905),new h(2147483648,32771),new h(2147483648,32770),new h(2147483648,128),new h(0,32778),new h(2147483648,2147483658),new h(2147483648,2147516545),new h(2147483648,32896),new h(0,2147483649),new h(2147483648,2147516424);var g=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(g),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(g);var _=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{--ran-radar-polygon-color:var(--ran-color-border,#e6e6e6);--ran-radar-line-color:var(--ran-color-border,#e6e6e6);--ran-radar-fill-color:#ff792399;--ran-radar-stroke-color:#ff792399}.ran-radar{position:var(--ran-radar-position,relative);width:var(--ran-radar-width,100%);height:var(--ran-radar-height,100%);display:var(--ran-radar-display,block)}.ran-radar canvas{width:100%;height:100%}`,v=typeof document>`u`;function y(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function b(e){return y(e)}var x=e=>typeof e==`string`?!1:`tagName`in e&&`childrenList`in e,S=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},C=(e,t,n)=>{for(let r of e)x(r)&&(S(r,t)&&n.push(r),C(r.childrenList,t,n))},w=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?y(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}},T=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new w)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new E(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${b(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${b(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`?y(e):(e instanceof w,e.serialize())).join(``):a+=y(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}>`}},E=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${y(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?y(e):(e instanceof w,e.serialize())).join(``)}</template>`}},D=class e{el;constructor(e){this.el=v?new T(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return v?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.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let n=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(n(t)):e.concat(t),[]);return n(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?v?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(v){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 O(this.el,t,e)}build(){return this.el}serialize(){if(v)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},O=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof D?this.root.appendChild(e.build()):typeof e==`string`?v?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(v)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 v?this.root.serialize():this.root.innerHTML}},k=e=>new D(e),A=()=>k(`div`),j=new Map;function M(e,t){v?(j.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var N=typeof document<`u`?HTMLElement:T,P=new Map,F=new Map,I=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!P.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),P.set(t,e)}let n=P.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)}}},L=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!F.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),F.set(t,e)}let n=F.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)}}},R=new WeakMap,z=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,B=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||R.get(e)||e.attachShadow(n);return R.set(e,r),I(r,t?`${t}\n${z}`:z),r},V=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},H=(e,t,n=``)=>e.getAttribute(t)??n,U=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},W=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&L(t,a)},G=`rgba(0,0,0,0)`,K=`rgba(0,0,0,1)`,q=`#e6e6e6`,J=`#e6e6e6`,Y=`黑体`,X=`rgba(255,121,35,0.60)`,Z=`rgba(255,121,35,0.60)`,Q=class extends N{mData;mCount;mW;mCenter;mRadius;mAngle;static get observedAttributes(){return[`abilitys`,`colorpolygon`,`colorline`,`fillcolor`,`strokecolor`,`sheet`]}abilityRadarChartContainer;abilityRadarChart;_iconElement;_shadowDom;resizeObserver;constructor(){super(),this._shadowDom=B(this,_);let e=V(this._shadowDom,`.ran-radar`,()=>A().class(`ran-radar`).children(k(`canvas`).build()).build()),t=e.querySelector(`canvas`);this.abilityRadarChartContainer=e,this.abilityRadarChart=t,this.resizeObserver=new ResizeObserver(this.resize),this.resizeObserver.observe(this.abilityRadarChartContainer)}resize=()=>{this.refreshData()};get abilitys(){let e=this.getAttribute(`abilitys`);if(typeof e==`string`)try{return JSON.parse(e)}catch(t){return console.error(`Failed to parse the rule in JSON.parse: ${e}, error: ${t}`),e}return e}set abilitys(e){typeof e==`string`?this.setAttribute(`abilitys`,e||``):this.setAttribute(`abilitys`,JSON.stringify(e)||``)}_cssVar(e){return typeof getComputedStyle>`u`?``:getComputedStyle(this).getPropertyValue(e).trim()}get colorPolygon(){return this.getAttribute(`colorPolygon`)||this._cssVar(`--ran-radar-polygon-color`)||q}set colorPolygon(e){this.setAttribute(`colorPolygon`,e||q)}get colorLine(){return this.getAttribute(`colorLine`)||this._cssVar(`--ran-radar-line-color`)||J}set colorLine(e){this.setAttribute(`colorLine`,e||J)}get fontColor(){return this._cssVar(`--ran-color-text`)||K}get fillColor(){return this.getAttribute(`fillColor`)||this._cssVar(`--ran-radar-fill-color`)||X}set fillColor(e){this.setAttribute(`fillColor`,e||X)}get strokeColor(){return this.getAttribute(`strokeColor`)||this._cssVar(`--ran-radar-stroke-color`)||Z}set strokeColor(e){this.setAttribute(`strokeColor`,e||Z)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};refreshData(){let e=this.abilityRadarChart.getContext(`2d`);if(!this.abilityRadarChartContainer||!e)return;let t=a(e),n=this.abilityRadarChartContainer.clientWidth*t,r=this.abilityRadarChartContainer.clientHeight*t;this.abilityRadarChart.width=n,this.abilityRadarChart.height=r,this.mW=n,this.mData=this.abilitys,this.mCount=this.mData?.length||1,this.mCenter=this.mW/2,this.mRadius=this.mCenter-50*t,this.mAngle=Math.PI*2/this.mCount,this.drawPolygon(e),this.drawSide(e),this.drawLines(e),this.drawText(e),this.drawRegion(e),this.drawCircle(e)}drawSide(e){if(!this.mRadius||!this.mCount||!this.mCenter||!this.mAngle)return;e.save(),e.strokeStyle=this.colorLine;let t=this.mRadius;for(let n=0;n<this.mCount;n++){let r=this.mCenter+t*Math.sin(this.mAngle*n),i=this.mCenter+t*Math.cos(this.mAngle*n);e.lineTo(r,i)}e.closePath(),e.stroke()}drawPolygon(e){if(!this.mRadius||!this.mCount||!this.mCenter||!this.mAngle)return;e.save(),e.strokeStyle=this.colorPolygon;let t=this.mRadius/4;e.setLineDash([6,6]);for(let n=0;n<4;n++){e.beginPath();let r=t*(n+1);for(let t=0;t<this.mCount;t++){let n=this.mCenter+r*Math.sin(this.mAngle*t),i=this.mCenter+r*Math.cos(this.mAngle*t);e.lineTo(n,i)}e.closePath(),e.stroke()}e.restore()}drawLines(e){if(!(!this.mRadius||!this.mCount||!this.mCenter||!this.mAngle)){e.save(),e.beginPath(),e.strokeStyle=this.colorLine;for(let t=0;t<this.mCount;t++){let n=this.mCenter+this.mRadius*Math.sin(this.mAngle*t),r=this.mCenter+this.mRadius*Math.cos(this.mAngle*t);e.moveTo(this.mCenter,this.mCenter),e.lineTo(n,r)}e.stroke(),e.restore()}}drawText(e){if(!this.mRadius||!this.mCount||!this.mCenter||!this.mAngle||!this.mData)return;e.save();let t=a(e),n=this.mCenter/12;for(let r=0;r<this.mCount;r++){let i=this.mCenter+this.mRadius*Math.sin(this.mAngle*r),a=this.mCenter+this.mRadius*Math.cos(this.mAngle*r),o=this.mData[r]?.backgroundColor||G,s=this.mData[r]?.fontColor||this.fontColor,c=this.mData[r]?.fontFamily||Y,l=this.mData[r]?.fontSize||n;e.font=`${l}px ${c}`,this.mAngle*r>=0&&this.mAngle*r<Math.PI/2?this.drawButton(e,o,i,a,44*t,24*t,12*t,this.mData[r].abilityName,s,c,l):this.mAngle*r>=Math.PI/2&&this.mAngle*r<Math.PI?this.drawButton(e,o,i,a-24*t,44*t,24*t,12*t,this.mData[r].abilityName,s,c,l):this.mAngle*r>=Math.PI&&this.mAngle*r<Math.PI*3/2?this.drawButton(e,o,i-44*t,a-24*t,44*t,24*t,12*t,this.mData[r].abilityName,s,c,l):this.drawButton(e,o,i-44*t,a,44*t,24*t,12*t,this.mData[r].abilityName,s,c,l)}e.restore()}drawButton(e,t,n,r,i,o,s,c,l,u,d){e.beginPath();let f=a(e);e.fillStyle=t,e.moveTo(n+s,r),e.lineTo(n+i-s,r),e.arc(n+i-s,r+s,s,Math.PI*3/2,Math.PI*2),e.lineTo(n+i,r+o-s),e.arc(n+i-s,r+o-s,s,Math.PI,Math.PI/2),e.lineTo(n+s,r+o),e.arc(n+s,r+o-s,s,Math.PI/2,Math.PI),e.lineTo(n,r+s),e.arc(n+s,r+s,s,Math.PI,Math.PI*3/2),e.fill(),e.closePath(),e.beginPath(),e.fillStyle=l,e.font=`${d||12*f}px ${u}`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(c,n+i/2,r+o/2)}drawRegion(e){if(!this.mRadius||!this.mCount||!this.mCenter||!this.mAngle||!this.mData)return;let t=a(e);e.save(),e.beginPath();for(let t=0;t<this.mCount;t++){let n=this.mCenter+this.mRadius*Math.sin(this.mAngle*t)*this.mData[t].scoreRate/100,r=this.mCenter+this.mRadius*Math.cos(this.mAngle*t)*this.mData[t].scoreRate/100;e.lineTo(n,r)}e.closePath(),e.fillStyle=this.fillColor,e.fill(),e.strokeStyle=this.strokeColor,e.lineWidth=1*t,e.stroke(),e.restore()}drawCircle(e){if(!this.mRadius||!this.mCount||!this.mCenter||!this.mAngle||!this.mData)return;let t=a(e);e.save();for(let n=0;n<this.mCount;n++){let r=this.mCenter+this.mRadius*Math.sin(this.mAngle*n)*this.mData[n].scoreRate/100,i=this.mCenter+this.mRadius*Math.cos(this.mAngle*n)*this.mData[n].scoreRate/100;e.beginPath(),e.arc(r,i,3,0,Math.PI*2),e.lineWidth=1.5*t,e.strokeStyle=this.strokeColor,e.stroke()}e.restore()}connectedCallback(){this.handlerExternalCss(),this.refreshData()}disconnectedCallback(){this.resizeObserver.disconnect()}attributeChangedCallback(e,t,n){t!==n&&([`abilitys`,`colorpolygon`,`colorline`,`fillcolor`,`strokecolor`].includes(e)&&this.abilityRadarChartContainer&&this.refreshData(),e===`sheet`&&this.handlerExternalCss())}};return M(`r-radar`,Q),e.RadarChart=Q,e.default=Q,e})({});
@@ -0,0 +1 @@
1
+ var ranui_route=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:block}:host([hidden]){display:none!important}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}};function i(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function a(e){return i(e)}var o=e=>typeof e==`string`?!1:`tagName`in e&&`childrenList`in e,s=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},c=(e,t,n)=>{for(let r of e)o(r)&&(s(r,t)&&n.push(r),c(r.childrenList,t,n))},l=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}},u=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 l)}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 d(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${a(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),o=r?` style="${a(r)}"`:``,s=``;return this.shadowRoot&&(s+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?s+=this._innerHTML:s+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof l,e.serialize())).join(``):s+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!s?`<${t}${n}${o} />`:`<${t}${n}${o}>${s}</${t}>`}},d=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${i(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof l,e.serialize())).join(``)}</template>`}},f=class e{el;constructor(e){this.el=n?new u(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return n?this.el.attributes.set(`class`,e):this.el.className=e,this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?n?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.el.textContent=e,this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new p(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},p=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof f?this.root.appendChild(e.build()):typeof e==`string`?n?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},m=e=>new f(e),h=()=>m(`slot`),g=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}},_=(e=8)=>Math.random().toString(36).substring(2,e+2),v=e=>typeof e==`function`,y=12e4,b=`__ranuts_bridge__`,x=`default`,S=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)}},C=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=x){this.targetOrigin=t,this.channel=n,this.senderId=_(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,S.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:b,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(v(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=_(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},y),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{S.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new C(n,t,r);if(e||=_(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance();function w(e){return Object.prototype.toString.call(e)}function T(e,t,n=new Map){if(e===t)return!0;if(e==null||t==null)return e===t;if(e!=e&&t!=t)return!0;let r=typeof e;if(r!==typeof t)return!1;if(r!==`object`)return e===t;let i=w(e);if(i!==w(t))return!1;if(n.has(e))return n.get(e)===t;if(n.set(e,t),i===`[object Array]`){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!T(e[r],t[r],n))return!1;return!0}if(i===`[object Date]`)return+e==+t;if(i===`[object RegExp]`)return e.toString()===t.toString();if(i===`[object Map]`){if(e.size!==t.size)return!1;let r=!0;return e.forEach((e,i)=>{r&&(t.has(i)&&T(e,t.get(i),n)||(r=!1))}),r}if(i===`[object Set]`){if(e.size!==t.size)return!1;let r=Array.from(e),i=Array.from(t);return r.every(e=>i.some(t=>T(e,t,n)))}let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||!T(e[r],t[r],n))return!1;return!0}var E=(e,t=new WeakMap)=>{if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r=0;r<e.length;r++)n[r]=E(e[r],t);return n}if(e instanceof Map){let n=new Map;return t.set(e,n),e.forEach((e,r)=>{n.set(typeof r==`object`&&r?E(r,t):r,E(e,t))}),n}if(e instanceof Set){let n=new Set;return t.set(e,n),e.forEach(e=>{n.add(E(e,t))}),n}if(typeof e==`object`&&e.constructor===Object){let n={};return t.set(e,n),[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].forEach(r=>{n[r]=E(e[r],t)}),n}try{let n=new(Object.getPrototypeOf(e)).constructor;t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=E(e[r],t));return n}catch{return console.warn(`Unable to deeply clone object of type ${Object.prototype.toString.call(e)}. Fallback to shallow copy.`),{...e}}};new g;var D=[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],O=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new O(D[0],3609767458),new O(D[1],602891725),new O(D[2],3964484399),new O(D[3],2173295548),new O(D[4],4081628472),new O(D[5],3053834265),new O(D[6],2937671579),new O(D[7],3664609560),new O(D[8],2734883394),new O(D[9],1164996542),new O(D[10],1323610764),new O(D[11],3590304994),new O(D[12],4068182383),new O(D[13],991336113),new O(D[14],633803317),new O(D[15],3479774868),new O(D[16],2666613458),new O(D[17],944711139),new O(D[18],2341262773),new O(D[19],2007800933),new O(D[20],1495990901),new O(D[21],1856431235),new O(D[22],3175218132),new O(D[23],2198950837),new O(D[24],3999719339),new O(D[25],766784016),new O(D[26],2566594879),new O(D[27],3203337956),new O(D[28],1034457026),new O(D[29],2466948901),new O(D[30],3758326383),new O(D[31],168717936),new O(D[32],1188179964),new O(D[33],1546045734),new O(D[34],1522805485),new O(D[35],2643833823),new O(D[36],2343527390),new O(D[37],1014477480),new O(D[38],1206759142),new O(D[39],344077627),new O(D[40],1290863460),new O(D[41],3158454273),new O(D[42],3505952657),new O(D[43],106217008),new O(D[44],3606008344),new O(D[45],1432725776),new O(D[46],1467031594),new O(D[47],851169720),new O(D[48],3100823752),new O(D[49],1363258195),new O(D[50],3750685593),new O(D[51],3785050280),new O(D[52],3318307427),new O(D[53],3812723403),new O(D[54],2003034995),new O(D[55],3602036899),new O(D[56],1575990012),new O(D[57],1125592928),new O(D[58],2716904306),new O(D[59],442776044),new O(D[60],593698344),new O(D[61],3733110249),new O(D[62],2999351573),new O(D[63],3815920427),new O(3391569614,3928383900),new O(3515267271,566280711),new O(3940187606,3454069534),new O(4118630271,4000239992),new O(116418474,1914138554),new O(174292421,2731055270),new O(289380356,3203993006),new O(460393269,320620315),new O(685471733,587496836),new O(852142971,1086792851),new O(1017036298,365543100),new O(1126000580,2618297676),new O(1288033470,3409855158),new O(1501505948,4234509866),new O(1607167915,987167468),new O(1816402316,1246189591),new O(0,1),new O(0,32898),new O(2147483648,32906),new O(2147483648,2147516416),new O(0,32907),new O(0,2147483649),new O(2147483648,2147516545),new O(2147483648,32777),new O(0,138),new O(0,136),new O(0,2147516425),new O(0,2147483658),new O(0,2147516555),new O(2147483648,139),new O(2147483648,32905),new O(2147483648,32771),new O(2147483648,32770),new O(2147483648,128),new O(0,32778),new O(2147483648,2147483658),new O(2147483648,2147516545),new O(2147483648,32896),new O(0,2147483649),new O(2147483648,2147516424);var k=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})(k),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(k);var A=new Map;function j(e,t){n?(A.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var M=typeof document<`u`?HTMLElement:u,N=new Map,P=new Map,F=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!N.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),N.set(t,e)}let n=N.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)}}},I=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!P.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),P.set(t,e)}let n=P.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)}}},L=new WeakMap,R=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,z=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||L.get(e)||e.attachShadow(n);return L.set(e,r),F(r,t?`${t}\n${R}`:R),r},B=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},V=(e,t,n=``)=>e.getAttribute(t)??n,H=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},U=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&I(t,a)},W=null;function G(){return W}var K=class extends M{static get observedAttributes(){return[`path`,`exact`,`sheet`]}_events=new r;_shadowDom;_params={};constructor(){super(),this._shadowDom=z(this,t),B(this._shadowDom,`slot`,()=>h().build())}get path(){return V(this,`path`,`/`)}set path(e){H(this,`path`,e)}get exact(){return this.hasAttribute(`exact`)}get params(){return{...this._params}}get sheet(){return V(this,`sheet`)}set sheet(e){H(this,`sheet`,e)}handlerExternalCss=()=>{U(this,this._shadowDom,`sheet`,null,this.sheet)};_matchPath(e){let t=this.path,n={},r=[],i=t.split(`/`).map(e=>e.startsWith(`:`)?(r.push(e.slice(1)),`([^/]+)`):e===`*`?`(.*)`:e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`/`),a=this.exact?RegExp(`^${i}$`):RegExp(`^${i}(?:/.*)?$`),o=e.match(a);return o?(r.forEach((e,t)=>{n[e]=decodeURIComponent(o[t+1]??``)}),{matched:!0,params:n}):{matched:!1,params:n}}_update(e){let{matched:t,params:n}=this._matchPath(e);this._params=n,this.hidden=!t,t&&this.dispatchEvent(new CustomEvent(`routematch`,{detail:{path:e,params:n},bubbles:!0}))}_preSerialize(){let e=G();e!==null&&this._update(e)}connectedCallback(){this.handlerExternalCss();let e=this.closest(`r-router`);e&&e._currentPath&&this._update(e._currentPath)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){if(t!==n){if(e===`path`||e===`exact`){let e=this.closest(`r-router`);e&&this._update(e._currentPath)}e===`sheet`&&this.handlerExternalCss()}}};return j(`r-route`,K),e.Route=K,e.default=K,e})({});
@@ -0,0 +1 @@
1
+ var ranui_router=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{width:100%;display:block}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}};function i(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function a(e){return i(e)}var o=e=>typeof e==`string`?!1:`tagName`in e&&`childrenList`in e,s=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},c=(e,t,n)=>{for(let r of e)o(r)&&(s(r,t)&&n.push(r),c(r.childrenList,t,n))},l=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}},u=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 l)}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 d(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${a(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),o=r?` style="${a(r)}"`:``,s=``;return this.shadowRoot&&(s+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?s+=this._innerHTML:s+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof l,e.serialize())).join(``):s+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!s?`<${t}${n}${o} />`:`<${t}${n}${o}>${s}</${t}>`}},d=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${i(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof l,e.serialize())).join(``)}</template>`}},f=class e{el;constructor(e){this.el=n?new u(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return n?this.el.attributes.set(`class`,e):this.el.className=e,this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?n?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.el.textContent=e,this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new p(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},p=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof f?this.root.appendChild(e.build()):typeof e==`string`?n?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},m=e=>new f(e),h=()=>m(`slot`),g=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}},_=(e=8)=>Math.random().toString(36).substring(2,e+2),v=e=>typeof e==`function`,y=12e4,b=`__ranuts_bridge__`,x=`default`,S=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)}},C=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=x){this.targetOrigin=t,this.channel=n,this.senderId=_(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,S.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:b,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(v(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=_(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},y),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{S.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new C(n,t,r);if(e||=_(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance();function w(e){return Object.prototype.toString.call(e)}function T(e,t,n=new Map){if(e===t)return!0;if(e==null||t==null)return e===t;if(e!=e&&t!=t)return!0;let r=typeof e;if(r!==typeof t)return!1;if(r!==`object`)return e===t;let i=w(e);if(i!==w(t))return!1;if(n.has(e))return n.get(e)===t;if(n.set(e,t),i===`[object Array]`){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!T(e[r],t[r],n))return!1;return!0}if(i===`[object Date]`)return+e==+t;if(i===`[object RegExp]`)return e.toString()===t.toString();if(i===`[object Map]`){if(e.size!==t.size)return!1;let r=!0;return e.forEach((e,i)=>{r&&(t.has(i)&&T(e,t.get(i),n)||(r=!1))}),r}if(i===`[object Set]`){if(e.size!==t.size)return!1;let r=Array.from(e),i=Array.from(t);return r.every(e=>i.some(t=>T(e,t,n)))}let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||!T(e[r],t[r],n))return!1;return!0}var E=(e,t=new WeakMap)=>{if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r=0;r<e.length;r++)n[r]=E(e[r],t);return n}if(e instanceof Map){let n=new Map;return t.set(e,n),e.forEach((e,r)=>{n.set(typeof r==`object`&&r?E(r,t):r,E(e,t))}),n}if(e instanceof Set){let n=new Set;return t.set(e,n),e.forEach(e=>{n.add(E(e,t))}),n}if(typeof e==`object`&&e.constructor===Object){let n={};return t.set(e,n),[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].forEach(r=>{n[r]=E(e[r],t)}),n}try{let n=new(Object.getPrototypeOf(e)).constructor;t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=E(e[r],t));return n}catch{return console.warn(`Unable to deeply clone object of type ${Object.prototype.toString.call(e)}. Fallback to shallow copy.`),{...e}}};new g;var D=[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],O=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new O(D[0],3609767458),new O(D[1],602891725),new O(D[2],3964484399),new O(D[3],2173295548),new O(D[4],4081628472),new O(D[5],3053834265),new O(D[6],2937671579),new O(D[7],3664609560),new O(D[8],2734883394),new O(D[9],1164996542),new O(D[10],1323610764),new O(D[11],3590304994),new O(D[12],4068182383),new O(D[13],991336113),new O(D[14],633803317),new O(D[15],3479774868),new O(D[16],2666613458),new O(D[17],944711139),new O(D[18],2341262773),new O(D[19],2007800933),new O(D[20],1495990901),new O(D[21],1856431235),new O(D[22],3175218132),new O(D[23],2198950837),new O(D[24],3999719339),new O(D[25],766784016),new O(D[26],2566594879),new O(D[27],3203337956),new O(D[28],1034457026),new O(D[29],2466948901),new O(D[30],3758326383),new O(D[31],168717936),new O(D[32],1188179964),new O(D[33],1546045734),new O(D[34],1522805485),new O(D[35],2643833823),new O(D[36],2343527390),new O(D[37],1014477480),new O(D[38],1206759142),new O(D[39],344077627),new O(D[40],1290863460),new O(D[41],3158454273),new O(D[42],3505952657),new O(D[43],106217008),new O(D[44],3606008344),new O(D[45],1432725776),new O(D[46],1467031594),new O(D[47],851169720),new O(D[48],3100823752),new O(D[49],1363258195),new O(D[50],3750685593),new O(D[51],3785050280),new O(D[52],3318307427),new O(D[53],3812723403),new O(D[54],2003034995),new O(D[55],3602036899),new O(D[56],1575990012),new O(D[57],1125592928),new O(D[58],2716904306),new O(D[59],442776044),new O(D[60],593698344),new O(D[61],3733110249),new O(D[62],2999351573),new O(D[63],3815920427),new O(3391569614,3928383900),new O(3515267271,566280711),new O(3940187606,3454069534),new O(4118630271,4000239992),new O(116418474,1914138554),new O(174292421,2731055270),new O(289380356,3203993006),new O(460393269,320620315),new O(685471733,587496836),new O(852142971,1086792851),new O(1017036298,365543100),new O(1126000580,2618297676),new O(1288033470,3409855158),new O(1501505948,4234509866),new O(1607167915,987167468),new O(1816402316,1246189591),new O(0,1),new O(0,32898),new O(2147483648,32906),new O(2147483648,2147516416),new O(0,32907),new O(0,2147483649),new O(2147483648,2147516545),new O(2147483648,32777),new O(0,138),new O(0,136),new O(0,2147516425),new O(0,2147483658),new O(0,2147516555),new O(2147483648,139),new O(2147483648,32905),new O(2147483648,32771),new O(2147483648,32770),new O(2147483648,128),new O(0,32778),new O(2147483648,2147483658),new O(2147483648,2147516545),new O(2147483648,32896),new O(0,2147483649),new O(2147483648,2147516424);var k=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})(k),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(k);var A=new Map;function j(e,t){n?(A.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var M=typeof document<`u`?HTMLElement:u,N=new Map,P=new Map,F=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!N.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),N.set(t,e)}let n=N.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)}}},I=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!P.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),P.set(t,e)}let n=P.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)}}},L=new WeakMap,R=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,z=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||L.get(e)||e.attachShadow(n);return L.set(e,r),F(r,t?`${t}\n${R}`:R),r},B=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},V=(e,t,n=``)=>e.getAttribute(t)??n,H=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},U=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&I(t,a)},W=null;function G(){return W}var K=class extends M{static get observedAttributes(){return[`mode`,`base`,`sheet`]}_events=new r;_shadowDom;_slot;_currentPath=``;constructor(){super(),this._shadowDom=z(this,t);let e=B(this._shadowDom,`slot`,()=>h().build());this._slot=e}get mode(){return this.getAttribute(`mode`)===`hash`?`hash`:`history`}get base(){return V(this,`base`)}get sheet(){return V(this,`sheet`)}set sheet(e){H(this,`sheet`,e)}handlerExternalCss=()=>{U(this,this._shadowDom,`sheet`,null,this.sheet)};_getPath(){if(this.mode===`hash`)return window.location.hash.slice(1)||`/`;let e=this.base,t=window.location.pathname;return e&&t.startsWith(e)?t.slice(e.length)||`/`:t}navigate(e,t=!1){let n=this.mode===`hash`?`#${e}`:this.base+e;t?window.history.replaceState(null,``,n):window.history.pushState(null,``,n),this._syncRoutes()}_syncRoutes(){let e=this._getPath();this._currentPath=e,this.querySelectorAll(`r-route`).forEach(t=>{typeof t._update==`function`&&t._update(e)}),this.dispatchEvent(new CustomEvent(`routechange`,{detail:{path:e},bubbles:!0}))}_handlePopState=()=>{this._syncRoutes()};_handleNavigate=e=>{let{path:t,replace:n}=e.detail;e.stopPropagation(),this.navigate(t,n)};connectedCallback(){this.handlerExternalCss(),this._events.on(window,`popstate`,this._handlePopState),this._events.on(this,`ran-navigate`,this._handleNavigate),this._events.on(this._slot,`slotchange`,()=>this._syncRoutes());let e=G();e&&e._bind(this),this._syncRoutes(),typeof customElements<`u`&&customElements.whenDefined(`r-route`).then(()=>this._syncRoutes())}disconnectedCallback(){let e=G();e&&e._unbind(this),this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&e===`sheet`&&this.handlerExternalCss()}};return j(`r-router`,K),e.Router=K,e.default=K,e})({});
@@ -0,0 +1 @@
1
+ var ranui_scratch=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:block;position:relative}.ran-scratch-ticket{width:100%;height:100%;display:block;position:relative}.ran-scratch-ticket-award{z-index:1;background:#000;width:100%;height:100%;display:block;position:absolute;top:0;left:0}.ran-scratch-ticket-canvas{z-index:2;width:100%;height:100%;display:block;position:absolute;top:0;left:0}`,n=typeof document>`u`;function r(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function i(e){return r(e)}var a=e=>typeof e==`string`?!1:`tagName`in e&&`childrenList`in e,o=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},s=(e,t,n)=>{for(let r of e)a(r)&&(o(r,t)&&n.push(r),s(r.childrenList,t,n))},c=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?r(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return s(this.childrenList,e,t),t}},l=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new c)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new u(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return s(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${i(t)}"`).join(``),a=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),o=a?` style="${i(a)}"`:``,s=``;return this.shadowRoot&&(s+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?s+=this._innerHTML:s+=this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof c,e.serialize())).join(``):s+=r(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!s?`<${t}${n}${o} />`:`<${t}${n}${o}>${s}</${t}>`}},u=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return s(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${r(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof c,e.serialize())).join(``)}</template>`}},d=class e{el;constructor(e){this.el=n?new l(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return n?this.el.attributes.set(`class`,e):this.el.className=e,this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?n?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return 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 f(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},f=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof d?this.root.appendChild(e.build()):typeof e==`string`?n?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},p=e=>new d(e),m=()=>p(`div`),h=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}},g=(e=8)=>Math.random().toString(36).substring(2,e+2),_=e=>typeof e==`function`,v=12e4,y=`__ranuts_bridge__`,b=`default`,x=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)}},S=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=b){this.targetOrigin=t,this.channel=n,this.senderId=g(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,x.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:y,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(_(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=g(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},v),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{x.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new S(n,t,r);if(e||=g(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance();function C(e){return Object.prototype.toString.call(e)}function w(e,t,n=new Map){if(e===t)return!0;if(e==null||t==null)return e===t;if(e!=e&&t!=t)return!0;let r=typeof e;if(r!==typeof t)return!1;if(r!==`object`)return e===t;let i=C(e);if(i!==C(t))return!1;if(n.has(e))return n.get(e)===t;if(n.set(e,t),i===`[object Array]`){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!w(e[r],t[r],n))return!1;return!0}if(i===`[object Date]`)return+e==+t;if(i===`[object RegExp]`)return e.toString()===t.toString();if(i===`[object Map]`){if(e.size!==t.size)return!1;let r=!0;return e.forEach((e,i)=>{r&&(t.has(i)&&w(e,t.get(i),n)||(r=!1))}),r}if(i===`[object Set]`){if(e.size!==t.size)return!1;let r=Array.from(e),i=Array.from(t);return r.every(e=>i.some(t=>w(e,t,n)))}let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||!w(e[r],t[r],n))return!1;return!0}var T=(e,t=new WeakMap)=>{if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r=0;r<e.length;r++)n[r]=T(e[r],t);return n}if(e instanceof Map){let n=new Map;return t.set(e,n),e.forEach((e,r)=>{n.set(typeof r==`object`&&r?T(r,t):r,T(e,t))}),n}if(e instanceof Set){let n=new Set;return t.set(e,n),e.forEach(e=>{n.add(T(e,t))}),n}if(typeof e==`object`&&e.constructor===Object){let n={};return t.set(e,n),[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].forEach(r=>{n[r]=T(e[r],t)}),n}try{let n=new(Object.getPrototypeOf(e)).constructor;t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=T(e[r],t));return n}catch{return console.warn(`Unable to deeply clone object of type ${Object.prototype.toString.call(e)}. Fallback to shallow copy.`),{...e}}};new h;var E=[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(E[0],3609767458),new D(E[1],602891725),new D(E[2],3964484399),new D(E[3],2173295548),new D(E[4],4081628472),new D(E[5],3053834265),new D(E[6],2937671579),new D(E[7],3664609560),new D(E[8],2734883394),new D(E[9],1164996542),new D(E[10],1323610764),new D(E[11],3590304994),new D(E[12],4068182383),new D(E[13],991336113),new D(E[14],633803317),new D(E[15],3479774868),new D(E[16],2666613458),new D(E[17],944711139),new D(E[18],2341262773),new D(E[19],2007800933),new D(E[20],1495990901),new D(E[21],1856431235),new D(E[22],3175218132),new D(E[23],2198950837),new D(E[24],3999719339),new D(E[25],766784016),new D(E[26],2566594879),new D(E[27],3203337956),new D(E[28],1034457026),new D(E[29],2466948901),new D(E[30],3758326383),new D(E[31],168717936),new D(E[32],1188179964),new D(E[33],1546045734),new D(E[34],1522805485),new D(E[35],2643833823),new D(E[36],2343527390),new D(E[37],1014477480),new D(E[38],1206759142),new D(E[39],344077627),new D(E[40],1290863460),new D(E[41],3158454273),new D(E[42],3505952657),new D(E[43],106217008),new D(E[44],3606008344),new D(E[45],1432725776),new D(E[46],1467031594),new D(E[47],851169720),new D(E[48],3100823752),new D(E[49],1363258195),new D(E[50],3750685593),new D(E[51],3785050280),new D(E[52],3318307427),new D(E[53],3812723403),new D(E[54],2003034995),new D(E[55],3602036899),new D(E[56],1575990012),new D(E[57],1125592928),new D(E[58],2716904306),new D(E[59],442776044),new D(E[60],593698344),new D(E[61],3733110249),new D(E[62],2999351573),new D(E[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 O=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})(O),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(O);var k=new Map;function A(e,t){n?(k.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var j=typeof document<`u`?HTMLElement:l,M=new Map,N=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!M.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),M.set(t,e)}let n=M.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)}}},P=new WeakMap,F=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,I=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||P.get(e)||e.attachShadow(n);return P.set(e,r),N(r,t?`${t}\n${F}`:F),r},L=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},R=class extends j{scratchTicketContainer;scratchTicket;state;scratchAward;_shadowDom;static get observedAttributes(){return[`disabled`,`icon`,`effect`,`iconSize`,`sheet`]}constructor(){super(),this._shadowDom=I(this,t);let e=L(this._shadowDom,`.ran-scratch-ticket`,()=>{let e=p(`canvas`).class(`ran-scratch-ticket-canvas`).style(`width`,`100%`).style(`height`,`100%`).build(),t=m().class(`ran-scratch-ticket-award`).build();return m().class(`ran-scratch-ticket`).children(e,t).build()}),n=e.querySelector(`.ran-scratch-ticket-award`),r=e.querySelector(`.ran-scratch-ticket-canvas`);this.scratchTicketContainer=e,this.scratchAward=n,this.scratchTicket=r,this.state={touchStart:!1,scratchArea:0}}touchStartScratch=e=>{console.log(`eeeeee`,e),this.state.touchStart=!0};touchMoveScratch=()=>{if(this.state.touchStart){let e=this.scratchTicket.getContext(`2d`);if(!e)return;this.state.scratchArea+=30,e.beginPath(),e.arc(100,100,30,0,2*Math.PI),e.globalCompositeOperation=`destination-out`,e.fill(),e.closePath()}};touchEndScratch=()=>{this.state.touchStart=!1;let{width:e,height:t}=this.scratchTicket,n=this.scratchTicket.getContext(`2d`);n&&this.state.scratchArea>e*t*.03&&(this.state.scratchArea=0,n.clearRect(0,0,e,t))};drawScratchTicket=()=>{let e=this.scratchTicket.getContext(`2d`);if(!this.scratchTicketContainer||!e)return;let t=new Image;t.src=``,t.onload=()=>{e.drawImage(t,0,0,this.scratchTicket.width,this.scratchTicket.height)},this.scratchTicket.addEventListener(`touchstart`,this.touchStartScratch),this.scratchTicket.addEventListener(`touchmove`,this.touchMoveScratch),this.scratchTicket.addEventListener(`touchend`,this.touchEndScratch)};attributeChangedCallback(){this._shadowDom.contains(this.scratchTicketContainer)||this._shadowDom.appendChild(this.scratchTicketContainer),this.drawScratchTicket()}};return A(`r-scratch`,R),e.default=R,e})({});
@@ -0,0 +1 @@
1
+ var ranui_section=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{border-width:var(--ran-skin-border-width,1px);border-style:var(--ran-skin-border-style,solid);border-color:var(--ran-section-border-color,var(--ran-color-border,#d9d9d9));border-radius:var(--ran-section-radius,var(--ran-radius-md,8px));background:var(--ran-section-background,var(--ran-color-bg-elevated,#fff));box-shadow:var(--ran-section-shadow,var(--ran-shadow-elevated,none));padding:var(--ran-section-padding,28px);box-sizing:border-box;scroll-margin-top:96px;display:block}.ran-section-header{gap:8px;max-width:760px;margin-bottom:22px;display:grid}.ran-section-heading{color:var(--ran-section-heading-color,var(--ran-color-text,#0f172a));font-size:var(--ran-section-heading-font-size,24px);font-weight:var(--ran-section-heading-font-weight,700);letter-spacing:0;margin:0;line-height:1.25}.ran-section-heading:empty{display:none}.ran-section-subtitle{max-width:620px;color:var(--ran-section-subtitle-color,var(--ran-color-text-secondary,#607086));margin:0}.ran-section-subtitle:empty{display:none}.ran-section-body{min-width:0}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}};function i(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function a(e){return i(e)}var o=e=>typeof e==`string`?!1:`tagName`in e&&`childrenList`in e,s=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},c=(e,t,n)=>{for(let r of e)o(r)&&(s(r,t)&&n.push(r),c(r.childrenList,t,n))},l=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}},u=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 l)}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 d(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${a(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),o=r?` style="${a(r)}"`:``,s=``;return this.shadowRoot&&(s+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?s+=this._innerHTML:s+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof l,e.serialize())).join(``):s+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!s?`<${t}${n}${o} />`:`<${t}${n}${o}>${s}</${t}>`}},d=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return c(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${i(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof l,e.serialize())).join(``)}</template>`}},f=class e{el;constructor(e){this.el=n?new u(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}class(e){return n?this.el.attributes.set(`class`,e):this.el.className=e,this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.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 t?this.el.setAttribute(e,n):this.el.removeAttribute(e),this}part(e){return this.el.setAttribute(`part`,e),this}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?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(...t){let r=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(r(t)):e.concat(t),[]);return r(t).forEach(t=>{t!=null&&(t instanceof e?this.el.appendChild(t.build()):typeof t==`string`?n?this.el.appendChild(t):this.el.appendChild(document.createTextNode(t)):this.el.appendChild(t))}),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.el.textContent=e,this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new p(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},p=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){let t=e=>e.reduce((e,n)=>Array.isArray(n)?e.concat(t(n)):e.concat(n),[]);return t(e).forEach(e=>{e!=null&&(e instanceof f?this.root.appendChild(e.build()):typeof e==`string`?n?this.root.appendChild(e):this.root.appendChild(document.createTextNode(e)):this.root.appendChild(e))}),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},m=e=>new f(e),h=()=>m(`div`),g=()=>m(`slot`),_=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}},v=(e=8)=>Math.random().toString(36).substring(2,e+2),y=e=>typeof e==`function`,b=12e4,x=`__ranuts_bridge__`,S=`default`,C=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)}},w=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=S){this.targetOrigin=t,this.channel=n,this.senderId=v(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,C.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:x,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(y(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=v(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},b),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{C.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new w(n,t,r);if(e||=v(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance();function T(e){return Object.prototype.toString.call(e)}function E(e,t,n=new Map){if(e===t)return!0;if(e==null||t==null)return e===t;if(e!=e&&t!=t)return!0;let r=typeof e;if(r!==typeof t)return!1;if(r!==`object`)return e===t;let i=T(e);if(i!==T(t))return!1;if(n.has(e))return n.get(e)===t;if(n.set(e,t),i===`[object Array]`){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!E(e[r],t[r],n))return!1;return!0}if(i===`[object Date]`)return+e==+t;if(i===`[object RegExp]`)return e.toString()===t.toString();if(i===`[object Map]`){if(e.size!==t.size)return!1;let r=!0;return e.forEach((e,i)=>{r&&(t.has(i)&&E(e,t.get(i),n)||(r=!1))}),r}if(i===`[object Set]`){if(e.size!==t.size)return!1;let r=Array.from(e),i=Array.from(t);return r.every(e=>i.some(t=>E(e,t,n)))}let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(let r of a)if(!Object.prototype.hasOwnProperty.call(t,r)||!E(e[r],t[r],n))return!1;return!0}var D=(e,t=new WeakMap)=>{if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r=0;r<e.length;r++)n[r]=D(e[r],t);return n}if(e instanceof Map){let n=new Map;return t.set(e,n),e.forEach((e,r)=>{n.set(typeof r==`object`&&r?D(r,t):r,D(e,t))}),n}if(e instanceof Set){let n=new Set;return t.set(e,n),e.forEach(e=>{n.add(D(e,t))}),n}if(typeof e==`object`&&e.constructor===Object){let n={};return t.set(e,n),[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].forEach(r=>{n[r]=D(e[r],t)}),n}try{let n=new(Object.getPrototypeOf(e)).constructor;t.set(e,n);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=D(e[r],t));return n}catch{return console.warn(`Unable to deeply clone object of type ${Object.prototype.toString.call(e)}. Fallback to shallow copy.`),{...e}}};new _;var O=[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],k=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new k(O[0],3609767458),new k(O[1],602891725),new k(O[2],3964484399),new k(O[3],2173295548),new k(O[4],4081628472),new k(O[5],3053834265),new k(O[6],2937671579),new k(O[7],3664609560),new k(O[8],2734883394),new k(O[9],1164996542),new k(O[10],1323610764),new k(O[11],3590304994),new k(O[12],4068182383),new k(O[13],991336113),new k(O[14],633803317),new k(O[15],3479774868),new k(O[16],2666613458),new k(O[17],944711139),new k(O[18],2341262773),new k(O[19],2007800933),new k(O[20],1495990901),new k(O[21],1856431235),new k(O[22],3175218132),new k(O[23],2198950837),new k(O[24],3999719339),new k(O[25],766784016),new k(O[26],2566594879),new k(O[27],3203337956),new k(O[28],1034457026),new k(O[29],2466948901),new k(O[30],3758326383),new k(O[31],168717936),new k(O[32],1188179964),new k(O[33],1546045734),new k(O[34],1522805485),new k(O[35],2643833823),new k(O[36],2343527390),new k(O[37],1014477480),new k(O[38],1206759142),new k(O[39],344077627),new k(O[40],1290863460),new k(O[41],3158454273),new k(O[42],3505952657),new k(O[43],106217008),new k(O[44],3606008344),new k(O[45],1432725776),new k(O[46],1467031594),new k(O[47],851169720),new k(O[48],3100823752),new k(O[49],1363258195),new k(O[50],3750685593),new k(O[51],3785050280),new k(O[52],3318307427),new k(O[53],3812723403),new k(O[54],2003034995),new k(O[55],3602036899),new k(O[56],1575990012),new k(O[57],1125592928),new k(O[58],2716904306),new k(O[59],442776044),new k(O[60],593698344),new k(O[61],3733110249),new k(O[62],2999351573),new k(O[63],3815920427),new k(3391569614,3928383900),new k(3515267271,566280711),new k(3940187606,3454069534),new k(4118630271,4000239992),new k(116418474,1914138554),new k(174292421,2731055270),new k(289380356,3203993006),new k(460393269,320620315),new k(685471733,587496836),new k(852142971,1086792851),new k(1017036298,365543100),new k(1126000580,2618297676),new k(1288033470,3409855158),new k(1501505948,4234509866),new k(1607167915,987167468),new k(1816402316,1246189591),new k(0,1),new k(0,32898),new k(2147483648,32906),new k(2147483648,2147516416),new k(0,32907),new k(0,2147483649),new k(2147483648,2147516545),new k(2147483648,32777),new k(0,138),new k(0,136),new k(0,2147516425),new k(0,2147483658),new k(0,2147516555),new k(2147483648,139),new k(2147483648,32905),new k(2147483648,32771),new k(2147483648,32770),new k(2147483648,128),new k(0,32778),new k(2147483648,2147483658),new k(2147483648,2147516545),new k(2147483648,32896),new k(0,2147483649),new k(2147483648,2147516424);var A=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})(A),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(A);var j=new Map;function M(e,t){n?(j.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var N=typeof document<`u`?HTMLElement:u,P=new Map,F=new Map,I=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!P.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),P.set(t,e)}let n=P.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)}}},L=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!F.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),F.set(t,e)}let n=F.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)}}},R=new WeakMap,z=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,B=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||R.get(e)||e.attachShadow(n);return R.set(e,r),I(r,t?`${t}\n${z}`:z),r},V=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},H=(e,t,n=``)=>e.getAttribute(t)??n,U=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},W=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&L(t,a)},G=class extends N{_shadowDom;_headerEl;_headingEl;_subtitleEl;_events=new r;static get observedAttributes(){return[`heading`,`subtitle`,`sheet`]}constructor(){super(),this._shadowDom=B(this,t);let e=V(this._shadowDom,`.ran-section-header`,()=>{let e=h().class(`ran-section-header`).attr(`part`,`header`).children(h().class(`ran-section-heading`).attr(`part`,`heading`).attr(`role`,`heading`).attr(`aria-level`,`2`),h().class(`ran-section-subtitle`).attr(`part`,`subtitle`)).build(),t=h().class(`ran-section-body`).attr(`part`,`body`).children(g()).build();return this._shadowDom.appendChild(e),this._shadowDom.appendChild(t),e});this._headerEl=e,this._headingEl=e.querySelector(`.ran-section-heading`),this._subtitleEl=e.querySelector(`.ran-section-subtitle`)}get heading(){return H(this,`heading`)}set heading(e){U(this,`heading`,e)}get subtitle(){return H(this,`subtitle`)}set subtitle(e){U(this,`subtitle`,e)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}_syncHeading(){this._headingEl.textContent=this.getAttribute(`heading`)??``,this._headerEl.style.display=this._headingEl.textContent||this._subtitleEl.textContent?``:`none`}_syncSubtitle(){this._subtitleEl.textContent=this.getAttribute(`subtitle`)??``,this._headerEl.style.display=this._headingEl.textContent||this._subtitleEl.textContent?``:`none`}connectedCallback(){this._syncHeading(),this._syncSubtitle(),W(this,this._shadowDom,`sheet`,null,this.sheet)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`heading`&&this._syncHeading(),e===`subtitle`&&this._syncSubtitle(),e===`sheet`&&W(this,this._shadowDom,e,t,n))}};return M(`r-section`,G),e.Section=G,e.default=G,e})({});