You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
32 KiB
3 lines
32 KiB
var Ve=Object.defineProperty;var ve=(t,e,n)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var $=(t,e,n)=>(ve(t,typeof e!="symbol"?e+"":e,n),n);import{d as Je,r as $e,c as ze,w as We,o as Ke,a as Xe,b as Ge,t as Qe,u as Ye,E as z,_ as Ze,e as ie,f as U,g as ae,h as ce,i as ue,j as et,F as tt,k as nt}from"./index-02f26ed2.js";function ge(t,e){return function(){return t.apply(e,arguments)}}const{toString:Re}=Object.prototype,{getPrototypeOf:Z}=Object,ee=(t=>e=>{const n=Re.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),R=t=>(t=t.toLowerCase(),e=>ee(e)===t),q=t=>e=>typeof e===t,{isArray:D}=Array,x=q("undefined");function rt(t){return t!==null&&!x(t)&&t.constructor!==null&&!x(t.constructor)&&N(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ae=R("ArrayBuffer");function st(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ae(t.buffer),e}const ot=q("string"),N=q("function"),Te=q("number"),te=t=>t!==null&&typeof t=="object",it=t=>t===!0||t===!1,k=t=>{if(ee(t)!=="object")return!1;const e=Z(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},at=R("Date"),ct=R("File"),ut=R("Blob"),lt=R("FileList"),ft=t=>te(t)&&N(t.pipe),dt=t=>{const e="[object FormData]";return t&&(typeof FormData=="function"&&t instanceof FormData||Re.call(t)===e||N(t.toString)&&t.toString()===e)},pt=R("URLSearchParams"),ht=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function B(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),D(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let l;for(r=0;r<i;r++)l=o[r],e.call(null,t[l],l,t)}}function Ne(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const Ce=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),_e=t=>!x(t)&&t!==Ce;function X(){const{caseless:t}=_e(this)&&this||{},e={},n=(r,s)=>{const o=t&&Ne(e,s)||s;k(e[o])&&k(r)?e[o]=X(e[o],r):k(r)?e[o]=X({},r):D(r)?e[o]=r.slice():e[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&B(arguments[r],n);return e}const mt=(t,e,n,{allOwnKeys:r}={})=>(B(e,(s,o)=>{n&&N(s)?t[o]=ge(s,n):t[o]=s},{allOwnKeys:r}),t),yt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),bt=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},wt=(t,e,n,r)=>{let s,o,i;const l={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!l[i]&&(e[i]=t[i],l[i]=!0);t=n!==!1&&Z(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Et=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},St=t=>{if(!t)return null;if(D(t))return t;let e=t.length;if(!Te(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Ot=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Z(Uint8Array)),gt=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},Rt=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},At=R("HTMLFormElement"),Tt=t=>t.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),le=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Nt=R("RegExp"),De=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};B(n,(s,o)=>{e(s,o,t)!==!1&&(r[o]=s)}),Object.defineProperties(t,r)},Ct=t=>{De(t,(e,n)=>{if(N(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(N(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},_t=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return D(t)?r(t):r(String(t).split(e)),n},Dt=()=>{},Pt=(t,e)=>(t=+t,Number.isFinite(t)?t:e),xt=t=>{const e=new Array(10),n=(r,s)=>{if(te(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const o=D(r)?[]:{};return B(r,(i,l)=>{const p=n(i,s+1);!x(p)&&(o[l]=p)}),e[s]=void 0,o}}return r};return n(t,0)},a={isArray:D,isArrayBuffer:Ae,isBuffer:rt,isFormData:dt,isArrayBufferView:st,isString:ot,isNumber:Te,isBoolean:it,isObject:te,isPlainObject:k,isUndefined:x,isDate:at,isFile:ct,isBlob:ut,isRegExp:Nt,isFunction:N,isStream:ft,isURLSearchParams:pt,isTypedArray:Ot,isFileList:lt,forEach:B,merge:X,extend:mt,trim:ht,stripBOM:yt,inherits:bt,toFlatObject:wt,kindOf:ee,kindOfTest:R,endsWith:Et,toArray:St,forEachEntry:gt,matchAll:Rt,isHTMLForm:At,hasOwnProperty:le,hasOwnProp:le,reduceDescriptors:De,freezeMethods:Ct,toObjectSet:_t,toCamelCase:Tt,noop:Dt,toFiniteNumber:Pt,findKey:Ne,global:Ce,isContextDefined:_e,toJSONObject:xt};function y(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(y,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:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Pe=y.prototype,xe={};["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=>{xe[t]={value:t}});Object.defineProperties(y,xe);Object.defineProperty(Pe,"isAxiosError",{value:!0});y.from=(t,e,n,r,s,o)=>{const i=Object.create(Pe);return a.toFlatObject(t,i,function(p){return p!==Error.prototype},l=>l!=="isAxiosError"),y.call(i,t.message,e,n,r,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};var Bt=typeof self=="object"?self.FormData:window.FormData;const Ft=Bt;function G(t){return a.isPlainObject(t)||a.isArray(t)}function Be(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function fe(t,e,n){return t?t.concat(e).map(function(s,o){return s=Be(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function Lt(t){return a.isArray(t)&&!t.some(G)}const Ut=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function kt(t){return t&&a.isFunction(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator]}function V(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new(Ft||FormData),n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,E){return!a.isUndefined(E[h])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&kt(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(!p&&a.isBlob(f))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?p&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,h,E){let S=f;if(f&&!E&&typeof f=="object"){if(a.endsWith(h,"{}"))h=r?h:h.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&Lt(f)||a.isFileList(f)||a.endsWith(h,"[]")&&(S=a.toArray(f)))return h=Be(h),S.forEach(function(L,qe){!(a.isUndefined(L)||L===null)&&e.append(i===!0?fe([h],qe,o):i===null?h:h+"[]",c(L))}),!1}return G(f)?!0:(e.append(fe(E,h,o),c(f)),!1)}const d=[],b=Object.assign(Ut,{defaultVisitor:u,convertValue:c,isVisitable:G});function m(f,h){if(!a.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(f),a.forEach(f,function(S,C){(!(a.isUndefined(S)||S===null)&&s.call(e,S,a.isString(C)?C.trim():C,h,b))===!0&&m(S,h?h.concat(C):[C])}),d.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return m(t),e}function de(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ne(t,e){this._pairs=[],t&&V(t,this,e)}const Fe=ne.prototype;Fe.append=function(e,n){this._pairs.push([e,n])};Fe.toString=function(e){const n=e?function(r){return e.call(this,r,de)}:de;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function jt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Le(t,e,n){if(!e)return t;const r=n&&n.encode||jt,s=n&&n.serialize;let o;if(s?o=s(e,n):o=a.isURLSearchParams(e)?e.toString():new ne(e,n).toString(r),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class It{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}}const pe=It,Ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mt=typeof URLSearchParams<"u"?URLSearchParams:ne,Ht=FormData,qt=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Vt=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),O={isBrowser:!0,classes:{URLSearchParams:Mt,FormData:Ht,Blob},isStandardBrowserEnv:qt,isStandardBrowserWebWorkerEnv:Vt,protocols:["http","https","file","blob","url","data"]};function vt(t,e){return V(t,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Jt(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $t(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function ke(t){function e(n,r,s,o){let i=n[o++];const l=Number.isFinite(+i),p=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,p?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!l):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=$t(s[i])),!l)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,s)=>{e(Jt(r),s,n,0)}),n}return null}const zt={"Content-Type":void 0};function Wt(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const v={transitional:Ue,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(e);if(o&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s&&s?JSON.stringify(ke(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return vt(e,this.formSerializer).toString();if((l=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return V(l?{"files[]":e}:e,p&&new p,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Wt(e)):e}],transformResponse:[function(e){const n=this.transitional||v.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(e&&a.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(l){if(i)throw l.name==="SyntaxError"?y.from(l,y.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(e){v.headers[e]={}});a.forEach(["post","put","patch"],function(e){v.headers[e]=a.merge(zt)});const re=v,Kt=a.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"]),Xt=t=>{const e={};let n,r,s;return t&&t.split(`
|
|
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&Kt[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},he=Symbol("internals");function P(t){return t&&String(t).trim().toLowerCase()}function j(t){return t===!1||t==null?t:a.isArray(t)?t.map(j):String(t)}function Gt(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}function Qt(t){return/^[-_a-zA-Z]+$/.test(t.trim())}function me(t,e,n,r){if(a.isFunction(r))return r.call(this,e,n);if(a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function Yt(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Zt(t,e){const n=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,o,i){return this[r].call(this,e,s,o,i)},configurable:!0})})}class J{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function o(l,p,c){const u=P(p);if(!u)throw new Error("header name must be a non-empty string");const d=a.findKey(s,u);(!d||s[d]===void 0||c===!0||c===void 0&&s[d]!==!1)&&(s[d||p]=j(l))}const i=(l,p)=>a.forEach(l,(c,u)=>o(c,u,p));return a.isPlainObject(e)||e instanceof this.constructor?i(e,n):a.isString(e)&&(e=e.trim())&&!Qt(e)?i(Xt(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=P(e),e){const r=a.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return Gt(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=P(e),e){const r=a.findKey(this,e);return!!(r&&(!n||me(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function o(i){if(i=P(i),i){const l=a.findKey(r,i);l&&(!n||me(r,r[l],l,n))&&(delete r[l],s=!0)}}return a.isArray(e)?e.forEach(o):o(e),s}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(e){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=j(s),delete n[o];return}const l=e?Yt(o):String(o).trim();l!==o&&delete n[o],n[l]=j(s),r[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[he]=this[he]={accessors:{}}).accessors,s=this.prototype;function o(i){const l=P(i);r[l]||(Zt(s,i),r[l]=!0)}return a.isArray(e)?e.forEach(o):o(e),this}}J.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]);a.freezeMethods(J.prototype);a.freezeMethods(J);const g=J;function W(t,e){const n=this||re,r=e||n,s=g.from(r.headers);let o=r.data;return a.forEach(t,function(l){o=l.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function je(t){return!!(t&&t.__CANCEL__)}function F(t,e,n){y.call(this,t??"canceled",y.ERR_CANCELED,e,n),this.name="CanceledError"}a.inherits(F,y,{__CANCEL__:!0});const en=null;function tn(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const nn=O.isStandardBrowserEnv?function(){return{write:function(n,r,s,o,i,l){const p=[];p.push(n+"="+encodeURIComponent(r)),a.isNumber(s)&&p.push("expires="+new Date(s).toGMTString()),a.isString(o)&&p.push("path="+o),a.isString(i)&&p.push("domain="+i),l===!0&&p.push("secure"),document.cookie=p.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function rn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function sn(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Ie(t,e){return t&&!rn(e)?sn(t,e):e}const on=O.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const l=a.isString(i)?s(i):i;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function an(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function cn(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(p){const c=Date.now(),u=r[o];i||(i=c),n[s]=p,r[s]=c;let d=o,b=0;for(;d!==s;)b+=n[d++],d=d%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),c-i<e)return;const m=u&&c-u;return m?Math.round(b*1e3/m):void 0}}function ye(t,e){let n=0;const r=cn(50,250);return s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,l=o-n,p=r(l),c=o<=i;n=o;const u={loaded:o,total:i,progress:i?o/i:void 0,bytes:l,rate:p||void 0,estimated:p&&i&&c?(i-o)/p:void 0,event:s};u[e?"download":"upload"]=!0,t(u)}}const un=typeof XMLHttpRequest<"u",ln=un&&function(t){return new Promise(function(n,r){let s=t.data;const o=g.from(t.headers).normalize(),i=t.responseType;let l;function p(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}a.isFormData(s)&&(O.isStandardBrowserEnv||O.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const m=t.auth.username||"",f=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(m+":"+f))}const u=Ie(t.baseURL,t.url);c.open(t.method.toUpperCase(),Le(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function d(){if(!c)return;const m=g.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),h={data:!i||i==="text"||i==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:m,config:t,request:c};tn(function(S){n(S),p()},function(S){r(S),p()},h),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new y("Request aborted",y.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new y("Network Error",y.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let f=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const h=t.transitional||Ue;t.timeoutErrorMessage&&(f=t.timeoutErrorMessage),r(new y(f,h.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,t,c)),c=null},O.isStandardBrowserEnv){const m=(t.withCredentials||on(u))&&t.xsrfCookieName&&nn.read(t.xsrfCookieName);m&&o.set(t.xsrfHeaderName,m)}s===void 0&&o.setContentType(null),"setRequestHeader"in c&&a.forEach(o.toJSON(),function(f,h){c.setRequestHeader(h,f)}),a.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&i!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",ye(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",ye(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=m=>{c&&(r(!m||m.type?new F(null,t,c):m),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const b=an(u);if(b&&O.protocols.indexOf(b)===-1){r(new y("Unsupported protocol "+b+":",y.ERR_BAD_REQUEST,t));return}c.send(s||null)})},I={http:en,xhr:ln};a.forEach(I,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const fn={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let s=0;s<e&&(n=t[s],!(r=a.isString(n)?I[n.toLowerCase()]:n));s++);if(!r)throw r===!1?new y(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(a.hasOwnProp(I,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!a.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:I};function K(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new F(null,t)}function be(t){return K(t),t.headers=g.from(t.headers),t.data=W.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),fn.getAdapter(t.adapter||re.adapter)(t).then(function(r){return K(t),r.data=W.call(t,t.transformResponse,r),r.headers=g.from(r.headers),r},function(r){return je(r)||(K(t),r&&r.response&&(r.response.data=W.call(t,t.transformResponse,r.response),r.response.headers=g.from(r.response.headers))),Promise.reject(r)})}const we=t=>t instanceof g?t.toJSON():t;function _(t,e){e=e||{};const n={};function r(c,u,d){return a.isPlainObject(c)&&a.isPlainObject(u)?a.merge.call({caseless:d},c,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(c,u,d){if(a.isUndefined(u)){if(!a.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function o(c,u){if(!a.isUndefined(u))return r(void 0,u)}function i(c,u){if(a.isUndefined(u)){if(!a.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function l(c,u,d){if(d in e)return r(c,u);if(d in t)return r(void 0,c)}const p={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(c,u)=>s(we(c),we(u),!0)};return a.forEach(Object.keys(t).concat(Object.keys(e)),function(u){const d=p[u]||s,b=d(t[u],e[u],u);a.isUndefined(b)&&d!==l||(n[u]=b)}),n}const Me="1.2.2",se={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{se[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ee={};se.transitional=function(e,n,r){function s(o,i){return"[Axios v"+Me+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,l)=>{if(e===!1)throw new y(s(i," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!Ee[i]&&(Ee[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,i,l):!0}};function dn(t,e,n){if(typeof t!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],i=e[o];if(i){const l=t[o],p=l===void 0||i(l,o,t);if(p!==!0)throw new y("option "+o+" must be "+p,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}const Q={assertOptions:dn,validators:se},A=Q.validators;class H{constructor(e){this.defaults=e,this.interceptors={request:new pe,response:new pe}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=_(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Q.assertOptions(r,{silentJSONParsing:A.transitional(A.boolean),forcedJSONParsing:A.transitional(A.boolean),clarifyTimeoutError:A.transitional(A.boolean)},!1),s!==void 0&&Q.assertOptions(s,{encode:A.function,serialize:A.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i;i=o&&a.merge(o.common,o[n.method]),i&&a.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),n.headers=g.concat(i,o);const l=[];let p=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(p=p&&h.synchronous,l.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let u,d=0,b;if(!p){const f=[be.bind(this),void 0];for(f.unshift.apply(f,l),f.push.apply(f,c),b=f.length,u=Promise.resolve(n);d<b;)u=u.then(f[d++],f[d++]);return u}b=l.length;let m=n;for(d=0;d<b;){const f=l[d++],h=l[d++];try{m=f(m)}catch(E){h.call(this,E);break}}try{u=be.call(this,m)}catch(f){return Promise.reject(f)}for(d=0,b=c.length;d<b;)u=u.then(c[d++],c[d++]);return u}getUri(e){e=_(this.defaults,e);const n=Ie(e.baseURL,e.url);return Le(n,e.params,e.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(e){H.prototype[e]=function(n,r){return this.request(_(r||{},{method:e,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(e){function n(r){return function(o,i,l){return this.request(_(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}H.prototype[e]=n(),H.prototype[e+"Form"]=n(!0)});const M=H;class oe{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},e(function(o,i,l){r.reason||(r.reason=new F(o,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new oe(function(s){e=s}),cancel:e}}}const pn=oe;function hn(t){return function(n){return t.apply(null,n)}}function mn(t){return a.isObject(t)&&t.isAxiosError===!0}const Y={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(Y).forEach(([t,e])=>{Y[e]=t});const yn=Y;function He(t){const e=new M(t),n=ge(M.prototype.request,e);return a.extend(n,M.prototype,e,{allOwnKeys:!0}),a.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return He(_(t,s))},n}const w=He(re);w.Axios=M;w.CanceledError=F;w.CancelToken=pn;w.isCancel=je;w.VERSION=Me;w.toFormData=V;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(e){return Promise.all(e)};w.spread=hn;w.isAxiosError=mn;w.mergeConfig=_;w.AxiosHeaders=g;w.formToJSON=t=>ke(a.isHTMLForm(t)?new FormData(t):t);w.HttpStatusCode=yn;w.default=w;const Se=w;class bn{constructor(){$(this,"getWantedValueByKeys",(e,n)=>{const r=[];for(const s in e)s.indexOf(n.toString())>=0&&r.push(e[s]);return r})}get staticSourceHost(){return`http://${{}.VUE_APP_STATIC_SOURCE_HOST}`}getChineseStrByKeyAndValue(e,n,r){for(const{label:s,value:o}of e[n])if(r===o)return s;return""}getLabelByValue(e,n){for(const{label:r,value:s}of e)if(s===n)return r;return""}getTargetValByKey(e,n,r,s){for(const o of e)if(o[n]===r)return o[s]}getTargetItemByKey(e,n,r){const s=r||"id";for(const o of e)if(o[s]===n)return o;return{}}getRegionById(e,n){for(const{id:r,name:s}of n)if(e===r)return s}getIndustryById(e,n){for(const{industryCode:r,industryName:s}of n)if(e===r)return s}deepClone(e){return JSON.parse(JSON.stringify(e))}isArray(e){return!!Array.isArray(e)}isValidArray(e){return this.isArray(e)&&e.length}isValidObject(e){return!e||this.isArray(e)?!1:this.isValidArray(Object.keys(e))}getTargetValIndexInList(e,n,r){for(const[s,o]of e.entries())if(o[n]===r)return s;return-1}isExistInList(e,n){return this.isValidArray(e)?e.indexOf(n)>=0:!1}}const T=new bn;class wn{constructor(e){$(this,"ws");this.ws=new WebSocket(e)}onOpen(e){this.ws.onopen=()=>{e&&e()}}send(e){this.ws.send(e)}onMessage(e){this.ws.onmessage=e}close(){this.ws.close()}}const Oe="/thing",En=Je({name:"preview",setup(){const t=Ye(),e=$e({bannerData:[],index:0}),n=ze(()=>{var u;return+(((u=t.query)==null?void 0:u.interval)||"0")}),r=u=>{p(u===0?e.bannerData.length-1:u-1),e.index=u,i(e.bannerData[u].id,u)},s=async()=>{var m;const{data:{data:u,code:d,msg:b}}=await Se.get(`dashboard/iotdashboard/listShare/${(m=t.query)==null?void 0:m.id}`,{baseURL:Oe});if(d!==0)return z.error(b);T.isValidArray(u)?e.bannerData=u:e.bannerData=[]},o=async(u,d)=>{const{data:{data:b,code:m,msg:f}}=await Se.get(`/dashboard/iotdashboard/svg/xml/${u}`,{baseURL:Oe});if(m!==0)return z.error(f);typeof b=="string"?(e.bannerData[d].detail=b,d===0&&(p(d),i(u,d))):e.bannerData[d].detail=""},i=(u,d)=>{let b="";b="ws://"+window.location.host+"/thing/dashboard/websocket?dashboardId="+u,e.bannerData[d].socket=new wn(b),e.bannerData[d].map=[],l(u,d)},l=(u,d)=>{e.bannerData[d].loading=!0,e.bannerData[d].socket.onOpen(()=>{e.bannerData[d].socket.onMessage(b=>{if(T.isValidObject(b)&&T.isValidObject(b.data)){const m=JSON.parse(b.data||"{}");if(T.isValidArray(m.data))for(const f of m.data)try{debugger;if(f.elementId){e.bannerData[d].map.push(f);const h=document.getElementById(f.elementId);h&&(h.innerHTML=f.val||f.elementName)}else if(T.isValidArray(e.bannerData[d].map)){for(const h of e.bannerData[d].map)if(h.thingCode==f.thingCode&&h.attrKey===f.attrCode){const E=document.getElementById(h.elementId);E&&(E.innerHTML=f.val||f.elementName)}}else throw new Error}catch{console.warn(`设置${f.elementId}:${f.elementName}失败`)}else typeof m.data=="string"&&z.warning(m.data)}e.bannerData[d].loading=!1})})},p=u=>{T.isValidObject(e.bannerData[u].socket)&&e.bannerData[u].socket.close(),e.bannerData[u].socket={},e.bannerData[u].map=[],e.bannerData[u].loading=!1};We(()=>e.bannerData,u=>{T.isValidArray(u)&&(async()=>{for(const[d,b]of u.entries())await o(b.id,d)})()},{immediate:!0}),Ke(()=>{s()});const c=()=>{for(const[u,d]of e.bannerData.entries())p(u)};return Xe(()=>{c()}),Ge(()=>{c()}),{...Qe(e),changeIndex:r,intervalTime:n}}});const Sn=["innerHTML","id","v-loading"];function On(t,e,n,r,s,o){const i=ie("el-carousel-item"),l=ie("el-carousel");return U(),ae(l,{trigger:"click",autoplay:!!t.intervalTime,interval:t.intervalTime*1e3,onChange:t.changeIndex,class:"carousel"},{default:ce(()=>[(U(!0),ue(tt,null,et(t.bannerData,(p,c)=>(U(),ae(i,{key:p.id},{default:ce(()=>[c===t.index?(U(),ue("div",{key:0,innerHTML:p.detail,id:p.id,"v-loading":p.loading},null,8,Sn)):nt("",!0)]),_:2},1024))),128))]),_:1},8,["autoplay","interval","onChange"])}const An=Ze(En,[["render",On],["__scopeId","data-v-0211b8f0"]]);export{An as default};
|