ranui 0.4.1-alpha.2 → 0.4.2-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.
- package/dist/{arc-DOGcyb-0.js → arc-BTq35m9x.js} +2 -2
- package/dist/{arc-ByizYZ13.cjs → arc-BjIU7MOi.cjs} +1 -1
- package/dist/builder-2HD21I6K.cjs +1 -0
- package/dist/builder.js +2 -2
- package/dist/{button-DFBA474n.js → button-BgWXCj7-.js} +4 -4
- package/dist/button.js +1 -1
- package/dist/{card-Cfkb7dIm.js → card-DzVv3ADA.js} +3 -3
- package/dist/card.js +1 -1
- package/dist/{checkbox-CeVzf_ff.js → checkbox-KOXDiwRr.js} +4 -4
- package/dist/checkbox.js +1 -1
- package/dist/{circle-DgoPsPmL.cjs → circle-By7YwAJj.cjs} +1 -1
- package/dist/{circle-fold-DGHgTbNx.cjs → circle-fold-BJWGLDa6.cjs} +1 -1
- package/dist/{circle-fold-CZf63cE1.js → circle-fold-DrwUHB-m.js} +2 -2
- package/dist/{circle-line-DDD6hHbp.cjs → circle-line-BsXpw2HA.cjs} +1 -1
- package/dist/{circle-line-vsuTmqx8.js → circle-line-DCUX3o9u.js} +2 -2
- package/dist/{circle-rotate-B7JrnjYG.cjs → circle-rotate-BK1tW3Jv.cjs} +1 -1
- package/dist/{circle-rotate-DDC3CKzB.js → circle-rotate-DeBqoVVp.js} +2 -2
- package/dist/{circle-spin-Djuwx9eN.js → circle-spin-Crycoffl.js} +2 -2
- package/dist/{circle-spin-CIMhAYj5.cjs → circle-spin-Ctoq0Wil.cjs} +1 -1
- package/dist/{circle-turn-DtYjq4Ky.js → circle-turn-DytKZEgU.js} +2 -2
- package/dist/{circle-turn-D1Z-dXF8.cjs → circle-turn-J9aToB75.cjs} +1 -1
- package/dist/{colorpicker-C8vbgSta.js → colorpicker-7adjGSuz.js} +7 -7
- package/dist/colorpicker.js +1 -1
- package/dist/{content-WyCTQEb9.js → content-BmwgR8WP.js} +3 -3
- package/dist/content.js +1 -1
- package/dist/{cube-BHbuhZjD.cjs → cube-BB32JJuI.cjs} +1 -1
- package/dist/{cube-dim-JK8OwqXU.cjs → cube-dim-DTcZAlcE.cjs} +1 -1
- package/dist/{cube-dim-FDQVX9Sb.js → cube-dim-DgfzlG3p.js} +2 -2
- package/dist/{cube-fold-DMmWEicy.cjs → cube-fold-CKVQ1IDZ.cjs} +1 -1
- package/dist/{cube-fold-68Pk6igJ.js → cube-fold-Dp4-pf7P.js} +2 -2
- package/dist/{cube-grid-C5ONBtr1.cjs → cube-grid-BrxyqSNh.cjs} +1 -1
- package/dist/{cube-grid-DTgwN5o-.js → cube-grid-DprxkSoT.js} +2 -2
- package/dist/{cube-BJr0a40o.js → cube-iOzgFQbc.js} +2 -2
- package/dist/{dot-bar-Ddbyx-0a.cjs → dot-bar-C2PcL7wc.cjs} +1 -1
- package/dist/{dot-bar-CXBmT1RL.js → dot-bar-vHWpqnhw.js} +2 -2
- package/dist/{dot-circle-DksscvAR.js → dot-circle-DQqpkRr_.js} +2 -2
- package/dist/{dot-circle-DxoSLiz7.cjs → dot-circle-EInrpGOw.cjs} +1 -1
- package/dist/{dot-D8taMWFZ.cjs → dot-do6V9GYP.cjs} +1 -1
- package/dist/{dot-line-CKcmWaBb.cjs → dot-line-BEFriL91.cjs} +1 -1
- package/dist/{dot-line-8Z2hpBOL.js → dot-line-CorWP6p2.js} +2 -2
- package/dist/{dot-pulse-DVwedcib.cjs → dot-pulse-BGidqqxA.cjs} +1 -1
- package/dist/{dot-pulse-BC7xaifX.js → dot-pulse-OtjDlpwG.js} +2 -2
- package/dist/{double-bounce-BVGrEHLy.js → double-bounce-CWAE4F5S.js} +2 -2
- package/dist/{double-bounce-Cxp3i6ip.cjs → double-bounce-DOehLE4X.cjs} +1 -1
- package/dist/{drop-q8qufm5t.cjs → drop-BkBi0TEt.cjs} +1 -1
- package/dist/{drop-CTufsC6T.js → drop-CTSvqyOb.js} +2 -2
- package/dist/{dropdown-B2Sk5gQF.js → dropdown-DQy4YvVn.js} +4 -4
- package/dist/dropdown.js +1 -1
- package/dist/{factory-Ce9hR27Y.js → factory-Bbul5tOL.js} +1 -1
- package/dist/{form-C0-UiXLj.js → form-DwjKUNz4.js} +3 -3
- package/dist/form.js +1 -1
- package/dist/{glass-TzHfgesD.js → glass-DKQAEAmc.js} +3 -3
- package/dist/glass.js +1 -1
- package/dist/{icon-BoaQYEij.js → icon-DSIyi1nQ.js} +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/iife/button.iife.js +1 -1
- package/dist/iife/card.iife.js +1 -1
- package/dist/iife/checkbox.iife.js +1 -1
- package/dist/iife/colorpicker.iife.js +1 -1
- package/dist/iife/content.iife.js +1 -1
- package/dist/iife/dropdown.iife.js +1 -1
- package/dist/iife/form.iife.js +1 -1
- package/dist/iife/glass.iife.js +1 -1
- package/dist/iife/icon.iife.js +1 -1
- package/dist/iife/image.iife.js +1 -1
- package/dist/iife/input.iife.js +1 -1
- package/dist/iife/link.iife.js +1 -1
- package/dist/iife/loading.iife.js +1 -1
- package/dist/iife/math.iife.js +1 -1
- package/dist/iife/mermaid.iife.js +1 -1
- package/dist/iife/message.iife.js +1 -1
- package/dist/iife/modal.iife.js +1 -1
- package/dist/iife/player.iife.js +1 -1
- package/dist/iife/popover.iife.js +1 -1
- package/dist/iife/progress.iife.js +1 -1
- package/dist/iife/radar.iife.js +1 -1
- package/dist/iife/route.iife.js +1 -1
- package/dist/iife/router.iife.js +1 -1
- package/dist/iife/scratch.iife.js +1 -1
- package/dist/iife/section.iife.js +1 -1
- package/dist/iife/select.iife.js +1 -1
- package/dist/iife/skeleton.iife.js +1 -1
- package/dist/iife/tab.iife.js +1 -1
- package/dist/iife/tabpane.iife.js +1 -1
- package/dist/iife/theme-switch.iife.js +1 -1
- package/dist/{image-CNpdv9k_.js → image-Bn0VuwO0.js} +3 -3
- package/dist/image.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.iife.js +106 -106
- package/dist/index.js +30 -30
- package/dist/{input-_iNjylVC.js → input-2Zz1gLzy.js} +4 -4
- package/dist/input.js +1 -1
- package/dist/{line-qgqu6ngc.cjs → line-BFm46PmI.cjs} +1 -1
- package/dist/{line-Bhz15vpy.js → line-Dt7YMxyn.js} +2 -2
- package/dist/{line-scale-CtMO8YfX.js → line-scale-BNCCcLKl.js} +2 -2
- package/dist/{line-scale-Dr9ILV5d.cjs → line-scale-Mzdq1fTx.cjs} +1 -1
- package/dist/{link-CmMSKe18.js → link-DcRMinJ9.js} +2 -2
- package/dist/link.js +1 -1
- package/dist/{loading-DHQDAkef.js → loading-BXZBOAbH.js} +30 -30
- package/dist/loading.js +1 -1
- package/dist/{math-DobANAnr.js → math-C6oaCrk-.js} +4 -4
- package/dist/math.js +1 -1
- package/dist/{mermaid-CwMPhttK.js → mermaid-Cmxzclzv.js} +4 -4
- package/dist/mermaid.js +1 -1
- package/dist/{message-CT-at-dX.js → message-E92Vu7SO.js} +4 -4
- package/dist/message.js +1 -1
- package/dist/{modal-COzuPRoz.cjs → modal-BQUM-5G3.cjs} +1 -1
- package/dist/{modal-DkFW7_It.js → modal-TayIRDMV.js} +3 -3
- package/dist/modal.js +1 -1
- package/dist/{pacman-DSIM9KGC.js → pacman-DqDqKzL4.js} +2 -2
- package/dist/{pacman-C7_BcAl5.cjs → pacman-hB0Vx_ut.cjs} +1 -1
- package/dist/{player-Dhv_QP4a.js → player-BZVIOmdS.js} +5 -5
- package/dist/player.js +1 -1
- package/dist/{popover-DR5ua2_I.js → popover-Bimxdeql.js} +6 -6
- package/dist/popover.js +1 -1
- package/dist/{progress-BRIBVXqD.js → progress-CNUdc_VD.js} +4 -4
- package/dist/progress.js +1 -1
- package/dist/{pulse-QISsDmFE.cjs → pulse-CPV8p0Lr.cjs} +1 -1
- package/dist/{pulse-DNmbppj-.js → pulse-IOuRzRUm.js} +2 -2
- package/dist/{radar-B9eKnRw8.js → radar-Dse0Dgma.js} +4 -4
- package/dist/radar.js +1 -1
- package/dist/{rotate-VMR047YI.cjs → rotate-O1KJozW0.cjs} +1 -1
- package/dist/{rotate-BX5qIRKZ.js → rotate-uZhtaw8R.js} +2 -2
- package/dist/{route-C9sC9d8P.js → route-Dh5S2dSW.js} +3 -3
- package/dist/route.js +1 -1
- package/dist/{router-CID9Dasr.js → router-DUxBSvIi.js} +3 -3
- package/dist/router.js +1 -1
- package/dist/{scale-out-aZu3503p.cjs → scale-out-CEERARri.cjs} +1 -1
- package/dist/{scale-out-DqffQsuL.js → scale-out-mSsKNtie.js} +2 -2
- package/dist/{scratch-y8Op8fTo.js → scratch-4TCqNbat.js} +3 -3
- package/dist/scratch.js +1 -1
- package/dist/{section-cgPwzwLR.js → section-CMN7tQ-S.js} +3 -3
- package/dist/section.js +1 -1
- package/dist/{select-Bqo_7nRL.js → select-D48kcwEy.js} +9 -9
- package/dist/select.js +1 -1
- package/dist/{skeleton-wq2ybbYv.js → skeleton-DbgMcQQ0.js} +3 -3
- package/dist/skeleton.js +1 -1
- package/dist/{solar-DaoF834l.cjs → solar-CdvkRr5X.cjs} +1 -1
- package/dist/{solar-BPmDmWLU.js → solar-Ck7RIK09.js} +2 -2
- package/dist/{square-DiBkWYAH.cjs → square-exSvykCu.cjs} +1 -1
- package/dist/{square-DKQ0d_O6.js → square-xGODzCyr.js} +2 -2
- package/dist/ssg.js +1 -1
- package/dist/{ssr-vZNJHtYm.js → ssr-BzHZ2bCe.js} +1 -1
- package/dist/ssr-stream.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/{stretch-BXJ4labN.js → stretch-Bv60MZD_.js} +2 -2
- package/dist/{stretch-LP22YEA3.cjs → stretch-CTFwefaK.cjs} +1 -1
- package/dist/{tab-DMUILL_2.js → tab-ADuziXeq.js} +3 -3
- package/dist/tab.js +1 -1
- package/dist/{tabpane-R8Kyn9jv.js → tabpane-Bisq-qpc.js} +3 -3
- package/dist/tabpane.js +1 -1
- package/dist/{text-C_XRjuGr.cjs → text-BniFEEB5.cjs} +1 -1
- package/dist/{text-8gI5TFOa.js → text-CX8UkbzB.js} +2 -2
- package/dist/{theme-DAG2-N5e.js → theme-DL6q_FZu.js} +1 -1
- package/dist/{theme-switch-D3MpVw-R.js → theme-switch-GbuiPclm.js} +4 -4
- package/dist/theme-switch.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/{triple-bounce-CMwTsw-f.js → triple-bounce-BwxTDpKz.js} +2 -2
- package/dist/{triple-bounce-CNjk5imb.cjs → triple-bounce-BzAtF-TA.cjs} +1 -1
- package/dist/{utils-DqjNwwjC.js → utils-X5_TIQTQ.js} +3 -3
- package/dist/{utils-nntJky78.js → utils-xccQZnoa.js} +29 -25
- package/package.json +2 -2
- package/dist/builder-BjRti6oP.cjs +0 -1
package/dist/iife/select.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ranui_select=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=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}};Math.PI/180,180/Math.PI,2*Math.PI;var a=(e=8)=>Math.random().toString(36).substring(2,e+2),o=typeof window<`u`,s=()=>{if(!o)return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)};Object.freeze({});var ee=e=>typeof e==`function`,c=12e4,te=`__ranuts_bridge__`,ne=`default`,re=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)}},ie=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=ne){this.targetOrigin=t,this.channel=n,this.senderId=a(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,re.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:te,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(ee(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=a(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},c),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=()=>{re.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 ie(n,t,r);if(e||=a(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new i;var l=[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],u=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new u(l[0],3609767458),new u(l[1],602891725),new u(l[2],3964484399),new u(l[3],2173295548),new u(l[4],4081628472),new u(l[5],3053834265),new u(l[6],2937671579),new u(l[7],3664609560),new u(l[8],2734883394),new u(l[9],1164996542),new u(l[10],1323610764),new u(l[11],3590304994),new u(l[12],4068182383),new u(l[13],991336113),new u(l[14],633803317),new u(l[15],3479774868),new u(l[16],2666613458),new u(l[17],944711139),new u(l[18],2341262773),new u(l[19],2007800933),new u(l[20],1495990901),new u(l[21],1856431235),new u(l[22],3175218132),new u(l[23],2198950837),new u(l[24],3999719339),new u(l[25],766784016),new u(l[26],2566594879),new u(l[27],3203337956),new u(l[28],1034457026),new u(l[29],2466948901),new u(l[30],3758326383),new u(l[31],168717936),new u(l[32],1188179964),new u(l[33],1546045734),new u(l[34],1522805485),new u(l[35],2643833823),new u(l[36],2343527390),new u(l[37],1014477480),new u(l[38],1206759142),new u(l[39],344077627),new u(l[40],1290863460),new u(l[41],3158454273),new u(l[42],3505952657),new u(l[43],106217008),new u(l[44],3606008344),new u(l[45],1432725776),new u(l[46],1467031594),new u(l[47],851169720),new u(l[48],3100823752),new u(l[49],1363258195),new u(l[50],3750685593),new u(l[51],3785050280),new u(l[52],3318307427),new u(l[53],3812723403),new u(l[54],2003034995),new u(l[55],3602036899),new u(l[56],1575990012),new u(l[57],1125592928),new u(l[58],2716904306),new u(l[59],442776044),new u(l[60],593698344),new u(l[61],3733110249),new u(l[62],2999351573),new u(l[63],3815920427),new u(3391569614,3928383900),new u(3515267271,566280711),new u(3940187606,3454069534),new u(4118630271,4000239992),new u(116418474,1914138554),new u(174292421,2731055270),new u(289380356,3203993006),new u(460393269,320620315),new u(685471733,587496836),new u(852142971,1086792851),new u(1017036298,365543100),new u(1126000580,2618297676),new u(1288033470,3409855158),new u(1501505948,4234509866),new u(1607167915,987167468),new u(1816402316,1246189591),new u(0,1),new u(0,32898),new u(2147483648,32906),new u(2147483648,2147516416),new u(0,32907),new u(0,2147483649),new u(2147483648,2147516545),new u(2147483648,32777),new u(0,138),new u(0,136),new u(0,2147516425),new u(0,2147483658),new u(0,2147516555),new u(2147483648,139),new u(2147483648,32905),new u(2147483648,32771),new u(2147483648,32770),new u(2147483648,128),new u(0,32778),new u(2147483648,2147483658),new u(2147483648,2147516545),new u(2147483648,32896),new u(0,2147483649),new u(2147483648,2147516424);var d=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},f=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},ae=/["'&<>]/;function p(e){let t=``+e,n=ae.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var oe=new Map,se=new Map,ce=`data-adopted-style`,le=`data-adopted-sheet`,ue=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},de=(e,t,n=ce)=>{if(typeof document<`u`&&t&&!ue(e,t,oe)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},fe=(e,t,n=le)=>{if(typeof document<`u`&&t&&!ue(e,t,se)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};function pe(e,t=300){let n,r=0,i=null,a=null,o=()=>{if(i=null,!a)return;let t=a,o=n;a=null,n=void 0,r=Date.now(),e.apply(o,t)},s=function(...e){let s=t-(Date.now()-r);n=this,a=e,s<=0?(i!==null&&(clearTimeout(i),i=null),o()):i===null&&(i=setTimeout(o,s))};return s.cancel=()=>{i!==null&&clearTimeout(i),i=null,a=null,n=void 0},s.pending=()=>i!==null,s}var me=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})(me),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(me);var he=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-select-host-position,relative);display:var(--ran-select-host-display,inline-block);cursor:var(--ran-select-host-cursor,pointer);height:var(--ran-select-host-height,32px);outline:var(--ran-select-host-outline,0);-webkit-tap-highlight-color:var(--ran-select-host-tap-highlight-color,transparent)}:host,:host(:focus),:host(:active){outline:var(--ran-select-host-focus-outline,0);-webkit-tap-highlight-color:transparent}:host ::slotted(r-option){display:var(--ran-select-option-display,none)}:host([disabled]){cursor:var(--ran-select-host-disabled-cursor,not-allowed);pointer-events:var(--ran-select-host-disabled-pointer-events,all);opacity:var(--ran-select-host-disabled-opacity,.6)}:host(:not([disabled]):hover) .ran-select{cursor:var(--ran-select-host-hover-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection{border:var(--ran-select-selection-hover-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):hover) .selection-search{cursor:var(--ran-select-selection-hover-search-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection-item{cursor:var(--ran-select-selection-hover-item-cursor,pointer);color:var(--ran-select-selection-hover-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host([type=text]) .selection{border:var(--ran-select-selection-text-border,none);background:var(--ran-select-selection-text-background,transparent)}:host([type=text]) .icon{display:var(--ran-select-icon-text-display,none)}:host(:not([disabled],[type=text]):focus) .selection{border:var(--ran-select-selection-focus-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):focus) .selection-search{cursor:var(--ran-select-selection-focus-search-cursor,pointer)}:host(:not([disabled],[type=text]):focus) .selection-item{cursor:var(--ran-select-selection-focus-item-cursor,pointer);color:var(--ran-select-selection-focus-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host .selection-search{display:var(--ran-select-selection-search-display,none)}:host([showSearch]:not([disabled])) .selection-search{cursor:var(--ran-select-selection-search-visible-cursor,text);display:var(--ran-select-selection-search-visible-display,block)}:host([showSearch]:not([disabled])) .selection-item{cursor:var(--ran-select-selection-search-visible-item-cursor,pointer)}:host([showSearch]:not([disabled]):focus) .selection-search{display:var(--ran-select-selection-search-visible-display,block);cursor:var(--ran-select-selection-search-visible-cursor,text);opacity:var(--ran-select-selection-search-visible-opacity,1)}.ran-select{width:var(--ran-select-root-width,100%);height:var(--ran-select-root-height,100%);font-size:var(--ran-select-root-font-size,14px);box-sizing:var(--ran-select-root-box-sizing,border-box);margin:var(--ran-select-root-margin,0);padding:var(--ran-select-root-padding,0);color:var(--ran-select-root-color,var(--ran-color-text,#000000e0));line-height:var(--ran-select-root-line-height,1.57143);list-style:var(--ran-select-root-list-style,none);font-family:var(--ran-select-root-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));position:var(--ran-select-root-position,relative);display:var(--ran-select-root-display,inline-block)}.ran-select .selection{position:var(--ran-select-selection-position,relative);background-color:var(--ran-select-selection-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-select-selection-background-image,none);border:var(--ran-select-selection-border,1px solid var(--ran-color-border,#eaeaea));transition:var(--ran-select-selection-transition,none);width:var(--ran-select-selection-width,100%);height:var(--ran-select-selection-height,100%);padding:var(--ran-select-selection-padding,0 11px);box-sizing:var(--ran-select-selection-box-sizing,border-box);margin:var(--ran-select-selection-margin,0);color:var(--ran-select-selection-color,var(--ran-color-text,#000000e0));font-size:var(--ran-select-selection-font-size,14px);line-height:var(--ran-select-selection-line-height,1.57143);list-style:var(--ran-select-selection-list-style,none);font-family:var(--ran-select-selection-font-family,inherit);display:var(--ran-select-selection-display,flex);border-radius:var(--ran-select-selection-border-radius,var(--ran-radius-sm,6px))}.ran-select .selection-search{position:var(--ran-select-selection-search-position,absolute);opacity:var(--ran-select-selection-search-opacity,0);top:var(--ran-select-selection-search-top,0);left:var(--ran-select-selection-search-left,0);height:var(--ran-select-selection-search-height,100%);margin:var(--ran-select-selection-search-margin,0);padding:var(--ran-select-selection-search-padding,0);background:var(--ran-select-selection-search-background,transparent);border:var(--ran-select-selection-search-border,none);outline:var(--ran-select-selection-search-outline,none);appearance:var(--ran-select-selection-search-appearance,none);font-family:var(--ran-select-selection-search-font-family,inherit);cursor:var(--ran-select-selection-search-cursor,not-allowed);inset-inline-start:var(--ran-select-selection-search-inset-inline-start,11px);inset-inline-end:var(--ran-select-selection-search-inset-inline-end,11px)}.ran-select .selection-search::-webkit-search-cancel-button{display:var(--ran-select-selection-search-cancel-display,none);-webkit-appearance:var(--ran-select-selection-search-cancel-appearance,none)}.ran-select .selection-search::part(input){border:var(--ran-select-selection-search-input-border,none);padding:var(--ran-select-selection-search-input-padding,0);box-sizing:border-box;outline:var(--ran-select-selection-search-input-outline,none);height:100%;min-height:100%}.ran-select .selection-search::part(input):active{border:var(--ran-select-selection-search-input-active-border,none);padding:var(--ran-select-selection-search-input-active-padding,0);height:var(--ran-select-selection-search-input-active-height,100%);outline:var(--ran-select-selection-search-input-active-outline,none);border-color:var(--ran-select-selection-search-input-active-border-color,transparent);box-shadow:var(--ran-select-selection-search-input-active-box-shadow,none);border-right-width:var(--ran-select-selection-search-input-active-border-right-width,0px)}.ran-select .selection-search::part(content){min-height:var(--ran-select-selection-search-input-content-min-height,0)}.ran-select .selection-item{position:var(--ran-select-selection-item-position,absolute);top:var(--ran-select-selection-item-top,0);left:var(--ran-select-selection-item-left,12px);right:var(--ran-select-selection-item-right,28px);margin:var(--ran-select-selection-item-margin,0);padding:var(--ran-select-selection-item-padding,0);background:var(--ran-select-selection-item-background,transparent);border:var(--ran-select-selection-item-border,none);outline:var(--ran-select-selection-item-outline,none);appearance:var(--ran-select-selection-item-appearance,none);font-family:var(--ran-select-selection-item-font-family,inherit);height:var(--ran-select-selection-item-height,100%);display:var(--ran-select-selection-item-display,flex);align-items:var(--ran-select-selection-item-align-items,center);user-select:var(--ran-select-selection-item-user-select,none);overflow:var(--ran-select-selection-item-overflow,hidden);white-space:var(--ran-select-selection-item-white-space,nowrap);text-overflow:var(--ran-select-selection-item-text-overflow,ellipsis);cursor:var(--ran-select-selection-item-cursor,pointer)}.ran-select .selection-select{color:var(--ran-select-selection-select-color,var(--ran-color-text-disabled,#00000040))}.ran-select .selection .icon{display:var(--ran-select-selection-icon-display,flex);align-items:var(--ran-select-selection-icon-align-items,center);color:var(--ran-select-selection-icon-color,var(--ran-color-text-disabled,#00000040));font-style:var(--ran-select-selection-icon-font-style,normal);text-align:var(--ran-select-selection-icon-text-align,center);text-transform:var(--ran-select-selection-icon-text-transform,none);text-rendering:var(--ran-select-selection-icon-text-rendering,optimizeLegibility);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:var(--ran-select-selection-icon-position,absolute);top:var(--ran-select-selection-icon-top,50%);height:var(--ran-select-selection-icon-height,16px);transform:var(--ran-select-selection-icon-transform,translateY(-50%));margin-top:var(--ran-select-selection-icon-margin-top,0);font-size:var(--ran-select-selection-icon-font-size,12px);pointer-events:var(--ran-select-selection-icon-pointer-events,none);inset-inline-start:var(--ran-select-selection-icon-inset-inline-start,auto);inset-inline-end:var(--ran-select-selection-icon-inset-inline-end,8px)}`,ge=r({default:()=>m}),m,_e=n((()=>{m={success:!0,_identification:!0,data:`<svg viewBox="0 0 1024 1024" width="200" height="200" version="1.1"
|
|
1
|
+
var ranui_select=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=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}};Math.PI/180,180/Math.PI,2*Math.PI;var a=(e=8)=>Math.random().toString(36).substring(2,e+2),o=typeof window<`u`,s=()=>{if(!o)return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)};Object.freeze({});var ee=e=>typeof e==`function`,c=12e4,te=`__ranuts_bridge__`,ne=`default`,re=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)}},ie=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=ne){this.targetOrigin=t,this.channel=n,this.senderId=a(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,re.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:te,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(ee(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=a(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},c),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=()=>{re.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 ie(n,t,r);if(e||=a(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new i;var l=[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],u=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new u(l[0],3609767458),new u(l[1],602891725),new u(l[2],3964484399),new u(l[3],2173295548),new u(l[4],4081628472),new u(l[5],3053834265),new u(l[6],2937671579),new u(l[7],3664609560),new u(l[8],2734883394),new u(l[9],1164996542),new u(l[10],1323610764),new u(l[11],3590304994),new u(l[12],4068182383),new u(l[13],991336113),new u(l[14],633803317),new u(l[15],3479774868),new u(l[16],2666613458),new u(l[17],944711139),new u(l[18],2341262773),new u(l[19],2007800933),new u(l[20],1495990901),new u(l[21],1856431235),new u(l[22],3175218132),new u(l[23],2198950837),new u(l[24],3999719339),new u(l[25],766784016),new u(l[26],2566594879),new u(l[27],3203337956),new u(l[28],1034457026),new u(l[29],2466948901),new u(l[30],3758326383),new u(l[31],168717936),new u(l[32],1188179964),new u(l[33],1546045734),new u(l[34],1522805485),new u(l[35],2643833823),new u(l[36],2343527390),new u(l[37],1014477480),new u(l[38],1206759142),new u(l[39],344077627),new u(l[40],1290863460),new u(l[41],3158454273),new u(l[42],3505952657),new u(l[43],106217008),new u(l[44],3606008344),new u(l[45],1432725776),new u(l[46],1467031594),new u(l[47],851169720),new u(l[48],3100823752),new u(l[49],1363258195),new u(l[50],3750685593),new u(l[51],3785050280),new u(l[52],3318307427),new u(l[53],3812723403),new u(l[54],2003034995),new u(l[55],3602036899),new u(l[56],1575990012),new u(l[57],1125592928),new u(l[58],2716904306),new u(l[59],442776044),new u(l[60],593698344),new u(l[61],3733110249),new u(l[62],2999351573),new u(l[63],3815920427),new u(3391569614,3928383900),new u(3515267271,566280711),new u(3940187606,3454069534),new u(4118630271,4000239992),new u(116418474,1914138554),new u(174292421,2731055270),new u(289380356,3203993006),new u(460393269,320620315),new u(685471733,587496836),new u(852142971,1086792851),new u(1017036298,365543100),new u(1126000580,2618297676),new u(1288033470,3409855158),new u(1501505948,4234509866),new u(1607167915,987167468),new u(1816402316,1246189591),new u(0,1),new u(0,32898),new u(2147483648,32906),new u(2147483648,2147516416),new u(0,32907),new u(0,2147483649),new u(2147483648,2147516545),new u(2147483648,32777),new u(0,138),new u(0,136),new u(0,2147516425),new u(0,2147483658),new u(0,2147516555),new u(2147483648,139),new u(2147483648,32905),new u(2147483648,32771),new u(2147483648,32770),new u(2147483648,128),new u(0,32778),new u(2147483648,2147483658),new u(2147483648,2147516545),new u(2147483648,32896),new u(0,2147483649),new u(2147483648,2147516424);var d=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},f=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},ae=/["'&<>]/;function p(e){let t=``+e,n=ae.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var oe=new Map,se=new Map,ce=`data-adopted-style`,le=`data-adopted-sheet`,ue=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},de=(e,t,n=ce)=>{if(typeof document<`u`&&t&&!ue(e,t,oe)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},fe=(e,t,n=le)=>{if(typeof document<`u`&&t&&!ue(e,t,se)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();function pe(e,t=300){let n,r=0,i=null,a=null,o=()=>{if(i=null,!a)return;let t=a,o=n;a=null,n=void 0,r=Date.now(),e.apply(o,t)},s=function(...e){let s=t-(Date.now()-r);n=this,a=e,s<=0?(i!==null&&(clearTimeout(i),i=null),o()):i===null&&(i=setTimeout(o,s))};return s.cancel=()=>{i!==null&&clearTimeout(i),i=null,a=null,n=void 0},s.pending=()=>i!==null,s}var me=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})(me),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(me);var he=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{position:var(--ran-select-host-position,relative);display:var(--ran-select-host-display,inline-block);cursor:var(--ran-select-host-cursor,pointer);height:var(--ran-select-host-height,32px);outline:var(--ran-select-host-outline,0);-webkit-tap-highlight-color:var(--ran-select-host-tap-highlight-color,transparent)}:host,:host(:focus),:host(:active){outline:var(--ran-select-host-focus-outline,0);-webkit-tap-highlight-color:transparent}:host ::slotted(r-option){display:var(--ran-select-option-display,none)}:host([disabled]){cursor:var(--ran-select-host-disabled-cursor,not-allowed);pointer-events:var(--ran-select-host-disabled-pointer-events,all);opacity:var(--ran-select-host-disabled-opacity,.6)}:host(:not([disabled]):hover) .ran-select{cursor:var(--ran-select-host-hover-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection{border:var(--ran-select-selection-hover-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):hover) .selection-search{cursor:var(--ran-select-selection-hover-search-cursor,pointer)}:host(:not([disabled],[type=text]):hover) .selection-item{cursor:var(--ran-select-selection-hover-item-cursor,pointer);color:var(--ran-select-selection-hover-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host([type=text]) .selection{border:var(--ran-select-selection-text-border,none);background:var(--ran-select-selection-text-background,transparent)}:host([type=text]) .icon{display:var(--ran-select-icon-text-display,none)}:host(:not([disabled],[type=text]):focus) .selection{border:var(--ran-select-selection-focus-border,1px solid var(--ran-color-primary,#006bff))}:host(:not([disabled],[type=text]):focus) .selection-search{cursor:var(--ran-select-selection-focus-search-cursor,pointer)}:host(:not([disabled],[type=text]):focus) .selection-item{cursor:var(--ran-select-selection-focus-item-cursor,pointer);color:var(--ran-select-selection-focus-item-color,var(--ran-color-text-disabled,#bfbfbf))}:host .selection-search{display:var(--ran-select-selection-search-display,none)}:host([showSearch]:not([disabled])) .selection-search{cursor:var(--ran-select-selection-search-visible-cursor,text);display:var(--ran-select-selection-search-visible-display,block)}:host([showSearch]:not([disabled])) .selection-item{cursor:var(--ran-select-selection-search-visible-item-cursor,pointer)}:host([showSearch]:not([disabled]):focus) .selection-search{display:var(--ran-select-selection-search-visible-display,block);cursor:var(--ran-select-selection-search-visible-cursor,text);opacity:var(--ran-select-selection-search-visible-opacity,1)}.ran-select{width:var(--ran-select-root-width,100%);height:var(--ran-select-root-height,100%);font-size:var(--ran-select-root-font-size,14px);box-sizing:var(--ran-select-root-box-sizing,border-box);margin:var(--ran-select-root-margin,0);padding:var(--ran-select-root-padding,0);color:var(--ran-select-root-color,var(--ran-color-text,#000000e0));line-height:var(--ran-select-root-line-height,1.57143);list-style:var(--ran-select-root-list-style,none);font-family:var(--ran-select-root-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));position:var(--ran-select-root-position,relative);display:var(--ran-select-root-display,inline-block)}.ran-select .selection{position:var(--ran-select-selection-position,relative);background-color:var(--ran-select-selection-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-select-selection-background-image,none);border:var(--ran-select-selection-border,1px solid var(--ran-color-border,#eaeaea));transition:var(--ran-select-selection-transition,none);width:var(--ran-select-selection-width,100%);height:var(--ran-select-selection-height,100%);padding:var(--ran-select-selection-padding,0 11px);box-sizing:var(--ran-select-selection-box-sizing,border-box);margin:var(--ran-select-selection-margin,0);color:var(--ran-select-selection-color,var(--ran-color-text,#000000e0));font-size:var(--ran-select-selection-font-size,14px);line-height:var(--ran-select-selection-line-height,1.57143);list-style:var(--ran-select-selection-list-style,none);font-family:var(--ran-select-selection-font-family,inherit);display:var(--ran-select-selection-display,flex);border-radius:var(--ran-select-selection-border-radius,var(--ran-radius-sm,6px))}.ran-select .selection-search{position:var(--ran-select-selection-search-position,absolute);opacity:var(--ran-select-selection-search-opacity,0);top:var(--ran-select-selection-search-top,0);left:var(--ran-select-selection-search-left,0);height:var(--ran-select-selection-search-height,100%);margin:var(--ran-select-selection-search-margin,0);padding:var(--ran-select-selection-search-padding,0);background:var(--ran-select-selection-search-background,transparent);border:var(--ran-select-selection-search-border,none);outline:var(--ran-select-selection-search-outline,none);appearance:var(--ran-select-selection-search-appearance,none);font-family:var(--ran-select-selection-search-font-family,inherit);cursor:var(--ran-select-selection-search-cursor,not-allowed);inset-inline-start:var(--ran-select-selection-search-inset-inline-start,11px);inset-inline-end:var(--ran-select-selection-search-inset-inline-end,11px)}.ran-select .selection-search::-webkit-search-cancel-button{display:var(--ran-select-selection-search-cancel-display,none);-webkit-appearance:var(--ran-select-selection-search-cancel-appearance,none)}.ran-select .selection-search::part(input){border:var(--ran-select-selection-search-input-border,none);padding:var(--ran-select-selection-search-input-padding,0);box-sizing:border-box;outline:var(--ran-select-selection-search-input-outline,none);height:100%;min-height:100%}.ran-select .selection-search::part(input):active{border:var(--ran-select-selection-search-input-active-border,none);padding:var(--ran-select-selection-search-input-active-padding,0);height:var(--ran-select-selection-search-input-active-height,100%);outline:var(--ran-select-selection-search-input-active-outline,none);border-color:var(--ran-select-selection-search-input-active-border-color,transparent);box-shadow:var(--ran-select-selection-search-input-active-box-shadow,none);border-right-width:var(--ran-select-selection-search-input-active-border-right-width,0px)}.ran-select .selection-search::part(content){min-height:var(--ran-select-selection-search-input-content-min-height,0)}.ran-select .selection-item{position:var(--ran-select-selection-item-position,absolute);top:var(--ran-select-selection-item-top,0);left:var(--ran-select-selection-item-left,12px);right:var(--ran-select-selection-item-right,28px);margin:var(--ran-select-selection-item-margin,0);padding:var(--ran-select-selection-item-padding,0);background:var(--ran-select-selection-item-background,transparent);border:var(--ran-select-selection-item-border,none);outline:var(--ran-select-selection-item-outline,none);appearance:var(--ran-select-selection-item-appearance,none);font-family:var(--ran-select-selection-item-font-family,inherit);height:var(--ran-select-selection-item-height,100%);display:var(--ran-select-selection-item-display,flex);align-items:var(--ran-select-selection-item-align-items,center);user-select:var(--ran-select-selection-item-user-select,none);overflow:var(--ran-select-selection-item-overflow,hidden);white-space:var(--ran-select-selection-item-white-space,nowrap);text-overflow:var(--ran-select-selection-item-text-overflow,ellipsis);cursor:var(--ran-select-selection-item-cursor,pointer)}.ran-select .selection-select{color:var(--ran-select-selection-select-color,var(--ran-color-text-disabled,#00000040))}.ran-select .selection .icon{display:var(--ran-select-selection-icon-display,flex);align-items:var(--ran-select-selection-icon-align-items,center);color:var(--ran-select-selection-icon-color,var(--ran-color-text-disabled,#00000040));font-style:var(--ran-select-selection-icon-font-style,normal);text-align:var(--ran-select-selection-icon-text-align,center);text-transform:var(--ran-select-selection-icon-text-transform,none);text-rendering:var(--ran-select-selection-icon-text-rendering,optimizeLegibility);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:var(--ran-select-selection-icon-position,absolute);top:var(--ran-select-selection-icon-top,50%);height:var(--ran-select-selection-icon-height,16px);transform:var(--ran-select-selection-icon-transform,translateY(-50%));margin-top:var(--ran-select-selection-icon-margin-top,0);font-size:var(--ran-select-selection-icon-font-size,12px);pointer-events:var(--ran-select-selection-icon-pointer-events,none);inset-inline-start:var(--ran-select-selection-icon-inset-inline-start,auto);inset-inline-end:var(--ran-select-selection-icon-inset-inline-end,8px)}`,ge=r({default:()=>m}),m,_e=n((()=>{m={success:!0,_identification:!0,data:`<svg viewBox="0 0 1024 1024" width="200" height="200" version="1.1"
|
|
2
2
|
fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path
|
|
4
4
|
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var ranui_skeleton=(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}@keyframes skeleton{0%{transform:translate(-37.5%)}to{transform:translate(37.5%)}}.ran-skeleton{z-index:0;width:100%;height:var(--ran-skeleton-height,16px);background:0 0;background:var(--ran-skeleton-background,var(--ran-gray-alpha-200,#0000000f));border-radius:var(--ran-skeleton-border-radius,var(--ran-radius-sm,6px));position:relative;overflow:hidden}.ran-skeleton:after{top:0;inset-inline-end:-150%;bottom:0;background:var(--ran-skeleton-shimmer,linear-gradient(90deg, var(--ran-gray-alpha-200,#0000000f) 25%, var(--ran-gray-alpha-500,#00000026) 37%, var(--ran-gray-alpha-200,#0000000f) 63%));animation-name:skeleton;animation-duration:var(--ran-skeleton-animation-duration,1.4s);content:"";animation-timing-function:ease;animation-iteration-count:infinite;position:absolute;inset-inline-start:-150%}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(g(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)_(e,a);c===0&&te()}}]}function f(e){let t=ee(e,!0);return h(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function h(e){s&&s.owned.push(e)}function g(e){o&&(o.sources.add(e),e.observers.add(o))}function _(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)_(t,i)}function te(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)_(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var S=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}};Math.PI/180,180/Math.PI,2*Math.PI;var C=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var w=e=>typeof e==`function`,T=12e4,E=`__ranuts_bridge__`,D=`default`,O=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)}},k=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=D){this.targetOrigin=t,this.channel=n,this.senderId=C(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,O.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:E,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(w(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=C(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},T),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=()=>{O.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 k(n,t,r);if(e||=C(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new S;var A=[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],j=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new j(A[0],3609767458),new j(A[1],602891725),new j(A[2],3964484399),new j(A[3],2173295548),new j(A[4],4081628472),new j(A[5],3053834265),new j(A[6],2937671579),new j(A[7],3664609560),new j(A[8],2734883394),new j(A[9],1164996542),new j(A[10],1323610764),new j(A[11],3590304994),new j(A[12],4068182383),new j(A[13],991336113),new j(A[14],633803317),new j(A[15],3479774868),new j(A[16],2666613458),new j(A[17],944711139),new j(A[18],2341262773),new j(A[19],2007800933),new j(A[20],1495990901),new j(A[21],1856431235),new j(A[22],3175218132),new j(A[23],2198950837),new j(A[24],3999719339),new j(A[25],766784016),new j(A[26],2566594879),new j(A[27],3203337956),new j(A[28],1034457026),new j(A[29],2466948901),new j(A[30],3758326383),new j(A[31],168717936),new j(A[32],1188179964),new j(A[33],1546045734),new j(A[34],1522805485),new j(A[35],2643833823),new j(A[36],2343527390),new j(A[37],1014477480),new j(A[38],1206759142),new j(A[39],344077627),new j(A[40],1290863460),new j(A[41],3158454273),new j(A[42],3505952657),new j(A[43],106217008),new j(A[44],3606008344),new j(A[45],1432725776),new j(A[46],1467031594),new j(A[47],851169720),new j(A[48],3100823752),new j(A[49],1363258195),new j(A[50],3750685593),new j(A[51],3785050280),new j(A[52],3318307427),new j(A[53],3812723403),new j(A[54],2003034995),new j(A[55],3602036899),new j(A[56],1575990012),new j(A[57],1125592928),new j(A[58],2716904306),new j(A[59],442776044),new j(A[60],593698344),new j(A[61],3733110249),new j(A[62],2999351573),new j(A[63],3815920427),new j(3391569614,3928383900),new j(3515267271,566280711),new j(3940187606,3454069534),new j(4118630271,4000239992),new j(116418474,1914138554),new j(174292421,2731055270),new j(289380356,3203993006),new j(460393269,320620315),new j(685471733,587496836),new j(852142971,1086792851),new j(1017036298,365543100),new j(1126000580,2618297676),new j(1288033470,3409855158),new j(1501505948,4234509866),new j(1607167915,987167468),new j(1816402316,1246189591),new j(0,1),new j(0,32898),new j(2147483648,32906),new j(2147483648,2147516416),new j(0,32907),new j(0,2147483649),new j(2147483648,2147516545),new j(2147483648,32777),new j(0,138),new j(0,136),new j(0,2147516425),new j(0,2147483658),new j(0,2147516555),new j(2147483648,139),new j(2147483648,32905),new j(2147483648,32771),new j(2147483648,32770),new j(2147483648,128),new j(0,32778),new j(2147483648,2147483658),new j(2147483648,2147516545),new j(2147483648,32896),new j(0,2147483649),new j(2147483648,2147516424);var re=/["'&<>]/;function M(e){let t=``+e,n=re.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var ie=new Map,ae=new Map,oe=`data-adopted-style`,se=`data-adopted-sheet`,N=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},P=(e,t,n=oe)=>{if(typeof document<`u`&&t&&!N(e,t,ie)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},F=(e,t,n=se)=>{if(typeof document<`u`&&t&&!N(e,t,ae)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},I=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(I),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(I);function L(e){return M(e)}var R=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,z=(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()},B=(e,t,n)=>{for(let r of e)R(r)&&(z(r,t)&&n.push(r),B(r.childrenList,t,n))},V=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?M(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return B(this.childrenList,e,t),t}},H=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 V)}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 B(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}="${L(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${L(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`?M(e):(e instanceof V,e.serialize())).join(``):a+=M(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}>`}},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 B(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${M(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?M(e):(e instanceof V,e.serialize())).join(``)}</template>`}},W=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(W(t)):e.concat(t),[]),G=e=>e==null?null:e instanceof Y?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,K=(e,t)=>{if(n){J(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=t();o();let n=document.createDocumentFragment();a=p(t=>(J(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},ce=`__ranFor`,le=e=>typeof e==`object`&&!!e&&e[ce]===!0,ue=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=G(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},q=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},de=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=G(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=ue(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();q(r,a),i=n})},fe=`__ranIndex`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=G(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},he=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=G(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(me(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}q(r,i.map(e=>e.node).filter(e=>e!=null))})},J=(e,t)=>{W(t).forEach(t=>{if(le(t)){de(e,t);return}if(pe(t)){he(e,t);return}if(typeof t==`function`){K(e,t);return}let n=G(t);n!=null&&e.appendChild(n)})},Y=class{el;constructor(e){this.el=n?new H(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return J(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ge(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ge=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return J(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},_e=e=>new Y(e),ve=()=>_e(`div`),ye=`data-ranui`,be=`data-ranui-sheet`,xe=(e,t)=>P(e,t,ye),Se=(e,t)=>F(e,t,be),X=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}}`,Ce=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||X.get(e)||e.attachShadow(n);return X.set(e,r),xe(r,t?`${t}\n${Z}`:Z),r},we=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Q=(e,t,n=``)=>e.getAttribute(t)??n,Te=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Ee=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Se(t,a)},De=new Map;function Oe(e,t){n?(De.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var ke=typeof document<`u`?HTMLElement:H,$=class extends ke{_div;_shadowDom;static get observedAttributes(){return[`sheet`]}constructor(){super(),this._shadowDom=Ce(this,t),this._div=we(this._shadowDom,`.ran-skeleton`,()=>ve().class(`ran-skeleton`).build())}get sheet(){return Q(this,`sheet`)}set sheet(e){Te(this,`sheet`,e)}handlerExternalCss=()=>{Ee(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss()}attributeChangedCallback(e,t,n){t!==n&&e===`sheet`&&this.handlerExternalCss()}};return Oe(`r-skeleton`,$),e.Skeleton=$,e.default=$,e})({});
|
|
1
|
+
var ranui_skeleton=(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}@keyframes skeleton{0%{transform:translate(-37.5%)}to{transform:translate(37.5%)}}.ran-skeleton{z-index:0;width:100%;height:var(--ran-skeleton-height,16px);background:0 0;background:var(--ran-skeleton-background,var(--ran-gray-alpha-200,#0000000f));border-radius:var(--ran-skeleton-border-radius,var(--ran-radius-sm,6px));position:relative;overflow:hidden}.ran-skeleton:after{top:0;inset-inline-end:-150%;bottom:0;background:var(--ran-skeleton-shimmer,linear-gradient(90deg, var(--ran-gray-alpha-200,#0000000f) 25%, var(--ran-gray-alpha-500,#00000026) 37%, var(--ran-gray-alpha-200,#0000000f) 63%));animation-name:skeleton;animation-duration:var(--ran-skeleton-animation-duration,1.4s);content:"";animation-timing-function:ease;animation-iteration-count:infinite;position:absolute;inset-inline-start:-150%}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(g(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)_(e,a);c===0&&te()}}]}function f(e){let t=ee(e,!0);return h(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function h(e){s&&s.owned.push(e)}function g(e){o&&(o.sources.add(e),e.observers.add(o))}function _(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)_(t,i)}function te(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)_(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var S=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}};Math.PI/180,180/Math.PI,2*Math.PI;var C=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var w=e=>typeof e==`function`,T=12e4,E=`__ranuts_bridge__`,D=`default`,O=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)}},k=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=D){this.targetOrigin=t,this.channel=n,this.senderId=C(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,O.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:E,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(w(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=C(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},T),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=()=>{O.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 k(n,t,r);if(e||=C(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new S;var A=[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],j=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new j(A[0],3609767458),new j(A[1],602891725),new j(A[2],3964484399),new j(A[3],2173295548),new j(A[4],4081628472),new j(A[5],3053834265),new j(A[6],2937671579),new j(A[7],3664609560),new j(A[8],2734883394),new j(A[9],1164996542),new j(A[10],1323610764),new j(A[11],3590304994),new j(A[12],4068182383),new j(A[13],991336113),new j(A[14],633803317),new j(A[15],3479774868),new j(A[16],2666613458),new j(A[17],944711139),new j(A[18],2341262773),new j(A[19],2007800933),new j(A[20],1495990901),new j(A[21],1856431235),new j(A[22],3175218132),new j(A[23],2198950837),new j(A[24],3999719339),new j(A[25],766784016),new j(A[26],2566594879),new j(A[27],3203337956),new j(A[28],1034457026),new j(A[29],2466948901),new j(A[30],3758326383),new j(A[31],168717936),new j(A[32],1188179964),new j(A[33],1546045734),new j(A[34],1522805485),new j(A[35],2643833823),new j(A[36],2343527390),new j(A[37],1014477480),new j(A[38],1206759142),new j(A[39],344077627),new j(A[40],1290863460),new j(A[41],3158454273),new j(A[42],3505952657),new j(A[43],106217008),new j(A[44],3606008344),new j(A[45],1432725776),new j(A[46],1467031594),new j(A[47],851169720),new j(A[48],3100823752),new j(A[49],1363258195),new j(A[50],3750685593),new j(A[51],3785050280),new j(A[52],3318307427),new j(A[53],3812723403),new j(A[54],2003034995),new j(A[55],3602036899),new j(A[56],1575990012),new j(A[57],1125592928),new j(A[58],2716904306),new j(A[59],442776044),new j(A[60],593698344),new j(A[61],3733110249),new j(A[62],2999351573),new j(A[63],3815920427),new j(3391569614,3928383900),new j(3515267271,566280711),new j(3940187606,3454069534),new j(4118630271,4000239992),new j(116418474,1914138554),new j(174292421,2731055270),new j(289380356,3203993006),new j(460393269,320620315),new j(685471733,587496836),new j(852142971,1086792851),new j(1017036298,365543100),new j(1126000580,2618297676),new j(1288033470,3409855158),new j(1501505948,4234509866),new j(1607167915,987167468),new j(1816402316,1246189591),new j(0,1),new j(0,32898),new j(2147483648,32906),new j(2147483648,2147516416),new j(0,32907),new j(0,2147483649),new j(2147483648,2147516545),new j(2147483648,32777),new j(0,138),new j(0,136),new j(0,2147516425),new j(0,2147483658),new j(0,2147516555),new j(2147483648,139),new j(2147483648,32905),new j(2147483648,32771),new j(2147483648,32770),new j(2147483648,128),new j(0,32778),new j(2147483648,2147483658),new j(2147483648,2147516545),new j(2147483648,32896),new j(0,2147483649),new j(2147483648,2147516424);var re=/["'&<>]/;function M(e){let t=``+e,n=re.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var ie=new Map,ae=new Map,oe=`data-adopted-style`,se=`data-adopted-sheet`,N=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},P=(e,t,n=oe)=>{if(typeof document<`u`&&t&&!N(e,t,ie)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},F=(e,t,n=se)=>{if(typeof document<`u`&&t&&!N(e,t,ae)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var I=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(I),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(I);function L(e){return M(e)}var R=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,z=(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()},B=(e,t,n)=>{for(let r of e)R(r)&&(z(r,t)&&n.push(r),B(r.childrenList,t,n))},V=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?M(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return B(this.childrenList,e,t),t}},H=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 V)}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 B(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}="${L(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${L(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`?M(e):(e instanceof V,e.serialize())).join(``):a+=M(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}>`}},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 B(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${M(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?M(e):(e instanceof V,e.serialize())).join(``)}</template>`}},W=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(W(t)):e.concat(t),[]),G=e=>e==null?null:e instanceof Y?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,K=(e,t)=>{if(n){J(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=t();o();let n=document.createDocumentFragment();a=p(t=>(J(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},ce=`__ranFor`,le=e=>typeof e==`object`&&!!e&&e[ce]===!0,ue=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=G(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},q=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},de=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=G(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=ue(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();q(r,a),i=n})},fe=`__ranIndex`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=G(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},he=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=G(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(me(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}q(r,i.map(e=>e.node).filter(e=>e!=null))})},J=(e,t)=>{W(t).forEach(t=>{if(le(t)){de(e,t);return}if(pe(t)){he(e,t);return}if(typeof t==`function`){K(e,t);return}let n=G(t);n!=null&&e.appendChild(n)})},Y=class{el;constructor(e){this.el=n?new H(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return J(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ge(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ge=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return J(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},_e=e=>new Y(e),ve=()=>_e(`div`),ye=`data-ranui`,be=`data-ranui-sheet`,xe=(e,t)=>P(e,t,ye),Se=(e,t)=>F(e,t,be),X=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}}`,Ce=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||X.get(e)||e.attachShadow(n);return X.set(e,r),xe(r,t?`${t}\n${Z}`:Z),r},we=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Q=(e,t,n=``)=>e.getAttribute(t)??n,Te=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Ee=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Se(t,a)},De=new Map;function Oe(e,t){n?(De.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var ke=typeof document<`u`?HTMLElement:H,$=class extends ke{_div;_shadowDom;static get observedAttributes(){return[`sheet`]}constructor(){super(),this._shadowDom=Ce(this,t),this._div=we(this._shadowDom,`.ran-skeleton`,()=>ve().class(`ran-skeleton`).build())}get sheet(){return Q(this,`sheet`)}set sheet(e){Te(this,`sheet`,e)}handlerExternalCss=()=>{Ee(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss()}attributeChangedCallback(e,t,n){t!==n&&e===`sheet`&&this.handlerExternalCss()}};return Oe(`r-skeleton`,$),e.Skeleton=$,e.default=$,e})({});
|
package/dist/iife/tab.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var ranui_tab=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=typeof document>`u`,n=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(te(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,a);c===0&&_()}}]}function f(e){let t=h(e,!0);return ee(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function h(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function ee(e){s&&s.owned.push(e)}function te(e){o&&(o.sources.add(e),e.observers.add(o))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)g(t,i)}function _(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var re=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}};Math.PI/180,180/Math.PI,2*Math.PI;var S=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var ie=e=>typeof e==`function`,ae=12e4,oe=`__ranuts_bridge__`,se=`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)}},ce=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=se){this.targetOrigin=t,this.channel=n,this.senderId=S(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:oe,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(ie(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=S(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},ae),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 ce(n,t,r);if(e||=S(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new re;var w=[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],T=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new T(w[0],3609767458),new T(w[1],602891725),new T(w[2],3964484399),new T(w[3],2173295548),new T(w[4],4081628472),new T(w[5],3053834265),new T(w[6],2937671579),new T(w[7],3664609560),new T(w[8],2734883394),new T(w[9],1164996542),new T(w[10],1323610764),new T(w[11],3590304994),new T(w[12],4068182383),new T(w[13],991336113),new T(w[14],633803317),new T(w[15],3479774868),new T(w[16],2666613458),new T(w[17],944711139),new T(w[18],2341262773),new T(w[19],2007800933),new T(w[20],1495990901),new T(w[21],1856431235),new T(w[22],3175218132),new T(w[23],2198950837),new T(w[24],3999719339),new T(w[25],766784016),new T(w[26],2566594879),new T(w[27],3203337956),new T(w[28],1034457026),new T(w[29],2466948901),new T(w[30],3758326383),new T(w[31],168717936),new T(w[32],1188179964),new T(w[33],1546045734),new T(w[34],1522805485),new T(w[35],2643833823),new T(w[36],2343527390),new T(w[37],1014477480),new T(w[38],1206759142),new T(w[39],344077627),new T(w[40],1290863460),new T(w[41],3158454273),new T(w[42],3505952657),new T(w[43],106217008),new T(w[44],3606008344),new T(w[45],1432725776),new T(w[46],1467031594),new T(w[47],851169720),new T(w[48],3100823752),new T(w[49],1363258195),new T(w[50],3750685593),new T(w[51],3785050280),new T(w[52],3318307427),new T(w[53],3812723403),new T(w[54],2003034995),new T(w[55],3602036899),new T(w[56],1575990012),new T(w[57],1125592928),new T(w[58],2716904306),new T(w[59],442776044),new T(w[60],593698344),new T(w[61],3733110249),new T(w[62],2999351573),new T(w[63],3815920427),new T(3391569614,3928383900),new T(3515267271,566280711),new T(3940187606,3454069534),new T(4118630271,4000239992),new T(116418474,1914138554),new T(174292421,2731055270),new T(289380356,3203993006),new T(460393269,320620315),new T(685471733,587496836),new T(852142971,1086792851),new T(1017036298,365543100),new T(1126000580,2618297676),new T(1288033470,3409855158),new T(1501505948,4234509866),new T(1607167915,987167468),new T(1816402316,1246189591),new T(0,1),new T(0,32898),new T(2147483648,32906),new T(2147483648,2147516416),new T(0,32907),new T(0,2147483649),new T(2147483648,2147516545),new T(2147483648,32777),new T(0,138),new T(0,136),new T(0,2147516425),new T(0,2147483658),new T(0,2147516555),new T(2147483648,139),new T(2147483648,32905),new T(2147483648,32771),new T(2147483648,32770),new T(2147483648,128),new T(0,32778),new T(2147483648,2147483658),new T(2147483648,2147516545),new T(2147483648,32896),new T(0,2147483649),new T(2147483648,2147516424);var E=/["'&<>]/;function D(e){let t=``+e,n=E.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var O=new Map,k=new Map,A=`data-adopted-style`,le=`data-adopted-sheet`,j=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ue=(e,t,n=A)=>{if(typeof document<`u`&&t&&!j(e,t,O)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},de=(e,t,n=le)=>{if(typeof document<`u`&&t&&!j(e,t,k)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},M=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})(M),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(M);function N(e){return D(e)}var P=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,F=(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()},I=(e,t,n)=>{for(let r of e)P(r)&&(F(r,t)&&n.push(r),I(r.childrenList,t,n))},L=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?D(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return I(this.childrenList,e,t),t}},R=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 z(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return I(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}="${N(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${N(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`?D(e):(e instanceof L,e.serialize())).join(``):a+=D(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}>`}},z=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 I(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${D(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?D(e):(e instanceof L,e.serialize())).join(``)}</template>`}},B=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(B(t)):e.concat(t),[]),V=e=>e==null?null:e instanceof K?e.build():typeof e==`string`?t?e:document.createTextNode(e):e,H=(e,n)=>{if(t){G(e,[n()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=n();o();let t=document.createDocumentFragment();a=p(n=>(G(t,[e]),n)),i.parentNode?.insertBefore(t,i)}),m(()=>a?.())},fe=`__ranFor`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=V(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},U=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},he=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=V(n.render(t,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=n.each()??[],t=new Map,a=[];e.forEach((e,r)=>{let o=n.key(e,r);if(t.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=me(e,r,n.render),t.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();U(r,a),i=t})},ge=`__ranIndex`,_e=e=>typeof e==`object`&&!!e&&e[ge]===!0,ve=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=V(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},W=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=V(n.render(()=>t,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=n.each()??[];for(let t=0;t<e.length;t++)t<i.length?i[t].setItem(e[t]):i.push(ve(e[t],t,n.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}U(r,i.map(e=>e.node).filter(e=>e!=null))})},G=(e,t)=>{B(t).forEach(t=>{if(pe(t)){he(e,t);return}if(_e(t)){W(e,t);return}if(typeof t==`function`){H(e,t);return}let n=V(t);n!=null&&e.appendChild(n)})},K=class{el;constructor(e){this.el=t?new R(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{t?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return G(this.el,e),this}replaceChildren(...e){if(t){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ye(this.el,t,e)}build(){return this.el}serialize(){if(t)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ye=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return G(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(t)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let n=document.createElement(`style`);return n.textContent=e,this.root.appendChild(n),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return t?this.root.serialize():this.root.innerHTML}},q=e=>new K(e),J=()=>q(`div`),be=()=>q(`slot`),xe=[!1,`false`,null,void 0],Y=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!xe.includes(n))},Se=new Map;function Ce(e,n){t?(Se.set(e,n),n.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,n)}var we=typeof document<`u`?HTMLElement:R,Te=`data-ranui`,Ee=`data-ranui-sheet`,De=(e,t)=>ue(e,t,Te),Oe=(e,t)=>de(e,t,Ee),X=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}}`,ke=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||X.get(e)||e.attachShadow(n);return X.set(e,r),De(r,t?`${t}\n${Z}`:Z),r},Ae=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Q=(e,t,n=``)=>e.getAttribute(t)??n,je=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Me=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Oe(t,a)},Ne=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-tab ::slotted(r-tab){box-sizing:border-box;text-align:start;flex-shrink:0;width:100%;height:100%;padding:10px;overflow:auto}.ran-tab-header{scroll-behavior:smooth;position:relative;overflow:hidden}.ran-tab-header-nav{flex-flow:row;justify-content:flex-start;align-items:center;display:flex}.ran-tab-header-nav::-webkit-scrollbar{display:none}.ran-tab-header-nav-item{flex-shrink:0}.ran-tab-header-nav .active{color:var(--ran-tab-active-color,var(--ran-color-primary,#006bff))}.ran-tab-header-line{background:var(--ran-tab-line-color,var(--ran-color-primary,#006bff));width:0;height:2px;transition:var(--ran-tab-line-transition,left .2s, width .2s, transform .2s);border-radius:2px;margin-top:-2px;position:absolute}.ran-tab-content{overflow:hidden}.ran-tab-content-wrap{width:100%;height:100%;transition:var(--ran-tab-content-transition,transform .2s);display:flex}:host([type=line]) .ran-tab-header-nav-item{border:1px solid #0000}:host([type=line]) .ran-tab-header-nav .active{color:var(--ran-tab-line-color,var(--ran-color-primary,#006bff));border:1px solid #0000;border-color:var(--ran-tab-border-color,var(--ran-color-border,#0003)) var(--ran-tab-border-color,var(--ran-color-border,#0003)) transparent;border-radius:var(--ran-tab-border-radius,var(--ran-radius-sm,.25em)) var(--ran-tab-border-radius,var(--ran-radius-sm,.25em)) 0 0}:host([type=line]) .ran-tab-header-line{visibility:hidden;transition:none}:host([type=line]) .ran-tab-header-line:after,:host([type=line]) .ran-tab-header-line:before{content:"";visibility:visible;background:var(--ran-tab-border-color,var(--ran-color-border,#0003));width:9999px;height:1px;position:absolute;bottom:0}:host([type=line]) .ran-tab-header-line:after{left:100%}:host([type=line]) .ran-tab-header-line:before{right:100%}:host([align=center]) .ran-tab-header-nav{justify-content:center}:host([align=center]) .ran-tab-header-line{left:50%}:host([align=end]) .ran-tab-header-nav{justify-content:flex-end}`,Pe=0,$=class extends we{static get observedAttributes(){return[`active`,`type`,`align`,`effect`,`sheet`]}_events=new n;_container;_header;_nav;_line;_content;_wrap;_slot;_shadowDom;_tabsId;tabHeaderKeyMapIndex;constructor(){super(),this._tabsId=++Pe,this._shadowDom=ke(this,Ne),this.tabHeaderKeyMapIndex={};let e=Ae(this._shadowDom,`.ran-tab`,()=>J().class(`ran-tab`).part(`tabs`).children(J().class(`ran-tab-header`).part(`header`).children(J().class(`ran-tab-header-nav`).part(`nav`),J().class(`ran-tab-header-line`).part(`indicator`)),J().class(`ran-tab-content`).part(`content`).children(J().class(`ran-tab-content-wrap`).part(`content-wrap`).children(be()))).build());this._container=e,this._header=e.querySelector(`.ran-tab-header`),this._nav=e.querySelector(`.ran-tab-header-nav`),this._line=e.querySelector(`.ran-tab-header-line`),this._content=e.querySelector(`.ran-tab-content`),this._wrap=e.querySelector(`.ran-tab-content-wrap`),this._slot=e.querySelector(`slot`),this._nav.setAttribute(`role`,`tablist`)}get align(){return Q(this,`align`,`start`)}set align(e){this.setAttribute(`align`,e)}get type(){return Q(this,`type`,`flat`)}set type(e){this.setAttribute(`type`,e)}get active(){return this.getAttribute(`active`)}set active(e){e?(this.setAttribute(`active`,e),this.setTabLine(e),this.setTabContent(e),this.syncTabsAria()):this.removeAttribute(`active`)}get effect(){return this.getAttribute(`effect`)}set effect(e){!e||e===`false`?this.removeAttribute(`effect`):this.setAttribute(`effect`,e)}get sheet(){return Q(this,`sheet`)}set sheet(e){je(this,`sheet`,e)}handlerExternalCss=()=>{Me(this,this._shadowDom,`sheet`,null,this.sheet)};initTabHeaderKeyMapIndex=(e,t)=>{if(this.tabHeaderKeyMapIndex[e])throw Error(`tab 组件的 key 值存在重复,或者某个 tab 组件缺少 key 属性`);this.tabHeaderKeyMapIndex[e]=t};createTabHeader(e,t){let n=e.getAttribute(`label`)||``,r=e.getAttribute(`icon`)||``,i=e.getAttribute(`iconSize`)||``,a=e.getAttribute(`r-key`)||`${t}`,o=e.getAttribute(`type`)||`text`;this.initTabHeaderKeyMapIndex(a,t);let s=q(`r-button`).class(`tab-header-nav-item`).attr(`type`,o).attr(`r-key`,a).text(n);return r&&s.attr(`icon`,r),i&&s.attr(`iconSize`,i),Y(e)&&s.attr(`disabled`,``),this.effect&&(e.setAttribute(`effect`,this.effect),this._line.style.setProperty(`display`,`none`)),e.setAttribute(`r-key`,a),s.build()}initTabLineAlignCenter=()=>{let{length:e}=this._nav.children,t=0;for(let n=0;n<e;n++){let{width:e=0}=this._nav.children[n].getBoundingClientRect();t+=e}this._line.style.setProperty(`left`,`calc(50% - ${t/2}px)`)};initTabLineAlignEnd=()=>{let{length:e}=this._nav.children,t=0;for(let n=0;n<e;n++){let{width:e=0}=this._nav.children[n].getBoundingClientRect();t+=e}this._line.style.setProperty(`left`,`calc(100% - ${t}px)`)};setTabLine=e=>{if(e){let t=this.tabHeaderKeyMapIndex[e],{width:n=0}=this._nav.children[t].getBoundingClientRect();this._line.style.setProperty(`width`,`${n}px`);let r=0;for(let e=0;e<t;e++){let{width:t=0}=this._nav.children[e].getBoundingClientRect();r+=t}this._line.style.setProperty(`transform`,`translateX(${r}px)`)}};setTabContent=e=>{if(e){let t=this.tabHeaderKeyMapIndex[e];this._wrap.style.setProperty(`transform`,`translateX(${t*-100}%)`)}};clickTabHead=e=>{let t=e.currentTarget??e.target,n=t.getAttribute(`r-key`);!Y(t)&&n&&this.activateKey(n)};activateKey=e=>{this.setAttribute(`active`,e),this.setTabLine(e),this.setTabContent(e),this._nav.querySelectorAll(`.active`).forEach(e=>e.classList.remove(`active`));let t=this.tabHeaderKeyMapIndex[e];this._nav.children[t]?.classList.add(`active`),this.syncTabsAria()};tabFocusable=e=>e._btn??e;tabIdFor=e=>`ran-tab-${this._tabsId}-${e}`;panelIdFor=e=>`ran-tabpanel-${this._tabsId}-${e}`;syncTabsAria=()=>{let e=this.active,t=this._slot?.assignedElements?.()??[];[...this._nav.children].forEach((n,r)=>{let i=n.getAttribute(`r-key`)??`${r}`,a=i===e,o=Y(n),s=this.tabFocusable(n);s.setAttribute(`role`,`tab`),s.id=this.tabIdFor(i),s.setAttribute(`aria-controls`,this.panelIdFor(i)),s.setAttribute(`aria-selected`,a?`true`:`false`),s.tabIndex=a&&!o?0:-1;let c=t[r];c&&(c.setAttribute(`role`,`tabpanel`),c.id=this.panelIdFor(i),c.setAttribute(`aria-labelledby`,this.tabIdFor(i)),c.setAttribute(`tabindex`,a?`0`:`-1`),a?c.removeAttribute(`aria-hidden`):c.setAttribute(`aria-hidden`,`true`))})};onNavKeydown=e=>{if(![`ArrowRight`,`ArrowLeft`,`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=[...this._nav.children].filter(e=>!Y(e));if(!t.length)return;let n=e.target?.closest?.(`.tab-header-nav-item`)??e.target,r=t.findIndex(e=>e===n);r<0&&(r=t.findIndex(e=>e.getAttribute(`r-key`)===this.active)),r<0&&(r=0);let i=r;e.key===`ArrowRight`||e.key===`ArrowDown`?i=(r+1)%t.length:e.key===`ArrowLeft`||e.key===`ArrowUp`?i=(r-1+t.length)%t.length:e.key===`Home`?i=0:e.key===`End`&&(i=t.length-1),e.preventDefault();let a=t[i].getAttribute(`r-key`);a&&(this.activateKey(a),this.tabFocusable(t[i]).focus())};updateAttribute=(e,t,n=``)=>{let r=this.tabHeaderKeyMapIndex[e];e&&n&&this._nav.children[r]?this._nav.children[r]?.setAttribute(t,n):this._nav.children[r]?.removeAttribute(t)};initActive=()=>{let e=[...this._nav.children],t=e.filter(e=>!Y(e)),n;if(this.active!=null&&(n=t.find(e=>e.getAttribute(`r-key`)===this.active),n?.setAttribute(`r-key`,this.active)),n||=t.shift(),!n)return;let r=e.findIndex(e=>e===n),i=n?.getAttribute(`r-key`)||`${r}`;i!=null&&(this.setAttribute(`active`,`${i}`),n.classList.add(`active`),this.setTabContent(i),setTimeout(()=>{this.setTabLine(i)},200))};listenSlotChange=()=>{this._slot.assignedElements().forEach((e,t)=>{let n=this.createTabHeader(e,t);this._nav.appendChild(n),n.addEventListener(`click`,this.clickTabHead)}),this.initActive(),this.syncTabsAria(),this.align&&(this.align===`center`&&this.initTabLineAlignCenter(),this.align===`end`&&this.initTabLineAlignEnd())};connectedCallback(){this.handlerExternalCss(),this._events.on(this._slot,`slotchange`,this.listenSlotChange),this._events.on(this._nav,`keydown`,this.onNavKeydown)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.dispatchEvent(new CustomEvent(`change`,{detail:{active:this.active}})),e===`align`&&(n===`center`&&this.initTabLineAlignCenter(),n===`end`&&this.initTabLineAlignEnd()),e===`effect`&&[...this._nav.children].forEach(e=>{!this.effect||this.effect===`false`?e.removeAttribute(`effect`):e.setAttribute(`effect`,n)}),e===`active`&&this.setAttribute(e,n),e===`sheet`&&this.handlerExternalCss())}};return Ce(`r-tabs`,$),e.Tabs=$,e.default=$,e})({});
|
|
1
|
+
var ranui_tab=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=typeof document>`u`,n=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(te(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,a);c===0&&_()}}]}function f(e){let t=h(e,!0);return ee(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function h(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function ee(e){s&&s.owned.push(e)}function te(e){o&&(o.sources.add(e),e.observers.add(o))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)g(t,i)}function _(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var re=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}};Math.PI/180,180/Math.PI,2*Math.PI;var S=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var ie=e=>typeof e==`function`,ae=12e4,oe=`__ranuts_bridge__`,se=`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)}},ce=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=se){this.targetOrigin=t,this.channel=n,this.senderId=S(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:oe,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(ie(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=S(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},ae),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 ce(n,t,r);if(e||=S(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new re;var w=[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],T=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new T(w[0],3609767458),new T(w[1],602891725),new T(w[2],3964484399),new T(w[3],2173295548),new T(w[4],4081628472),new T(w[5],3053834265),new T(w[6],2937671579),new T(w[7],3664609560),new T(w[8],2734883394),new T(w[9],1164996542),new T(w[10],1323610764),new T(w[11],3590304994),new T(w[12],4068182383),new T(w[13],991336113),new T(w[14],633803317),new T(w[15],3479774868),new T(w[16],2666613458),new T(w[17],944711139),new T(w[18],2341262773),new T(w[19],2007800933),new T(w[20],1495990901),new T(w[21],1856431235),new T(w[22],3175218132),new T(w[23],2198950837),new T(w[24],3999719339),new T(w[25],766784016),new T(w[26],2566594879),new T(w[27],3203337956),new T(w[28],1034457026),new T(w[29],2466948901),new T(w[30],3758326383),new T(w[31],168717936),new T(w[32],1188179964),new T(w[33],1546045734),new T(w[34],1522805485),new T(w[35],2643833823),new T(w[36],2343527390),new T(w[37],1014477480),new T(w[38],1206759142),new T(w[39],344077627),new T(w[40],1290863460),new T(w[41],3158454273),new T(w[42],3505952657),new T(w[43],106217008),new T(w[44],3606008344),new T(w[45],1432725776),new T(w[46],1467031594),new T(w[47],851169720),new T(w[48],3100823752),new T(w[49],1363258195),new T(w[50],3750685593),new T(w[51],3785050280),new T(w[52],3318307427),new T(w[53],3812723403),new T(w[54],2003034995),new T(w[55],3602036899),new T(w[56],1575990012),new T(w[57],1125592928),new T(w[58],2716904306),new T(w[59],442776044),new T(w[60],593698344),new T(w[61],3733110249),new T(w[62],2999351573),new T(w[63],3815920427),new T(3391569614,3928383900),new T(3515267271,566280711),new T(3940187606,3454069534),new T(4118630271,4000239992),new T(116418474,1914138554),new T(174292421,2731055270),new T(289380356,3203993006),new T(460393269,320620315),new T(685471733,587496836),new T(852142971,1086792851),new T(1017036298,365543100),new T(1126000580,2618297676),new T(1288033470,3409855158),new T(1501505948,4234509866),new T(1607167915,987167468),new T(1816402316,1246189591),new T(0,1),new T(0,32898),new T(2147483648,32906),new T(2147483648,2147516416),new T(0,32907),new T(0,2147483649),new T(2147483648,2147516545),new T(2147483648,32777),new T(0,138),new T(0,136),new T(0,2147516425),new T(0,2147483658),new T(0,2147516555),new T(2147483648,139),new T(2147483648,32905),new T(2147483648,32771),new T(2147483648,32770),new T(2147483648,128),new T(0,32778),new T(2147483648,2147483658),new T(2147483648,2147516545),new T(2147483648,32896),new T(0,2147483649),new T(2147483648,2147516424);var E=/["'&<>]/;function D(e){let t=``+e,n=E.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var O=new Map,k=new Map,A=`data-adopted-style`,le=`data-adopted-sheet`,j=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ue=(e,t,n=A)=>{if(typeof document<`u`&&t&&!j(e,t,O)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},de=(e,t,n=le)=>{if(typeof document<`u`&&t&&!j(e,t,k)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var M=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})(M),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(M);function N(e){return D(e)}var P=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,F=(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()},I=(e,t,n)=>{for(let r of e)P(r)&&(F(r,t)&&n.push(r),I(r.childrenList,t,n))},L=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?D(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return I(this.childrenList,e,t),t}},R=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 z(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return I(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}="${N(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${N(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`?D(e):(e instanceof L,e.serialize())).join(``):a+=D(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}>`}},z=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 I(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${D(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?D(e):(e instanceof L,e.serialize())).join(``)}</template>`}},B=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(B(t)):e.concat(t),[]),V=e=>e==null?null:e instanceof K?e.build():typeof e==`string`?t?e:document.createTextNode(e):e,H=(e,n)=>{if(t){G(e,[n()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=n();o();let t=document.createDocumentFragment();a=p(n=>(G(t,[e]),n)),i.parentNode?.insertBefore(t,i)}),m(()=>a?.())},fe=`__ranFor`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=V(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},U=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},he=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=V(n.render(t,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=n.each()??[],t=new Map,a=[];e.forEach((e,r)=>{let o=n.key(e,r);if(t.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=me(e,r,n.render),t.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();U(r,a),i=t})},ge=`__ranIndex`,_e=e=>typeof e==`object`&&!!e&&e[ge]===!0,ve=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=V(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},W=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=V(n.render(()=>t,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=n.each()??[];for(let t=0;t<e.length;t++)t<i.length?i[t].setItem(e[t]):i.push(ve(e[t],t,n.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}U(r,i.map(e=>e.node).filter(e=>e!=null))})},G=(e,t)=>{B(t).forEach(t=>{if(pe(t)){he(e,t);return}if(_e(t)){W(e,t);return}if(typeof t==`function`){H(e,t);return}let n=V(t);n!=null&&e.appendChild(n)})},K=class{el;constructor(e){this.el=t?new R(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{t?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return G(this.el,e),this}replaceChildren(...e){if(t){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ye(this.el,t,e)}build(){return this.el}serialize(){if(t)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ye=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return G(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(t)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let n=document.createElement(`style`);return n.textContent=e,this.root.appendChild(n),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return t?this.root.serialize():this.root.innerHTML}},q=e=>new K(e),J=()=>q(`div`),be=()=>q(`slot`),xe=[!1,`false`,null,void 0],Y=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!xe.includes(n))},Se=new Map;function Ce(e,n){t?(Se.set(e,n),n.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,n)}var we=typeof document<`u`?HTMLElement:R,Te=`data-ranui`,Ee=`data-ranui-sheet`,De=(e,t)=>ue(e,t,Te),Oe=(e,t)=>de(e,t,Ee),X=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}}`,ke=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||X.get(e)||e.attachShadow(n);return X.set(e,r),De(r,t?`${t}\n${Z}`:Z),r},Ae=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Q=(e,t,n=``)=>e.getAttribute(t)??n,je=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Me=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Oe(t,a)},Ne=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}.ran-tab ::slotted(r-tab){box-sizing:border-box;text-align:start;flex-shrink:0;width:100%;height:100%;padding:10px;overflow:auto}.ran-tab-header{scroll-behavior:smooth;position:relative;overflow:hidden}.ran-tab-header-nav{flex-flow:row;justify-content:flex-start;align-items:center;display:flex}.ran-tab-header-nav::-webkit-scrollbar{display:none}.ran-tab-header-nav-item{flex-shrink:0}.ran-tab-header-nav .active{color:var(--ran-tab-active-color,var(--ran-color-primary,#006bff))}.ran-tab-header-line{background:var(--ran-tab-line-color,var(--ran-color-primary,#006bff));width:0;height:2px;transition:var(--ran-tab-line-transition,left .2s, width .2s, transform .2s);border-radius:2px;margin-top:-2px;position:absolute}.ran-tab-content{overflow:hidden}.ran-tab-content-wrap{width:100%;height:100%;transition:var(--ran-tab-content-transition,transform .2s);display:flex}:host([type=line]) .ran-tab-header-nav-item{border:1px solid #0000}:host([type=line]) .ran-tab-header-nav .active{color:var(--ran-tab-line-color,var(--ran-color-primary,#006bff));border:1px solid #0000;border-color:var(--ran-tab-border-color,var(--ran-color-border,#0003)) var(--ran-tab-border-color,var(--ran-color-border,#0003)) transparent;border-radius:var(--ran-tab-border-radius,var(--ran-radius-sm,.25em)) var(--ran-tab-border-radius,var(--ran-radius-sm,.25em)) 0 0}:host([type=line]) .ran-tab-header-line{visibility:hidden;transition:none}:host([type=line]) .ran-tab-header-line:after,:host([type=line]) .ran-tab-header-line:before{content:"";visibility:visible;background:var(--ran-tab-border-color,var(--ran-color-border,#0003));width:9999px;height:1px;position:absolute;bottom:0}:host([type=line]) .ran-tab-header-line:after{left:100%}:host([type=line]) .ran-tab-header-line:before{right:100%}:host([align=center]) .ran-tab-header-nav{justify-content:center}:host([align=center]) .ran-tab-header-line{left:50%}:host([align=end]) .ran-tab-header-nav{justify-content:flex-end}`,Pe=0,$=class extends we{static get observedAttributes(){return[`active`,`type`,`align`,`effect`,`sheet`]}_events=new n;_container;_header;_nav;_line;_content;_wrap;_slot;_shadowDom;_tabsId;tabHeaderKeyMapIndex;constructor(){super(),this._tabsId=++Pe,this._shadowDom=ke(this,Ne),this.tabHeaderKeyMapIndex={};let e=Ae(this._shadowDom,`.ran-tab`,()=>J().class(`ran-tab`).part(`tabs`).children(J().class(`ran-tab-header`).part(`header`).children(J().class(`ran-tab-header-nav`).part(`nav`),J().class(`ran-tab-header-line`).part(`indicator`)),J().class(`ran-tab-content`).part(`content`).children(J().class(`ran-tab-content-wrap`).part(`content-wrap`).children(be()))).build());this._container=e,this._header=e.querySelector(`.ran-tab-header`),this._nav=e.querySelector(`.ran-tab-header-nav`),this._line=e.querySelector(`.ran-tab-header-line`),this._content=e.querySelector(`.ran-tab-content`),this._wrap=e.querySelector(`.ran-tab-content-wrap`),this._slot=e.querySelector(`slot`),this._nav.setAttribute(`role`,`tablist`)}get align(){return Q(this,`align`,`start`)}set align(e){this.setAttribute(`align`,e)}get type(){return Q(this,`type`,`flat`)}set type(e){this.setAttribute(`type`,e)}get active(){return this.getAttribute(`active`)}set active(e){e?(this.setAttribute(`active`,e),this.setTabLine(e),this.setTabContent(e),this.syncTabsAria()):this.removeAttribute(`active`)}get effect(){return this.getAttribute(`effect`)}set effect(e){!e||e===`false`?this.removeAttribute(`effect`):this.setAttribute(`effect`,e)}get sheet(){return Q(this,`sheet`)}set sheet(e){je(this,`sheet`,e)}handlerExternalCss=()=>{Me(this,this._shadowDom,`sheet`,null,this.sheet)};initTabHeaderKeyMapIndex=(e,t)=>{if(this.tabHeaderKeyMapIndex[e])throw Error(`tab 组件的 key 值存在重复,或者某个 tab 组件缺少 key 属性`);this.tabHeaderKeyMapIndex[e]=t};createTabHeader(e,t){let n=e.getAttribute(`label`)||``,r=e.getAttribute(`icon`)||``,i=e.getAttribute(`iconSize`)||``,a=e.getAttribute(`r-key`)||`${t}`,o=e.getAttribute(`type`)||`text`;this.initTabHeaderKeyMapIndex(a,t);let s=q(`r-button`).class(`tab-header-nav-item`).attr(`type`,o).attr(`r-key`,a).text(n);return r&&s.attr(`icon`,r),i&&s.attr(`iconSize`,i),Y(e)&&s.attr(`disabled`,``),this.effect&&(e.setAttribute(`effect`,this.effect),this._line.style.setProperty(`display`,`none`)),e.setAttribute(`r-key`,a),s.build()}initTabLineAlignCenter=()=>{let{length:e}=this._nav.children,t=0;for(let n=0;n<e;n++){let{width:e=0}=this._nav.children[n].getBoundingClientRect();t+=e}this._line.style.setProperty(`left`,`calc(50% - ${t/2}px)`)};initTabLineAlignEnd=()=>{let{length:e}=this._nav.children,t=0;for(let n=0;n<e;n++){let{width:e=0}=this._nav.children[n].getBoundingClientRect();t+=e}this._line.style.setProperty(`left`,`calc(100% - ${t}px)`)};setTabLine=e=>{if(e){let t=this.tabHeaderKeyMapIndex[e],{width:n=0}=this._nav.children[t].getBoundingClientRect();this._line.style.setProperty(`width`,`${n}px`);let r=0;for(let e=0;e<t;e++){let{width:t=0}=this._nav.children[e].getBoundingClientRect();r+=t}this._line.style.setProperty(`transform`,`translateX(${r}px)`)}};setTabContent=e=>{if(e){let t=this.tabHeaderKeyMapIndex[e];this._wrap.style.setProperty(`transform`,`translateX(${t*-100}%)`)}};clickTabHead=e=>{let t=e.currentTarget??e.target,n=t.getAttribute(`r-key`);!Y(t)&&n&&this.activateKey(n)};activateKey=e=>{this.setAttribute(`active`,e),this.setTabLine(e),this.setTabContent(e),this._nav.querySelectorAll(`.active`).forEach(e=>e.classList.remove(`active`));let t=this.tabHeaderKeyMapIndex[e];this._nav.children[t]?.classList.add(`active`),this.syncTabsAria()};tabFocusable=e=>e._btn??e;tabIdFor=e=>`ran-tab-${this._tabsId}-${e}`;panelIdFor=e=>`ran-tabpanel-${this._tabsId}-${e}`;syncTabsAria=()=>{let e=this.active,t=this._slot?.assignedElements?.()??[];[...this._nav.children].forEach((n,r)=>{let i=n.getAttribute(`r-key`)??`${r}`,a=i===e,o=Y(n),s=this.tabFocusable(n);s.setAttribute(`role`,`tab`),s.id=this.tabIdFor(i),s.setAttribute(`aria-controls`,this.panelIdFor(i)),s.setAttribute(`aria-selected`,a?`true`:`false`),s.tabIndex=a&&!o?0:-1;let c=t[r];c&&(c.setAttribute(`role`,`tabpanel`),c.id=this.panelIdFor(i),c.setAttribute(`aria-labelledby`,this.tabIdFor(i)),c.setAttribute(`tabindex`,a?`0`:`-1`),a?c.removeAttribute(`aria-hidden`):c.setAttribute(`aria-hidden`,`true`))})};onNavKeydown=e=>{if(![`ArrowRight`,`ArrowLeft`,`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=[...this._nav.children].filter(e=>!Y(e));if(!t.length)return;let n=e.target?.closest?.(`.tab-header-nav-item`)??e.target,r=t.findIndex(e=>e===n);r<0&&(r=t.findIndex(e=>e.getAttribute(`r-key`)===this.active)),r<0&&(r=0);let i=r;e.key===`ArrowRight`||e.key===`ArrowDown`?i=(r+1)%t.length:e.key===`ArrowLeft`||e.key===`ArrowUp`?i=(r-1+t.length)%t.length:e.key===`Home`?i=0:e.key===`End`&&(i=t.length-1),e.preventDefault();let a=t[i].getAttribute(`r-key`);a&&(this.activateKey(a),this.tabFocusable(t[i]).focus())};updateAttribute=(e,t,n=``)=>{let r=this.tabHeaderKeyMapIndex[e];e&&n&&this._nav.children[r]?this._nav.children[r]?.setAttribute(t,n):this._nav.children[r]?.removeAttribute(t)};initActive=()=>{let e=[...this._nav.children],t=e.filter(e=>!Y(e)),n;if(this.active!=null&&(n=t.find(e=>e.getAttribute(`r-key`)===this.active),n?.setAttribute(`r-key`,this.active)),n||=t.shift(),!n)return;let r=e.findIndex(e=>e===n),i=n?.getAttribute(`r-key`)||`${r}`;i!=null&&(this.setAttribute(`active`,`${i}`),n.classList.add(`active`),this.setTabContent(i),setTimeout(()=>{this.setTabLine(i)},200))};listenSlotChange=()=>{this._slot.assignedElements().forEach((e,t)=>{let n=this.createTabHeader(e,t);this._nav.appendChild(n),n.addEventListener(`click`,this.clickTabHead)}),this.initActive(),this.syncTabsAria(),this.align&&(this.align===`center`&&this.initTabLineAlignCenter(),this.align===`end`&&this.initTabLineAlignEnd())};connectedCallback(){this.handlerExternalCss(),this._events.on(this._slot,`slotchange`,this.listenSlotChange),this._events.on(this._nav,`keydown`,this.onNavKeydown)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.dispatchEvent(new CustomEvent(`change`,{detail:{active:this.active}})),e===`align`&&(n===`center`&&this.initTabLineAlignCenter(),n===`end`&&this.initTabLineAlignEnd()),e===`effect`&&[...this._nav.children].forEach(e=>{!this.effect||this.effect===`false`?e.removeAttribute(`effect`):e.setAttribute(`effect`,n)}),e===`active`&&this.setAttribute(e,n),e===`sheet`&&this.handlerExternalCss())}};return Ce(`r-tabs`,$),e.Tabs=$,e.default=$,e})({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var ranui_tabpane=(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}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},i=0,a=1,o=2,s=null,c=null,l=0,u=new Set,d=!1;function f(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(_(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)v(e,o);l===0&&te()}}]}function p(e){let t=ee(e,!0);return g(t),b(t),()=>S(t)}function m(e){let t={owned:[],cleanups:[],owner:c},n=c,r=s;c=t,s=null;try{return e(()=>ne(t))}finally{c=n,s=r}}function h(e){c&&c.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:o,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:c}}function g(e){c&&c.owned.push(e)}function _(e){s&&(s.sources.add(e),e.observers.add(s))}function v(e,t){if(e.disposed||e.state>=t)return;let n=e.state===i;if(e.state=t,e.isEffect)u.add(e);else if(n)for(let t of e.observers)v(t,a)}function te(){if(!(l>0||d)){d=!0;try{for(;u.size>0;){let e=[...u];u.clear();for(let t of e)t.disposed||y(t)}}finally{d=!1}}}function y(e){if(!(e.disposed||e.state===i)){if(e.state===a)for(let t of e.sources)`fn`in t&&y(t);e.state===o&&b(e),e.state=i}}function b(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);x(e);let t=s,n=c;s=e,c=e,e.running=!0,e.state=i;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)v(t,o)}}finally{e.running=!1,s=t,c=n}}function x(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function S(e){e.disposed||(e.disposed=!0,x(e),e.observers.clear())}function ne(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var C=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}};Math.PI/180,180/Math.PI,2*Math.PI;var w=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var T=e=>typeof e==`function`,E=12e4,D=`__ranuts_bridge__`,O=`default`,k=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)}},A=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=O){this.targetOrigin=t,this.channel=n,this.senderId=w(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,k.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:D,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(T(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=w(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},E),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=()=>{k.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 A(n,t,r);if(e||=w(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new C;var j=[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(j[0],3609767458),new M(j[1],602891725),new M(j[2],3964484399),new M(j[3],2173295548),new M(j[4],4081628472),new M(j[5],3053834265),new M(j[6],2937671579),new M(j[7],3664609560),new M(j[8],2734883394),new M(j[9],1164996542),new M(j[10],1323610764),new M(j[11],3590304994),new M(j[12],4068182383),new M(j[13],991336113),new M(j[14],633803317),new M(j[15],3479774868),new M(j[16],2666613458),new M(j[17],944711139),new M(j[18],2341262773),new M(j[19],2007800933),new M(j[20],1495990901),new M(j[21],1856431235),new M(j[22],3175218132),new M(j[23],2198950837),new M(j[24],3999719339),new M(j[25],766784016),new M(j[26],2566594879),new M(j[27],3203337956),new M(j[28],1034457026),new M(j[29],2466948901),new M(j[30],3758326383),new M(j[31],168717936),new M(j[32],1188179964),new M(j[33],1546045734),new M(j[34],1522805485),new M(j[35],2643833823),new M(j[36],2343527390),new M(j[37],1014477480),new M(j[38],1206759142),new M(j[39],344077627),new M(j[40],1290863460),new M(j[41],3158454273),new M(j[42],3505952657),new M(j[43],106217008),new M(j[44],3606008344),new M(j[45],1432725776),new M(j[46],1467031594),new M(j[47],851169720),new M(j[48],3100823752),new M(j[49],1363258195),new M(j[50],3750685593),new M(j[51],3785050280),new M(j[52],3318307427),new M(j[53],3812723403),new M(j[54],2003034995),new M(j[55],3602036899),new M(j[56],1575990012),new M(j[57],1125592928),new M(j[58],2716904306),new M(j[59],442776044),new M(j[60],593698344),new M(j[61],3733110249),new M(j[62],2999351573),new M(j[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 re=/["'&<>]/;function N(e){let t=``+e,n=re.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var ie=new Map,ae=new Map,oe=`data-adopted-style`,se=`data-adopted-sheet`,P=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},F=(e,t,n=oe)=>{if(typeof document<`u`&&t&&!P(e,t,ie)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},I=(e,t,n=se)=>{if(typeof document<`u`&&t&&!P(e,t,ae)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},L=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})(L),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(L);function R(e){return N(e)}var z=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,B=(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()},V=(e,t,n)=>{for(let r of e)z(r)&&(B(r,t)&&n.push(r),V(r.childrenList,t,n))},H=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?N(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return V(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 H)}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 W(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return V(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}="${R(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${R(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`?N(e):(e instanceof H,e.serialize())).join(``):a+=N(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}>`}},W=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 V(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${N(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?N(e):(e instanceof H,e.serialize())).join(``)}</template>`}},G=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(G(t)):e.concat(t),[]),K=e=>e==null?null:e instanceof Y?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ce=(e,t)=>{if(n){J(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};p(()=>{let e=t();o();let n=document.createDocumentFragment();a=m(t=>(J(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),h(()=>a?.())},le=`__ranFor`,ue=e=>typeof e==`object`&&!!e&&e[le]===!0,de=(e,t,n)=>{let[r,i]=f(t),a=null,o=m(t=>{let i=K(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},q=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},fe=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=K(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;h(()=>{for(let e of i.values())e.dispose();i.clear()}),p(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=de(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();q(r,a),i=n})},pe=`__ranIndex`,me=e=>typeof e==`object`&&!!e&&e[pe]===!0,he=(e,t,n)=>{let[r,i]=f(e),a=null,o=m(e=>{let i=K(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},ge=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=K(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];h(()=>{for(let e of i)e.dispose();i=[]}),p(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(he(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}q(r,i.map(e=>e.node).filter(e=>e!=null))})},J=(e,t)=>{G(t).forEach(t=>{if(ue(t)){fe(e,t);return}if(me(t)){ge(e,t);return}if(typeof t==`function`){ce(e,t);return}let n=K(t);n!=null&&e.appendChild(n)})},Y=class{el;constructor(e){this.el=n?new U(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?p(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return J(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new _e(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}},_e=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return J(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},ve=e=>new Y(e),ye=()=>ve(`slot`),be=new Map;function xe(e,t){n?(be.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Se=typeof document<`u`?HTMLElement:U,Ce=`data-ranui`,X=`data-ranui-sheet`,we=(e,t)=>F(e,t,Ce),Te=(e,t)=>I(e,t,X),Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Ee=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),we(r,t?`${t}\n${Q}`:Q),r},De=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Oe=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},ke=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Te(t,a)},$=class extends Se{static get observedAttributes(){return[`label`,`key`,`disabled`,`icon`,`effect`,`iconSize`,`sheet`]}_events=new r;_div;parent;_shadowDom;constructor(){super(),this._shadowDom=Ee(this,t);let e=De(this._shadowDom,`slot`,()=>ye().part(`content`).build());this._div=e}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)}set icon(e){!e||e===`false`?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get iconSize(){return this.getAttribute(`iconSize`)}set iconSize(e){!e||e===`false`?this.removeAttribute(`iconSize`):this.setAttribute(`iconSize`,e)}get key(){return this.getAttribute(`r-key`)}set key(e){e?this.setAttribute(`r-key`,e):this.removeAttribute(`r-key`)}get disabled(){return this.getAttribute(`disabled`)}set disabled(e){!e||e===`false`?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,e)}get effect(){return this.getAttribute(`effect`)}set effect(e){!e||e===`false`?this.removeAttribute(`effect`):this.setAttribute(`effect`,e)}get sheet(){return this.getAttribute(`sheet`)}set sheet(e){Oe(this,`sheet`,e)}handlerExternalCss=()=>{ke(this,this._shadowDom,`sheet`,null,this.sheet)};initAttribute=()=>{this.parent=this.parentNode,this.key&&(this.parent?.updateAttribute(this.key,`icon`,this.icon),this.parent?.updateAttribute(this.key,`iconSize`,this.iconSize),this.parent?.updateAttribute(this.key,`effect`,this.effect))};connectedCallback(){this.handlerExternalCss(),this._events.on(document,`DOMContentLoaded`,this.initAttribute)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.key&&this.parent?.updateAttribute&&(e===`icon`&&this.parent?.updateAttribute(this.key,`icon`,n),e===`iconSize`&&this.parent?.updateAttribute(this.key,`iconSize`,n),e===`effect`&&this.parent?.updateAttribute(this.key,`effect`,n),e===`disabled`&&this.parent?.updateAttribute(this.key,`disabled`,n)),e===`sheet`&&this.handlerExternalCss())}};return xe(`r-tab`,$),e.TabPane=$,e.default=$,e})({});
|
|
1
|
+
var ranui_tabpane=(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}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},i=0,a=1,o=2,s=null,c=null,l=0,u=new Set,d=!1;function f(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(_(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)v(e,o);l===0&&te()}}]}function p(e){let t=ee(e,!0);return g(t),b(t),()=>S(t)}function m(e){let t={owned:[],cleanups:[],owner:c},n=c,r=s;c=t,s=null;try{return e(()=>ne(t))}finally{c=n,s=r}}function h(e){c&&c.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:o,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:c}}function g(e){c&&c.owned.push(e)}function _(e){s&&(s.sources.add(e),e.observers.add(s))}function v(e,t){if(e.disposed||e.state>=t)return;let n=e.state===i;if(e.state=t,e.isEffect)u.add(e);else if(n)for(let t of e.observers)v(t,a)}function te(){if(!(l>0||d)){d=!0;try{for(;u.size>0;){let e=[...u];u.clear();for(let t of e)t.disposed||y(t)}}finally{d=!1}}}function y(e){if(!(e.disposed||e.state===i)){if(e.state===a)for(let t of e.sources)`fn`in t&&y(t);e.state===o&&b(e),e.state=i}}function b(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);x(e);let t=s,n=c;s=e,c=e,e.running=!0,e.state=i;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)v(t,o)}}finally{e.running=!1,s=t,c=n}}function x(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function S(e){e.disposed||(e.disposed=!0,x(e),e.observers.clear())}function ne(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var C=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}};Math.PI/180,180/Math.PI,2*Math.PI;var w=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var T=e=>typeof e==`function`,E=12e4,D=`__ranuts_bridge__`,O=`default`,k=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)}},A=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=O){this.targetOrigin=t,this.channel=n,this.senderId=w(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,k.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:D,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(T(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=w(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},E),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=()=>{k.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 A(n,t,r);if(e||=w(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new C;var j=[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(j[0],3609767458),new M(j[1],602891725),new M(j[2],3964484399),new M(j[3],2173295548),new M(j[4],4081628472),new M(j[5],3053834265),new M(j[6],2937671579),new M(j[7],3664609560),new M(j[8],2734883394),new M(j[9],1164996542),new M(j[10],1323610764),new M(j[11],3590304994),new M(j[12],4068182383),new M(j[13],991336113),new M(j[14],633803317),new M(j[15],3479774868),new M(j[16],2666613458),new M(j[17],944711139),new M(j[18],2341262773),new M(j[19],2007800933),new M(j[20],1495990901),new M(j[21],1856431235),new M(j[22],3175218132),new M(j[23],2198950837),new M(j[24],3999719339),new M(j[25],766784016),new M(j[26],2566594879),new M(j[27],3203337956),new M(j[28],1034457026),new M(j[29],2466948901),new M(j[30],3758326383),new M(j[31],168717936),new M(j[32],1188179964),new M(j[33],1546045734),new M(j[34],1522805485),new M(j[35],2643833823),new M(j[36],2343527390),new M(j[37],1014477480),new M(j[38],1206759142),new M(j[39],344077627),new M(j[40],1290863460),new M(j[41],3158454273),new M(j[42],3505952657),new M(j[43],106217008),new M(j[44],3606008344),new M(j[45],1432725776),new M(j[46],1467031594),new M(j[47],851169720),new M(j[48],3100823752),new M(j[49],1363258195),new M(j[50],3750685593),new M(j[51],3785050280),new M(j[52],3318307427),new M(j[53],3812723403),new M(j[54],2003034995),new M(j[55],3602036899),new M(j[56],1575990012),new M(j[57],1125592928),new M(j[58],2716904306),new M(j[59],442776044),new M(j[60],593698344),new M(j[61],3733110249),new M(j[62],2999351573),new M(j[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 re=/["'&<>]/;function N(e){let t=``+e,n=re.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var ie=new Map,ae=new Map,oe=`data-adopted-style`,se=`data-adopted-sheet`,P=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},F=(e,t,n=oe)=>{if(typeof document<`u`&&t&&!P(e,t,ie)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},I=(e,t,n=se)=>{if(typeof document<`u`&&t&&!P(e,t,ae)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var L=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})(L),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(L);function R(e){return N(e)}var z=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,B=(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()},V=(e,t,n)=>{for(let r of e)z(r)&&(B(r,t)&&n.push(r),V(r.childrenList,t,n))},H=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?N(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return V(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 H)}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 W(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return V(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}="${R(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${R(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`?N(e):(e instanceof H,e.serialize())).join(``):a+=N(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}>`}},W=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 V(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${N(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?N(e):(e instanceof H,e.serialize())).join(``)}</template>`}},G=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(G(t)):e.concat(t),[]),K=e=>e==null?null:e instanceof Y?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ce=(e,t)=>{if(n){J(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};p(()=>{let e=t();o();let n=document.createDocumentFragment();a=m(t=>(J(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),h(()=>a?.())},le=`__ranFor`,ue=e=>typeof e==`object`&&!!e&&e[le]===!0,de=(e,t,n)=>{let[r,i]=f(t),a=null,o=m(t=>{let i=K(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},q=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},fe=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=K(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;h(()=>{for(let e of i.values())e.dispose();i.clear()}),p(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=de(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();q(r,a),i=n})},pe=`__ranIndex`,me=e=>typeof e==`object`&&!!e&&e[pe]===!0,he=(e,t,n)=>{let[r,i]=f(e),a=null,o=m(e=>{let i=K(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},ge=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=K(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];h(()=>{for(let e of i)e.dispose();i=[]}),p(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(he(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}q(r,i.map(e=>e.node).filter(e=>e!=null))})},J=(e,t)=>{G(t).forEach(t=>{if(ue(t)){fe(e,t);return}if(me(t)){ge(e,t);return}if(typeof t==`function`){ce(e,t);return}let n=K(t);n!=null&&e.appendChild(n)})},Y=class{el;constructor(e){this.el=n?new U(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?p(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return J(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new _e(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}},_e=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return J(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},ve=e=>new Y(e),ye=()=>ve(`slot`),be=new Map;function xe(e,t){n?(be.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Se=typeof document<`u`?HTMLElement:U,Ce=`data-ranui`,X=`data-ranui-sheet`,we=(e,t)=>F(e,t,Ce),Te=(e,t)=>I(e,t,X),Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Ee=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),we(r,t?`${t}\n${Q}`:Q),r},De=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Oe=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},ke=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Te(t,a)},$=class extends Se{static get observedAttributes(){return[`label`,`key`,`disabled`,`icon`,`effect`,`iconSize`,`sheet`]}_events=new r;_div;parent;_shadowDom;constructor(){super(),this._shadowDom=Ee(this,t);let e=De(this._shadowDom,`slot`,()=>ye().part(`content`).build());this._div=e}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)}set icon(e){!e||e===`false`?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get iconSize(){return this.getAttribute(`iconSize`)}set iconSize(e){!e||e===`false`?this.removeAttribute(`iconSize`):this.setAttribute(`iconSize`,e)}get key(){return this.getAttribute(`r-key`)}set key(e){e?this.setAttribute(`r-key`,e):this.removeAttribute(`r-key`)}get disabled(){return this.getAttribute(`disabled`)}set disabled(e){!e||e===`false`?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,e)}get effect(){return this.getAttribute(`effect`)}set effect(e){!e||e===`false`?this.removeAttribute(`effect`):this.setAttribute(`effect`,e)}get sheet(){return this.getAttribute(`sheet`)}set sheet(e){Oe(this,`sheet`,e)}handlerExternalCss=()=>{ke(this,this._shadowDom,`sheet`,null,this.sheet)};initAttribute=()=>{this.parent=this.parentNode,this.key&&(this.parent?.updateAttribute(this.key,`icon`,this.icon),this.parent?.updateAttribute(this.key,`iconSize`,this.iconSize),this.parent?.updateAttribute(this.key,`effect`,this.effect))};connectedCallback(){this.handlerExternalCss(),this._events.on(document,`DOMContentLoaded`,this.initAttribute)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.key&&this.parent?.updateAttribute&&(e===`icon`&&this.parent?.updateAttribute(this.key,`icon`,n),e===`iconSize`&&this.parent?.updateAttribute(this.key,`iconSize`,n),e===`effect`&&this.parent?.updateAttribute(this.key,`effect`,n),e===`disabled`&&this.parent?.updateAttribute(this.key,`disabled`,n)),e===`sheet`&&this.handlerExternalCss())}};return xe(`r-tab`,$),e.TabPane=$,e.default=$,e})({});
|