@yoyaflow/yoya-ui 0.3.2 → 0.4.0
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/README.md +407 -124
- package/README.zh-CN.md +375 -131
- package/dist/yoya.core.chunk.js +4275 -0
- package/dist/yoya.core.chunk.min.js +9 -0
- package/dist/yoya.core.js +3 -1779
- package/dist/yoya.core.min.js +1 -0
- package/dist/yoya.devtools.js +3 -0
- package/dist/yoya.devtools.min.js +1 -0
- package/dist/yoya.echart.js +182 -592
- package/dist/yoya.echart.min.js +1 -0
- package/dist/yoya.router.full.js +5271 -0
- package/dist/yoya.router.full.min.js +43 -0
- package/dist/yoya.router.js +1330 -0
- package/dist/yoya.router.min.js +35 -0
- package/dist/yoya.three.js +360 -0
- package/dist/yoya.three.min.js +1 -0
- package/dist/yoya.ui-router.full.js +21843 -0
- package/dist/yoya.ui-router.full.min.js +43 -0
- package/dist/yoya.ui-router.umd.js +43 -0
- package/dist/yoya.ui-router.umd.min.js +43 -0
- package/dist/yoya.ui.css +80 -0
- package/dist/yoya.ui.full.js +20169 -0
- package/dist/yoya.ui.full.min.js +1 -0
- package/dist/yoya.ui.js +12227 -9083
- package/dist/yoya.ui.min.js +1 -0
- package/package.json +27 -11
- package/types/core.d.ts +122 -1
- package/types/data-display.d.ts +44 -2
- package/types/devtools.d.ts +156 -0
- package/types/feedback.d.ts +13 -0
- package/types/form.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/ssr.d.ts +27 -7
- package/types/three.d.ts +77 -0
- package/types/yoya.devtools.d.ts +5 -0
- package/types/yoya.router.d.ts +7 -0
- package/types/yoya.three.d.ts +4 -0
- package/types/yoya.ui-router.d.ts +19 -0
- package/types/yoya.ui.d.ts +2 -7
- package/dist/yoya-ui.umd.js +0 -35
- package/dist/yoya.ssr.js +0 -2856
- package/types/yoya.ssr.d.ts +0 -9
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
let e=null,t=null;function n(e){if(!e)return null;if(typeof e==`object`&&e.code)return{code:e.code,level:e.level===`write`?`write`:`read`};let t=String(e).trim();return t?t.startsWith(`w.`)?{code:t.slice(2),level:`write`}:t.startsWith(`r.`)?{code:t.slice(2),level:`read`}:{code:t,level:`write`}:null}function r(e){let t=n(e);return t?t.code:String(e??``)}function i({permissions:e=[],roles:t=[],superAdmins:n=[`super_admin`]}={}){let i={permissions:[...e||[]],roles:[...t||[]],superAdmins:[...n||[]]},a=new Set(i.permissions),o=new Set,s=()=>i.superAdmins.some(e=>i.roles.includes(e));function c(e,t){return s()?!0:t===`write`?a.has(`w.${e}`)||a.has(e):a.has(`r.${e}`)||a.has(`w.${e}`)||a.has(e)}function l(e,t){return c(r(e),t)}let u={roles(){return i.roles.slice()},permissions(){return i.permissions.slice()},isSuper:s,has(e){let t=r(e);return s()||a.has(`r.${t}`)||a.has(`w.${t}`)||a.has(t)},canRead(e){return l(e,`read`)},canWrite(e){return l(e,`write`)},setPermissions(e){return i.permissions=[...e||[]],a.clear(),(e||[]).forEach(e=>a.add(e)),o.forEach(e=>e()),u},subscribe(e){return o.add(e),()=>o.delete(e)}};return u}function a(t,n){let r=e;e=t||r;try{return n()}finally{e=r}}function o(e){return t=e||null,t}function s(){return e||t}const c=Symbol.for(`yoya.devtools.bridge`);function l(){return typeof globalThis>`u`?null:globalThis[c]||null}function u(){let e=l();return e?e.enabled():!1}function d(e){let t=l();t&&t.emit(e)}function f(e){let t=l();t&&t.unregister(e)}function p(e){let t=l();t&&t.captureScope(e)}function m(e){let t=l();return t?t.ensureId(e):void 0}function h(e,t,n){let r=l();r&&r.notify(e,t,n)}function g(e){let t=l();t&&t.commit(e)}const _=new Set([`checked`,`disabled`,`readonly`,`selected`]),v=new Set([`input`,`select`,`textarea`,`button`,`fieldset`,`option`,`optgroup`,`keygen`]),y=new Set([`input`,`textarea`]),b=[];function x(){return b.length>0?b[b.length-1]:null}function S(e,t){b.push(e);try{return t()}finally{b.pop()}}let C=null;function w(e,t){let n=C;C=e;try{return t()}finally{C=n}}function T(e,t,n,r){if(!C)throw TypeError(`vStateNode binding scope required for function value (${e}${t?` "${t}"`:``})`);let i=C;i.bindings.push({commit:r,committed:!1,evaluate:()=>n(i.getState()),key:t,kind:e,last:void 0})}const E=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function D(e){return typeof e==`string`?document.querySelector(e):e}function O(e){return String(e).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function ee(e){return _.has(e)}function k(e,t,n){if(n==null||n===!1){if(e.removeAttribute(t),t in e)try{e[t]=!1}catch{}return}if(n===!0||ee(t)){if(e.setAttribute(t,t),t in e)try{e[t]=!0}catch{}return}if(e.setAttribute(t,String(n)),t in e)try{e[t]=n}catch{}}function te(e){return Object.entries(e).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${ne(e)}:${O(t)}`).join(`; `)}function ne(e){return String(e).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function re(e,t){return e===t?!0:!e||!t||typeof e!=`object`||typeof t!=`object`?!1:!!e.capture==!!t.capture&&!!e.once==!!t.once&&!!e.passive==!!t.passive}var A=class e{constructor(e=null){this._children=[],this._childKeys=new Map,this._events=new Map,this._domAdapters=new Map,this._cleanup=[],this._states={},this._stateTypes={},this._stateHandlers=new Map,this._pendingRemovals=new Set,this._childrenDirty=!1,this._deleted=!1,this._access=null,this._accessContext=s(),u()&&p(this),e!==null&&this.setup(e)}setup(t){return typeof t==`function`?t(this):t instanceof e?this.child(t):typeof t==`string`||typeof t==`number`?this.text(t):t&&typeof t==`object`&&this._setupObject(t),this}access(e){let t=n(e);return this._access=t?{code:t.code,level:`write`}:null,this}_permissionState(){let e=this._access??x();if(!e)return`active`;let t=this._accessContext||s();return t?t.canRead(e.code)?e.level===`write`&&!t.canWrite(e.code)?`readonly`:`active`:`hidden`:`active`}_applyAccessState(e){}_setupObject(e){e.children&&this.child(e.children)}children(){return[...this._children]}clearChildren(){let e=this._el&&u()&&!this._devtoolsRendering?this._children.map(e=>m(e)):[];return this._dropChildKeys(this._children),this._children.forEach(e=>{this._pendingRemovals.add(e)}),this._children=[],this._childrenDirty=!0,e.length>0&&!this._devtoolsRendering&&h(this,`child`,{removed:e}),this}addChild(e,t){let n=String(e);if(this._childKeys.has(n))throw TypeError(`duplicate key "${n}"`);let r=oe(this,t);if(this._childKeys.set(n,r),typeof r.attr==`function`&&r.attr(`data-row-key`,n),this._pendingRemovals.delete(r),this._children.push(r),this._childrenDirty=!0,this._el){let e=S(this._access??x(),()=>r.renderDom());e&&e.parentNode!==this._el&&this._el.appendChild(e),u()&&!this._devtoolsRendering&&h(this,`child`,{added:[m(r)]})}return this}getChild(e){return this._childKeys.get(String(e))||null}removeChild(e){let t=String(e),n=this._childKeys.get(t);if(!n)return this;this._childKeys.delete(t);let r=this._children.indexOf(n);r!==-1&&this._children.splice(r,1),this._childrenDirty=!0;let i=this._el&&u()&&!this._devtoolsRendering?m(n):null;return n.destroy(),i!==null&&h(this,`child`,{removed:[i]}),this}_dropChildKeys(e){let t=new Set(e);this._childKeys.forEach((e,n)=>{t.has(e)&&this._childKeys.delete(n)})}child(...e){return e.flat(1/0).forEach(e=>{if(e==null)return;let t=oe(this,e);this._pendingRemovals.delete(t),this._children.push(t),this._childrenDirty=!0}),this}text(e){return this.child(new j(e))}on(e,t,n){if(typeof t!=`function`)throw TypeError(`ViewNode event handler must be a function`);let r=this._events.get(e);return this._events.set(e,{handler:t,options:n}),this._el&&this._bindDomAdapter(e,r?.options,n),this}off(e){this._events.delete(e);let t=this._domAdapters.get(e);return t&&(t.cleanup(),this._removeCleanup(t.cleanup),this._domAdapters.delete(e)),this}_bindDomAdapter(e,t,n){let r=this._domAdapters.get(e);if(r){if(re(t,n))return;r.cleanup(),this._removeCleanup(r.cleanup),this._domAdapters.delete(e)}let i=t=>{let n=this._events.get(e);!n||typeof n.handler!=`function`||(n.handler.call(this,t),n.options?.once&&this.off(e))},a=()=>{this._el&&this._el.removeEventListener(e,i,n)};this._el.addEventListener(e,i,n),this._domAdapters.set(e,{cleanup:a}),this._cleanup.push(a)}_removeCleanup(e){let t=this._cleanup.indexOf(e);t!==-1&&this._cleanup.splice(t,1)}registerStateAttrs(...e){return e.forEach(e=>{if(typeof e==`string`){this._stateTypes[e]=`boolean`;return}e&&typeof e==`object`&&Object.entries(e).forEach(([e,t])=>{this._stateTypes[e]=t||`boolean`})}),this}registerStateHandler(e,t){return this._stateHandlers.has(e)||this._stateHandlers.set(e,[]),this._stateHandlers.get(e).push(t),this}setState(e,t=!0){let n=this._states[e];return this._states[e]=t,(this._stateHandlers.get(e)||[]).forEach(e=>e(t,this,n)),this}getState(e){return this._states[e]}getBooleanState(e){return!!this.getState(e)}getStringState(e){let t=this.getState(e);return t==null?``:String(t)}getNumberState(e){return Number(this.getState(e)||0)}renderDom(){return null}commit(){return this.renderDom()}_commitChildren(){this._pendingRemovals.forEach(e=>e.destroy()),this._pendingRemovals.clear(),this._childrenDirty=!1}bindTo(e){let t=D(e),n=this.renderDom();return t&&n&&t.appendChild(n),this}destroy(){return u()&&(d({type:`destroy`,node:this}),f(this)),this._deleted=!0,this._cleanup.forEach(e=>e()),this._cleanup=[],this._children.forEach(e=>e.destroy()),this._pendingRemovals.forEach(e=>e.destroy()),this._pendingRemovals.clear(),this._children=[],this._childKeys.clear(),this._el?.parentNode&&this._el.parentNode.removeChild(this._el),this}toHTML(){return``}hydrateSnapshot(){return this}},j=class extends A{constructor(e=``){if(super(null),this._content=``,this._textNode=null,typeof e==`function`){T(`text`,null,e,e=>this.textContent(e));return}this._content=String(e)}textContent(e){if(e===void 0)return this._content;if(typeof e==`function`)return T(`text`,null,e,e=>this.textContent(e)),this;let t=this._content;return this._content=String(e),this._textNode&&(this._textNode.textContent=this._content),this._textNode&&u()&&!Object.is(t,this._content)&&h(this,`text`,{from:t,to:this._content}),this}renderDom(){return this._deleted||this._permissionState()===`hidden`?null:(this._textNode||(this._textNode=document.createTextNode(this._content),this._el=this._textNode),this._textNode)}toHTML(){return this._deleted||this._permissionState()===`hidden`?``:O(this._content)}},M=class extends A{constructor(e){super(null),this._component=e,this._resolved=null,this._resolvedList=null,this._roots=null,this._fragmentDom=null}_resolve(){if(this._resolvedList)return this._resolved;let e=a(this._accessContext||s(),()=>typeof this._component==`function`?this._component():this._component.render()),t=Array.isArray(e)?e.slice():[e],n=ae(this._component),r=this._owner?` It was added as a child of ${ie(this._owner)}.`:``;return t.forEach(e=>{if(!(e instanceof A))throw TypeError(`Component render must return a ViewNode or an array of ViewNodes. render() of ${n} returned ${ie(e)}.${r} If render() returns a component object (for example vPagination({ ... })), attach it with parent.child(...) instead of returning it directly.`)}),this._resolvedList=t,this._resolved=t[0]||null,this._roots=Array.isArray(e)?t:null,this._component&&typeof this._component==`object`&&typeof this._component._attachHost==`function`&&this._component._attachHost(this),this._resolved}_resolveList(){return this._resolve(),this._resolvedList||[]}_replaceResolved(e){let t=this._resolvedList||[],n=Array.isArray(e)?e.slice():[e];if(n.forEach(e=>{if(!(e instanceof A))throw TypeError(`Component render must return a ViewNode or an array of ViewNodes`)}),t.length===n.length&&t.every((e,t)=>e===n[t]))return;let r=[];if(this._fragmentDom&&this._fragmentDom.length>0)r.push(...this._fragmentDom);else if(t.length>0){let e=t[0]._el;e&&e.parentNode&&r.push(e)}if(this._resolvedList=n,this._resolved=n[0]||null,this._roots=Array.isArray(e)?n:null,this._fragmentDom=null,r.length===0){t.forEach(e=>e.destroy());return}let i=x(),a=r[0].parentNode,o=[];n.forEach(e=>{let t=S(this._access??i,()=>e.renderDom());t&&o.push(t)}),o.length>0&&a&&o.forEach(e=>a.insertBefore(e,r[0])),r.forEach(e=>{e.parentNode===a&&a.removeChild(e)}),this._roots?this._fragmentDom=o:this._el=o[0]||null,t.forEach(e=>e.destroy())}children(){return this._resolvedList?this._roots?this._resolvedList.flatMap(e=>e.children()):this._resolvedList[0]?this._resolvedList[0].children():[]:[]}textContent(){return this._resolveList().map(e=>typeof e.textContent==`function`?e.textContent():``).join(``)}renderDom(){if(this._deleted||this._permissionState()===`hidden`)return null;let e=x(),t=this._resolveList();if(this._roots){if(this._fragmentDom)return null;let n=[];t.forEach(t=>{let r=S(this._access??e,()=>t.renderDom());r&&n.push(r)}),this._fragmentDom=n;let r=document.createDocumentFragment();return n.forEach(e=>r.appendChild(e)),r}let n=t[0];return S(this._access??e,()=>{let e=n.renderDom();return this._el=e,e})}toHTML(){if(this._deleted||this._permissionState()===`hidden`)return``;let e=x(),t=this._resolveList();return S(this._access??e,()=>t.map(e=>e.toHTML()).join(``))}destroy(){return this._component&&typeof this._component==`object`&&typeof this._component.destroy==`function`&&this._component.destroy(),(this._resolvedList||[]).forEach(e=>e.destroy()),this._fragmentDom=null,super.destroy()}};function N(e=``){return new j(e)}function ie(e){if(e==null||typeof e==`boolean`)return String(e);if(typeof e==`string`||typeof e==`number`)return`${typeof e} ${JSON.stringify(e)}`;if(typeof e==`function`)return`function ${e.name||`(anonymous)`}`;if(e instanceof A){let t=typeof e._tagName==`string`?` <${e._tagName}>`:``;return`${e.constructor.name}${t}`}return e&&typeof e.render==`function`?`component object${e.constructor&&e.constructor!==Object?` ${e.constructor.name}`:``} with render()`:`${e&&e.constructor&&e.constructor!==Object?e.constructor.name:`Object`} instance`}function ae(e){return typeof e==`function`?`function ${e.name||`(anonymous)`}`:e&&typeof e==`object`?`component object${typeof e.render==`function`&&e.render.name?` (render ${e.render.name})`:``}`:String(e)}function oe(e,t){try{let n=se(t);return n._owner===void 0&&(n._owner=e),n}catch(n){throw n instanceof TypeError&&String(n.message).startsWith(`ViewNode child must`)?TypeError(`Invalid child for ${ie(e)}: ${n.message} (received ${ie(t)}). child() accepts a ViewNode, a component object with render(), a function, a string, or a number.`,{cause:n}):n}}function se(e){if(e instanceof A)return e;if(typeof e==`function`||e&&typeof e==`object`&&typeof e.render==`function`)return new M(e);if(typeof e==`string`||typeof e==`number`)return new j(e);throw TypeError(`ViewNode child must be a ViewNode, component, string, or number`)}function ce(e=null,t=null,n=null){return typeof t==`function`&&n==null?{first:e,options:null,callback:t}:{first:e,options:t,callback:n}}function le(e,t){return!t||typeof t!=`object`||Array.isArray(t)?e:(t.attrs&&typeof e.attr==`function`&&e.attr(t.attrs),t.style&&typeof e.styles==`function`&&e.styles(t.style),e)}var P=class extends A{constructor(e,t=null){super(null),this._tagName=e,this._attrs={},this._styles={},this._classes=new Set,this._el=null,t!==null&&this.setup(t)}_setupObject(e){Object.entries(e).forEach(([e,t])=>{if(e===`class`||e===`className`){this.className(t);return}if(e===`attrs`){this.attr(t);return}if(e===`style`){this.styles(t);return}if(e===`children`){this.child(t);return}if(e.startsWith(`on`)&&typeof t==`function`){this.on(e.slice(2).toLowerCase(),t);return}if(typeof this[e]==`function`){this[e](t);return}typeof t!=`function`&&this.attr(e,t)})}tagName(){return this._tagName}textContent(){return this._children.map(e=>typeof e.textContent==`function`?e.textContent():``).join(``)}attr(e,t){if(t===void 0&&typeof e==`string`)return this._attrs[e];if(e&&typeof e==`object`)return Object.entries(e).forEach(([e,t])=>this.attr(e,t)),this;if(typeof t==`function`)return T(`attr`,e,t,t=>this.attr(e,t)),this;let n=this._attrs[e];return t==null||t===!1?delete this._attrs[e]:this._attrs[e]=t,this._el&&k(this._el,e,t),this._el&&u()&&!this._devtoolsRendering&&!Object.is(n,t)&&h(this,`attr`,{name:e,previous:n,next:t}),this}id(e){return e===void 0?this.attr(`id`):this.attr(`id`,e)}name(e){return e===void 0?this.attr(`name`):this.attr(`name`,e)}className(...e){return e.length===0?[...this._classes].join(` `):(e.flat(1/0).forEach(e=>{e&&String(e).split(/\s+/).filter(Boolean).forEach(e=>this._classes.add(e))}),this._syncClassName(),this)}class(...e){return this.className(...e)}replaceClassName(e,t,n=!1){return!e||!t||e===t?this:this._classes.has(e)?(this._classes.delete(e),this.className(t)):n?this.className(t):this}style(e,t){if(t===void 0&&typeof e==`string`)return this._styles[e];if(e&&typeof e==`object`)return this.styles(e);if(typeof t==`function`)return T(`style`,e,t,t=>this.style(e,t)),this;let n=this._styles[e];return t==null||t===``?delete this._styles[e]:this._styles[e]=t,this._el&&(this._el.style[e]=t||``),this._el&&u()&&!this._devtoolsRendering&&!Object.is(n,t)&&h(this,`style`,{name:e,previous:n,next:t}),this}styles(e){return Object.entries(e||{}).forEach(([e,t])=>this.style(e,t)),this}child(...e){let t=this._el&&u()&&!this._devtoolsRendering?[]:null;return e.flat(1/0).forEach(e=>{if(e==null)return;let n=oe(this,e);if(this._pendingRemovals.delete(n),this._children.push(n),this._childrenDirty=!0,this._el){let e=S(this._access??x(),()=>n.renderDom());e&&e.parentNode!==this._el&&this._el.appendChild(e),t&&t.push(m(n))}}),t&&t.length>0&&h(this,`child`,{added:t}),this}_applyAccessState(e){if(e===`readonly`){this._accessAttrsApplied=!0;let e=this._tagName;v.has(e)&&this.attr(`disabled`,!0),y.has(e)&&this.attr(`readonly`,!0),this.attr(`aria-disabled`,`true`);return}this._accessAttrsApplied&&(this._accessAttrsApplied=!1,this.attr(`disabled`,null),this.attr(`readonly`,null),this.attr(`aria-disabled`,null))}renderDom(){if(this._deleted)return null;let e=this._permissionState();if(e===`hidden`)return null;let t=this._access??x();u()&&(this._devtoolsRendering=!0);try{return this._el||(this._el=document.createElement(this._tagName),S(t,()=>this._applySnapshotToElement())),this._applyAccessState(e),this._commitChildren(),this._children.forEach(e=>{S(t,()=>{let t=e.renderDom();t&&t.parentNode!==this._el?this._el.appendChild(t):!t&&e._el&&e._el.parentNode===this._el&&this._el.removeChild(e._el)})}),u()&&g(this),this._el}finally{this._devtoolsRendering=!1}}toHTML(){if(this._deleted)return``;let e=this._permissionState();return e===`hidden`?``:(this._applyAccessState(e),S(this._access??x(),()=>{let e=this._serializeAttributes(),t=e?`<${this._tagName} ${e}>`:`<${this._tagName}>`;return E.has(this._tagName)?t:`${t}${this._children.map(e=>e.toHTML()).join(``)}</${this._tagName}>`}))}_applyBindingsToElement(){Object.entries(this._attrs).forEach(([e,t])=>k(this._el,e,t)),this._syncClassName(),Object.entries(this._styles).forEach(([e,t])=>{this._el.style[e]=t}),this._events.forEach((e,t)=>{this._bindDomAdapter(t,void 0,e.options)})}_applySnapshotToElement(){this._applyBindingsToElement(),this._children.forEach(e=>{let t=e.renderDom();t&&this._el.appendChild(t)})}_syncClassName(){let e=this._attrs.class,t=[...this._classes].join(` `);t?this._attrs.class=t:delete this._attrs.class,this._el&&(t?this._el.className=t:this._el.removeAttribute(`class`),u()&&!this._devtoolsRendering&&!Object.is(e,t)&&h(this,`attr`,{name:`class`,previous:e,next:t||void 0}))}_serializeAttributes(){let e={...this._attrs},t=this._serializeStyles();return t&&(e.style=e.style?`${e.style}; ${t}`:t),Object.entries(e).filter(([,e])=>e!=null&&e!==!1).map(([e,t])=>t===!0||ee(e)?`${e}="${e}"`:`${e}="${O(t)}"`).join(` `)}_serializeStyles(){return te(this._styles)}};function ue(e,t=P){return function(n=null,r=null,i=null){let a=ce(n,r,i),o=new t(e,a.first);return le(o,a.options),typeof a.callback==`function`&&a.callback(o),o}}function F(e,t,n={}){let{override:r=!1}=n;Object.entries(t).forEach(([t,n])=>{!r&&e.prototype[t]||(e.prototype[t]=function(...e){return this.child(n(...e))})})}var de=class extends A{constructor(e){super(null),this._loader=e,this._resolved=null}_resolve(){return this._resolved||=pe(this._loader),this._resolved}toHTML(){return this._deleted?``:`<div class="yoya-client-only" data-client-only="true"></div>`}renderDom(){if(this._deleted)return null;let e=this._resolve().renderDom();return this._el&&this._el!==e&&this._el.parentNode&&this._el.parentNode.replaceChild(e,this._el),this._el=e,e}children(){return this._resolved?this._resolved.children():[]}textContent(){return this._resolved&&typeof this._resolved.textContent==`function`?this._resolved.textContent():``}destroy(){return this._resolved&&this._resolved.destroy(),super.destroy()}};function fe(e){return new de(e)}function pe(e){if(e instanceof A)return e;if(typeof e==`function`)return pe(e());if(e&&typeof e.render==`function`)return pe(e.render());throw TypeError(`vClientOnly loader must return a ViewNode or a component object`)}function I(e,t,n=void 0){return typeof document>`u`?()=>{}:(document.addEventListener(e,t,n),()=>{document.removeEventListener(e,t,n)})}function me(e,t,n=void 0){typeof document>`u`||document.removeEventListener(e,t,n)}function L(e,t,n=void 0){return typeof window>`u`?()=>{}:(window.addEventListener(e,t,n),()=>{window.removeEventListener(e,t,n)})}function he(e,t=null){if(typeof document>`u`)return null;if(t){let e=document.querySelector(`[${t}]`);if(e)return e}let n=document.createElement(`style`);return t&&n.setAttribute(t,``),n.textContent=e,document.head?.appendChild(n),n}const ge=`yoya-ui:i18n`,R=new Map;var _e=class{constructor(e={}){let t=e.language||`zh-CN`;this._key=e.key||null,this._storage=Ke(e.storage),this._storageKey=e.storageKey||null,this._sharedStorageKey=this._key?ge:null,this._fallbackLanguage=e.fallbackLanguage||t,this._language=this._readStoredLanguage(t),this._messages={},this._listeners=new Set,this.registerMessages(e.messages||{}),this._key&&we(this)}key(){return this._key}getLanguage(){return this._language}setLanguage(e){return!e||e===this._language?this:(this._language=e,this._persistLanguage(),this._notify(),this)}getFallbackLanguage(){return this._fallbackLanguage}setFallbackLanguage(e){return e?(this._fallbackLanguage=e,this._notify(),this):this}clearPersistedLanguage(){if(!this._storageKey){if(!this._sharedStorageKey)return this;let e=ke(this._storage,this._sharedStorageKey);return delete e[this._key],Ae(this._storage,this._sharedStorageKey,e),this}try{this._storage.removeItem(this._storageKey)}catch{}return this}registerLocale(e,t){if(!e||typeof t!=`function`)return Promise.reject(TypeError(`registerLocale requires a language name and a loader`));let n;try{n=t()}catch(e){return Promise.reject(e)}return Promise.resolve(n).then(t=>(this.register(e,t||{}),this))}register(e,t={}){return e?(Ge(t).forEach(t=>{this._messages[e]=He(this._messages[e]||{},t)}),this._notify(),this):this}registerMessages(e={}){return We(e).forEach(e=>{if(e.language){this.register(e.language,e.messages||{});return}Object.entries(e).forEach(([e,t])=>{this.register(e,t)})}),this}t(e,t={},n=void 0){let r=je(this._messages[this._language],e)??je(this._messages[this._fallbackLanguage],e)??n??e;return Me(typeof r==`function`?r(t,this):r,t,this)}text(e,t={},n=void 0){return new ve(this,e,t,n)}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}_readStoredLanguage(e){if(this._storageKey)try{return this._storage.getItem(this._storageKey)||e}catch{return e}return this._sharedStorageKey&&ke(this._storage,this._sharedStorageKey)[this._key]||e}_persistLanguage(){if(this._storageKey){try{this._storage.setItem(this._storageKey,this._language)}catch{}return}if(this._sharedStorageKey){let e=ke(this._storage,this._sharedStorageKey);e[this._key]=this._language,Ae(this._storage,this._sharedStorageKey,e)}}_notify(){this._listeners.forEach(e=>e(this))}},ve=class extends j{constructor(e,t,n={},r=void 0){super(e.t(t,n,r)),this._i18n=e,this._key=t,this._params=n||{},this._defaultValue=r,this._unsubscribe=e.subscribe(()=>this.refresh())}key(e){return e===void 0?this._key:(this._key=e,this.refresh())}params(e){return e===void 0?{...this._params}:(this._params=e||{},this.refresh())}defaultValue(e){return e===void 0?this._defaultValue:(this._defaultValue=e,this.refresh())}refresh(){return this.textContent(this._i18n.t(this._key,this._params,this._defaultValue)),this}destroy(){return this._unsubscribe&&=(this._unsubscribe(),null),super.destroy()}};function ye(e={}){return new _e(e)}const z=ye();function be(e,t={}){return z.text(e,t)}let B=z;function xe(e=z){return B=e,String.prototype._yoyaUiStringShortcutInstalled?e:(Object.defineProperty(String.prototype,"_yoyaUiStringShortcutInstalled",{configurable:!0,enumerable:!1,value:!0}),Object.defineProperty(String.prototype,"s",{configurable:!0,enumerable:!1,value:function(e,t,n){let r=String(this),i={},a=B;return Ce(t)?a=t:typeof t==`string`?a=Ee(t)||B:(i=t||{},Ce(n)?a=n:typeof n==`string`&&(a=Ee(n)||B)),a.text(e||r,i,r)}}),e)}function Se(e,t){let n=B;B=e||n;try{return t()}finally{B=n}}function Ce(e){return!!(e&&typeof e.text==`function`)}function we(e){let t=e?.key?.();return t?(R.set(t,e),()=>{R.get(t)===e&&R.delete(t)}):()=>{}}function Te(e){let t=typeof e==`string`?e:e?.key?.();return t&&R.delete(t),t}function Ee(e){return e&&R.get(e)||null}function De(){return new Map(R)}function Oe(e){return ke(e||Ke(),ge)}function ke(e,t){if(!e)return{};try{let n=e.getItem(t);if(!n)return{};let r=JSON.parse(n);return r&&typeof r==`object`?r:{}}catch{return{}}}function Ae(e,t,n){if(e)try{e.setItem(t,JSON.stringify(n))}catch{}}xe(z);function je(e,t){if(!(!e||!t))return Object.prototype.hasOwnProperty.call(e,t)?e[t]:String(t).split(`.`).reduce((e,t)=>{if(e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,t))return e[t]},e)}function Me(e,t,n){let r=String(e),i=[],a=0;for(;a<r.length;){let e=r.charAt(a);if(e===`{`){let e=Ne(r,a),o=r.slice(a+1,e).trim();i.push(Pe(o,t,n,r.slice(a,e+1))),a=e+1}else i.push(e),a+=1}return i.join(``)}function Ne(e,t){let n=0;for(let r=t;r<e.length;r+=1){let t=e.charAt(r);if(t===`{`)n+=1;else if(t===`}`&&(--n,n===0))return r}return e.length-1}function Pe(e,t,n,r){let i=Fe(e);if(i.length===1)return Ie(t,i[0],r);let[a,o,...s]=i,c=Ie(t,a,void 0);if(c==null)return r;let l=n?.getLanguage?.()||`zh-CN`;if(/^number$/i.test(o||``))return ze(c,l);if(/^date$/i.test(o||``))return Ve(c,l,s[0]);if(/^plural$/i.test(o||``)){let e=Re(c,l),a=Le(i.slice(2).join(`,`));return Me(a[`=${c}`]??a[e]??a.other??r,t,n)}return r}function Fe(e){let t=[],n=0,r=``;for(let i of String(e))i===`{`?n+=1:i===`}`&&--n,i===`,`&&n===0?(t.push(r.trim()),r=``):r+=i;return r&&t.push(r.trim()),t}function Ie(e,t,n){let r=e?.[t];return r===void 0?n:r}function Le(e){let t={},n=/([^\s{}]+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g,r;for(;r=n.exec(e);)t[r[1].trim()]=r[2].trim();return t}function Re(e,t){let n=Number(e);if(typeof Intl>`u`||typeof Intl.PluralRules!=`function`)return n===1?`one`:`other`;try{return new Intl.PluralRules(t).select(n)}catch{return n===1?`one`:`other`}}function ze(e,t){if(typeof Intl>`u`||typeof Intl.NumberFormat!=`function`)return String(e);try{return new Intl.NumberFormat(t).format(e)}catch{return String(e)}}const Be=new Set([`full`,`long`,`medium`,`short`]);function Ve(e,t,n=`medium`){if(typeof Intl>`u`||typeof Intl.DateTimeFormat!=`function`)return String(e);try{return new Intl.DateTimeFormat(t,{dateStyle:Be.has(n)?n:`medium`}).format(new Date(e))}catch{return String(e)}}function He(e,t){let n={...e};return Object.entries(t||{}).forEach(([e,t])=>{Ue(t)&&Ue(n[e])?n[e]=He(n[e],t):n[e]=t}),n}function Ue(e){return Object.prototype.toString.call(e)===`[object Object]`}function We(e){return Array.isArray(e)?e.flatMap(e=>We(e)):[e||{}]}function Ge(e){return Array.isArray(e)?e.flatMap(e=>Ge(e)):[e||{}]}function Ke(e){if(e)return e;try{if(typeof globalThis<`u`&&globalThis.localStorage)return globalThis.localStorage}catch{}return Je()}const qe=new Map;function Je(){return{getItem(e){return qe.has(e)?qe.get(e):null},setItem(e,t){qe.set(e,String(t))},removeItem(e){qe.delete(e)}}}const V=[];let H=null;function Ye(e,t){if(!e||typeof e!=`object`)return t();V.push(e);try{return t()}finally{V.pop()}}function Xe(e){return H=e&&typeof e==`object`?e:null,H}function Ze(){return H=null,null}function Qe(e,t=void 0){for(let t=V.length-1;t>=0;--t){let n=V[t];if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e]}return H&&Object.prototype.hasOwnProperty.call(H,e)?H[e]:t}function $e(){let e={...H||{}};return V.forEach(t=>Object.assign(e,t)),e}const et=new WeakMap,tt=new Map;let nt=1;function rt(){return!1}function it(e){}function at(e){let t=et.get(e);return t===void 0&&(t=nt,nt+=1,et.set(e,t)),tt.set(t,e),t}function ot(e){let t=et.get(e);t!==void 0&&tt.delete(t)}function st(e){let t=$e();e._devtoolsContext=Object.keys(t).length>0?t:null}function ct(e){return at(e)}function lt(e,t,n){}function ut(e){}const dt=Symbol.for(`yoya.devtools.bridge`);function ft(){typeof globalThis>`u`||(globalThis[dt]={captureScope:st,commit:ut,emit:it,enabled:()=>!1,ensureId:ct,notify:lt,unregister:ot})}ft();const pt=new Set([`state`,`render`,`update`]),mt=new Set([`_attachHost`,`destroy`,`getState`,`setState`,`subscribe`]);function ht(e={}){if(typeof e.render!=`function`)throw TypeError(`vStateNode requires a render function`);let t=typeof e.state==`function`?e.state():{...e.state||{}},n=new Set,r=!1,i=null,a=null,o=[],s={_attachHost(e){return a=e,s},destroy(){if(r)return s;if(r=!0,o=[],n.clear(),a=null,i){let e=i;i=null,e.forEach(e=>e.destroy())}return s},getState(){return s.state()},render(){return r||i||c(),l()},setState(e){if(r||e==null)return s;let a=typeof e==`function`?e({...t}):e;if(!a||typeof a!=`object`)return s;let o=new Set,c=rt()?{}:null;return Object.entries(a).forEach(([e,n])=>{t[e]!==n&&(c&&(c[e]={from:t[e],to:n}),t[e]=n,o.add(e))}),o.size>0&&(i&&d(o),n.forEach(e=>e(t,s)),rt()&&c&&{...t}),s},state(){return{...t}},subscribe(e){if(typeof e!=`function`)throw TypeError(`vStateNode subscriber must be a function`);return n.add(e),()=>n.delete(e)}};for(let t of Object.keys(e))if(!(pt.has(t)||typeof e[t]!=`function`)){if(mt.has(t))throw TypeError(`vStateNode config key "${t}" conflicts with the built-in API`);s[t]=e[t]}return s;function c(){let n=i||[];o=[];let r=w({bindings:o,getState:()=>t},()=>e.render.call(s,t,s)),c=Array.isArray(r)?r.slice():[r];if(c.forEach(e=>{if(!(e instanceof A))throw TypeError(`vStateNode render must return a ViewNode or an array of ViewNodes`)}),i=c,u(),a){a._replaceResolved(l());return}if(n.length>0){let e=n.length===1?n[0]:null;if(e&&e._el&&e._el.parentNode&&c.length===1){let t=c[0].renderDom();t&&e._el.parentNode.replaceChild(t,e._el)}n.forEach(e=>e.destroy())}}function l(){return i?i.length===1?i[0]:i:null}function u(){o.forEach(e=>{let t=e.evaluate();(!e.committed||!Object.is(t,e.last))&&(e.committed=!0,e.last=t,e.commit(t))})}function d(n){return typeof e.update==`function`?e.update.call(s,t,s,n)===!0?(c(),`rebuild`):o.length>0?(u(),`bindings`):`update`:o.length>0?(u(),`bindings`):(c(),`rebuild`)}}F(P,{vStateNode:ht});const gt=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `),_t=`data-yoya-live`;function vt(e){return!e||typeof e.querySelectorAll!=`function`?[]:Array.from(e.querySelectorAll(gt)).filter(e=>e.getAttribute&&e.getAttribute(`tabindex`)!==`-1`)}function yt(e,t={}){let{onEscape:n=null,restoreFocus:r=!0}=t;if(typeof document>`u`||!e)return{activate(){},destroy(){}};let i=!1,a=null,o=null,s=t=>{if(!i)return;if(t.key===`Escape`){n&&n(t);return}if(t.key!==`Tab`)return;let r=vt(e);if(r.length===0){t.preventDefault();return}let a=document.activeElement,o=r.indexOf(a),s;s=t.shiftKey?o<=0?r.length-1:o-1:o===-1||o===r.length-1?0:o+1,t.preventDefault(),r[s].focus()};return{activate:()=>{if(i)return;i=!0,a=document.activeElement,o=I(`keydown`,s);let t=vt(e)[0];t&&t.focus()},destroy:()=>{i&&(i=!1,o&&=(o(),null),r&&a&&typeof a.isConnected==`boolean`&&a.isConnected&&typeof a.focus==`function`&&a.focus())}}}function bt(e,t={}){if(typeof document>`u`)return null;let{politeness:n=`polite`,dedupeKey:r=`yoya-announce`}=t,i=document.querySelector(`[${_t}="${r}"]`);return i||(i=document.createElement(`div`),i.setAttribute(_t,r),i.setAttribute(`aria-live`,n),i.setAttribute(`aria-atomic`,`true`),i.className=`yoya-a11y-live`,i.style.cssText=`position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0;margin:-1px;`,document.body.appendChild(i)),i.textContent=``,queueMicrotask(()=>{i.textContent=String(e)}),i}function xt({key:e,items:t,currentIndex:n=-1,shiftKey:r=!1}){let i=t?.length||0;if(i===0)return-1;let a=i-1,o=n>=0&&n<i?n:-1;return e===`Home`?0:e===`End`?a:e===`ArrowDown`?r?-1:o===a?0:o+1:e===`ArrowUp`?r||o<=0?a:o-1:o}const St=[`light`,`dark`,`system`],Ct=`yoya-theme-mode`,wt=`yoya-theme-name`;function Tt(){return typeof document>`u`?null:document.documentElement}function U(){try{return typeof localStorage<`u`&&localStorage!==null}catch{return!1}}function Et(e=`light`,t={}){let n=St.includes(e)?e:`light`,r=Tt();if(r&&(r.dataset.yoyaMode=n),t.persist&&U())try{localStorage.setItem(Ct,n)}catch{}return n}function Dt(){let e=Tt(),t=e&&e.dataset.yoyaMode;return St.includes(t)?t:`light`}function Ot(){let e=Dt();return e===`system`?typeof window>`u`||typeof window.matchMedia!=`function`?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e}function kt(e=``,t={}){let n=Tt();if(!e){if(n&&delete n.dataset.yoyaTheme,t.persist&&U())try{localStorage.removeItem(wt)}catch{}return``}if(n&&(n.dataset.yoyaTheme=e),t.persist&&U())try{localStorage.setItem(wt,e)}catch{}return e}function At(){let e=Tt();return e&&e.dataset.yoyaTheme||``}function jt(e={}){let t=e.mode,n=e.theme;if(t===void 0&&U()){let e=localStorage.getItem(Ct);St.includes(e)&&(t=e)}return n===void 0&&U()&&(n=localStorage.getItem(wt)||``),t!==void 0&&Et(t,{persist:e.persist}),n!==void 0&&kt(n,{persist:e.persist}),{mode:Dt(),theme:At()}}let Mt=null;function Nt({submit:e}={}){return Mt=typeof e==`function`?e:null,Mt}var Pt=class{method(){return`GET`}headers(){return{}}cookies(){return null}body(){return null}params(){return{}}address(){return``}submit(){if(typeof Mt!=`function`)throw Error(`RequestBase: 未注册请求传输,请先 configureRequest({ submit })`);return Mt(this)}},Ft=class e{constructor({ok:e=!0,code:t=`0`,msg:n=null,showType:r=0,data:i=null,kind:a=`detail`,pageNum:o=null,pageSize:s=null,total:c=null}={}){this.ok=e,this.code=t,this.msg=n,this.showType=r,this.data=i,this.kind=a,this.pageNum=o,this.pageSize=s,this.total=c}get isSuccess(){return!!this.ok}get pages(){return this.pageSize>0?Math.ceil((this.total??0)/this.pageSize):0}static from(t,n={}){if(!t||t.ok===!1){let e=Error(t?.msg||`请求失败`);throw e.code=t?.code,e.showType=t?.showType,e}let r=t.data,i=Array.isArray(r)&&t.pageNum!=null,a=Array.isArray(r);return new e({ok:t.ok,code:t.code,msg:t.msg,showType:t.showType,kind:i?`page`:a?`list`:`detail`,data:i||a?(r??[]).map(e=>n.toItem?n.toItem(e):e):n.toDetail?n.toDetail(r):r,pageNum:t.pageNum,pageSize:t.pageSize,total:t.total})}},W=class extends P{};const It=[`a`,`abbr`,`address`,`area`,`article`,`aside`,`audio`,`b`,`base`,`bdi`,`bdo`,`blockquote`,`body`,`br`,`button`,`canvas`,`caption`,`cite`,`code`,`col`,`colgroup`,`data`,`datalist`,`dd`,`del`,`details`,`dfn`,`dialog`,`div`,`dl`,`dt`,`em`,`embed`,`fieldset`,`figcaption`,`figure`,`footer`,`form`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`head`,`header`,`hgroup`,`hr`,`html`,`i`,`iframe`,`img`,`input`,`ins`,`kbd`,`label`,`legend`,`li`,`link`,`main`,`map`,`mark`,`menu`,`meta`,`meter`,`nav`,`noscript`,`object`,`ol`,`optgroup`,`option`,`output`,`p`,`picture`,`pre`,`progress`,`q`,`rp`,`rt`,`ruby`,`s`,`samp`,`script`,`search`,`section`,`select`,`selectedcontent`,`slot`,`small`,`source`,`span`,`strong`,{name:`style`,tagName:`style`,aliases:[`styleTag`]},`sub`,`summary`,`sup`,`table`,`tbody`,`td`,`template`,`textarea`,`tfoot`,`th`,`thead`,`time`,`title`,`tr`,`track`,`u`,`ul`,{name:`varTag`,tagName:`var`},`video`,`wbr`];function Lt(){return It.reduce((e,t)=>{let{aliases:n=[],name:r,tagName:i}=Kr(t),a=ue(i,W);return e[r]=a,n.forEach(t=>{e[t]=a}),e},{})}const Rt=Lt();F(W,Rt);const{a:zt,abbr:Bt,address:Vt,area:Ht,article:Ut,aside:Wt,audio:Gt,b:Kt,base:qt,bdi:Jt,bdo:Yt,blockquote:Xt,body:Zt,br:Qt,button:$t,canvas:en,caption:tn,cite:nn,code:rn,col:an,colgroup:on,data:sn,datalist:cn,dd:ln,del:un,details:dn,dfn:fn,dialog:pn,div:mn,dl:hn,dt:gn,em:_n,embed:vn,fieldset:yn,figcaption:bn,figure:xn,footer:Sn,form:Cn,h1:wn,h2:Tn,h3:En,h4:Dn,h5:On,h6:kn,head:An,header:jn,hgroup:Mn,hr:Nn,html:Pn,i:Fn,iframe:In,img:Ln,input:Rn,ins:zn,kbd:Bn,label:Vn,legend:Hn,li:Un,link:Wn,main:Gn,map:Kn,mark:qn,menu:Jn,meta:Yn,meter:Xn,nav:Zn,noscript:Qn,object:$n,ol:er,optgroup:tr,option:nr,output:rr,p:ir,picture:ar,pre:or,progress:sr,q:cr,rp:lr,rt:ur,ruby:dr,s:fr,samp:pr,script:mr,search:hr,section:gr,select:_r,selectedcontent:vr,slot:yr,small:br,source:xr,span:Sr,strong:Cr,style:wr,styleTag:Tr,sub:Er,summary:Dr,sup:Or,table:kr,tbody:Ar,td:jr,template:Mr,textarea:Nr,tfoot:Pr,th:Fr,thead:Ir,time:Lr,title:Rr,tr:zr,track:Br,u:Vr,ul:Hr,varTag:Ur,video:Wr,wbr:Gr}=Rt;function Kr(e){return typeof e==`string`?{name:e,tagName:e}:e}function qr(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M12 5v14`}),e.path({d:`m19 12-7 7-7-7`})})}function Jr(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M19 12H5`}),e.path({d:`m12 19-7-7 7-7`})})}function Yr(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M5 12h14`}),e.path({d:`m12 5 7 7-7 7`})})}function Xr(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M12 19V5`}),e.path({d:`m5 12 7-7 7 7`})})}function Zr(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9`}),e.path({d:`M10.3 21a1.94 1.94 0 0 0 3.4 0`})})}function Qr(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`18`,rx:`2`,width:`18`,x:`3`,y:`4`}),e.path({d:`M16 2v4`}),e.path({d:`M8 2v4`}),e.path({d:`M3 10h18`})})}function $r(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M20 6 9 17l-5-5`})})}function ei(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m6 9 6 6 6-6`})})}function ti(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m15 18-6-6 6-6`})})}function ni(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m9 18 6-6-6-6`})})}function ri(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m18 15-6-6-6 6`})})}function ii(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M18 6 6 18`}),e.path({d:`m6 6 12 12`})})}function ai(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m16 18 6-6-6-6`}),e.path({d:`m8 6-6 6 6 6`})})}function oi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`14`,rx:`2`,width:`14`,x:`8`,y:`8`}),e.path({d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})})}function si(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),e.path({d:`m7 10 5 5 5-5`}),e.path({d:`M12 15V3`})})}function ci(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z`})})}function li(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),e.path({d:`m15 3 6 6`}),e.path({d:`m21 3-9 9`})})}function ui(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z`}),e.circle({cx:`12`,cy:`12`,r:`3`})})}function di(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),e.path({d:`M14 2v4a2 2 0 0 0 2 2h4`})})}function fi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`18`,rx:`2`,width:`18`,x:`3`,y:`3`}),e.circle({cx:`9`,cy:`9`,r:`2`}),e.path({d:`m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21`})})}function pi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`})})}function mi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2`})})}function hi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z`})})}function gi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m3 9.5 9-6.5 9 6.5`}),e.path({d:`M5 10v10h5v-6h4v6h5V10`})})}function _i(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`12`,cy:`12`,r:`10`}),e.path({d:`M12 16v-4`}),e.path({d:`M12 8h.01`})})}function vi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`11`,rx:`2`,width:`18`,x:`3`,y:`11`}),e.path({d:`M7 11V7a5 5 0 0 1 10 0v4`})})}function yi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),e.path({d:`m16 17 5-5-5-5`}),e.path({d:`M21 12H9`})})}function bi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`16`,rx:`2`,width:`20`,x:`2`,y:`4`}),e.path({d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`})})}function xi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M4 6h16`}),e.path({d:`M4 12h16`}),e.path({d:`M4 18h16`})})}function Si(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M5 12h14`})})}function Ci(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`5`,cy:`12`,r:`1`,fill:`currentColor`}),e.circle({cx:`12`,cy:`12`,r:`1`,fill:`currentColor`}),e.circle({cx:`19`,cy:`12`,r:`1`,fill:`currentColor`})})}function wi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M5 12h14`}),e.path({d:`M12 5v14`})})}function Ti(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M3 12a9 9 0 0 1 15-6.7L21 8`}),e.path({d:`M21 3v5h-5`}),e.path({d:`M21 12a9 9 0 0 1-15 6.7L3 16`}),e.path({d:`M3 21v-5h5`})})}function Ei(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`11`,cy:`11`,r:`7`}),e.path({d:`m20 20-4-4`})})}function Di(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`12`,cy:`12`,r:`3`}),e.path({d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z`})})}function Oi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z`,fill:`currentColor`,stroke:`none`})})}function ki(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M3 6h18`}),e.path({d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}),e.path({d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}),e.path({d:`M10 10v6`}),e.path({d:`M14 10v6`})})}function Ai(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),e.path({d:`m17 8-5-5-5 5`}),e.path({d:`M12 3v12`})})}function ji(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}),e.circle({cx:`12`,cy:`7`,r:`4`})})}function Mi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M21.73 18 13.34 3.7a2 2 0 0 0-3.44 0L2.27 18A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}),e.path({d:`M12 9v4`}),e.path({d:`M12 17h.01`})})}function Ni(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.circle({cx:`12`,cy:`12`,r:`4`}),e.path({d:`M12 2v2`}),e.path({d:`M12 20v2`}),e.path({d:`m4.93 4.93 1.41 1.41`}),e.path({d:`m17.66 17.66 1.41 1.41`}),e.path({d:`M2 12h2`}),e.path({d:`M20 12h2`}),e.path({d:`m6.34 17.66-1.41 1.41`}),e.path({d:`m19.07 4.93-1.41 1.41`})})}function Pi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.path({d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`})})}function Fi(){return G(e=>{e.className(`yoya-icon`).attr({"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,viewBox:`0 0 24 24`}).styles({height:`24px`,width:`24px`}),e.rect({height:`14`,rx:`2`,width:`20`,x:`2`,y:`3`}),e.path({d:`M8 21h8`}),e.path({d:`M12 17v4`})})}const Ii=`http://www.w3.org/2000/svg`,Li=new Set([`desc`,`metadata`,`text`,`textPath`,`title`,`tspan`]);var Ri=class e extends P{setup(e){return typeof e==`string`||typeof e==`number`?this.child(e):super.setup(e)}text(...e){if(Li.has(this._tagName)){let[t,n]=e;return e.length>0&&this.child(t),n!=null&&this.setup(n),this}return this._svgChild(`text`,...e)}style(...e){let[t,n]=e;return this._tagName===`style`&&e.length<=1?(e.length===1&&this.child(t),this):e.length<=1&&zi(t)?this._svgChild(`style`,t):super.style(t,n)}renderDom(){return this._deleted?null:(this._el||(this._el=document.createElementNS(Ii,this._tagName),this._applySnapshotToElement()),this._el)}_syncClassName(){let e=[...this._classes].join(` `);e?this._attrs.class=e:delete this._attrs.class,this._el&&(e?this._el.setAttribute(`class`,e):this._el.removeAttribute(`class`))}_svgChild(t,...n){let r=new e(t);return n.forEach(e=>{e!=null&&r.setup(e)}),this.child(r)}};function zi(e){return e==null||typeof e==`function`||typeof e==`string`||typeof e==`number`||Array.isArray(e)}const Bi=`animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.a.script.style.switch.text.title.symbol.textPath.tspan.use.view`.split(`.`);function Vi(e){return function(...t){let n=new Ri(e);return e===`svg`&&n.style(`display`,`block`),t.forEach(e=>{e!=null&&n.setup(e)}),n}}function Hi(){return Bi.reduce((e,t)=>{let{aliases:n=[],name:r,tagName:i}=Wi(t),a=Vi(i);return e[r]=a,n.forEach(t=>{e[t]=a}),e},{})}const G=Vi(`svg`),Ui=Hi();F(W,{svg:G}),F(Ri,{svg:G,...Ui});function Wi(e){return typeof e==`string`?{name:e,tagName:e}:e}function K(e,t){return`var(--yoya-${e}, ${t})`}function q(e,t,n=`1px`){return`${n} solid ${K(e,t)}`}function Gi(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ki(e,t){return e.children().forEach(e=>e.destroy()),e._children=[],e._el&&e._el.replaceChildren(),t.length>0&&e.child(t),e}let qi=null;function Ji(){qi||=he(`.yoya-vrouter-views-titlebar,
|
|
2
|
+
.yoya-vrouter-views-popup {
|
|
3
|
+
-ms-overflow-style: none;
|
|
4
|
+
scrollbar-width: none;
|
|
5
|
+
}
|
|
6
|
+
.yoya-vrouter-views-titlebar::-webkit-scrollbar,
|
|
7
|
+
.yoya-vrouter-views-popup::-webkit-scrollbar {
|
|
8
|
+
display: none;
|
|
9
|
+
height: 0;
|
|
10
|
+
width: 0;
|
|
11
|
+
}
|
|
12
|
+
.yoya-vrouter-views-popup-item:hover {
|
|
13
|
+
background: var(--yoya-color-surface-hover, #eef3f9);
|
|
14
|
+
}
|
|
15
|
+
.yoya-vrouter-views-popup-item[aria-current='true'] {
|
|
16
|
+
background: var(--yoya-color-primary-subtle, #e8f0fe);
|
|
17
|
+
color: var(--yoya-color-primary, #1f6feb);
|
|
18
|
+
}
|
|
19
|
+
.yoya-vrouter-views-popup-close {
|
|
20
|
+
color: var(--yoya-color-text-secondary, #57606a);
|
|
21
|
+
opacity: 0.65;
|
|
22
|
+
}
|
|
23
|
+
.yoya-vrouter-views-popup-item:hover .yoya-vrouter-views-popup-close,
|
|
24
|
+
.yoya-vrouter-views-popup-close:hover {
|
|
25
|
+
color: var(--yoya-color-text-danger, #b91c1c);
|
|
26
|
+
opacity: 1;
|
|
27
|
+
}
|
|
28
|
+
.yoya-vrouter-views-context-item:hover {
|
|
29
|
+
background: var(--yoya-color-surface-hover, #f6f8fa);
|
|
30
|
+
}
|
|
31
|
+
.yoya-vrouter-views-context-separator {
|
|
32
|
+
background: var(--yoya-color-border, #d0d7de);
|
|
33
|
+
height: 1px;
|
|
34
|
+
margin: 4px 6px;
|
|
35
|
+
}`,`data-yoya-vrouter-views-popup-style`)}function Yi(e){let t=[e._defaultPath||`/`,e._routes.map(e=>e.pattern).join(`|`)].join(`::`),n=0;for(let e=0;e<t.length;e+=1)n=n*31+t.charCodeAt(e)|0;return`yoya-ui:router-views:${(n>>>0).toString(36)}`}function Xi(e){if(typeof localStorage>`u`)return null;try{let t=JSON.parse(localStorage.getItem(e)||`null`);return Array.isArray(t?.paths)?t:null}catch{return null}}var Zi=class extends P{constructor(e=null){super(`div`),this._routes=[],this._defaultPath=null,this._notFoundView=null,this._beforeEach=null,this._currentPath=`/`,this._currentParams={},this._currentQuery={},this._currentRoute=null,this._currentView=null,this._loadingView=null,this._errorView=null,this._navigationGeneration=0,this._outlet=this,this._subscribers=new Set,this._ignoreNextHashPath=null,this._mode=`hash`,this._started=!1,this._onHashChange=()=>this._handleHashChange(),this._onPopState=()=>this._handlePopState(),this.attr(`data-yoya-router`,``),e!==null&&this.setup(e)}setup(e){return typeof e==`function`?(e(this),this):super.setup(e)}default(e){return this._defaultPath=X(e),this}mode(e){if(e===void 0)return this._mode;let t=e===`history`?`history`:`hash`;if(t===this._mode)return this;let n=this._started;return n&&this.stop(),this._mode=t,n&&this.start(),this}route(e,t){let n=aa(e,t);return this._routes.push(n),this}notFound(e){return this._notFoundView=e,this}loading(e){return this._loadingView=e,this}error(e){return this._errorView=e,this}beforeEach(e){return this._beforeEach=e,this}start(){this._started||=(this._stopListening=this._mode===`history`?L(`popstate`,this._onPopState):L(`hashchange`,this._onHashChange),!0);let e=xa(this._mode);return(this._mode===`history`?e===`/`||e===`/index.html`:!window.location.hash)&&this._defaultPath?this.navigate(this._defaultPath,{replace:!0}):this.refresh()}stop(){return this._started&&=(this._stopListening?.(),this._stopListening=null,!1),this}navigate(e,t={}){let n=X(e),r=this._resolve(n);return this._canEnter(r.context)?(Ca(n,t,this._mode)&&!t.replace&&this._mode===`hash`&&(this._ignoreNextHashPath=n),this._renderResolved(r),this):this}refresh(){let e=xa(this._mode),t=this._resolve(e);return this._canEnter(t.context)&&this._renderResolved(t),this}renderPath(e){let t=this._resolve(e);return this._canEnter(t.context)&&this._renderResolved(t),this}currentPath(){return this._currentPath}currentParams(){return{...this._currentParams}}currentQuery(){return{...this._currentQuery}}currentRoute(){return this._currentRoute}currentView(){return this._currentView}outlet(e){if(e===void 0)return this._outlet;if(!(e instanceof P))throw TypeError(`Router outlet must be an ElementNode`);return this._outlet=e,this}subscribe(e){if(typeof e!=`function`)throw TypeError(`Router subscriber must be a function`);return this._subscribers.add(e),()=>this._subscribers.delete(e)}go(e){return window.history.go(e),this}back(){return this.go(-1)}forward(){return this.go(1)}destroy(){return this.stop(),this._navigationGeneration+=1,this._destroyCurrentView(),this._subscribers.clear(),super.destroy()}_resolve(e){let t=this._routes.map(t=>({route:t,match:va(t.pattern,e)})).find(({match:e})=>e);if(t)return{context:ya(this,e,t.route,t.match),route:t.route,view:t.route.view};let n=Z(e);return{context:ya(this,e,null,{params:{},pathname:n.pathname,query:n.query}),route:null,view:this._notFoundView}}_handleHashChange(){let e=ba();return this._ignoreNextHashPath===e?(this._ignoreNextHashPath=null,this):(this._ignoreNextHashPath=null,e===this._currentPath?this:this.refresh())}_handlePopState(){return this._ignoreNextHashPath=null,this.refresh()}_canEnter(e){let t={params:this.currentParams(),path:this._currentPath,query:this.currentQuery(),route:this._currentRoute};return!(this._beforeEach&&this._beforeEach(e,t,this)===!1||e.route?.beforeEnter&&e.route.beforeEnter(e,t,this)===!1)}_renderResolved(e){let{context:t,route:n,view:r}=e,i=typeof r==`function`?r(t):r;if(this._navigationGeneration+=1,!ga(i)){this._commitView(e,Y(i,t));return}let a=this._navigationGeneration;this._commitView(e,this._buildLoadingView(n,t)),Promise.resolve(i).then(r=>{if(a!==this._navigationGeneration||this._deleted)return r;let i;try{i=Y(r,t)}catch(i){return this._commitView(e,this._buildErrorView(n,t,i)),r}return this._commitView(e,i),r},r=>(a!==this._navigationGeneration||this._deleted||this._commitView(e,this._buildErrorView(n,t,r)),r))}_commitView(e,t){let{context:n,route:r}=e,i=this._outlet;this._destroyCurrentView(),i._children=[],i._el&&i._el.replaceChildren(),i.child(t),this._currentPath=n.path,this._currentParams=n.params,this._currentQuery=n.query,this._currentRoute=r,this._currentView=t,this._subscribers.forEach(e=>e(n,this))}_buildLoadingView(e,t){return _a(e?.loading??this._loadingView??ma,[t])}_buildErrorView(e,t,n){return _a(e?.error??this._errorView??ha,[n,t])}_destroyCurrentView(){this._currentView?.destroy&&this._currentView.destroy(),this._currentView=null}};function Qi(e=null,t=null,n=null){let r=ce(e,t,n),i=new Zi(r.first);return le(i,r.options),typeof r.callback==`function`&&r.callback(i),i}const $i=Qi;function ea(e,t){return{config:t,pattern:e}}function ta(e=null,t=null,n=null){let r=ce(e,t,n),i=new Zi;return i.vRoute=(e,t)=>(i.route(e,t),i),ca(i,r.first),le(i,r.options),typeof r.callback==`function`&&r.callback(i),i}function na(e,t=null,n=null){oa(e);let r=new P(`a`),i={exact:!0,label:null,params:{},query:{},replace:!1,to:`/`},a=new P(`span`).className(`yoya-vlink-label`);r.className(`yoya-vlink`),r.attr(`data-router-link`,`true`),r.child(a),r.to=e=>J(r,i,`to`,e),r.params=e=>J(r,i,`params`,e||{}),r.query=e=>J(r,i,`query`,e||{}),r.replace=e=>J(r,i,`replace`,!!e),r.exact=e=>J(r,i,`exact`,!!e),r.label=e=>e===void 0?i.label:(i.label=e,Ki(a,Gi(e)),r),la(r,i,t),ua(r,i,e),r.on(`click`,t=>{pa(t,r)&&(t.preventDefault(),e.navigate(da(i.to,i.params,i.query),{replace:i.replace}))});let o=e.subscribe(()=>ua(r,i,e)),s=r.destroy.bind(r);return r.destroy=()=>(o(),s()),typeof n==`function`&&n(r),r}function ra(e,t=null,n=null){oa(e);let r=new P(`div`);r.className(`yoya-vrouter-view`),r.attr(`data-router-view`,`true`),typeof t==`function`?t(r):t&&r.setup(t),e.outlet(r);let i=r.destroy.bind(r);return r.destroy=()=>(e.outlet()===r&&e.outlet(e),i()),typeof n==`function`&&n(r),r}function ia(e,t=null,n=null){oa(e);let r=new P(`div`),i=new P(`header`).className(`yoya-vrouter-views-titlebar`).attr({role:`tablist`,"aria-label":`已打开页面`}),a=new P(`div`).className(`yoya-vrouter-views-content`),o=N(`⋯`),s=new P(`button`).className(`yoya-vrouter-views-expand`).attr({type:`button`,"aria-expanded":`false`,"aria-label":`展开全部标签`}).styles({alignItems:`center`,background:`transparent`,border:`0`,color:K(`color-text-secondary`,`#57606a`),cursor:`pointer`,display:`none`,flexShrink:`0`,font:`inherit`,gap:`6px`,height:`24px`,justifyContent:`center`,lineHeight:`1`,marginBottom:`0`,marginLeft:`auto`,minWidth:`24px`,padding:`0`,position:`sticky`,right:`8px`,zIndex:`2`}).child(o),c=new P(`div`).className(`yoya-vrouter-views-popup`).attr({role:`menu`,"aria-label":`已打开页面`}).styles({background:K(`color-surface`,`#ffffff`),border:q(`color-border`,`#d0d7de`),borderRadius:`8px`,boxShadow:`0 12px 28px rgba(15, 23, 42, 0.18)`,display:`none`,maxHeight:`280px`,maxWidth:`260px`,minWidth:`180px`,msOverflowStyle:`none`,overflowY:`auto`,padding:`6px`,position:`fixed`,scrollbarWidth:`none`,zIndex:`100`}),l={lockTitle:!1,overflow:!1,persist:!0,popupOpen:!1,storageKey:Yi(e),suppressPersist:!1,tabs:new Map,title:`工作区`,titleResolver:null,titlePosition:`top`};r.className(`yoya-vrouter-views`),r.styles({border:q(`color-border`,`#d0d7de`),boxSizing:`border-box`,overflow:`hidden`}),i.styles({background:K(`color-surface-hover`,`#f6f8fa`),borderBottom:q(`color-border`,`#d0d7de`),boxSizing:`border-box`,color:K(`color-text-secondary`,`#57606a`),display:`flex`,flexWrap:`nowrap`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,fontSize:`13px`,gap:`0px`,msOverflowStyle:`none`,overflowX:`auto`,overflowY:`hidden`,padding:`0px 0px`,scrollbarWidth:`none`,width:`100%`}),a.className(`yoya-vrouter-views-content`),a.styles({minHeight:`120px`,padding:`16px`}),r.child(i,a,c);let u=()=>{let e=l.titlePosition!==`top`;if(l.lockTitle){r.styles({display:`flex`,flexDirection:e?`row`:`column`,height:`100%`,minHeight:`0`,overflow:`hidden`}),i.style(`flex`,`0 0 auto`),a.styles({flex:`1 1 auto`,minHeight:`0`,minWidth:`0`,overflow:`auto`});return}r.styles({flexDirection:null,height:null,minHeight:null,overflow:`hidden`}),i.style(`flex`,null),a.styles({flex:e?`1 1 auto`:null,minHeight:`120px`,minWidth:e?`0`:null,overflow:null})},d=e=>{let t=e!==`top`;r.styles({alignItems:t?`stretch`:null,display:t?`flex`:null}),i.styles({background:K(`color-surface-hover`,`#f6f8fa`),borderBottom:t?null:q(`color-border`,`#d0d7de`),borderLeft:e===`right`?`1px solid`:null,borderLeftColor:e===`right`?K(`color-border`,`#d0d7de`):null,borderLeftStyle:e===`right`?`solid`:null,borderLeftWidth:e===`right`?`1px`:null,borderRight:e===`left`?`1px solid`:null,borderRightColor:e===`left`?K(`color-border`,`#d0d7de`):null,borderRightStyle:e===`left`?`solid`:null,borderRightWidth:e===`left`?`1px`:null,boxSizing:`border-box`,color:K(`color-text-secondary`,`#57606a`),display:`flex`,flexDirection:t?`column`:`row`,flexShrink:t?`0`:null,flexWrap:`nowrap`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,fontSize:`13px`,gap:`0px`,msOverflowStyle:`none`,overflowX:t?`hidden`:`auto`,overflowY:t?`auto`:`hidden`,padding:t?`10px 8px`:`0px 0px`,scrollbarWidth:`none`,width:t?null:`100%`}),a.styles({flex:t?`1 1 auto`:null,minWidth:t?`0`:null});let n=e===`right`?[a,i,c]:[i,a,c];r.clearChildren().child(n),r._el&&n.forEach(e=>{let t=e.renderDom();t&&r._el.appendChild(t)}),u()},f=(e={})=>{let t=l.title,n=e.route?.title;if(n!==void 0&&(t=typeof n==`function`?n(e):n),l.titleResolver){let n=l.titleResolver(e);n!=null&&(t=typeof n==`function`?n(e):n)}return t??``},p=(e,t)=>{let n=e.tab,r=l.titlePosition,i=r!==`top`;e.label.attr(`aria-selected`,String(t)),n.styles({background:t?K(`color-surface`,`#ffffff`):K(`color-surface-active`,`#eaeef2`),border:q(`color-border`,`#d0d7de`),borderBottomColor:r===`top`&&t?K(`color-surface`,`#ffffff`):K(`color-border`,`#d0d7de`),borderLeftColor:`transparent`,borderRightColor:r===`left`&&t?K(`color-surface`,`#ffffff`):K(`color-border`,`#d0d7de`),color:t?K(`color-text`,`#24292f`):K(`color-text-secondary`,`#57606a`),fontWeight:t?`600`:`400`,marginBottom:r===`top`?`-9px`:`0`,marginLeft:r===`right`?`-9px`:`0`,marginRight:r===`left`?`-9px`:`0`,padding:i?`8px 10px`:`7px 14px 8px`})},m=e=>{l.overflow=!!e,r.attr(`data-title-overflow`,l.overflow?`true`:null),s.style(`display`,l.overflow?`inline-flex`:`none`)},h=()=>{if(l.titlePosition!==`top`||l.tabs.size<=8){m(!1);return}m(!0)},g=()=>{let e=Array.from(l.tabs.entries()),t=e.slice(0,8).map(([,e])=>e.tab).filter(e=>e!==s);if(!(e.length>8&&l.titlePosition===`top`)){l.popupOpen&&y(),i._children=t,i._childrenDirty=!0,i._el?i._el.replaceChildren(...t.map(e=>e.renderDom()).filter(Boolean)):s._el?.remove(),m(!1);return}if(i._children=[...t,s],i._childrenDirty=!0,i._el){let e=t.map(e=>e.renderDom()).filter(Boolean);i._el.replaceChildren(...e,s.renderDom())}h()},_=()=>{if(!(!l.persist||l.suppressPersist||typeof localStorage>`u`))try{localStorage.setItem(l.storageKey,JSON.stringify({activePath:e.currentPath(),paths:Array.from(l.tabs.keys())}))}catch{}},v=null,y=()=>{l.popupOpen=!1,r.attr(`data-title-popup`,null),s.attr(`aria-expanded`,`false`),c.style(`display`,`none`),v&&=(v(),null)},b=()=>{c.clearChildren(),c._el&&c._el.replaceChildren(),Array.from(l.tabs.entries()).slice(8).forEach(([t,n])=>{let r=n.text.textContent(),i=new P(`div`).className(`yoya-vrouter-views-popup-item`).attr({role:`menuitem`,tabIndex:`0`,"data-router-view-path":t}).styles({alignItems:`center`,borderRadius:`6px`,color:K(`color-text`,`#24292f`),cursor:`pointer`,display:`flex`,fontSize:`13px`,gap:`8px`,padding:`7px 8px`,width:`100%`}),a=new P(`span`).className(`yoya-vrouter-views-popup-title`).styles({flex:`1`,minWidth:`0`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}).text(r),o=new P(`button`).className(`yoya-vrouter-views-popup-close`).attr({type:`button`,"aria-label":`关闭 ${r}`}).styles({background:`transparent`,border:`0`,color:`inherit`,cursor:`pointer`,flexShrink:`0`,font:`inherit`,lineHeight:`1`,padding:`2px 4px`}).text(`×`);t===e.currentPath()&&(i.attr(`aria-current`,`true`),i.styles({background:K(`color-primary-subtle`,`#e8f0fe`),color:K(`color-primary`,`#1f6feb`)}));let s=()=>{y(),e.navigate(t)};i.on(`click`,s),i.on(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s())}),o.on(`click`,e=>{e.stopPropagation(),C(t,e),l.popupOpen&&b()}),i.child(a,o),c.child(i)})},x=()=>{if(l.tabs.size===0)return;Ji(),b(),l.popupOpen=!0,r.attr(`data-title-popup`,`true`),s.attr(`aria-expanded`,`true`),c.styles({display:`block`}),f();let e=e=>{!c._el?.contains(e.target)&&!s._el?.contains(e.target)&&y()},t=e=>{e.key===`Escape`&&y()},n=()=>f(),i=()=>f(),a=I(`click`,e),o=I(`keydown`,t),u=L(`scroll`,n,!0),d=L(`resize`,i);v=()=>{a(),o(),u(),d()};function f(){let e=s._el?.getBoundingClientRect(),t=c._el?.getBoundingClientRect();if(!e||!t)return;let n=window.innerWidth||document.documentElement?.clientWidth||0,r=window.innerHeight||document.documentElement?.clientHeight||0,i=e.right-t.width;i=Math.max(8,Math.min(i,n-t.width-8));let a=e.bottom+4;a+t.height+8>r&&(a=Math.max(8,e.top-t.height-4)),c.styles({left:`${i}px`,top:`${a}px`})}};s.on(`click`,()=>{l.popupOpen?y():x()});let S=r.renderDom.bind(r);r.renderDom=()=>{Ji();let e=S();return h(),e},r.updateOverflow=h,r.titlePosition=t=>{if(t===void 0)return l.titlePosition;let n=sa(t);return l.titlePosition=n,n!==`top`&&l.popupOpen&&y(),r.attr(`data-title-position`,l.titlePosition),i.attr(`aria-orientation`,l.titlePosition===`top`?`horizontal`:`vertical`),d(l.titlePosition),g(),l.tabs.forEach((t,n)=>{p(t,n===e.currentPath())}),h(),r},r.titlePosition(l.titlePosition),r.lockTitle=(e=!0)=>e===void 0?l.lockTitle:(l.lockTitle=!!e,r.attr(`data-title-locked`,l.lockTitle?`true`:null),d(l.titlePosition),h(),r),r.titleLocked=r.lockTitle;let C=(t,n=null)=>{n&&n.stopPropagation();let r=Array.from(l.tabs.entries()).findIndex(([e])=>e===t),o=l.tabs.get(t);if(!o)return;let s=o.label.attr(`aria-selected`)===`true`;if(l.tabs.delete(t),i._children=i.children().filter(e=>e!==o.tab),i._childrenDirty=!0,o.tab.destroy(),g(),_(),!s)return;let c=Array.from(l.tabs.keys());if(c.length>0){let t=c[Math.min(r,c.length-1)];e.navigate(t,{replace:!0});return}a.clearChildren().commit(),e._navigationGeneration+=1,e._currentView=null},w=new P(`div`).className(`yoya-vrouter-views-context`).attr({role:`menu`,"aria-label":`标签页操作`}).styles({background:K(`color-surface`,`#ffffff`),border:q(`color-border`,`#d0d7de`),borderRadius:`8px`,boxShadow:`0 12px 28px rgba(15, 23, 42, 0.18)`,display:`none`,minWidth:`180px`,padding:`6px`,position:`fixed`,zIndex:`100`}),T=null,E=()=>{w.styles({display:`none`}),w.clearChildren(),w._el?.remove(),T&&=(T(),null)},D=(t,n=null)=>{let r=new Set(t),o=Array.from(l.tabs.entries()),s=o.findIndex(([e])=>r.has(e));if(o.forEach(([e,t])=>{r.has(e)&&(l.tabs.delete(e),i._children=i.children().filter(e=>e!==t.tab),i._childrenDirty=!0,t.tab.destroy())}),g(),_(),l.popupOpen&&b(),!r.has(e.currentPath()))return;let c=Array.from(l.tabs.keys());if(c.length===0){a.clearChildren().commit(),e._navigationGeneration+=1,e._currentView=null;return}let u=n&&l.tabs.has(n)?n:c[Math.min(Math.max(s,0),c.length-1)];e.navigate(u,{replace:!0})},O=t=>{if(typeof navigator>`u`||!navigator.clipboard)return;let n=typeof window>`u`?``:window.location.origin,r=typeof window>`u`?``:window.location.pathname,i=e.mode()===`history`?`${n}${r}${t}`:`${n}${r}#${t}`;navigator.clipboard.writeText(i).catch(()=>{})},ee=(t,n)=>{l.popupOpen&&y(),E();let r=Array.from(l.tabs.entries()),i=r.findIndex(([e])=>e===t),a=()=>D(r.filter(([e])=>e!==t).map(([e])=>e),t),o=()=>D(r.slice(0,i).map(([e])=>e),t),s=()=>D(r.slice(i+1).map(([e])=>e),t),c=()=>D(r.map(([e])=>e)),u=(e,t,n=!1,r=!1)=>{let i=new P(`div`).className(`yoya-vrouter-views-context-item`).attr({role:`menuitem`,tabIndex:`0`}).text(e).styles({alignItems:`center`,borderRadius:`6px`,color:n?K(`color-text-danger`,`#b91c1c`):K(`color-text`,`#24292f`),cursor:r?`default`:`pointer`,display:`flex`,fontSize:`13px`,gap:`8px`,padding:`7px 10px`,width:`100%`});return r?(i.attr(`aria-disabled`,`true`),i.styles({opacity:`0.4`})):i.on(`click`,()=>{E(),t()}),w.child(i),i},d=()=>w.child(new P(`div`).className(`yoya-vrouter-views-context-separator`));u(`刷新`,()=>e.navigate(t,{replace:!0})),u(`复制链接`,()=>O(t)),d(),u(`关闭`,()=>C(t),!0),u(`关闭其他`,a,!1,r.length<=1),u(`关闭左侧`,o,!1,i<=0),u(`关闭右侧`,s,!1,i===r.length-1),d(),u(`关闭全部`,c,!0,r.length===0),w.bindTo(document.body),w.styles({display:`block`});let f=w._el.getBoundingClientRect(),p=typeof window>`u`?0:window.innerWidth||0,m=typeof window>`u`?0:window.innerHeight||0,h=Math.max(8,Math.min(n.clientX||0,p-f.width-8)),g=Math.max(8,Math.min(n.clientY||0,m-f.height-8));w.styles({left:`${h}px`,top:`${g}px`});let _=e=>{w._el?.contains(e.target)||E()},v=e=>{e.key===`Escape`&&E()},b=()=>E(),x=I(`mousedown`,_),S=I(`keydown`,v),ee=L(`scroll`,b,!0),k=L(`resize`,b);T=()=>{x(),S(),ee(),k()}},k=(t={})=>{let n=t.path||e.currentPath(),r=new Set(l.titlePosition===`top`?Array.from(l.tabs.keys()).slice(0,8):Array.from(l.tabs.keys())),a=l.tabs.get(n);if(a){let e=f(t);a.text.textContent(e),a.closeButton.attr(`aria-label`,`关闭 ${e}`)}else{let r=new P(`div`).className(`yoya-vrouter-views-title`),o=N(f(t)),s=new P(`button`).className(`yoya-vrouter-views-label`).child(o),c=new P(`button`).className(`yoya-vrouter-views-close`);r.attr({"data-router-view-path":n}),r.styles({alignItems:`center`,cursor:`pointer`,display:`inline-flex`,font:`inherit`,gap:`8px`,whiteSpace:`nowrap`}),s.attr({role:`tab`,type:`button`}),s.styles({background:`transparent`,border:`0`,color:`inherit`,cursor:`pointer`,font:`inherit`,padding:`0`}),s.on(`click`,()=>e.navigate(n)),c.attr({type:`button`,"aria-label":`关闭 ${f(t)}`}),c.styles({background:`transparent`,border:`0`,color:`inherit`,cursor:`pointer`,font:`inherit`,lineHeight:`1`,padding:`0`}),c.text(`×`),c.on(`click`,e=>C(n,e)),r.on(`contextmenu`,e=>{e.preventDefault(),e.stopPropagation(),ee(n,e)}),r.child(s,c),i.child(r),a={closeButton:c,label:s,tab:r,text:o},l.tabs.set(n,a),p(a,!1)}r.has(n)||(l.tabs.delete(n),l.tabs=new Map([[n,a],...l.tabs])),l.tabs.forEach((e,t)=>p(e,t===n)),g(),l.popupOpen&&b(),_()},te=()=>{if(!l.persist)return;let t=Xi(l.storageKey);if(t){l.suppressPersist=!0;try{t.paths.slice().reverse().forEach(t=>{let n=e._resolve(t);k({...n.context,path:t})})}finally{l.suppressPersist=!1,_()}}};if(typeof t==`function`)t(r);else if(t&&typeof t==`object`){let{persist:e,storageKey:n,title:i,titlePosition:a,titleResolver:o,...s}=t;i!==void 0&&(l.title=i),e!==void 0&&(l.persist=!!e),n!==void 0&&(l.storageKey=n),a!==void 0&&r.titlePosition(a),typeof o==`function`&&(l.titleResolver=o),Object.keys(s).length>0&&r.setup(s)}e.outlet(a),te(),(e.currentRoute()||e.currentPath()!==`/`)&&k({params:e.currentParams(),path:e.currentPath(),query:e.currentQuery(),route:e.currentRoute(),router:e});let ne=e.subscribe(e=>k(e)),re=L(`resize`,()=>h()),A=r.destroy.bind(r);return r.destroy=()=>(l.popupOpen&&y(),E(),re(),ne(),e.outlet()===a&&e.outlet(e),A()),typeof n==`function`&&n(r),r}F(P,{vLink:na,vRouter:ta,vRouterView:ra,vRouterViews:ia});function aa(e,t){let n={beforeEnter:null,error:null,loading:null,pattern:wa(e),title:null,view:null};return typeof t==`function`||t instanceof A||Ea(t)?(n.view=t,n):(t&&typeof t==`object`&&(n.beforeEnter=t.beforeEnter||null,n.error=t.error??null,n.loading=t.loading??null,n.title=t.title??null,n.view=t.view||t.component||null),n)}function oa(e){if(!(e instanceof Zi))throw TypeError(`vLink and vRouterView require a Router instance`)}function sa(e){return e===`left`||e===`right`?e:`top`}function ca(e,t){if(typeof t==`function`)return t(e),e;if(!t||typeof t!=`object`)return e;let{beforeEach:n,default:r,error:i,loading:a,notFound:o,routes:s=[],...c}=t;return Object.keys(c).length&&e.setup(c),r!==void 0&&e.default(r),n&&e.beforeEach(n),a!==void 0&&e.loading(a),i!==void 0&&e.error(i),s.forEach(t=>{t?.pattern!==void 0&&e.vRoute(t.pattern,t.config)}),o!==void 0&&e.notFound(o),e}function la(e,t,n){if(typeof n==`function`){n(e);return}if(typeof n==`string`){e.to(n),e.label(n);return}if(!n)return;let{exact:r,label:i,params:a,query:o,replace:s,to:c,...l}=n;Object.keys(l).length&&e.setup(l),c!==void 0&&(t.to=c),a!==void 0&&(t.params=a||{}),o!==void 0&&(t.query=o||{}),s!==void 0&&(t.replace=!!s),r!==void 0&&(t.exact=!!r),t.label=i??t.to,e.label(t.label)}function J(e,t,n,r){if(r===void 0)return t[n];t[n]=r,n===`to`&&t.label===null&&Ki(e.children()[0],Gi(r));let i=e._routerInstance;return i&&ua(e,t,i),e}function ua(e,t,n){e._routerInstance=n;let r=da(t.to,t.params,t.query),i=fa(n.currentPath(),r,t.exact),a=new Set(String(e.attr(`class`)||``).split(/\s+/).filter(Boolean));return a.add(`yoya-vlink`),i?a.add(`is-active`):a.delete(`is-active`),e.attr({"aria-current":i?`page`:null,class:[...a].join(` `),href:n.mode()===`history`?r:`#${r}`}),e}function da(e,t,n){let[r,i=``]=X(e).split(`?`),a=r.replace(/:([A-Za-z0-9_]+)/g,(e,n)=>t[n]===void 0?e:encodeURIComponent(t[n])),o=new URLSearchParams(i);Object.entries(n||{}).forEach(([e,t])=>{o.delete(e),Array.isArray(t)?t.forEach(t=>o.append(e,t)):t!=null&&o.set(e,t)});let s=o.toString();return s?`${a}?${s}`:a}function fa(e,t,n){let r=X(e),i=X(t);if(n)return r===i;let a=Z(r).pathname,o=Z(i).pathname;return a===o||a.startsWith(`${o}/`)}function pa(e,t){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&(!t.attr(`target`)||t.attr(`target`)===`_self`)}function Y(e,t){if(e instanceof A)return e;if(e==null)return N(``);if(Ea(e))return N(e);if(typeof e==`object`&&e&&e.default!==void 0&&typeof e.render!=`function`)return Y(e.default,t);if(typeof e==`function`)return Y(e(t),t);if(typeof e==`object`&&typeof e.render==`function`)return Y(e.render(),t);throw TypeError(`Router route view must be a ViewNode, string, number, null, undefined, a render() component object, a factory returning one, or a module with a default export`)}const ma=()=>`加载中…`,ha=e=>`加载失败:${e?.message??String(e)}`;function ga(e){return e!==null&&(typeof e==`object`||typeof e==`function`)&&typeof e.then==`function`}function _a(e,t){return Y(typeof e==`function`?e(...t):e,t[t.length-1])}function va(e,t){let n=Z(e),r=Z(t),i=Ta(n.pathname),a=Ta(r.pathname);if(i.length!==a.length)return null;let o={};for(let e=0;e<i.length;e+=1){let t=i[e],n=a[e];if(t.startsWith(`:`)){o[t.slice(1)]=decodeURIComponent(n);continue}if(t!==n)return null}return{params:o,pathname:r.pathname,query:r.query}}function ya(e,t,n,r){return{params:{...r.params},path:t,pathname:r.pathname,query:{...r.query},route:n,router:e}}function ba(){return typeof window>`u`?`/`:X(window.location.hash.replace(/^#/,``)||`/`)}function xa(e=`hash`){return typeof window>`u`?`/`:e===`history`?X(`${window.location.pathname}${window.location.search}`):ba()}function Sa(e,t={}){if(typeof window>`u`)return!1;let n=`#${e}`;return t.replace?(window.history.replaceState(null,``,n),!0):window.location.hash!==n&&(window.location.hash=n,!0)}function Ca(e,t={},n=`hash`){if(typeof window>`u`)return!1;if(n!==`history`)return Sa(e,t);let r=X(e),i=xa(`history`);return!t.replace&&i===r?!1:(t.replace?window.history.replaceState(null,``,r):window.history.pushState(null,``,r),!0)}function wa(e){return X(e).split(`?`)[0]||`/`}function X(e){let[t,n=``]=String(e||`/`).replace(/^#/,``).split(`?`),r=t.startsWith(`/`)?t:`/${t}`,i=r.length>1?r.replace(/\/+$/,``):r;return n?`${i}?${n}`:i}function Z(e){let[t,n=``]=X(e).split(`?`);return{pathname:t,query:Object.fromEntries(new URLSearchParams(n))}}function Ta(e){return e.split(`/`).filter(Boolean)}function Ea(e){return typeof e==`string`||typeof e==`number`}let Da=null;function Q(){let e=0;return{next(){return e+=1,e}}}function Oa(e,t){let n=Da;Da=e;try{return t()}finally{Da=n}}function ka(e={},t={}){let{cookie:n=``,url:r=``,acceptLanguage:i=``}=e||{},{cookieKey:a=`yoya-lang`,queryKey:o=`locale`,defaultLanguage:s=`zh-CN`}=t;return Aa(n,a)||ja(r,o)||Ma(i)||s}function Aa(e,t){if(!e||!t)return null;for(let n of String(e).split(`;`)){let e=n.indexOf(`=`);if(e===-1||n.slice(0,e).trim()!==t)continue;let r=n.slice(e+1).trim();if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}return null}function ja(e,t){if(!e||!t)return null;let n=String(e).indexOf(`?`);return n===-1?null:new URLSearchParams(String(e).slice(n+1)).get(t)||null}function Ma(e){if(!e)return null;let t=String(e).split(`,`)[0];return t&&t.split(`;`)[0].trim()||null}function Na(e,t){return e?a(typeof e==`function`?e():e,t):t()}function Pa(e,t,n,r,i){return Na(e,()=>Fa(t,r,()=>Ia(n,r,i)))}function Fa(e,t,n){return e?Ye(typeof e==`function`?e(t):e,n):n()}function Ia(e,t,n){return e?Se(typeof e==`function`?e(t):e,n):n()}function $(e,t=null){if(e instanceof A)return e;if(typeof e==`function`)return $(e(t),t);if(e&&typeof e.render==`function`)return $(e.render(),t);throw TypeError(`renderToString/mount requires a ViewNode, a component object with render(), or a factory function`)}function La(e){let t=1;return typeof e.children==`function`&&e.children().forEach(e=>{(e instanceof M?e._resolveList():[e]).forEach(e=>{t+=La(e)})}),t}function Ra(e,t={}){let{access:n=null,context:r=null,maxNodes:i=1/0,state:a=null,i18n:o=null}=t||{},s=Ua(a);return Oa(Q(),()=>Pa(n,r,o,a,()=>{let t=typeof e==`function`,n=$(e,a),r;try{r=La(n)>i?{exceeded:!0,html:``,state:s}:{exceeded:!1,html:n.toHTML(),state:s}}finally{t&&n.destroy()}return r}))}var za=class extends W{constructor(){super(`html`,null),this._headCallback=null,this._bodyCallback=null}head(e){return this._headCallback=typeof e==`function`?e:null,this}body(e){return this._bodyCallback=typeof e==`function`?e:null,this}vBody(...e){return this.body(t=>t.vBody(...e))}};function Ba(e){return String(e??``).replace(/&/g,`&`).replace(/"/g,`"`)}function Va(e,t={},n={}){let{client:r=`/client.js`,containerId:i=`app`,access:a=null,context:o=null,i18n:s=null,maxNodes:c=1/0,messages:l,stateId:u=`__YOYA_DATA__`}=n||{},d=t||{};if(!e||typeof e.page!=`function`)throw TypeError(`renderPage requires { page: (page, state) => {} }`);let f=s||(l?()=>ye({language:d.lang||`zh-CN`,messages:l}):null),p=Ua(d);return Oa(Q(),()=>Pa(a,o,f,d,()=>{let t=new za;e.page(t,d);let n=new W(`head`);t._headCallback&&t._headCallback(n,d);let a=new W(`body`);t._bodyCallback&&t._bodyCallback(a,d);let o=La(a)>c,s=n.toHTML(),l=`<div id="${Ba(i)}">`,f=o?`${l}</div>`:`${l}${a.toHTML()}</div>`,m=`<script type="application/json" id="${Ba(u)}">${p}<\/script>`,h=`<script type="module" src="${Ba(r)}"><\/script>`;return n.destroy(),a.destroy(),`<!doctype html>
|
|
36
|
+
<html lang="${Ba(d.lang||`zh-CN`)}">
|
|
37
|
+
${s}
|
|
38
|
+
<body>
|
|
39
|
+
${f}
|
|
40
|
+
${m}
|
|
41
|
+
${h}
|
|
42
|
+
</body>
|
|
43
|
+
</html>`}))}function Ha(e,t={}){if(typeof document>`u`)return null;let{messages:n,i18n:r=null,stateId:i=`__YOYA_DATA__`,target:a=`#app`}=t||{},o=document.getElementById(i),s=Wa(o?o.textContent:``),c=r||(n?()=>ye({language:s?.lang||`zh-CN`,messages:n}):null),l=D(a);return l&&l.firstElementChild?Ka(e,a,s,{access:t.access,context:t.context,i18n:c}):Ga(e,a,s,{access:t.access,context:t.context,i18n:c})}function Ua(e){return e==null?null:JSON.stringify(e).replace(/</g,`\\u003c`)}function Wa(e){return e==null||e===``?null:JSON.parse(e)}function Ga(e,t,n=null,r={}){return Oa(Q(),()=>Pa(r.access,r.context,r.i18n,n,()=>{let r=$(e,n),i=D(t);return i&&(i.replaceChildren(),i.appendChild(r.renderDom())),r}))}function Ka(e,t,n=null,r={}){return Oa(Q(),()=>Pa(r.access,r.context,r.i18n,n,()=>{let r=$(e,n),i=D(t);if(i){let e=i.firstElementChild;e?(qa(r,e),Ya(r),Ja(r),r.renderDom()):i.appendChild(r.renderDom())}return r}))}function qa(e,t){if(e instanceof M){let n=e._resolveList();if(n.length===1){qa(n[0],t);return}let r=t?Array.from(t.childNodes):[];n.forEach((e,t)=>qa(e,r[t]));return}if(e instanceof j){t&&t.nodeType===3?(e._textNode=t,e._el=t,t.textContent!==e._content&&(t.textContent=e._content)):Xa(t,e.renderDom());return}if(t&&t.nodeType===1&&t.tagName.toLowerCase()===e._tagName){e._el=t,e._hydrated=!0;let n=Array.from(t.childNodes),r=0;e.children().forEach(e=>{(e instanceof M?e._resolveList():[e]).forEach(e=>{qa(e,n[r]),r+=1})});return}Xa(t,e.renderDom())}function Ja(e){if(e instanceof M){e._resolveList().forEach(e=>Ja(e));return}e instanceof j||(e._el&&e._hydrated&&e._applyBindingsToElement(),e.children().forEach(Ja))}function Ya(e){if(e instanceof M){e._resolveList().forEach(e=>Ya(e));return}e instanceof j||(e.children().forEach(Ya),typeof e.hydrateSnapshot==`function`&&e.hydrateSnapshot())}function Xa(e,t){e&&e.parentNode&&e.parentNode.replaceChild(t,e)}export{qr as ArrowDownOutlined,Jr as ArrowLeftOutlined,Yr as ArrowRightOutlined,Xr as ArrowUpOutlined,Zr as BellOutlined,Qr as CalendarOutlined,$r as CheckOutlined,ei as ChevronDownOutlined,ti as ChevronLeftOutlined,ni as ChevronRightOutlined,ri as ChevronUpOutlined,de as ClientOnlyNode,ii as CloseOutlined,ai as CodeOutlined,M as ComponentNode,oi as CopyOutlined,si as DownloadOutlined,ci as EditOutlined,P as ElementNode,li as ExternalOutlined,ui as EyeOutlined,di as FileOutlined,mi as FolderOpenOutlined,pi as FolderOutlined,hi as HeartOutlined,gi as HomeOutlined,W as HtmlElementNode,_e as I18n,ve as I18nTextNode,fi as ImageOutlined,_i as InfoOutlined,vi as LockOutlined,yi as LogoutOutlined,bi as MailOutlined,xi as MenuOutlined,Si as MinusOutlined,Fi as MonitorOutlined,Pi as MoonOutlined,Ci as MoreHorizontalOutlined,za as PageDocumentNode,wi as PlusOutlined,Ti as RefreshOutlined,Pt as RequestBase,Ft as Result,Zi as Router,Ii as SVG_NAMESPACE,Ei as SearchOutlined,Di as SettingsOutlined,Oi as StarOutlined,Ni as SunOutlined,Ri as SvgElementNode,j as TextNode,j as VTextNode,j as ViewTextNode,ki as TrashOutlined,Ai as UploadOutlined,ji as UserOutlined,A as ViewNode,Mi as WarningOutlined,zt as a,Bt as abbr,Vt as address,bt as announce,le as applyElementOptions,Ht as area,Ut as article,Wt as aside,Gt as audio,Kt as b,qt as base,Jt as bdi,Yt as bdo,I as bindDocumentEvent,L as bindWindowEvent,Xt as blockquote,Zt as body,Qt as br,$t as button,en as canvas,tn as caption,nn as cite,Ze as clearInstalledContext,rn as code,an as col,on as colgroup,Nt as configureRequest,i as createAccess,ue as createElementFactory,yt as createFocusTrap,Lt as createHtmlFactories,ye as createI18n,Qi as createRouter,s as currentAccess,Qe as currentContext,sn as data,cn as datalist,ln as dd,un as del,dn as details,fn as dfn,pn as dialog,mn as div,hn as dl,gn as dt,_n as em,vn as embed,O as escapeHtml,yn as fieldset,bn as figcaption,xn as figure,Sn as footer,Cn as form,vt as getFocusableElements,Ee as getI18n,Oe as getPersistedI18nLocales,Dt as getYoyaMode,At as getYoyaTheme,wn as h1,Tn as h2,En as h3,Dn as h4,On as h5,kn as h6,An as head,jn as header,Mn as hgroup,Nn as hr,Pn as html,Ka as hydrate,Ha as hydrateOrMount,Fn as i,z as i18n,be as i18nText,In as iframe,Ln as img,jt as initYoyaTheme,he as injectDocumentStyle,Rn as input,zn as ins,o as installAccess,Xe as installContext,xe as installI18nStringShortcut,Bn as kbd,Vn as label,Hn as legend,Un as li,Wn as link,De as listI18n,Gn as main,Kn as map,qn as mark,Jn as menu,Yn as meta,Xn as meter,Ga as mount,xt as moveByKey,Zn as nav,se as normalizeChild,ce as normalizeSetupArguments,Qn as noscript,$n as object,er as ol,tr as optgroup,nr as option,rr as output,ir as p,n as parseAccessSpec,Wa as parseState,ar as picture,or as pre,sr as progress,cr as q,F as registerChildFactories,we as registerI18n,Va as renderPage,Ra as renderToString,ka as resolveLocale,D as resolveTarget,Ot as resolveYoyaMode,$i as router,lr as rp,ur as rt,dr as ruby,fr as s,pr as samp,mr as script,hr as search,gr as section,_r as select,vr as selectedcontent,Ua as serializeState,Et as setYoyaMode,kt as setYoyaTheme,yr as slot,br as small,$e as snapshotContext,xr as source,Sr as span,r as stripAccessCode,Cr as strong,wr as style,Tr as styleTag,Er as sub,Dr as summary,Or as sup,G as svg,kr as table,Ar as tbody,jr as td,Mr as template,N as text,N as vText,Nr as textarea,Pr as tfoot,Fr as th,Ir as thead,Lr as time,Rr as title,zr as tr,Br as track,Vr as u,Hr as ul,me as unbindDocumentEvent,Te as unregisterI18n,fe as vClientOnly,na as vLink,ea as vRoute,ta as vRouter,ra as vRouterView,ia as vRouterViews,ht as vStateNode,Ur as varTag,Wr as video,Gr as wbr,a as withAccess,Ye as withContext,Se as withI18nStringShortcut};
|