mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
94 KiB
JavaScript
1 line
94 KiB
JavaScript
var t;t=function(){const t=[],e=[];function n(){return`${performance.now().toString(36)}-${Math.random().toString(36).substring(2,5)}`}function o(t,e=new Set){if(t&&"object"==typeof t&&!e.has(t)){e.add(t);for(let n in t)o(t[n],e)}return t}setInterval((()=>{let n=new Set(e.splice(0)),o=0;for(let e of n)t[e]&&(t[e](),o++);return o}),25),window.$vupdate=e=>{t[e]()};var r=[];const i=Symbol("isProxy"),s=Symbol("DataID"),a=Symbol("bind"),c=Symbol("root"),l=Symbol("root arg");function u(t,e){t[c]=e,Object.keys(e).forEach((e=>{e in t||(t[e]=l)}))}function f(t){return!(!t||"object"!=typeof t||t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Event||t.t||t.constructor!==Object&&t.constructor!==Array)}function h(t,e){if(!t||!t[i]||!f(e))return e;let n=t[a];if(!e[i]){if(Array.isArray(e)&&Array.isArray(t)){t.length=0;for(let n=0;n<e.length;n++)t.push(e[n]);return t}return Object.keys(t).forEach((n=>{e.hasOwnProperty(n)||delete t[n]})),Object.keys(e).forEach((n=>{t[n]?.[i]?t[n]=h(t[n],e[n]):t[n]=e[n]})),t}if(e[s]===t[s])return e;for(let o in n)if(e[a][o]?.indexOf){const t=e[a][o],r=new Set(t);for(let e of n[o])r.has(e)||(t.push(e),r.add(e))}else e[a][o]=n[o];for(let o in e)o in t&&t[o]?.[i]&&(e[o]=h(t[o],e[o]));return e}let d=!1;const p={console,window,prompt:prompt.bind(window),alert:alert.bind(window),confirm:confirm.bind(window),RegExp,document,Array,Object,Math,Date,JSON,Symbol,Number,eval,isNaN,parseInt,parseFloat,setTimeout:setTimeout.bind(window),setInterval:setInterval.bind(window),clearTimeout:clearTimeout.bind(window),clearInterval:clearInterval.bind(window),encodeURIComponent,btoa:btoa.bind(window),fetch:fetch.bind(window),TextDecoder,history,requestAnimationFrame:requestAnimationFrame.bind(window)};function m(t,e,n){const o=new Proxy(t,{has:(t,e)=>!0,get(o,r,i){let s;return"$data"===r?s=t:"$env"===r?s=e:r in o?s=Reflect.get(o,r,i):r in e?s=e[r]:n&&r in n?s=n[r]:r in p?s=p[r]:r in window&&(s=window[r]),s},set:(t,e,n,o)=>Reflect.set(t,e,n,o)});return o}const w=Object.getPrototypeOf((async function(){})).constructor;function b(t,e){if(t.startsWith("/"))return t;const n=e.substring(0,e.lastIndexOf("/")).split("/").filter((t=>""!==t)),o=t.split("/").filter((t=>""!==t));for(const r of o)if(".."===r)n.length>0&&n.pop();else{if("."===r)continue;n.push(r)}return"/"+n.join("/")}const y={Wrap:function o(p,m=void 0){const w=n();let b=!1;"[object Array]"==={}.toString.call(p)&&(b=!0),m&&u(p,m);const y={},v={get(t,e,n){if(e===s)return w;if(e===i)return!0;if(e===a)return y;const u=Reflect.get(t,e,n);if(u===l)return t[c][e];if("symbol"==typeof e&&d)return u;if("function"==typeof u)return u;let h=-1;if(r.length>0){let t=e;h=r[r.length-1],b&&(t=""),y.hasOwnProperty(t)?-1==y[t].indexOf(h)&&y[t].push(h):y[t]=[h]}if(window.vdev,f(u)&&!u[i]){let r=o(u,void 0);return Reflect.set(t,e,r,n),r}return u},set(n,o,s,a){const u=Reflect.get(n,o,a);if(u===l)return n[c][o]=s,!0;if(u===s)return!0;if(d)return Reflect.set(n,o,s,a);let p=!0;if(Array.isArray(s)&&Array.isArray(u)){d=!0,u.length=0;for(let t=0;t<s.length;t++)u.push(s[t]);d=!1}else u&&u[i]&&f(s)?(s=h(u,s),p=Reflect.set(n,o,s,a)):p=Reflect.set(n,o,s,a);if(p&&0===r.length){let n=o;if(b&&(n=""),y[n]){let o=0;for(window.vdev;o<y[n].length;){let r=y[n][o];t[r]?(o++,window.vdev,e.push(r)):y[n].splice(o,1)}}}return p},deleteProperty(n,o){window.vdev;const i=Reflect.deleteProperty(n,o);if(i&&0===r.length){let n=o;if(b&&(n=""),y[n]){let o=0;for(;o<y[n].length;){let r=y[n][o];t[r]?(o++,e.push(r),window.vdev):y[n].splice(o,1)}}}return i}};return new Proxy(p,v)},Watch:function(e,n,i){let s,a=t.length;r.push(a),"function"==typeof n?t.push((()=>{n(e())})):t.push(e);try{s=e(),i&&i.deep&&o(s)}catch(g){}finally{r.pop()}return"function"==typeof n&&n(s),a},Cancel:function(e){e>=0&&e<t.length&&(t[e]=null)},ForceUpdate:function(){for(let e of t)e&&e()},SetDataRoot:u,DataID:s,GenUniqueID:n,Run:function(t,e,n,o){let r=t.trim();const i=r.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g,"").trim();let s;/^(var|let|const|if|for|while|switch|try|throw|class|function|return|debugger)\b/.test(i)||-1!==r.indexOf("\n")&&i.includes(";")||(r="return "+r),r=`\nwith (sandbox) {\n${r}\n}`;try{s=Function("sandbox",r)(m(e,n,o))}catch(a){}return s},AsyncRun:async function(t,e,n,o){let r=t.trim();-1===r.indexOf("\n")&&(r="return "+r),r=`\nwith (sandbox) {\n${r}\n}`;const i=new w("sandbox",r);return await i(m(e,n,o))},ParseImport:async function(t,e,n,o){e=e||{};let r,i=n.scoped||"",s=t;o=o.startsWith("http")?o:i+o;const a=/await import\(['"]([^'"]+)['"]\)/gm;for(;null!==(r=a.exec(t));){let t=r[1];t.startsWith("http")||(t=b(t,o),t=window.location.origin+t),s=s.replace(r[0],`await import('${t}')`)}const c=/^[\s/]*import\s+([\w{},\s]+)\s+from\s+['"]([^'"]+)['"][;\s]*$/gm;for(;null!==(r=c.exec(t));){if(s=s.replace(r[0],""),r[0].trim().startsWith("//"))continue;let t=r[2];t.startsWith("http")||t.startsWith("@")||(t=t.startsWith("/")&&i?i+t:b(t,o)),t.startsWith("@")&&(t=t.slice(1)),t.endsWith(".js")||(t+=".js"),t.startsWith("http")||(t=window.location.origin+t);let n=r[1].trim();try{let o=null;if(/^\w+$/.test(n))o=n;else{if(!/^{[\w\s,]+}$/.test(n))throw Error("unsupported import: "+r[0]);o=n.slice(1,-1).split(",").map((t=>t.trim()))}const i=await import(t);"string"==typeof o?i.default?e[o]=i.default:e[o]=i:o.forEach((t=>{t in i?e[t]=i[t]:t in i.default&&(e[t]=i.default[t])}))}catch(l){}}return s.trim()}};class v{constructor(){this.events={}}on(t,e,n=null){if("function"!=typeof e)throw Error("\u56de\u8c03\u51fd\u6570\u5fc5\u987b\u662f\u4e00\u4e2a\u51fd\u6570");this.events[t]||(this.events[t]=[]);const o={callback:e,context:n};return this.events[t].push(o),()=>this.off(t,e,n)}once(t,e,n=null){const o=(...r)=>{this.off(t,o,n),e.apply(n,r)};return this.on(t,o,n)}off(t,e=null,n=null){this.events[t]&&(e?(this.events[t]=this.events[t].filter((t=>!(t.callback===e&&t.context===n))),0===this.events[t].length&&delete this.events[t]):delete this.events[t])}emit(t,...e){this.events[t]&&[...this.events[t]].forEach((t=>{try{t.callback.apply(t.context,e)}catch(n){}}))}listenerCount(t){return this.events[t]?this.events[t].length:0}eventNames(){return Object.keys(this.events)}removeAllListeners(){this.events={}}hasListeners(t){return this.listenerCount(t)>0}}function g(t,e){return function(){return t.apply(e,arguments)}}const{toString:x}=Object.prototype,{getPrototypeOf:R}=Object,{iterator:k,toStringTag:O}=Symbol,T=(E=Object.create(null),t=>{const e=x.call(t);return E[e]||(E[e]=e.slice(8,-1).toLowerCase())});var E;const S=t=>(t=t.toLowerCase(),e=>T(e)===t),A=t=>e=>typeof e===t,{isArray:j}=Array,$=A("undefined"),N=S("ArrayBuffer"),P=A("string"),C=A("function"),U=A("number"),F=t=>null!==t&&"object"==typeof t,D=t=>{if("object"!==T(t))return!1;const e=R(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||O in t||k in t)},L=S("Date"),I=S("File"),z=S("Blob"),M=S("FileList"),q=S("URLSearchParams"),[B,_,H,V]=["ReadableStream","Request","Response","Headers"].map(S);function X(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let o,r;if("object"!=typeof t&&(t=[t]),j(t))for(o=0,r=t.length;r>o;o++)e.call(null,t[o],o,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),i=r.length;let s;for(o=0;i>o;o++)s=r[o],e.call(null,t[s],s,t)}}function J(t,e){e=e.toLowerCase();const n=Object.keys(t);let o,r=n.length;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,K=t=>!$(t)&&t!==W,G=(Z="undefined"!=typeof Uint8Array&&R(Uint8Array),t=>Z&&t instanceof Z);var Z;const Y=S("HTMLFormElement"),Q=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),tt=S("RegExp"),et=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};X(n,((n,r)=>{let i;!1!==(i=e(n,r,t))&&(o[r]=i||n)})),Object.defineProperties(t,o)},nt=S("AsyncFunction"),ot=(rt="function"==typeof setImmediate,it=C(W.postMessage),rt?setImmediate:it?(st="axios@"+Math.random(),at=[],W.addEventListener("message",(({source:t,data:e})=>{t===W&&e===st&&at.length&&at.shift()()}),!1),t=>{at.push(t),W.postMessage(st,"*")}):t=>setTimeout(t));var rt,it,st,at;const ct="undefined"!=typeof queueMicrotask?queueMicrotask.bind(W):"undefined"!=typeof process&&process.nextTick||ot,lt={isArray:j,isArrayBuffer:N,isBuffer:function(t){return null!==t&&!$(t)&&null!==t.constructor&&!$(t.constructor)&&C(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||C(t.append)&&("formdata"===(e=T(t))||"object"===e&&C(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&N(t.buffer),e},isString:P,isNumber:U,isBoolean:t=>!0===t||!1===t,isObject:F,isPlainObject:D,isReadableStream:B,isRequest:_,isResponse:H,isHeaders:V,isUndefined:$,isDate:L,isFile:I,isBlob:z,isRegExp:tt,isFunction:C,isStream:t=>F(t)&&C(t.pipe),isURLSearchParams:q,isTypedArray:G,isFileList:M,forEach:X,merge:function t(){const{caseless:e}=K(this)&&this||{},n={},o=(o,r)=>{const i=e&&J(n,r)||r;D(n[i])&&D(o)?n[i]=t(n[i],o):D(o)?n[i]=t({},o):j(o)?n[i]=o.slice():n[i]=o};for(let r=0,i=arguments.length;i>r;r++)arguments[r]&&X(arguments[r],o);return n},extend:(t,e,n,{allOwnKeys:o}={})=>(X(e,((e,o)=>{n&&C(e)?t[o]=g(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,o)=>{let r,i,s;const a={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)s=r[i],o&&!o(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&R(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:T,kindOfTest:S,endsWith:(t,e,n)=>{t+="",(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return-1!==o&&o===n},toArray:t=>{if(!t)return null;if(j(t))return t;let e=t.length;if(!U(e))return null;const n=Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[k]).call(t);let o;for(;(o=n.next())&&!o.done;){const n=o.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const o=[];for(;null!==(n=t.exec(e));)o.push(n);return o},isHTMLForm:Y,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:et,freezeMethods:t=>{et(t,((e,n)=>{if(C(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=t[n];C(o)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},o=t=>{t.forEach((t=>{n[t]=!0}))};return j(t)?o(t):o((t+"").split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:J,global:W,isContextDefined:K,isSpecCompliantForm:function(t){return!!(t&&C(t.append)&&"FormData"===t[O]&&t[k])},toJSONObject:t=>{const e=[,,,,,,,,,,],n=(t,o)=>{if(F(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[o]=t;const r=j(t)?[]:{};return X(t,((t,e)=>{const i=n(t,o+1);!$(i)&&(r[e]=i)})),e[o]=void 0,r}}return t};return n(t,0)},isAsyncFn:nt,isThenable:t=>t&&(F(t)||C(t))&&C(t.then)&&C(t.catch),setImmediate:ot,asap:ct,isIterable:t=>null!=t&&C(t[k])};function ut(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}lt.inherits(ut,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:lt.toJSONObject(this.config),code:this.code,status:this.status}}});const ft=ut.prototype,ht={};function dt(t){return lt.isPlainObject(t)||lt.isArray(t)}function pt(t){return lt.endsWith(t,"[]")?t.slice(0,-2):t}function mt(t,e,n){return t?t.concat(e).map((function(t,e){return t=pt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ht[t]={value:t}})),Object.defineProperties(ut,ht),Object.defineProperty(ft,"isAxiosError",{value:!0}),ut.from=(t,e,n,o,r,i)=>{const s=Object.create(ft);return lt.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ut.call(s,t.message,e,n,o,r),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const wt=lt.toFlatObject(lt,{},null,(function(t){return/^is[A-Z]/.test(t)}));function bt(t,e,n){if(!lt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const o=(n=lt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!lt.isUndefined(e[t])}))).metaTokens,r=n.visitor||l,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&<.isSpecCompliantForm(e);if(!lt.isFunction(r))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(lt.isDate(t))return t.toISOString();if(lt.isBoolean(t))return t.toString();if(!a&<.isBlob(t))throw new ut("Blob is not supported. Use a Buffer instead.");return lt.isArrayBuffer(t)||lt.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,n,r){let a=t;if(t&&!r&&"object"==typeof t)if(lt.endsWith(n,"{}"))n=o?n:n.slice(0,-2),t=JSON.stringify(t);else if(lt.isArray(t)&&function(t){return lt.isArray(t)&&!t.some(dt)}(t)||(lt.isFileList(t)||lt.endsWith(n,"[]"))&&(a=lt.toArray(t)))return n=pt(n),a.forEach((function(t,o){!lt.isUndefined(t)&&null!==t&&e.append(!0===s?mt([n],o,i):null===s?n:n+"[]",c(t))})),!1;return!!dt(t)||(e.append(mt(r,n,i),c(t)),!1)}const u=[],f=Object.assign(wt,{defaultVisitor:l,convertValue:c,isVisitable:dt});if(!lt.isObject(t))throw new TypeError("data must be an object");return function t(n,o){if(!lt.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+o.join("."));u.push(n),lt.forEach(n,(function(n,i){!0===(!(lt.isUndefined(n)||null===n)&&r.call(e,n,lt.isString(i)?i.trim():i,o,f))&&t(n,o?o.concat(i):[i])})),u.pop()}}(t),e}function yt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function vt(t,e){this.o=[],t&&bt(t,this,e)}const gt=vt.prototype;function xt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Rt(t,e,n){if(!e)return t;const o=n&&n.encode||xt;lt.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let i;if(i=r?r(e,n):lt.isURLSearchParams(e)?e.toString():new vt(e,n).toString(o),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}gt.append=function(t,e){this.o.push([t,e])},gt.toString=function(t){const e=t?function(e){return t.call(this,e,yt)}:yt;return this.o.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const kt=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){lt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:vt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Et="undefined"!=typeof window&&"undefined"!=typeof document,St="object"==typeof navigator&&navigator||void 0,At=Et&&(!St||0>["ReactNative","NativeScript","NS"].indexOf(St.product)),jt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,$t=Et&&window.location.href||"http://localhost",Nt={...Object.freeze({__proto__:null,hasBrowserEnv:Et,hasStandardBrowserWebWorkerEnv:jt,hasStandardBrowserEnv:At,navigator:St,origin:$t}),...Tt};function Pt(t){function e(t,n,o,r){let i=t[r++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=r>=t.length;return i=!i&<.isArray(o)?o.length:i,a?(lt.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!s):(o[i]&<.isObject(o[i])||(o[i]=[]),e(t,n,o[i],r)&<.isArray(o[i])&&(o[i]=function(t){const e={},n=Object.keys(t);let o;const r=n.length;let i;for(o=0;r>o;o++)i=n[o],e[i]=t[i];return e}(o[i])),!s)}if(lt.isFormData(t)&<.isFunction(t.entries)){const n={};return lt.forEachEntry(t,((t,o)=>{e(function(t){return lt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),o,n,0)})),n}return null}const Ct={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",o=n.indexOf("application/json")>-1,r=lt.isObject(t);if(r&<.isHTMLForm(t)&&(t=new FormData(t)),lt.isFormData(t))return o?JSON.stringify(Pt(t)):t;if(lt.isArrayBuffer(t)||lt.isBuffer(t)||lt.isStream(t)||lt.isFile(t)||lt.isBlob(t)||lt.isReadableStream(t))return t;if(lt.isArrayBufferView(t))return t.buffer;if(lt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return bt(t,new Nt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,o){return Nt.isNode&<.isBuffer(t)?(this.append(e,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=lt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return bt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||o?(e.setContentType("application/json",!1),function(t){if(lt.isString(t))try{return(0,JSON.parse)(t),lt.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Ct.transitional,n=e&&e.forcedJSONParsing,o="json"===this.responseType;if(lt.isResponse(t)||lt.isReadableStream(t))return t;if(t&<.isString(t)&&(n&&!this.responseType||o)){const n=!(e&&e.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw ut.from(t,ut.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(t){return t>=200&&300>t},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};lt.forEach(["delete","get","head","post","put","patch"],(t=>{Ct.headers[t]={}}));const Ut=Ct,Ft=lt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dt=Symbol("internals");function Lt(t){return t&&(t+"").trim().toLowerCase()}function It(t){return!1===t||null==t?t:lt.isArray(t)?t.map(It):t+""}function zt(t,e,n,o,r){return lt.isFunction(o)?o.call(this,e,n):(r&&(e=n),lt.isString(e)?lt.isString(o)?-1!==e.indexOf(o):lt.isRegExp(o)?o.test(e):void 0:void 0)}class Mt{constructor(t){t&&this.set(t)}set(t,e,n){const o=this;function r(t,e,n){const r=Lt(e);if(!r)throw Error("header name must be a non-empty string");const i=lt.findKey(o,r);(!i||void 0===o[i]||!0===n||void 0===n&&!1!==o[i])&&(o[i||e]=It(t))}const i=(t,e)=>lt.forEach(t,((t,n)=>r(t,n,e)));if(lt.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(lt.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,o,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),o=t.substring(r+1).trim(),!n||e[n]&&Ft[n]||("set-cookie"===n?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)})),e})(t),e);else if(lt.isObject(t)&<.isIterable(t)){let n,o,r={};for(const e of t){if(!lt.isArray(e))throw TypeError("Object iterator must return a key-value pair");r[o=e[0]]=(n=r[o])?lt.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}i(r,e)}else null!=t&&r(e,t,n);return this}get(t,e){if(t=Lt(t)){const n=lt.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}(t);if(lt.isFunction(e))return e.call(this,t,n);if(lt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Lt(t)){const n=lt.findKey(this,t);return!(!n||void 0===this[n]||e&&!zt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let o=!1;function r(t){if(t=Lt(t)){const r=lt.findKey(n,t);!r||e&&!zt(0,n[r],r,e)||(delete n[r],o=!0)}}return lt.isArray(t)?t.forEach(r):r(t),o}clear(t){const e=Object.keys(this);let n=e.length,o=!1;for(;n--;){const r=e[n];t&&!zt(0,this[r],r,t,!0)||(delete this[r],o=!0)}return o}normalize(t){const e=this,n={};return lt.forEach(this,((o,r)=>{const i=lt.findKey(n,r);if(i)return e[i]=It(o),void delete e[r];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):(r+"").trim();s!==r&&delete e[r],e[s]=It(o),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return lt.forEach(this,((n,o)=>{null!=n&&!1!==n&&(e[o]=t&<.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Dt]=this[Dt]={accessors:{}}).accessors,n=this.prototype;function o(t){const o=Lt(t);e[o]||(function(t,e){const n=lt.toCamelCase(" "+e);["get","set","has"].forEach((o=>{Object.defineProperty(t,o+n,{value:function(t,n,r){return this[o].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[o]=!0)}return lt.isArray(t)?t.forEach(o):o(t),this}}Mt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),lt.reduceDescriptors(Mt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),lt.freezeMethods(Mt);const qt=Mt;function Bt(t,e){const n=this||Ut,o=e||n,r=qt.from(o.headers);let i=o.data;return lt.forEach(t,(function(t){i=t.call(n,i,r.normalize(),e?e.status:void 0)})),r.normalize(),i}function _t(t){return!(!t||!t.i)}function Ht(t,e,n){ut.call(this,t??"canceled",ut.ERR_CANCELED,e,n),this.name="CanceledError"}function Vt(t,e,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}lt.inherits(Ht,ut,{i:!0});const Xt=(t,e,n=3)=>{let o=0;const r=function(t,e){const n=Array(t=t||10),o=Array(t);let r,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),l=o[s];r||(r=c),n[i]=a,o[i]=c;let u=s,f=0;for(;u!==i;)f+=n[u++],u%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),e>c-r)return;const h=l&&c-l;return h?Math.round(1e3*f/h):void 0}}(50,250);return function(t,e){let n,o,r=0,i=1e3/e;const s=(e,i=Date.now())=>{r=i,n=null,o&&(clearTimeout(o),o=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),a=e-r;i>a?(n=t,o||(o=setTimeout((()=>{o=null,s(n)}),i-a))):s(t,e)},()=>n&&s(n)]}((n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-o,c=r(a);o=i,t({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&s>=i?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0})}),n)},Jt=(t,e)=>{const n=null!=t;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]},Wt=t=>(...e)=>lt.asap((()=>t(...e))),Kt=Nt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Nt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Nt.origin),Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent)):()=>!0,Gt=Nt.hasStandardBrowserEnv?{write(t,e,n,o,r,i){const s=[t+"="+encodeURIComponent(e)];lt.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),lt.isString(o)&&s.push("path="+o),lt.isString(r)&&s.push("domain="+r),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Zt(t,e,n){return!t||/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)&&0!=n?e:function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e)}const Yt=t=>t instanceof qt?{...t}:t;function Qt(t,e){e=e||{};const n={};function o(t,e,n,o){return lt.isPlainObject(t)&<.isPlainObject(e)?lt.merge.call({caseless:o},t,e):lt.isPlainObject(e)?lt.merge({},e):lt.isArray(e)?e.slice():e}function r(t,e,n,r){return lt.isUndefined(e)?lt.isUndefined(t)?void 0:o(void 0,t,0,r):o(t,e,0,r)}function i(t,e){if(!lt.isUndefined(e))return o(void 0,e)}function s(t,e){return lt.isUndefined(e)?lt.isUndefined(t)?void 0:o(void 0,t):o(void 0,e)}function a(n,r,i){return i in e?o(n,r):i in t?o(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e,n)=>r(Yt(t),Yt(e),0,!0)};return lt.forEach(Object.keys(Object.assign({},t,e)),(function(o){const i=c[o]||r,s=i(t[o],e[o],o);lt.isUndefined(s)&&i!==a||(n[o]=s)})),n}const te=t=>{const e=Qt({},t);let n,{data:o,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=e;if(e.headers=a=qt.from(a),e.url=Rt(Zt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),lt.isFormData(o))if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(Nt.hasStandardBrowserEnv&&(r&<.isFunction(r)&&(r=r(e)),r||!1!==r&&Kt(e.url))){const t=i&&s&&Gt.read(s);t&&a.set(i,t)}return e},ee="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const o=te(t);let r=o.data;const i=qt.from(o.headers).normalize();let s,a,c,l,u,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=o;function p(){l&&l(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(s),o.signal&&o.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function w(){if(!m)return;const o=qt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Vt((function(t){e(t),p()}),(function(t){n(t),p()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:o,config:t,request:m}),m=null}m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout,"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(w)},m.onabort=function(){m&&(n(new ut("Request aborted",ut.ECONNABORTED,t,m)),m=null)},m.onerror=function(){n(new ut("Network Error",ut.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let e=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const r=o.transitional||Ot;o.timeoutErrorMessage&&(e=o.timeoutErrorMessage),n(new ut(e,r.clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,t,m)),m=null},void 0===r&&i.setContentType(null),"setRequestHeader"in m&<.forEach(i.toJSON(),(function(t,e){m.setRequestHeader(e,t)})),lt.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),f&&"json"!==f&&(m.responseType=o.responseType),d&&([c,u]=Xt(d,!0),m.addEventListener("progress",c)),h&&m.upload&&([a,l]=Xt(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(o.cancelToken||o.signal)&&(s=e=>{m&&(n(!e||e.type?new Ht(null,t,m):e),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(s),o.signal&&(o.signal.aborted?s():o.signal.addEventListener("abort",s)));const b=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(o.url);b&&-1===Nt.protocols.indexOf(b)?n(new ut("Unsupported protocol "+b+":",ut.ERR_BAD_REQUEST,t)):m.send(r||null)}))},ne=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,o=new AbortController;const r=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;o.abort(e instanceof ut?e:new Ht(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,r(new ut(`timeout ${e} of ms exceeded`,ut.ETIMEDOUT))}),e);const s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)})),t=null)};t.forEach((t=>t.addEventListener("abort",r)));const{signal:a}=o;return a.unsubscribe=()=>lt.asap(s),a}},oe=function*(t,e){let n=t.byteLength;if(e>n)return void(yield t);let o,r=0;for(;n>r;)o=r+e,yield t.slice(r,o),r=o},re=(t,e,n,o)=>{const r=async function*(t,e){for await(const n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*oe(n,e)}(t,e);let i,s=0,a=t=>{i||(i=!0,o&&o(t))};return new ReadableStream({async pull(t){try{const{done:e,value:o}=await r.next();if(e)return a(),void t.close();let i=o.byteLength;if(n){let t=s+=i;n(t)}t.enqueue(new Uint8Array(o))}catch(t){throw a(t),t}},cancel:t=>(a(t),r.return())},{highWaterMark:2})},ie="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,se=ie&&"function"==typeof ReadableStream,ae=ie&&("function"==typeof TextEncoder?(ce=new TextEncoder,t=>ce.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var ce;const le=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},ue=se&&le((()=>{let t=!1;const e=new Request(Nt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),fe=se&&le((()=>lt.isReadableStream(new Response("").body))),he={stream:fe&&(t=>t.body)};var de;ie&&(de=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!he[t]&&(he[t]=lt.isFunction(de[t])?e=>e[t]():(e,n)=>{throw new ut(`Response type '${t}' is not supported`,ut.ERR_NOT_SUPPORT,n)})})));const pe={http:null,xhr:ee,fetch:ie&&(async t=>{let{url:e,method:n,data:o,signal:r,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:h}=te(t);l=l?(l+"").toLowerCase():"text";let d,p=ne([r,i&&i.toAbortSignal()],s);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let w;try{if(c&&ue&&"get"!==n&&"head"!==n&&0!==(w=await(async(t,e)=>lt.toFiniteNumber(t.getContentLength())??(async t=>{if(null==t)return 0;if(lt.isBlob(t))return t.size;if(lt.isSpecCompliantForm(t)){const e=new Request(Nt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return lt.isArrayBufferView(t)||lt.isArrayBuffer(t)?t.byteLength:(lt.isURLSearchParams(t)&&(t+=""),lt.isString(t)?(await ae(t)).byteLength:void 0)})(e))(u,o))){let t,n=new Request(e,{method:"POST",body:o,duplex:"half"});if(lt.isFormData(o)&&(t=n.headers.get("content-type"))&&u.setContentType(t),n.body){const[t,e]=Jt(w,Xt(Wt(c)));o=re(n.body,65536,t,e)}}lt.isString(f)||(f=f?"include":"omit");const r="credentials"in Request.prototype;d=new Request(e,{...h,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:r?f:void 0});let i=await fetch(d,h);const s=fe&&("stream"===l||"response"===l);if(fe&&(a||s&&m)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=lt.toFiniteNumber(i.headers.get("content-length")),[n,o]=a&&Jt(e,Xt(Wt(a),!0))||[];i=new Response(re(i.body,65536,n,(()=>{o&&o(),m&&m()})),t)}l=l||"text";let b=await he[lt.findKey(he,l)||"text"](i,t);return!s&&m&&m(),await new Promise(((e,n)=>{Vt(e,n,{data:b,headers:qt.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:d})}))}catch(e){if(m&&m(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new ut("Network Error",ut.ERR_NETWORK,t,d),{cause:e.cause||e});throw ut.from(e,e&&e.code,t,d)}})};lt.forEach(pe,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const me=t=>"- "+t,we=t=>lt.isFunction(t)||null===t||!1===t,be=t=>{t=lt.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let i=0;e>i;i++){let e;if(n=t[i],o=n,!we(n)&&(o=pe[(e=n+"").toLowerCase()],void 0===o))throw new ut(`Unknown adapter '${e}'`);if(o)break;r[e||"#"+i]=o}if(!o){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ut("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(me).join("\n"):" "+me(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function ye(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ht(null,t)}function ve(t){return ye(t),t.headers=qt.from(t.headers),t.data=Bt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),be(t.adapter||Ut.adapter)(t).then((function(e){return ye(t),e.data=Bt.call(t,t.transformResponse,e),e.headers=qt.from(e.headers),e}),(function(e){return _t(e)||(ye(t),e&&e.response&&(e.response.data=Bt.call(t,t.transformResponse,e.response),e.response.headers=qt.from(e.response.headers))),Promise.reject(e)}))}const ge={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ge[t]=function(n){return typeof n===t||"a"+(1>e?"n ":" ")+t}}));const xe={};ge.transitional=function(t,e,n){function o(t,e){return"[Axios v1.10.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,i)=>{if(!1===t)throw new ut(o(r," has been removed"+(e?" in "+e:"")),ut.ERR_DEPRECATED);return e&&!xe[r]&&(xe[r]=!0),!t||t(n,r,i)}},ge.spelling=function(t){return(t,e)=>!0};const Re={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ut("options must be an object",ut.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const i=o[r],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new ut("option "+i+" must be "+n,ut.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ut("Unknown option "+i,ut.ERR_BAD_OPTION)}},validators:ge},ke=Re.validators;class Oe{constructor(t){this.defaults=t||{},this.interceptors={request:new kt,response:new kt}}async request(t,e){try{return await this.l(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=Error();const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!(t.stack+"").endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}l(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Qt(this.defaults,e);const{transitional:n,paramsSerializer:o,headers:r}=e;void 0!==n&&Re.assertOptions(n,{silentJSONParsing:ke.transitional(ke.boolean),forcedJSONParsing:ke.transitional(ke.boolean),clarifyTimeoutError:ke.transitional(ke.boolean)},!1),null!=o&&(lt.isFunction(o)?e.paramsSerializer={serialize:o}:Re.assertOptions(o,{encode:ke.function,serialize:ke.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Re.assertOptions(e,{baseUrl:ke.spelling("baseURL"),withXsrfToken:ke.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=r&<.merge(r.common,r[e.method]);r&<.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=qt.concat(i,r);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let u,f=0;if(!a){const t=[ve.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),u=t.length,l=Promise.resolve(e);u>f;)l=l.then(t[f++],t[f++]);return l}u=s.length;let h=e;for(f=0;u>f;){const e=s[f++],n=s[f++];try{h=e(h)}catch(t){n.call(this,t);break}}try{l=ve(h)}catch(t){return Promise.reject(t)}for(f=0,u=c.length;u>f;)l=l.then(c[f++],c[f++]);return l}getUri(t){return Rt(Zt((t=Qt(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}lt.forEach(["delete","get","head","options"],(function(t){Oe.prototype[t]=function(e,n){return this.request(Qt(n||{},{method:t,url:e,data:(n||{}).data}))}})),lt.forEach(["post","put","patch"],(function(t){function e(e){return function(n,o,r){return this.request(Qt(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}Oe.prototype[t]=e(),Oe.prototype[t+"Form"]=e(!0)}));const Te=Oe;class Ee{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n.u)return;let e=n.u.length;for(;e-- >0;)n.u[e](t);n.u=null})),this.promise.then=t=>{let e;const o=new Promise((t=>{n.subscribe(t),e=t})).then(t);return o.cancel=function(){n.unsubscribe(e)},o},t((function(t,o,r){n.reason||(n.reason=new Ht(t,o,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this.u?this.u.push(t):this.u=[t]}unsubscribe(t){if(!this.u)return;const e=this.u.indexOf(t);-1!==e&&this.u.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Ee((function(e){t=e})),cancel:t}}}const Se=Ee,Ae={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ae).forEach((([t,e])=>{Ae[e]=t}));const je=Ae,$e=function t(e){const n=new Te(e),o=g(Te.prototype.request,n);return lt.extend(o,Te.prototype,n,{allOwnKeys:!0}),lt.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(Qt(e,n))},o}(Ut);$e.Axios=Te,$e.CanceledError=Ht,$e.CancelToken=Se,$e.isCancel=_t,$e.VERSION="1.10.0",$e.toFormData=bt,$e.AxiosError=ut,$e.Cancel=$e.CanceledError,$e.all=function(t){return Promise.all(t)},$e.spread=function(t){return function(e){return t.apply(null,e)}},$e.isAxiosError=function(t){return lt.isObject(t)&&!0===t.isAxiosError},$e.mergeConfig=Qt,$e.AxiosHeaders=qt,$e.formToJSON=t=>Pt(lt.isHTMLForm(t)?new FormData(t):t),$e.getAdapter=be,$e.HttpStatusCode=je,$e.default=$e;const Ne=$e,{Axios:Pe,AxiosError:Ce,CanceledError:Ue,isCancel:Fe,CancelToken:De,VERSION:Le,all:Ie,Cancel:ze,isAxiosError:Me,spread:qe,toFormData:Be,AxiosHeaders:_e,HttpStatusCode:He,formToJSON:Ve,getAdapter:Xe,mergeConfig:Je}=Ne,We=new class{constructor(){this.scopeAttribute="",this.scopeBody="",this.scopedKeyframes=new Map}parse(t,e){return this.scopeAttribute=`[vrefof="${e}"]`,this.scopeBody=`[vref="${e}"]`,this.scopedKeyframes.clear(),this.scopeSuffix=e.replace(/[^a-zA-Z0-9]/g,""),t=this.removeComments(t),this.collectKeyframes(t),this.parseRules(t)}collectKeyframes(t){const e=/@keyframes\s+([^\s{]+)/gi;let n;for(;null!==(n=e.exec(t));){const t=n[1],e=t+"-"+this.scopeSuffix;this.scopedKeyframes.set(t,e)}}removeComments(t){return t.replace(/\/\*[\s\S]*?\*\//g,"")}parseRules(t){let e="",n=0;for(;n<t.length;){for(;n<t.length&&/\s/.test(t[n]);)e+=t[n],n++;if(n>=t.length)break;if("@"===t[n]){const o=this.parseAtRule(t,n);e+=o.content,n=o.endIndex}else{const o=this.parseNormalRule(t,n);e+=o.content,n=o.endIndex}}return e}parseAtRule(t,e){let n=e,o="";for(;n<t.length&&"{"!==t[n];)o+=t[n],n++;if(n>=t.length)return{content:o,endIndex:n};const r=o.toLowerCase().trim();if(r.startsWith("@keyframes"))return this.parseKeyframes(t,e);if(r.startsWith("@media"))return this.parseMedia(t,e);if(r.startsWith("@supports"))return this.parseSupports(t,e);{const e=this.findMatchingBrace(t,n);return{content:o+e.content,endIndex:e.endIndex}}}parseKeyframes(t,e){let n=e,o="";for(;n<t.length&&"{"!==t[n];)o+=t[n],n++;if(n>=t.length)return{content:o,endIndex:n};const r=this.findMatchingBrace(t,n),i=r.content,s=this.extractKeyframeName(o),a=this.scopedKeyframes.get(s);return a&&(o=o.replace(s,a)),o+=i,{content:o,endIndex:r.endIndex}}extractKeyframeName(t){const e=t.match(/@keyframes\s+([^\s{]+)/i);return e?e[1]:""}parseMedia(t,e){let n=e,o="";for(;n<t.length&&"{"!==t[n];)o+=t[n],n++;if(n>=t.length)return{content:o,endIndex:n};o+="{",n++;let r=1,i="";for(;n<t.length&&r>0;){if("{"===t[n])r++;else if("}"===t[n]&&(r--,0===r))break;i+=t[n],n++}return o+=this.parseRules(i),n<t.length&&"}"===t[n]&&(o+="}",n++),{content:o,endIndex:n}}parseSupports(t,e){return this.parseMedia(t,e)}parseNormalRule(t,e){let n=e,o="";for(;n<t.length&&"{"!==t[n];)o+=t[n],n++;if(n>=t.length)return{content:o,endIndex:n};const r=this.addScopeToSelector(o.trim()),i=this.findMatchingBrace(t,n);return{content:r+this.processRuleContent(i.content),endIndex:i.endIndex}}processRuleContent(t){let e=t;return e=e.replace(/animation\s*:\s*([^;]+);/gi,((t,e)=>`animation: ${this.processAnimationValue(e)};`)),e=e.replace(/animation-name\s*:\s*([^;]+);/gi,((t,e)=>`animation-name: ${this.processAnimationNames(e)};`)),e}processAnimationValue(t){return t.split(",").map((t=>t.trim())).map((t=>{const e=t.split(/\s+/);for(let n=0;n<e.length;n++){const t=e[n];if(/^\d+(\.\d+)?(s|ms)$/.test(t))continue;if(/^\d+(\.\d+)?$/.test(t))continue;if(["ease","ease-in","ease-out","ease-in-out","linear","infinite","normal","reverse","alternate","alternate-reverse","forwards","backwards","both","running","paused"].includes(t))continue;if(t.startsWith("cubic-bezier("))continue;const o=this.scopedKeyframes.get(t);o&&(e[n]=o);break}return e.join(" ")})).join(", ")}processAnimationNames(t){return t.split(",").map((t=>{const e=t.trim();return this.scopedKeyframes.get(e)||e})).join(", ")}addScopeToSelector(t){return t.trim()?t.split(",").map((t=>t.trim())).map((t=>this.addScopeToSingleSelector(t))).join(", "):t}addScopeToSingleSelector(t){if(!t.trim())return t;if(t.includes("::")){const e=t.split("::"),n=e[0],o="::"+e.slice(1).join("::");return this.addScopeToSelectorPart(n)+o}if(t.includes(":")&&!t.includes("::")){const e=t.match(/^([^:]+)(:.+)$/);if(e){const t=e[1],n=e[2];return this.addScopeToSelectorPart(t)+n}}return"*"===t||t.startsWith("@")?t:this.addScopeToSelectorPart(t)}addScopeToSelectorPart(t){const e=/(\s*[>+~]\s*|\s+)/;if(e.test(t)){const n=t.split(e);if(/^body(?:$|[:\[ ])/.test(n[0]))return n[0]=this.scopeBody+n[0].slice(4),n.join("");if(/^:root(?:$|[:\[ ])/.test(n[0]))return n[0]=this.scopeBody+n[0].slice(5),n.join("");for(let t=n.length-1;t>=0;t--)if(n[t].trim()&&!e.test(n[t])){let e=n[t].trim();n[t]=/^body(?:$|[:\[ ])/.test(e)?this.scopeBody+e.slice(4):/^:root(?:$:[$:\[ ])/.test(e)?this.scopeBody+e.slice(5):n[t].trim()+this.scopeAttribute;break}return n.join("")}let n=(t=t.trim()).trim();return/^body(?:$|[:\[ ])/.test(n)?this.scopeBody+n.slice(4):/^:root(?:$:[$:\[ ])/.test(n)?this.scopeBody+n.slice(5):n+this.scopeAttribute}findMatchingBrace(t,e){let n=e,o="",r=0;for(;n<t.length;){if(o+=t[n],"{"===t[n])r++;else if("}"===t[n]&&(r--,0===r)){n++;break}n++}return{content:o,endIndex:n}}},Ke=new class{constructor(){this.container=null,this.init()}init(){this.container=document.createElement("div"),this.container.className="message-container",document.body.appendChild(this.container),this.addBaseStyles()}addBaseStyles(){const t=document.createElement("style");t.textContent="\n .message-container {\n position: fixed;\n top: 60px;\n left: 50%; \n transform: translateX(-50%);\n z-index: 9999;\n width: 300px;\n }\n \n .message-item {\n margin-bottom: 10px;\n padding: 15px;\n border-radius: 4px;\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);\n transform: translateY(100%);\n opacity: 0;\n transition: all 0.3s ease;\n display: flex;\n align-items: flex-start;\n }\n \n .message-item.show {\n transform: translateY(0);\n opacity: 1;\n }\n \n .message-icon {\n margin-right: 10px;\n font-size: 16px;\n line-height: 1;\n }\n \n .message-content {\n flex: 1;\n font-size: 14px;\n line-height: 1.4;\n }\n \n .message-close {\n margin-left: 10px;\n cursor: pointer;\n font-size: 16px;\n opacity: 0.7;\n transition: opacity 0.2s;\n }\n \n .message-close:hover {\n opacity: 1;\n }\n \n .message-success {\n background-color: #f0f9eb;\n border: 1px solid #e1f3d8;\n color: var(--color-success, #67c23a);\n }\n \n .message-warning {\n background-color: #fdf6ec;\n border: 1px solid #faecd8;\n color: #e6a23c;\n }\n \n .message-error {\n background-color: #fef0f0;\n border: 1px solid #fde2e2;\n color: #f56c6c;\n }\n \n .message-info {\n background-color: #edf2fc;\n border: 1px solid #ebeef5;\n color: #409eff;\n }\n \n .prompt-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n transition: opacity 0.3s ease;\n }\n \n .prompt-overlay.show {\n opacity: 1;\n }\n \n .prompt-dialog {\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n min-width: 400px;\n max-width: 500px;\n transform: scale(0.8);\n transition: transform 0.3s ease;\n }\n \n .prompt-overlay.show .prompt-dialog {\n transform: scale(1);\n }\n \n .prompt-header {\n padding: 20px 20px 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid #eee;\n }\n \n .prompt-title {\n font-size: 18px;\n font-weight: 500;\n margin: 0;\n }\n \n .prompt-close {\n cursor: pointer;\n font-size: 20px;\n color: #999;\n border: none;\n background: none;\n padding: 0;\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .prompt-close:hover {\n color: #666;\n }\n \n .prompt-body {\n padding: 20px;\n }\n \n .prompt-content {\n margin-bottom: 20px;\n font-size: 14px;\n line-height: 1.5;\n color: #333;\n }\n \n .prompt-input {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #dcdfe6;\n border-radius: 4px;\n font-size: 14px;\n box-sizing: border-box;\n transition: border-color 0.2s;\n }\n \n .prompt-input:focus {\n outline: none;\n border-color: #409eff;\n }\n \n .prompt-footer {\n padding: 15px 20px;\n text-align: right;\n border-top: 1px solid #eee;\n }\n \n .prompt-btn {\n padding: 8px 16px;\n border: 1px solid #dcdfe6;\n border-radius: 4px;\n font-size: 14px;\n cursor: pointer;\n margin-left: 10px;\n transition: all 0.2s;\n }\n \n .prompt-btn-cancel {\n background: white;\n color: #606266;\n }\n \n .prompt-btn-cancel:hover {\n background: #f5f7fa;\n border-color: #c0c4cc;\n }\n \n .prompt-btn-confirm {\n background: #409eff;\n color: white;\n border-color: #409eff;\n }\n \n .prompt-btn-confirm:hover {\n background: #66b1ff;\n border-color: #66b1ff;\n }\n ",document.head.appendChild(t)}createMessage(t,e,n={}){const{duration:o=3e3,showClose:r=!0,onClose:i=null}=n,s=document.createElement("div");s.className="message-item message-"+t;const a={success:"\u2713",warning:"\u26a0",error:"\u2715",info:"\u2139"},c=document.createElement("span");c.className="message-icon",c.textContent=a[t]||a.info;const l=document.createElement("div");if(l.className="message-content",l.textContent=e,s.appendChild(c),s.appendChild(l),r){const t=document.createElement("span");t.className="message-close",t.innerHTML="×",t.onclick=()=>{this.removeMessage(s),i&&i()},s.appendChild(t)}return this.container.appendChild(s),setTimeout((()=>{s.classList.add("show")}),10),o>0&&setTimeout((()=>{this.removeMessage(s),i&&i()}),o),s}removeMessage(t){t&&t.parentNode&&(t.classList.remove("show"),setTimeout((()=>{t.parentNode&&t.parentNode.removeChild(t)}),300))}success(t,e={}){return this.createMessage("success",t,e)}warning(t,e={}){return this.createMessage("warning",t,e)}error(t,e={}){return this.createMessage("error",t,e)}info(t,e={}){return this.createMessage("info",t,e)}h(t,e={}){return new Promise(((n,o)=>{const{title:r="\u63d0\u793a",type:i="confirm",inputValue:s="",confirmText:a="\u786e\u5b9a",cancelText:c="\u53d6\u6d88",onConfirm:l=null,onCancel:u=()=>{n("")}}=e,f=document.createElement("div");f.className="prompt-overlay";const h=document.createElement("div");h.className="prompt-dialog";const d=document.createElement("div");d.className="prompt-header";const p=document.createElement("h3");p.className="prompt-title",p.textContent=r;const m=document.createElement("button");m.className="prompt-close",m.innerHTML="×",d.appendChild(p),d.appendChild(m);const w=document.createElement("div");w.className="prompt-body";const b=document.createElement("div");b.className="prompt-content",b.textContent=t,w.appendChild(b);let y=null;"input"===i&&(y=document.createElement("input"),y.className="prompt-input",y.type="text",y.value=s,w.appendChild(y));const v=document.createElement("div");v.className="prompt-footer";const g=document.createElement("button");g.className="prompt-btn prompt-btn-cancel",g.textContent=c;const x=document.createElement("button");x.className="prompt-btn prompt-btn-confirm",x.textContent=a,v.appendChild(g),v.appendChild(x),h.appendChild(d),h.appendChild(w),h.appendChild(v),f.appendChild(h),document.body.appendChild(f),setTimeout((()=>{f.classList.add("show")}),10),y&&setTimeout((()=>{y.focus()}),300);const R=(t=null)=>(f.classList.remove("show"),setTimeout((()=>{f.parentNode&&f.parentNode.removeChild(f)}),300),t);m.onclick=()=>{R(),u?u():o(Error("cancelled"))},g.onclick=()=>{R(),u?u():o(Error("cancelled"))},x.onclick=()=>{const t=!y||y.value;R(),n(t),l&&l(t)};const k=t=>{"Escape"===t.key&&(R(),u?u():o(Error("cancelled")),document.removeEventListener("keydown",k))};document.addEventListener("keydown",k),f.onclick=t=>{t.target===f&&(R(),u?u():o(Error("cancelled")))}}))}confirm(t,e={}){return this.h(t,{...e,type:"confirm"})}prompt(t,e,n={}){return this.h(t,{...n,type:"input",inputValue:e})}};var Ge={},Ze={};const Ye={};function Qe(t,e){Array.from(t.childNodes).forEach((t=>{1===t.nodeType&&(t.setAttribute("vrefof",e),Qe(t,e))}))}async function tn(t,e,n,o){void 0===n&&(n="#"+function(){let t=(new Date).getTime().toString(36);t.length>4&&(t=t.substring(t.length-4));let e="";for(let n=0;4>n;n++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".charAt(Math.floor(52*Math.random()));return e+t.padStart(4,"0")}()),n.endsWith(".html")&&(n=n.slice(0,-5));let r=(new DOMParser).parseFromString(t,"text/html");if(r.body.hasAttribute("scoped")&&!o)throw Error("HTTP error! status: 404");let i={url:n,heads:[],body:document.createElement("div"),setup:void 0,scripts:[],styles:"",txt:t,env:e,tmp:r,customAttrs:{}};if(i.heads=Array.from(r.querySelector("head")?.children),n&&(r.querySelectorAll("style").forEach((t=>{null===t.getAttribute("unscoped")?i.styles+=We.parse(t.innerHTML,n):i.styles+=t.innerHTML})),i.styles)){const t=document.createElement("style");t.innerHTML=i.styles,t.setAttribute("vref",n),document.head.appendChild(t)}return i.body.append(...r.querySelector("body").childNodes),i.body.querySelectorAll("script").forEach((t=>{""!=t.innerHTML.trim()?(t.hasAttribute("setup")?i.setup=t:t.hasAttribute("no-vhtml")||i.scripts.push(t),t.remove()):t.remove()})),Array.from(r.body.attributes).forEach((t=>{/^[a-zA-Z]/.test(t.name)?i.body.setAttribute(t.name,t.value):i.customAttrs[t.name]=t.value})),i.body.setAttribute("vref",n),Qe(i.body,n),o||await async function(t,e){for(let n of t.heads){let o=n.nodeName.toLowerCase();"link"===o?nn(n,e):"script"===o?await en(n,e):"title"===o&&(t.title=n.innerText)}}(i,e),i}function en(t,e){let n=t.getAttribute("src"),o=t.getAttribute("key"),r=e?.scoped;if(r&&n.startsWith("/")&&(n=r+n),n.startsWith("@")&&(n=n.slice(1)),n&&document.querySelector(`script[src="${n}"]`))return;if(o&&document.querySelector(`script[key="${o}"]`))return;let i=document.createElement("script");return i.src=n,i.key=o,i.type=t.getAttribute("type")||"text/javascript",new Promise(((t,e)=>{i.onload=()=>{t(i)},i.onerror=()=>e(Error("Failed to load script "+n)),document.head.appendChild(i)}))}async function nn(t,e){let n=t.getAttribute("href"),o=t.getAttribute("key"),r=e?.scoped;r&&n.startsWith("/")&&(n=r+n),n.startsWith("@")&&(n=n.slice(1)),n&&document.querySelector(`link[href="${n}"]`)||o&&document.querySelector(`link[key="${o}"]`)||(t.setAttribute("href",n),document.head.append(t))}const on={FetchUI:async function(t,e,n){t&&"/"!==t||(t="/scoped.html"),t.startsWith("http")||t.startsWith("@")||t.startsWith("/")||(t="/"+t);let o=e?.scoped;if(o&&t.startsWith("/")&&(t=o+t),t.startsWith("@")&&(t=t.slice(1)),Ge[t])return Promise.resolve(Ge[t]);if(Ze[t])return Ze[t];let r={};const i=fetch(t+"?random="+Math.random()).then((async e=>{if(!e.ok)throw Error("HTTP error! status: "+e.status);for(const[t,i]of e.headers.entries())t.startsWith("vhtml-")&&(r[t.slice(5)]=i);let n=r.scoped||"";t.startsWith("http")&&(n=new URL(t).origin+n,r.scoped=n);let o=await async function(t,e){if(!Ye[t=t||""]){let n=t.startsWith("http")?t:window.location.origin+t;Ye[t]=Object.assign({},e,{scoped:t,$G:y.Wrap({}),$bus:new v,$axios:Ne.create({baseURL:n}),$message:Ke,$router:null,$emit:null}),t===$vhtml.scoped||null===$vhtml.scoped?Ye[t].$router=$vhtml.$router:Ye[t].$router={addRoutes:()=>{},beforeEnter:()=>{}};try{await(await import(n+"/env.js")).default(Ye[t])}catch(g){}}return Ye[t]}(n,r);return Object.assign(r,o),e.text()})).then((e=>tn(e,r,t,n))).then((e=>(Ge[t]=e,e))).catch((e=>{e.message;let n=document.createElement("div");n.style.cssText="\n backgound:#aaa;\n height:100%;\n width: 100%;\n display:grid;\n place-items: center;\n",n.innerHTML=`\n<div style="width:20rem;height:15rem;border-radius:1rem;padding:1rem;background:#cfc0aa;display:grid;place-items:center;">\n <div style="font-size:2rem">404</div>\n <p>${t}</p>\n</div>\n`;let o={heads:[],body:n,setup:"",scripts:[],styles:"",txt:"",tmp:"",env:r,err:e};return Ge[t]=o,o})).finally((()=>{delete Ze[t]}));return Ze[t]=i,i},FetchFile:async function(t){return fetch(t).then((t=>{if(!t.ok)throw Error("HTTP error! status: "+t.status);return t.text()}))},LoadScript:en,LoadLink:nn,ParseUI:tn};function rn(t,e){let n,o;if(t.startsWith("http://")||t.startsWith("https://")){if(n=new URL(t),n.origin!==window.location.origin)return null;n.pathname.startsWith(e)&&(o=n.pathname.slice(e.length))}else n=new URL(t,window.location.href),o=n.pathname;const r={};return n.searchParams.forEach(((t,e)=>{r[e]=t})),{path:o,query:r,hash:n.hash}}class sn{constructor(t,e){this.originalPath=t,this.name=e,this.keys=[],this.regexp=this.pathToRegexp(t)}pathToRegexp(t){let e=t.replace(/:([^(/]+)/g,((t,e)=>(this.keys.push(e),`(?<${e}>[^/]+)`)));return e=e.replace(/\*(\w+)/g,((t,e)=>(this.keys.push(e),`(?<${e}>.*)`))),e=e.replace(/\*/g,".*"),RegExp(`^${e}$`)}match(t){let e;if("string"==typeof t)e=t;else{if(!t||"object"!=typeof t)return null;if(!t.path)return t.name&&t.name===this.name?{path:this.originalPath,params:t.params||{},matched:this.originalPath}:null;e=t.path}const n=this.regexp.exec(e);if(!n)return null;const o={};return this.keys.forEach((t=>{n.groups?.[t]&&(o[t]=n.groups[t])})),{path:this.originalPath,params:o,matched:n[0]}}}const an=new Map;class cn{constructor(t,e,n){this.vhtml=t,this.node=e,this.layoutDom=void 0,this.matchedRoute=n,this.htmlPath=this.resolveHtmlPath(n)}resolveHtmlPath(t){let e=t.route.component||t.route.path;return"function"==typeof e&&(e=e(t.path)),Object.entries(t.params).forEach((([t,n])=>{e=e.replace(":"+t,n)})),e.startsWith("/")||(e="/"+e),e.endsWith("/")&&(e=e.slice(0,-1)),e.endsWith(".html")||(e+=".html"),e}async mount(t,e,n){const o=await on.FetchUI(this.htmlPath,t);if(o.err){let n=document.createElement("div");return Object.assign(n.style,{width:"100%",height:"100%"}),n.append(...e),this.node.innerHTML="",this.node.append(n),void this.vhtml.parseRef(this.htmlPath,n,{},t,null,!0)}this.title=o.title||"";const r={},i=document.createElement("div");if(i.setAttribute("vsrc",this.htmlPath),r[""]=[i],this.slots=r,!n)return this.node.innerHTML="",this.node.append(i),void this.vhtml.parseRef(this.htmlPath,i,{},t,null);let s=an.get(n);if(s)this.layoutDom=s,this.activate();else{let e=n;e.startsWith("/")||(e="/"+n),e.endsWith(".html")||(e+=".html"),e.startsWith("/layout")||(e="/layout"+e);const o=await on.FetchUI(e,t);if(o.err)return this.node.innerHTML="",this.node.append(i),void this.vhtml.parseRef(this.htmlPath,i,{},t,null);s=o.body.cloneNode(!0),an.set(n,s),i.$refData=y.Wrap({}),s.$refSlots=y.Wrap({...r}),this.node.innerHTML="",this.node.append(s),this.layoutDom=s,this.vhtml.parseRef("/layout/"+n,s,{},t,null,!0)}}activate(){this.title&&(document.title=this.title);const t=this.layoutDom;if(t)t.querySelectorAll("vslot").forEach((e=>{e.closest("[vref]")===t&&this.slots[e.getAttribute("name")||""]&&(e.innerHTML="")})),Object.keys(t.$refSlots).forEach((e=>{delete t.$refSlots[e]})),Object.assign(t.$refSlots,this.slots),t.isConnected||(this.node.innerHTML=""),this.node.append(t);else{this.node.innerHTML="";const t=this.slots[""];t instanceof Array?this.node.append(...t):this.node.append(t)}}}const ln=new class{#t=[];#e=[];#n=null;#o="";#r=[];#i=new Map;#s=null;#a=null;#c=[];#l=!1;#u=null;#f=new Map;constructor(){this.init()}get routes(){return this.#t.slice()}get history(){return this.#e.slice()}get current(){return this.#n}get query(){return this.#n?.query||{}}get params(){return this.#n?.params||{}}get scoped(){return this.#o}onChange(t){this.#r.push(t)}addRoute(t){if(!t.path)throw Error("Route must have a path");"/"!=t.path&&t.path.endsWith("/")&&(t.path=t.path.slice(0,-1));const e={path:t.path,component:t.component,name:t.name,meta:t.meta||{},children:t.children||[],matcher:new sn(t.path,t.name),description:t.description||"",layout:t.layout||""};this.#t.push(e),t.name&&this.#f.set(t.name,e),t.children?.length>0&&t.children.forEach((n=>{const o=t.path+(n.path.startsWith("/")?n.path:"/"+n.path),r=n.layout||t.layout||"",i={...t.meta,...n.meta};this.addRoute({...n,path:o,parent:e,layout:r,meta:i})}))}addRoutes(t){t.forEach((t=>this.addRoute(t)))}#h(t,e){this.#r.forEach((n=>{if("function"==typeof n)try{n(t,e)}catch(o){}}))}#d(t){const e=this.#n;this.#n={path:t.path,fullPath:t.fullPath,params:t.params||{},query:t.query||{},hash:new URL(t.fullPath,window.location.origin).hash,meta:t.route?.meta||{},description:t.route?.description||"",layout:t.route?.layout||"",name:t.route?.name,matched:t.route?[t.route]:[]},this.#e.push(this.#n),this.#o&&!t.fullPath.startsWith("http")?history.pushState({},"",this.#o+t.fullPath):history.pushState({},"",t.fullPath),this.#h(this.#n,e)}matchRoute(t){const e=this.normalizeRouteTarget(t);if(!e)return null;const{path:n,query:o,params:r,name:i}=e;if(i){const t=this.#f.get(i);if(!t)return null;let e=t.path;Object.entries(r).forEach((([t,n])=>{e=e.replace(":"+t,n)}));const n=t.matcher.match(e);return n?{route:t,params:{...n.params,...r},matched:n.matched,path:e,query:o,name:i}:null}for(const s of this.#t){const t=s.matcher.match(n);if(t&&s.component)return{route:s,params:{...t.params,...r},matched:t.matched,description:s.description,layout:s.layout,path:n,query:o,name:s.name}}return null}normalizeRouteTarget(t){let e,n,o={},r={},i="";if("string"==typeof t){const n=rn(t,this.#o);if(!n)return null;e=n.path,o={...n.query},i=n.hash}else{if(!t||"object"!=typeof t)return null;if(t.path){const n=rn(t.path,this.#o);if(!n)return null;e=n.path,o={...n.query,...t.query||{}},i=t.hash||n.hash,r=t.params||{}}else{if(!t.name)return null;n=t.name,o=t.query||{},r=t.params||{},i=t.hash||""}}return e&&!e.startsWith("/")&&(e="/"+e),this.#o&&(e=e.startsWith(this.#o)?e.slice(this.#o.length):e),e.startsWith("/")||(e="/"+e),"/"!=e&&e.endsWith("/")&&(e=e.slice(0,-1)),{path:e,query:o,params:r,hash:i,name:n}}matchTo(t){const e=this.matchRoute(t);if(!e)return null;const{route:n,params:o,query:r,path:i,name:s}=e;let a="";r&&Object.keys(r).length>0&&(a="?"+Object.entries(r).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&"));const c=(i||e.path)+a;return{route:n,params:o,query:r,name:s||n.name,path:i||e.path,fullPath:c,matched:[n]}}buildUrl(t,e={}){const n=new URL(t,window.location.origin);return Object.entries(e).forEach((([t,e])=>{n.searchParams.append(t,e)})),n}resolveRoutePath(t,e={}){let n=t.component||t.path;return Object.entries(e).forEach((([t,e])=>{n=n.replace(":"+t,e)})),"/"!==n&&""!==n||(n="/index"),n.startsWith("/")||(n="/"+n),n.endsWith(".html")&&(n=n.slice(0,-5)),n.endsWith("/")&&(n=n.slice(0,-1)),n}async#p(t){if(!t)return;const{route:e,params:n,query:o}=t,r={path:t.path,fullPath:t.fullPath,params:n,query:o,hash:new URL(t.fullPath,window.location.origin).hash,meta:e.meta,description:e.description,layout:e.layout,name:e.name,matched:[e]};if(this.beforeEnter)try{let t=!0;if(!1===await this.beforeEnter(r,this.#n,(e=>{e&&(t=!1,this.push(e))}))||!t)return}catch(a){return}const i=t.fullPath;let s=this.#i.get(i);this.#d(t),s?s.activate():(s=new cn(this.#u,this.#s,t),await s.mount(this.#a,this.#c,r.layout),this.#i.set(i,s))}async push(t){const e=this.matchTo(t);e?await this.#p(e):"string"==typeof t||t.path||t.name}replace(t){this.push(t),this.#e.length>1&&this.#e.splice(-2,1)}go(t){history.go(t)}back(){history.back()}forward(){history.forward()}init(){this.#l||(this.#l=!0,document.body.addEventListener("click",(t=>{const e=t.target.closest("a");if(!e)return;const n=e.getAttribute("href");!n||n.startsWith("http")||n.startsWith("#")||(t.preventDefault(),e.hasAttribute("reload")?window.location.href=n:this.push(n))}),!0),window.addEventListener("popstate",(()=>{this.push(window.location.href)})))}ParseVrouter(t,e,n){this.#s=e,this.#a=n,this.#o=n.scoped||"",this.#c=Array.from(e.childNodes),this.#u=t,this.push(window.location.href)}},un={$router:ln},fn=[];document.addEventListener("click",(t=>{fn.forEach((e=>{e?.dom instanceof Element&&"function"==typeof e?.callback&&(e.dom.contains(t.target)||e.callback(t))}))}));const hn={CamelToKebabCase:function(t){return 0===t.length?"":t.charAt(0).toLowerCase()+t.slice(1).replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))},EventsList:["load","unload","beforeunload","resize","scroll","submit","reset","input","change","focus","blur","keydown","keypress","keyup","click","dblclick","contextmenu","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","touchstart","touchmove","touchend","touchcancel","drag","dragstart","dragend","dragover","dragenter","dragleave","drop","copy","cut","paste","animationstart","animationend","animationiteration","transitionend","abort","error","loadstart","progress","play","pause","ended","volumechange","timeupdate","loadeddata","waiting","playing","online","offline","storage","visibilitychange"],BindInputDomValue:function(t,e,n,o){const r="string"==typeof t?document.querySelector(t):t;if(r){switch(r.type||r.tagName.toLowerCase()){case"text":case"password":case"email":case"tel":case"url":case"search":case"number":case"range":case"color":case"date":case"time":case"datetime-local":case"month":case"week":case"hidden":case"textarea":o((()=>e[n]),(t=>{r.value=void 0===t?"":t})),r.addEventListener("input",(function(){e[n]=this.value}));break;case"checkbox":o((function(){r.checked=!!e[n]})),r.addEventListener("change",(function(){e[n]=this.checked}));break;case"radio":o((()=>{r.checked=r.value===e[n]})),r.addEventListener("change",(function(){this.checked&&(e[n]=this.value)}));break;case"select-one":case"select-multiple":o((()=>{let t=e[n];if(r.multiple){const e=Array.isArray(t)?t:[];for(let t=0;t<r.options.length;t++)r.options[t].selected=e.includes(r.options[t].value)}else r.value=t||""})),r.addEventListener("change",(function(){if(this.multiple){const t=[];for(let e=0;e<this.options.length;e++)this.options[e].selected&&t.push(this.options[e].value);e[n]=t}else e[n]=this.value}));break;default:return!1}return!0}},SetAttr:function(t,e,n){const o=new Set(["innerHTML","innerText","outerHTML","textContent","value","checked","selected","disabled","readOnly","maxLength","minLength","htmlFor","tabIndex","scrollTop","scrollLeft","scrollWidth","scrollHeight","clientWidth","clientHeight","offsetWidth","offsetHeight","style","dataset"]),r=new Set(["checked","selected","disabled","readonly","required","hidden","autofocus","multiple","novalidate"]),i=e.toLowerCase(),s={htmlfor:"htmlFor",readonly:"readOnly",maxlength:"maxLength",minlength:"minLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable",spellcheck:"spellcheck",innerhtml:"innerHTML",innertext:"innerText",autocapitalize:"autocapitalize"}[i]||e;o.has(s)?t[s]=void 0===n?"":n:r.has(i)?n?t.setAttribute(i,""):t.removeAttribute(i):void 0===n?t.removeAttribute(e):t.setAttribute(e,n)},AddClicker:(t,e,n)=>{if("outer"===e){let e=fn.length;return fn.push({dom:t,callback:n}),()=>{fn[e]=null}}}},dn=async t=>navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(t):(prompt("http\u73af\u5883\u65e0\u6cd5\u81ea\u52a8\u590d\u5236\uff0c\u8bf7\u624b\u52a8\u590d\u5236\u5185\u5bb9\u5230\u526a\u8d34\u677f:",t),new Promise((t=>{})));class pn{postMessage=(t,e)=>{};constructor(t={}){this.options={highlightColor:"#007bff",overlayColor:"rgba(0, 123, 255, 0.1)",borderWidth:"2px",zIndex:1e4,showTagName:!0,...t},this.isActive=!1,this.selectedElement=null,this.currentHoverElement=null,this.overlay=null,this.selectedOverlay=null,this.tooltip=null,this.selectedTooltip=null,this.actionPanel=null,this.originalCursor="",this.init()}init(){this.createStyles(),this.bindEvents()}createStyles(){const t=document.createElement("style");t.textContent=`\n .div-selector-overlay {\n position: fixed;\n pointer-events: none;\n border: ${this.options.borderWidth} solid ${this.options.highlightColor};\n background: ${this.options.overlayColor};\n z-index: ${this.options.zIndex};\n transition: all 0.2s ease;\n box-sizing: border-box;\n }\n \n .div-selector-selected {\n position: fixed;\n pointer-events: none;\n border: ${this.options.borderWidth} solid #28a745;\n background: rgba(40, 167, 69, 0.1);\n z-index: ${this.options.zIndex-1};\n box-sizing: border-box;\n }\n \n .div-selector-tooltip {\n position: fixed;\n background: rgba(51, 51, 51, 0.95);\n cursor:pointer;\n color: white;\n padding: 8px 12px;\n border-radius: 6px;\n font-size: 12px;\n font-family: 'Consolas', 'Monaco', 'Courier New', monospace;\n z-index: ${this.options.zIndex+1};\n user-select: none;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n border: 1px solid rgba(255,255,255,0.1);\n backdrop-filter: blur(4px);\n }\n \n .div-selector-tooltip.hover {\n background: rgba(0, 123, 255, 0.9);\n }\n \n .div-selector-tooltip.selected {\n background: rgba(40, 167, 69, 0.9);\n border-color: rgba(40, 167, 69, 0.3);\n }\n \n .div-selector-actions {\n position: fixed;\n background: white;\n border: 1px solid #ddd;\n border-radius: 8px;\n padding: 8px;\n z-index: ${this.options.zIndex+2};\n box-shadow: 0 4px 16px rgba(0,0,0,0.15);\n display: flex;\n gap: 6px;\n min-width: 30px;\n backdrop-filter: blur(8px);\n }\n \n .div-selector-btn {\n padding: 4px 6px;\n border: 1px solid #ddd;\n background: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 12px;\n transition: all 0.2s ease;\n text-align: left;\n white-space: nowrap;\n }\n \n .div-selector-btn:hover {\n background: #f8f9fa;\n transform: translateX(2px);\n }\n \n .div-selector-btn.danger {\n color: #dc3545;\n border-color: #dc3545;\n }\n \n .div-selector-btn.danger:hover {\n background: #dc3545;\n color: white;\n }\n \n .div-selector-btn.primary {\n background: #007bff;\n color: white;\n border-color: #007bff;\n }\n \n .div-selector-btn.primary:hover {\n background: #0056b3;\n }\n \n .div-selector-active {\n cursor: crosshair !important;\n }\n `,document.head.appendChild(t)}bindEvents(){this.handleMouseMove=this.handleMouseMove.bind(this),this.handleClick=this.handleClick.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleResize=this.handleResize.bind(this)}activate(){this.isActive||(this.isActive=!0,this.originalCursor=document.body.style.cursor,document.body.classList.add("div-selector-active"),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("click",this.handleClick),window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleResize),this.createOverlay(),this.createTooltip())}deactivate(){this.isActive&&(this.isActive=!1,document.body.style.cursor=this.originalCursor,document.body.classList.remove("div-selector-active"),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("click",this.handleClick),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize),this.removeOverlay(),this.removeTooltip())}handleMouseMove(t){if(!this.isActive)return;const e=document.elementFromPoint(t.clientX,t.clientY);if(!e)return;if(this.isPluginElement(e))return;const n="DIV"===e.tagName?e:e.closest("div,[vref]");n&&!this.isPluginElement(n)&&this.selectedElement!==n&&(this.currentHoverElement=n,this.highlightElement(n),this.updateHoverTooltip(n))}handleClick(t){if(!this.isActive)return;const e=document.elementFromPoint(t.clientX,t.clientY);if(!e)return;if(this.isPluginElement(e))return;t.preventDefault(),t.stopPropagation();const n="DIV"===e.tagName?e:e.closest("div");n&&!this.isPluginElement(n)&&(this.selectElement(n),this.deactivate())}handleScroll(){this.selectedElement&&(this.updateSelectedOverlay(),this.updateSelectedTooltip(),this.updateActionPanelPosition()),this.currentHoverElement&&!this.selectedElement&&(this.highlightElement(this.currentHoverElement),this.updateHoverTooltip(this.currentHoverElement))}handleResize(){this.selectedElement&&(this.updateSelectedOverlay(),this.updateSelectedTooltip(),this.updateActionPanelPosition())}isPluginElement(t){return t.closest(".div-selector-overlay, .div-selector-selected, .div-selector-tooltip, .div-selector-actions")}createOverlay(){this.overlay=document.createElement("div"),this.overlay.className="div-selector-overlay",this.overlay.style.display="none",document.body.appendChild(this.overlay)}createSelectedOverlay(){this.selectedOverlay=document.createElement("div"),this.selectedOverlay.className="div-selector-selected",document.body.appendChild(this.selectedOverlay)}createTooltip(){this.tooltip=document.createElement("div"),this.tooltip.className="div-selector-tooltip hover",this.tooltip.style.display="none",document.body.appendChild(this.tooltip)}createSelectedTooltip(){this.selectedTooltip=document.createElement("div"),this.selectedTooltip.className="div-selector-tooltip selected",document.body.appendChild(this.selectedTooltip)}highlightElement(t){if(!this.overlay)return;const e=t.getBoundingClientRect();this.overlay.style.display="block",this.overlay.style.left=e.left+"px",this.overlay.style.top=e.top+"px",this.overlay.style.width=e.width+"px",this.overlay.style.height=e.height+"px"}updateHoverTooltip(t){if(!this.tooltip)return;const e=this.getElementInfo(t),n=t.getBoundingClientRect();this.tooltip.textContent=e,this.tooltip.style.display="block";let o=n.left-8,r=n.top-this.tooltip.offsetHeight-8;0>o&&(o=8),0>r&&(r=n.top+8),this.tooltip.style.left=o+"px",this.tooltip.style.top=r+"px"}selectElement(t){this.clearSelection(),this.selectedElement=t,this.createSelectedOverlay(),this.createSelectedTooltip(),this.updateSelectedOverlay(),this.updateSelectedTooltip(),this.overlay&&(this.overlay.style.display="none"),this.tooltip&&(this.tooltip.style.display="none"),this.showActionPanel()}updateSelectedOverlay(){if(!this.selectedOverlay||!this.selectedElement)return;const t=this.selectedElement.getBoundingClientRect();this.selectedOverlay.style.left=t.left+"px",this.selectedOverlay.style.top=t.top+"px",this.selectedOverlay.style.width=t.width+"px",this.selectedOverlay.style.height=t.height+"px"}updateSelectedTooltip(){if(!this.selectedTooltip||!this.selectedElement)return;const t=this.getElementInfo(this.selectedElement);let e=this.getFilePath(this.selectedElement);const n=this.selectedElement.getBoundingClientRect();this.selectedTooltip.addEventListener("click",(t=>{e&&this.postMessage("fs-open",e),t.preventDefault(),t.stopPropagation()})),this.selectedTooltip.textContent="\u2713 "+t;let o=n.left-8,r=n.top-this.selectedTooltip.offsetHeight-8;0>o&&(o=8),0>r&&(r=n.top+8),this.selectedTooltip.style.left=o+"px",this.selectedTooltip.style.top=r+"px"}showActionPanel(){this.removeActionPanel();const t=this.selectedElement.getBoundingClientRect();this.actionPanel=document.createElement("div"),this.actionPanel.className="div-selector-actions";let e=t.right-180,n=t.top+6;e+180>window.innerWidth&&(e=t.left-180-8),0>e&&(e=8),n+40>window.innerHeight&&(n=window.innerHeight-40-8),0>n&&(n=8),this.actionPanel.style.left=e+"px",this.actionPanel.style.top=n+"px",[{text:"\ud83d\udccb",action:()=>this.copySelector(this.selectedElement)},{text:"x",action:()=>this.clearSelection()}].forEach((t=>{const e=document.createElement("button");e.className="div-selector-btn "+(t.class||""),e.textContent=t.text,e.onclick=t.action,this.actionPanel.appendChild(e)})),document.body.appendChild(this.actionPanel)}updateActionPanelPosition(){if(!this.actionPanel||!this.selectedElement)return;const t=this.selectedElement.getBoundingClientRect(),e=this.actionPanel.offsetWidth,n=this.actionPanel.offsetHeight;let o=t.right-e+8,r=t.top-8;o+e>window.innerWidth&&(o=t.left-e-8),0>o&&(o=8),r+n>window.innerHeight&&(r=window.innerHeight-n-8),0>r&&(r=8),this.actionPanel.style.left=o+"px",this.actionPanel.style.top=r+"px"}clearSelection(){this.selectedElement=null,this.selectedOverlay&&(this.selectedOverlay.remove(),this.selectedOverlay=null),this.selectedTooltip&&(this.selectedTooltip.remove(),this.selectedTooltip=null),this.removeActionPanel()}getElementInfo(t){const e=t.getBoundingClientRect();let n=t.getAttribute("vref");return n||(n=t.closest("[vref]").getAttribute("vref"),n+="."+t.tagName.toLowerCase()),`${n} (${Math.round(e.width)}\xd7${Math.round(e.height)})`}getFilePath(t){let e=t.getAttribute("vref");return e||(e=t.closest("[vref]").getAttribute("vref")),e&&(e="/ui"+e+".html"),e}copySelector(t){let e=this.getFilePath(t);dn(e).then((()=>{this.showNotification("\ud83d\udccb CSS\u9009\u62e9\u5668\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f")}))}copyXPath(t){const e=this.generateXPath(t);dn(e).then((()=>{this.showNotification("\ud83d\udd0d XPath\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f")}))}viewStyles(t){const e=window.getComputedStyle(t);let n="\ud83d\udcca \u91cd\u8981\u6837\u5f0f\u5c5e\u6027:\n\n";["display","position","width","height","margin","padding","background-color","color","font-size","border","z-index","opacity"].forEach((t=>{n+=`${t}: ${e.getPropertyValue(t)}\n`})),alert(n)}showNotification(t){const e=document.createElement("div");e.style.cssText=`\n position: fixed;\n top: 20px;\n right: 20px;\n background: linear-gradient(135deg, #28a745, #20c997);\n color: white;\n padding: 12px 18px;\n border-radius: 8px;\n z-index: ${this.options.zIndex+10};\n font-size: 14px;\n box-shadow: 0 4px 12px rgba(0,0,0,0.2);\n transform: translateX(100%);\n transition: transform 0.3s ease;\n `,e.textContent=t,document.body.appendChild(e),setTimeout((()=>{e.style.transform="translateX(0)"}),100),setTimeout((()=>{e.style.transform="translateX(100%)",setTimeout((()=>{e.remove()}),300)}),2500)}generateXPath(t){if(t.id)return`//*[@id="${t.id}"]`;const e=[];for(;t&&t.nodeType===Node.ELEMENT_NODE;){let n=0,o=!1,r=!1;for(let e=t.previousSibling;e;e=e.previousSibling)e.nodeType===Node.ELEMENT_NODE&&e.nodeName===t.nodeName&&(r=!0,n++);for(let e=t.nextSibling;e&&!o;e=e.nextSibling)e.nodeType===Node.ELEMENT_NODE&&e.nodeName===t.nodeName&&(o=!0);const i=t.nodeName.toLowerCase(),s=r||o?`[${n+1}]`:"";if(e.unshift(i+s),(t=t.parentNode)===document.body)break}return e.length?"/"+e.join("/"):null}removeOverlay(){this.overlay&&(this.overlay.remove(),this.overlay=null)}removeTooltip(){this.tooltip&&(this.tooltip.remove(),this.tooltip=null)}removeActionPanel(){this.actionPanel&&(this.actionPanel.remove(),this.actionPanel=null)}}let mn=!1,wn=null;const bn=(t,e)=>{mn&&("string"!=typeof e&&"number"!=typeof e||(e={value:e}),window.parent.postMessage(Object.assign({type:t,from:"vdev"},e),"*"))};!async function(){const t=document.createElement("style");t.innerHTML="\n [vref] {\n display: block;\n }\n [vparsing] {\n display: none;\n -webkit-text-fill-color: transparent;\n }\n vslot, vrouter {\n display: block;\n }\n",document.head.firstChild?document.head.insertBefore(t,document.head.firstChild):document.head.appendChild(t);const e=[],n=t=>{if(!t.isConnected)return;let n=t.getAttribute("vdelay");if(n){let o=e[n];o&&o(t)}};function o(t,e){const n=Function("sandbox",t=`with (sandbox) { ${t} }`);let o={data:null,key:null};const r=t=>new Proxy(t,{has:(t,e)=>!0,get(t,e,n){if(e===Symbol.unscopables)return;let i=Reflect.get(t,e,n);return o.data=t,o.key=e,"object"==typeof i&&i?r(i):i},set:(t,e,n,o)=>!1});return n(r(e)),o}new MutationObserver((function(t,e){t.forEach((function(t){for(let e of t.addedNodes)1===e.nodeType&&(n(e),e.querySelectorAll("*[vdelay]").forEach(n))}))})).observe(document.body,{attributes:!1,childList:!0,subtree:!0,characterData:!1});const r=/{{|}}/g,i=/^(\s*(\w+)\s+in\s+|\((\w+),\s*(\w+)\)\s+in\s+)([\w\?\$\.\[\]\(\)'"]+)$/;window.$vhtml||(window.$vhtml=new class{app=null;scoped=null;vget=on;vproxy=y;t=!0;$router=un.$router;constructor(t){"string"==typeof t?this.app=document.getElementById(t):t instanceof HTMLElement?this.app=t:this.app=document.body,this.app&&(async()=>{let t=await on.FetchUI(window.location.pathname,{},!0);this.scoped=t.env?.scoped||"",t.env?.vdev&&window.self!==window.top&&(mn||(mn=!0,wn=new pn,bn("iframe-loaded"),wn.postMessage=bn,window.addEventListener("keyup",(t=>{"Escape"===t.key&&bn("key-esc")})),setTimeout((()=>{window.$vhtml&&window.$vhtml.$router&&$vhtml.$router.onChange((t=>{bn("url-change",t.fullPath)}))}),100),window.addEventListener("message",(t=>{const e=t.data;if("vhtml"==e.from)switch(e.type){case"reload":window.location.reload();break;case"magic":wn&&wn.isActive?wn.deactivate():wn&&wn.activate()}})))),this.parseRef("scoped",this.app,{},t.env||{},t,!0)})()}async parseDom(t,e={},n){if(n instanceof HTMLElement)throw Error("env error");let o=t.nodeName.toLowerCase();if(3===t.nodeType)return void this.parseTextNode(t,e,n);if(8===t.nodeType)return;if(1!==t.nodeType)return;if(t.hasAttribute("no-vhtml")||t.vparsed)return;let r=t.getAttribute("v-for");if(null!==r)return void this.parseVfor(r,t,e,n);if(-1!==o.indexOf("-")){let r="/"+o.split("-").join("/"),i=t.hasAttribute("single");return this.parseRef(r,t,e,n,null,i),void(t.vparsed=!0)}if(t.getAttribute(":vsrc")){let o=t.getAttribute(":vsrc");t.removeAttribute(":vsrc");let r=Array.from(t.attributes).map((t=>({name:t.name,value:t.value}))),i=Array.from(t.childNodes);return void y.Watch((()=>{delete t.vparsed,t.setAttribute("vparsing","");let s=y.Run(o,e,n);s&&(Array.from(t.attributes).forEach((e=>{t.removeAttribute(e.name)})),t.innerHTML="",r.forEach((e=>{t.setAttribute(e.name,e.value)})),i.forEach((e=>{t.appendChild(e.cloneNode(!0))})),this.parseRef(s,t,e,n,null,!1),t.vparsed=!0)}))}if(t.getAttribute("vsrc")){let o=t.hasAttribute("single");return this.parseRef(t.getAttribute("vsrc"),t,e,n,null,o),void(t.vparsed=!0)}if("div"===o&&t.getAttribute("v-html")){let o=t.getAttribute("v-html");return t.removeAttribute("v-html"),t.innerHTML="",this.parseAttrs(t,e,n),t.vparsed=!0,void y.Watch((()=>{let r=y.Run(o,e,n);t.innerHTML=r;let i=this.parseVif(Array.from(t.childNodes),e,n);for(let t of i)this.parseDom(t,e,n)}))}if("vslot"===o)return this.parseSlots(t,e,n),void(t.vparsed=!0);if("vrouter"===o)return this.parseAttrs(t,e,n),void un.$router.ParseVrouter(this,t,n);this.parseAttrs(t,e,n);let i=this.parseVif(Array.from(t.childNodes),e,n);for(let s of i)this.parseDom(s,e,n);t.vparsed=!0}onMountedRun(t,n,o=!0){if(o){if(t.isConnected)return void n(t);let o=e.push((t=>{t.removeAttribute("vdelay"),n(t)}));return void t.setAttribute("vdelay",o-1)}t.isConnected&&n(t);let r=e.push(n);t.setAttribute("vdelay",r-1)}AllENVs={};async parseRef(t,e,n,o,r,i=!1){e.setAttribute("vparsing","");let s=o,a=e.getAttribute("vrefof"),c=e.closest(`*[vref='${a}']`);c&&(o=c.$env),!r&&t&&(t.endsWith(".html")||(t+=".html"),r=await on.FetchUI(t,o,e.hasAttribute("scoped"))),o=Object.assign({},o,r?.env||{}),e.$env=o,e.$vsrc=t,o.$router=un.$router,o.$emit=(t,...n)=>{if(t=t.toLowerCase(),!e.$vevent)return;let o=e.$vevent[t];o&&"function"==typeof o&&o(...n)};let l=await this.setupRef(e,n,s,r,i);i?this.parseAttrs(e,l,o,r?.customAttrs):this.parseAttrs(e,n,s,r?.customAttrs);let u=this.parseVif(Array.from(e.childNodes),l,o);for(let f of u)this.parseDom(f,l,o);e.removeAttribute("vparsing"),this.mountRef(e,l,o,r)}async setupRef(t,e,n,r,i=!1){let s=y.Wrap({});if(r.setup){let e=r.setup.innerHTML;e=await y.ParseImport(e,s,t.$env,t.$vsrc),await y.AsyncRun(e,s,t.$env,{$node:t})}if(t.$refScope=e,t.$refData=s,i)return s;if(!t.$refSlots){let e=y.Wrap({});t.childNodes.forEach((t=>{let n=t.getAttribute?t.getAttribute("vslot"):"";n=n||"",e[n]||(e[n]=[]),e[n].push(t)})),t.$refSlots=e}t.innerHTML="";let a=r.body.cloneNode(!0);t.append(...a.childNodes),Object.keys(s).forEach((r=>{const i=hn.CamelToKebabCase(r);if("boolean"==typeof s[r]?(t.hasAttribute(r)||t.hasAttribute(i))&&(s[r]=!0):t.hasAttribute(r)?(s[r]=t.getAttribute(r),t.removeAttribute(r)):t.hasAttribute(i)&&(s[r]=t.getAttribute(i),t.removeAttribute(i)),t.hasAttribute(":"+r)||t.hasAttribute(":"+i)){let o=t.getAttribute(":"+r)||t.getAttribute(":"+i);t.removeAttribute(":"+r),t.removeAttribute(":"+i),delete s[r],o?y.Watch((()=>y.Run(o,e,n)),(()=>{s[r]=y.Run(o,e,n)}),{deep:!0}):y.Watch((()=>e[r]),(()=>{s[r]=e[r]}),{deep:!0})}if(t.hasAttribute("v:"+r)||t.hasAttribute("v:"+i)){let n=t.getAttribute("v:"+r)||t.getAttribute("v:"+i);t.removeAttribute("v:"+r),t.removeAttribute("v:"+i),n||(n=r),delete s[r],y.Watch((()=>o(n,e)),(t=>{t&&t.data&&t.key&&(s[r]=t.data[t.key])})),y.Watch((()=>s[r]),(()=>{let t=o(n,e);t&&t.data&&t.key&&(t.data[t.key]=s[r])}))}}));let c=Array.from(a.attributes);return c=c.filter((e=>!this.parseAttr(t,e.name,e.value,s,n)||(a.removeAttribute(e.name),!1))),c.forEach((e=>{if("class"===e.name)t.classList.add(...e.value.trim().split(/\s+/));else if("style"===e.name){let n=e.value.split(";");for(let e of n){let n=e.split(":");if(2===n.length&&!t.style[n[0]]){let e=n[0].trim();e.startsWith("--")?t.style.setProperty(e,n[1].trim()):t.style[e]=n[1].trim()}}}else t.getAttribute(e.name)||t.setAttribute(e.name,e.value)})),s}async mountRef(t,e,n,o){for(let r of o.scripts)r.hasAttribute("active")?this.onMountedRun(t,(()=>{y.AsyncRun(r.innerHTML,e,n,{$node:t,$watch:y.Watch})}),!1):y.AsyncRun(r.innerHTML,e,n,{$node:t,$watch:y.Watch})}parseAttrs(t,e,n,o){if("A"===t.nodeName&&this.parseAHref(t,e,n),Array.from(t.attributes).forEach((o=>{this.parseAttr(t,o.name,o.value,e,n)&&t.removeAttribute(o.name)})),o&&Object.keys(o).forEach((e=>{this.parseAttr(t,e,o[e],t.$refData,n)})),t.hasAttribute("v-show")){let o=t.getAttribute("v-show"),r=t.style.display;y.Watch((()=>{let i=y.Run(o,e,n);t.style.display=i?r:"none"}))}}parseAHref(t,e,n){if(!t.hasAttribute("href")&&!t.hasAttribute(":href"))return;y.Watch((()=>{let o=t.getAttribute("href");if(t.hasAttribute(":href")){let r=t.getAttribute(":href");t.removeAttribute(":href"),o=y.Run(r,e,n)}if(o&&!o.startsWith("#")&&!o.startsWith("http"))if(o.startsWith("@"))o=o.replaceAll("//","/"),t.setAttribute("href",o.slice(1));else if(o){let e=n?.scoped;e&&(o=e+o),t.setAttribute("href",o)}}));const o=e=>{let n=e?.fullPath;t.getAttribute("href")===n?t.setAttribute("active",""):t.removeAttribute("active")};o(un.$router.current),un.$router.onChange(o)}parseAttr(t,e,n,r,i){if(e.startsWith(":")){let o=e.slice(1);return"class"===o||"style"===o?this.handleStyle(t,o,n,r,i):y.Watch((()=>{let e;e=n?y.Run(n,r,i):r[o],hn.SetAttr(t,o,e)})),!0}if(e.startsWith("@"))return this.handleEvent(t,e,n,r,i),!0;if(e.indexOf("!")>-1);else if(e.startsWith("v:")){let e=o(n,r);if(e&&e.data&&e.key){let n=e.key,o=e.data;return hn.BindInputDomValue(t,o,n,y.Watch)}}else if("vdom"===e){let e=o(n,r);return e&&e.data&&e.key&&(e.data[e.key]=t),!0}return!1}handleStyle(t,e,n,o,r){let i="";y.Watch((()=>{let s=y.Run(n,o,r);if("function"==typeof s&&(s=s()),"class"===e){if(i&&(t.classList.remove(...i.split(/\s+/)),i=""),s instanceof Array)i="",s.forEach((t=>{if("string"==typeof t&&t.length)i+=" "+t;else if("object"==typeof t)for(let e in t)t[e]&&(i+=" "+e)}));else if("string"==typeof s&&s.length)i=s.trim();else if("object"==typeof s){i="";for(let t in s)s[t]&&(i+=" "+t)}i=i.trim(),i&&t.classList.add(...i.split(/\s+/))}else if("style"===e){if(i)if("object"==typeof i)for(let e in i)e.startsWith("--")?t.style.removeProperty(e):t.style[e]="";else if("string"==typeof i){let e=i.split(";");for(let n of e){let e=n.split(":");2===e.length&&(e[0].trim().startsWith("--")?t.style.removeProperty(e[0].trim()):t.style[e[0].trim()]="")}}if("object"==typeof s)for(let e in s)e.startsWith("--")?t.style.setProperty(e,s[e]):t.style[e]=s[e];else if("string"==typeof s){let e=s.split(";");for(let n of e){let e=n.split(":");2===e.length&&(e[0].trim().startsWith("--")?t.style.setProperty(e[0].trim(),e[1].trim()):t.style[e[0].trim()]=e[1].trim())}}i=s}}))}handleEvent(t,e,n,o,r){let i=e.slice(1).split("."),s={self:!1,prevent:!1,stop:!1},a=i[0];if("mounted"===a)this.onMountedRun(t,(t=>{let e=y.Run(n,o,r);"function"==typeof e&&e(t)}),!1);else if("outerclick"===a){let e=t=>{let e=y.Run(n,o,r,{$event:t});"function"==typeof e&&e(t)};hn.AddClicker(t,"outer",e)}else if(-1!==hn.EventsList.indexOf(a)){"keydown"!==a&&"keyup"!==a&&"keypress"!==a||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&t.setAttribute("tabindex","0");let e=t=>{let e=y.Run(n,o,r,{$event:t});"function"==typeof e&&e(t)};i.slice(1).forEach((i=>{if(i.startsWith("delay")){let s=i.slice(5);s=s?s.endsWith("ms")?+s.slice(0,-2):s.endsWith("s")?1e3*+s.slice(0,-1):+s:1e3,isNaN(s)&&(s=1e3),e=e=>{let i=t["_"+a];i&&"number"==typeof i&&clearTimeout(i),t["_"+a]=setTimeout((()=>{let t=y.Run(n,o,r,{$event:e});"function"==typeof t&&t(e)}),s)}}s[i]=!0})),t.addEventListener(a,(t=>{(1>=i.length||"keydown"!==a&&"keyup"!=a&&"keypress"!=a||i[1]===t.key?.toLowerCase())&&(s.self&&t.currentTarget!==t.target||(s.prevent&&t.preventDefault(),s.stop&&t.stopPropagation(),e(t)))}))}else t.$vevent=t.$vevent||{},t.$vevent[a]=(...t)=>{let e=y.Run(n,o,r,{});"function"==typeof e&&e(...t)}}parseTextNode(t,e,n){let o,i=t.nodeValue.trim();if(!i)return;let s=0,a=-1,c=[];for(;null!==(o=r.exec(i));)if("{{"===o[0])a=o.index;else if("}}"===o[0]&&a>=0){s!==a&&c.push(i.slice(s,a)),c.push("");let r=i.slice(a+2,o.index),l=c.length;a=-1,s=o.index+2,y.Watch((()=>{c[l-1]=y.Run(r,e,n),"object"==typeof c[l-1]&&(c[l-1]=JSON.stringify(c[l-1])),t.nodeValue=c.join("")}))}c.push(i.slice(s)),t.nodeValue=c.join("")}vforDomCache={};parseVfor(t,e,n,o){e.removeAttribute("v-for");let r=i.exec(t);if(6===r?.length){let t=document.createElement("div");t.style.display="none";let i=y.GenUniqueID();this.vforDomCache[i]={},e.parentNode.replaceChild(t,e),y.Watch((()=>{let s=r[3]||r[2],a=r[4],c=y.Run(r[5],n,o),l=this.vforDomCache[i],u=new Set;if("function"==typeof c?c=c():"number"==typeof c&&(c=Array.from({length:c},((t,e)=>e))),null==c&&(c=[]),c.length,"object"==typeof c){let r=Object.keys(c),f=[];for(let t in r){let e=r[t],n="";n=c[e]&&c[e][y.DataID]?c[e][y.DataID]:e+"."+c[e],n=i+"."+n,u.add(n),f.push({k:e,vfk:n,val:c[e]})}for(let t of Object.keys(l))u.has(t)||(l[t]instanceof Array?l[t].forEach((t=>t.remove())):l[t].remove(),delete l[t]);let h=t;for(let i=f.length-1;i>=0;i--){let{k:r,vfk:c,val:u}=f[i],d=l[c];if(d){a&&(d.$vforData[a]="0"===r?0:+r||r),d.isConnected&&(d.nextSibling!==h&&t.parentNode.insertBefore(d,h),h=d);continue}let p=e.cloneNode(!0);l[c]=p;let m={[s]:u};a&&(m[a]="0"===r?0:+r||r),m=y.Wrap(m,n),p.$vforData=m,t.parentNode.insertBefore(p,h);let w=e.getAttribute("v-if");if(!w){this.parseDom(p,m,o),h=p;continue}p.removeAttribute("v-if");let b=-1;b=y.Watch((()=>{let e=l[c];if(e)if(y.Run(w,m,o)){if(e.vparsed||this.parseDom(e,m,o),!e.isConnected){let n=!1,o=t;for(let t in l)if(t!==c){if(n&&l[t].isConnected){o=l[t];break}}else n=!0;t.parentNode.insertBefore(e,o)}}else e.isConnected?e.remove():this.onMountedRun(e,(t=>{e.remove()}));else y.Cancel(b)})),p.isConnected&&(h=p)}}}))}}parseVif(t,e,n){let o={now:document.createElement("div"),conds:[],doms:[]};const r=t=>{let o={now:t.now,conds:t.conds,doms:t.doms},r=[];for(let e in o.conds){let t=o.conds[e];t=""===t?"true":"Boolean("+t+")",r.push(t)}let i=`let res = [${r.join(",")}]\n return res.indexOf(true)`;y.Watch((()=>{let t=y.Run(i,e,n),r=o.doms[t];return r||(r=document.createElement("div"),r.style.display="none"),r}),(t=>{t&&(this.onMountedRun(o.now,(e=>{e.replaceWith(t),o.now=t})),t?.vparsed||this.parseDom(t,e,n))}))};let i=t.filter((t=>!(t.getAttribute&&!t.getAttribute("v-for")&&(null!==t.getAttribute("v-if")?(o.conds.length>0&&(r(o),o={now:document.createElement("div"),conds:[],doms:[]}),t.replaceWith(o.now),o.conds.push(t.getAttribute("v-if")),t.removeAttribute("v-if"),o.doms.push(t),1):null!==t.getAttribute("v-else-if")?(o.conds.push(t.getAttribute("v-else-if")),t.removeAttribute("v-else-if"),o.doms.push(t),t.remove(),1):null!==t.getAttribute("v-else")&&(o.conds.push(""),t.removeAttribute("v-else"),o.doms.push(t),t.remove(),1)))));return o.conds.length>0&&r(o),i}parseSlots(t,e,n){let o=t.getAttribute("vrefof"),r=t.closest(`*[vref='${o}']`);if(!r)return void this.onMountedRun(t,(t=>{this.parseSlots(t,e,n)}));for(;;){let t=r?.parentNode.closest("*[vref]");if(!t)break;if(t.getAttribute("vref")!==o)break;r=t}let i=t.getAttribute("name")||"";if(t.getAttribute(":name")){let o=t.getAttribute(":name");t.removeAttribute(":name"),i=y.Run(o,e,n)}return t.originContent||(t.$originContent=Array.from(t.childNodes),t.innerHTML=""),t.$slotCache={},y.Watch((()=>{let o=r.$refSlots||{},s=r.$refScope||{},a=o[i];if(a&&a.length>0){let o=a[0].hashID;if(o){if(t.$slotCache[o])return t.innerHTML="",void t.append(...t.$slotCache[o])}else o=y.GenUniqueID(),a[0].hashID=o;t.innerHTML="",a=a.map((t=>t.cloneNode(!0))),t.append(...a);let r=s;if(null!==t.getAttribute("vbind")){let n=t.getAttribute("vbind").split(",").map((t=>t.trim()));r=y.Wrap({}),n.forEach((t=>{e.hasOwnProperty(t)&&(r[t]=e[t])})),y.SetDataRoot(r,s)}let i="";a.find((t=>!(!t.getAttribute||!t.getAttribute("vrefof")||(i=t.getAttribute("vrefof"),0))));let c=n;if(i){let e=t.closest(`*[vref='${i}']`);c=e?.$env||n}a=this.parseVif(a,r,c),a.forEach((t=>this.parseDom(t,r,c))),t.$slotCache[o]=a}else{t.innerHTML="",t.append(...t.$originContent);let o=!1;t.$originContent.forEach((t=>{t.hasAttribute&&t.vparsed&&(o=!0)})),o||(t.$originContent=this.parseVif(t.$originContent,e,n),t.$originContent.forEach((t=>this.parseDom(t,e,n))))}})),this.parseAttrs(t,e,n),t}}(document.body))}()},"function"==typeof define&&define.amd?define(t):t(); |