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.
6 lines
34 KiB
6 lines
34 KiB
import{i as ze,l as lt,q as xe,w as at,e as j,o as ct,G as ut,H as ft,c as I,j as Ve,A as dt,d as We,I as M,J as Ge,p as ae,B as ht,z as pt}from"./index-6ada96a9.js";import{z as mt,E as gt}from"./zh-tw-e7607a85.js";/* empty css */import"./config-provider-50df6398.js";const vt={__name:"App",setup(t){const e=ze(mt);return(n,r)=>{const s=ut("router-view");return ct(),lt("div",null,[xe(j(gt),{locale:e.value},{default:at(()=>[xe(s)]),_:1},8,["locale"])])}}},yt="modulepreload",wt=function(t,e){return new URL(t,e).href},Pe={},ce=function(e,n,r){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=wt(o,r),o in Pe)return;Pe[o]=!0;const u=o.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(!!r)for(let i=s.length-1;i>=0;i--){const f=s[i];if(f.href===o&&(!u||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":yt,u||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),u)return new Promise((i,f)=>{c.addEventListener("load",i),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};/*!
|
|
* vue-router v4.1.6
|
|
* (c) 2022 Eduardo San Martin Morote
|
|
* @license MIT
|
|
*/const D=typeof window<"u";function Et(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const C=Object.assign;function ue(t,e){const n={};for(const r in e){const s=e[r];n[r]=T(s)?s.map(t):t(s)}return n}const Q=()=>{},T=Array.isArray,bt=/\/$/,Rt=t=>t.replace(bt,"");function fe(t,e,n="/"){let r,s={},o="",u="";const d=e.indexOf("#");let l=e.indexOf("?");return d<l&&d>=0&&(l=-1),l>-1&&(r=e.slice(0,l),o=e.slice(l+1,d>-1?d:e.length),s=t(o)),d>-1&&(r=r||e.slice(0,d),u=e.slice(d,e.length)),r=Pt(r??e,n),{fullPath:r+(o&&"?")+o+u,path:r,query:s,hash:u}}function Ct(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Ae(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function kt(t,e,n){const r=e.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&z(e.matched[r],n.matched[s])&&Ke(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function z(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function Ke(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!xt(t[n],e[n]))return!1;return!0}function xt(t,e){return T(t)?Se(t,e):T(e)?Se(e,t):t===e}function Se(t,e){return T(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t.length===1&&t[0]===e}function Pt(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/");let s=n.length-1,o,u;for(o=0;o<r.length;o++)if(u=r[o],u!==".")if(u==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var X;(function(t){t.pop="pop",t.push="push"})(X||(X={}));var Y;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Y||(Y={}));function At(t){if(!t)if(D){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),Rt(t)}const St=/^[^#]+#/;function _t(t,e){return t.replace(St,"#")+e}function Bt(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{behavior:e.behavior,left:r.left-n.left-(e.left||0),top:r.top-n.top-(e.top||0)}}const ee=()=>({left:window.pageXOffset,top:window.pageYOffset});function Ot(t){let e;if("el"in t){const n=t.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;e=Bt(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function _e(t,e){return(history.state?history.state.position-e:-1)+t}const he=new Map;function It(t,e){he.set(t,e)}function Tt(t){const e=he.get(t);return he.delete(t),e}let Lt=()=>location.protocol+"//"+location.host;function Fe(t,e){const{pathname:n,search:r,hash:s}=e,o=t.indexOf("#");if(o>-1){let d=s.includes(t.slice(o))?t.slice(o).length:1,l=s.slice(d);return l[0]!=="/"&&(l="/"+l),Ae(l,"")}return Ae(n,t)+r+s}function Ht(t,e,n,r){let s=[],o=[],u=null;const d=({state:h})=>{const g=Fe(t,location),w=n.value,P=e.value;let x=0;if(h){if(n.value=g,e.value=h,u&&u===w){u=null;return}x=P?h.position-P.position:0}else r(g);s.forEach(E=>{E(n.value,w,{delta:x,type:X.pop,direction:x?x>0?Y.forward:Y.back:Y.unknown})})};function l(){u=n.value}function c(h){s.push(h);const g=()=>{const w=s.indexOf(h);w>-1&&s.splice(w,1)};return o.push(g),g}function i(){const{history:h}=window;h.state&&h.replaceState(C({},h.state,{scroll:ee()}),"")}function f(){for(const h of o)h();o=[],window.removeEventListener("popstate",d),window.removeEventListener("beforeunload",i)}return window.addEventListener("popstate",d),window.addEventListener("beforeunload",i),{pauseListeners:l,listen:c,destroy:f}}function Be(t,e,n,r=!1,s=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:s?ee():null}}function $t(t){const{history:e,location:n}=window,r={value:Fe(t,n)},s={value:e.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(l,c,i){const f=t.indexOf("#"),h=f>-1?(n.host&&document.querySelector("base")?t:t.slice(f))+l:Lt()+t+l;try{e[i?"replaceState":"pushState"](c,"",h),s.value=c}catch(g){console.error(g),n[i?"replace":"assign"](h)}}function u(l,c){const i=C({},e.state,Be(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});o(l,i,!0),r.value=l}function d(l,c){const i=C({},s.value,e.state,{forward:l,scroll:ee()});o(i.current,i,!0);const f=C({},Be(r.value,l,null),{position:i.position+1},c);o(l,f,!1),r.value=l}return{location:r,state:s,push:d,replace:u}}function Nt(t){t=At(t);const e=$t(t),n=Ht(t,e.state,e.location,e.replace);function r(o,u=!0){u||n.pauseListeners(),history.go(o)}const s=C({location:"",base:t,go:r,createHref:_t.bind(null,t)},e,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function qt(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),Nt(t)}function Mt(t){return typeof t=="string"||t&&typeof t=="object"}function Qe(t){return typeof t=="string"||typeof t=="symbol"}const $={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ye=Symbol("");var Oe;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(Oe||(Oe={}));function V(t,e){return C(new Error,{type:t,[Ye]:!0},e)}function H(t,e){return t instanceof Error&&Ye in t&&(e==null||!!(t.type&e))}const Ie="[^/]+?",Ut={sensitive:!1,strict:!1,start:!0,end:!0},Dt=/[.+*?^${}()[\]/\\]/g;function jt(t,e){const n=C({},Ut,e),r=[];let s=n.start?"^":"";const o=[];for(const c of t){const i=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let f=0;f<c.length;f++){const h=c[f];let g=40+(n.sensitive?.25:0);if(h.type===0)f||(s+="/"),s+=h.value.replace(Dt,"\\$&"),g+=40;else if(h.type===1){const{value:w,repeatable:P,optional:x,regexp:E}=h;o.push({name:w,repeatable:P,optional:x});const R=E||Ie;if(R!==Ie){g+=10;try{new RegExp(`(${R})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${w}" (${R}): `+O.message)}}let _=P?`((?:${R})(?:/(?:${R}))*)`:`(${R})`;f||(_=x&&c.length<2?`(?:/${_})`:"/"+_),x&&(_+="?"),s+=_,g+=20,x&&(g+=-8),P&&(g+=-20),R===".*"&&(g+=-50)}i.push(g)}r.push(i)}if(n.strict&&n.end){const c=r.length-1;r[c][r[c].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&(s+="(?:/|$)");const u=new RegExp(s,n.sensitive?"":"i");function d(c){const i=c.match(u),f={};if(!i)return null;for(let h=1;h<i.length;h++){const g=i[h]||"",w=o[h-1];f[w.name]=g&&w.repeatable?g.split("/"):g}return f}function l(c){let i="",f=!1;for(const h of t){(!f||!i.endsWith("/"))&&(i+="/"),f=!1;for(const g of h)if(g.type===0)i+=g.value;else if(g.type===1){const{value:w,repeatable:P,optional:x}=g,E=w in c?c[w]:"";if(T(E)&&!P)throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);const R=T(E)?E.join("/"):E;if(!R)if(x)h.length<2&&(i.endsWith("/")?i=i.slice(0,-1):f=!0);else throw new Error(`Missing required param "${w}"`);i+=R}}return i||"/"}return{re:u,score:r,keys:o,parse:d,stringify:l}}function zt(t,e){let n=0;for(;n<t.length&&n<e.length;){const r=e[n]-t[n];if(r)return r;n++}return t.length<e.length?t.length===1&&t[0]===40+40?-1:1:t.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function Vt(t,e){let n=0;const r=t.score,s=e.score;for(;n<r.length&&n<s.length;){const o=zt(r[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-r.length)===1){if(Te(r))return 1;if(Te(s))return-1}return s.length-r.length}function Te(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const Wt={type:0,value:""},Gt=/[a-zA-Z0-9_]/;function Kt(t){if(!t)return[[]];if(t==="/")return[[Wt]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=0,r=n;const s=[];let o;function u(){o&&s.push(o),o=[]}let d=0,l,c="",i="";function f(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:i,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;d<t.length;){if(l=t[d++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(c&&f(),u()):l===":"?(f(),n=1):h();break;case 4:h(),n=r;break;case 1:l==="("?n=2:Gt.test(l)?h():(f(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&d--);break;case 2:l===")"?i[i.length-1]=="\\"?i=i.slice(0,-1)+l:n=3:i+=l;break;case 3:f(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&d--,i="";break;default:e("Unknown state");break}}return n===2&&e(`Unfinished custom RegExp for param "${c}"`),f(),u(),s}function Ft(t,e,n){const r=jt(Kt(t.path),n),s=C(r,{record:t,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function Qt(t,e){const n=[],r=new Map;e=$e({strict:!1,end:!0,sensitive:!1},e);function s(i){return r.get(i)}function o(i,f,h){const g=!h,w=Yt(i);w.aliasOf=h&&h.record;const P=$e(e,i),x=[w];if("alias"in i){const _=typeof i.alias=="string"?[i.alias]:i.alias;for(const O of _)x.push(C({},w,{components:h?h.record.components:w.components,path:O,aliasOf:h?h.record:w}))}let E,R;for(const _ of x){const{path:O}=_;if(f&&O[0]!=="/"){const q=f.record.path,L=q[q.length-1]==="/"?"":"/";_.path=f.record.path+(O&&L+O)}if(E=Ft(_,f,P),h?h.alias.push(E):(R=R||E,R!==E&&R.alias.push(E),g&&i.name&&!He(E)&&u(i.name)),w.children){const q=w.children;for(let L=0;L<q.length;L++)o(q[L],E,h&&h.children[L])}h=h||E,(E.record.components&&Object.keys(E.record.components).length||E.record.name||E.record.redirect)&&l(E)}return R?()=>{u(R)}:Q}function u(i){if(Qe(i)){const f=r.get(i);f&&(r.delete(i),n.splice(n.indexOf(f),1),f.children.forEach(u),f.alias.forEach(u))}else{const f=n.indexOf(i);f>-1&&(n.splice(f,1),i.record.name&&r.delete(i.record.name),i.children.forEach(u),i.alias.forEach(u))}}function d(){return n}function l(i){let f=0;for(;f<n.length&&Vt(i,n[f])>=0&&(i.record.path!==n[f].record.path||!Xe(i,n[f]));)f++;n.splice(f,0,i),i.record.name&&!He(i)&&r.set(i.record.name,i)}function c(i,f){let h,g={},w,P;if("name"in i&&i.name){if(h=r.get(i.name),!h)throw V(1,{location:i});P=h.record.name,g=C(Le(f.params,h.keys.filter(R=>!R.optional).map(R=>R.name)),i.params&&Le(i.params,h.keys.map(R=>R.name))),w=h.stringify(g)}else if("path"in i)w=i.path,h=n.find(R=>R.re.test(w)),h&&(g=h.parse(w),P=h.record.name);else{if(h=f.name?r.get(f.name):n.find(R=>R.re.test(f.path)),!h)throw V(1,{location:i,currentLocation:f});P=h.record.name,g=C({},f.params,i.params),w=h.stringify(g)}const x=[];let E=h;for(;E;)x.unshift(E.record),E=E.parent;return{name:P,path:w,params:g,matched:x,meta:Zt(x)}}return t.forEach(i=>o(i)),{addRoute:o,resolve:c,removeRoute:u,getRoutes:d,getRecordMatcher:s}}function Le(t,e){const n={};for(const r of e)r in t&&(n[r]=t[r]);return n}function Yt(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:Xt(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function Xt(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const r in t.components)e[r]=typeof n=="boolean"?n:n[r];return e}function He(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function Zt(t){return t.reduce((e,n)=>C(e,n.meta),{})}function $e(t,e){const n={};for(const r in t)n[r]=r in e?e[r]:t[r];return n}function Xe(t,e){return e.children.some(n=>n===t||Xe(t,n))}const Ze=/#/g,Jt=/&/g,en=/\//g,tn=/=/g,nn=/\?/g,Je=/\+/g,rn=/%5B/g,sn=/%5D/g,et=/%5E/g,on=/%60/g,tt=/%7B/g,ln=/%7C/g,nt=/%7D/g,an=/%20/g;function ge(t){return encodeURI(""+t).replace(ln,"|").replace(rn,"[").replace(sn,"]")}function cn(t){return ge(t).replace(tt,"{").replace(nt,"}").replace(et,"^")}function pe(t){return ge(t).replace(Je,"%2B").replace(an,"+").replace(Ze,"%23").replace(Jt,"%26").replace(on,"`").replace(tt,"{").replace(nt,"}").replace(et,"^")}function un(t){return pe(t).replace(tn,"%3D")}function fn(t){return ge(t).replace(Ze,"%23").replace(nn,"%3F")}function dn(t){return t==null?"":fn(t).replace(en,"%2F")}function J(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function hn(t){const e={};if(t===""||t==="?")return e;const r=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;s<r.length;++s){const o=r[s].replace(Je," "),u=o.indexOf("="),d=J(u<0?o:o.slice(0,u)),l=u<0?null:J(o.slice(u+1));if(d in e){let c=e[d];T(c)||(c=e[d]=[c]),c.push(l)}else e[d]=l}return e}function Ne(t){let e="";for(let n in t){const r=t[n];if(n=un(n),r==null){r!==void 0&&(e+=(e.length?"&":"")+n);continue}(T(r)?r.map(o=>o&&pe(o)):[r&&pe(r)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function pn(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=T(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return e}const mn=Symbol(""),qe=Symbol(""),te=Symbol(""),ve=Symbol(""),me=Symbol("");function F(){let t=[];function e(r){return t.push(r),()=>{const s=t.indexOf(r);s>-1&&t.splice(s,1)}}function n(){t=[]}return{add:e,list:()=>t,reset:n}}function N(t,e,n,r,s){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((u,d)=>{const l=f=>{f===!1?d(V(4,{from:n,to:e})):f instanceof Error?d(f):Mt(f)?d(V(2,{from:e,to:f})):(o&&r.enterCallbacks[s]===o&&typeof f=="function"&&o.push(f),u())},c=t.call(r&&r.instances[s],e,n,l);let i=Promise.resolve(c);t.length<3&&(i=i.then(l)),i.catch(f=>d(f))})}function de(t,e,n,r){const s=[];for(const o of t)for(const u in o.components){let d=o.components[u];if(!(e!=="beforeRouteEnter"&&!o.instances[u]))if(gn(d)){const c=(d.__vccOpts||d)[e];c&&s.push(N(c,n,r,o,u))}else{let l=d();s.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${u}" at "${o.path}"`));const i=Et(c)?c.default:c;o.components[u]=i;const h=(i.__vccOpts||i)[e];return h&&N(h,n,r,o,u)()}))}}return s}function gn(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function Me(t){const e=M(te),n=M(ve),r=I(()=>e.resolve(j(t.to))),s=I(()=>{const{matched:l}=r.value,{length:c}=l,i=l[c-1],f=n.matched;if(!i||!f.length)return-1;const h=f.findIndex(z.bind(null,i));if(h>-1)return h;const g=Ue(l[c-2]);return c>1&&Ue(i)===g&&f[f.length-1].path!==g?f.findIndex(z.bind(null,l[c-2])):h}),o=I(()=>s.value>-1&&En(n.params,r.value.params)),u=I(()=>s.value>-1&&s.value===n.matched.length-1&&Ke(n.params,r.value.params));function d(l={}){return wn(l)?e[j(t.replace)?"replace":"push"](j(t.to)).catch(Q):Promise.resolve()}return{route:r,href:I(()=>r.value.href),isActive:o,isExactActive:u,navigate:d}}const vn=We({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Me,setup(t,{slots:e}){const n=Ve(Me(t)),{options:r}=M(te),s=I(()=>({[De(t.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[De(t.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:Ge("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),yn=vn;function wn(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function En(t,e){for(const n in e){const r=e[n],s=t[n];if(typeof r=="string"){if(r!==s)return!1}else if(!T(s)||s.length!==r.length||r.some((o,u)=>o!==s[u]))return!1}return!0}function Ue(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const De=(t,e,n)=>t??e??n,bn=We({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const r=M(me),s=I(()=>t.route||r.value),o=M(qe,0),u=I(()=>{let c=j(o);const{matched:i}=s.value;let f;for(;(f=i[c])&&!f.components;)c++;return c}),d=I(()=>s.value.matched[u.value]);ae(qe,I(()=>u.value+1)),ae(mn,d),ae(me,s);const l=ze();return ht(()=>[l.value,d.value,t.name],([c,i,f],[h,g,w])=>{i&&(i.instances[f]=c,g&&g!==i&&c&&c===h&&(i.leaveGuards.size||(i.leaveGuards=g.leaveGuards),i.updateGuards.size||(i.updateGuards=g.updateGuards))),c&&i&&(!g||!z(i,g)||!h)&&(i.enterCallbacks[f]||[]).forEach(P=>P(c))},{flush:"post"}),()=>{const c=s.value,i=t.name,f=d.value,h=f&&f.components[i];if(!h)return je(n.default,{Component:h,route:c});const g=f.props[i],w=g?g===!0?c.params:typeof g=="function"?g(c):g:null,x=Ge(h,C({},w,e,{onVnodeUnmounted:E=>{E.component.isUnmounted&&(f.instances[i]=null)},ref:l}));return je(n.default,{Component:x,route:c})||x}}});function je(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const Rn=bn;function Cn(t){const e=Qt(t.routes,t),n=t.parseQuery||hn,r=t.stringifyQuery||Ne,s=t.history,o=F(),u=F(),d=F(),l=ft($);let c=$;D&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const i=ue.bind(null,a=>""+a),f=ue.bind(null,dn),h=ue.bind(null,J);function g(a,m){let p,v;return Qe(a)?(p=e.getRecordMatcher(a),v=m):v=a,e.addRoute(v,p)}function w(a){const m=e.getRecordMatcher(a);m&&e.removeRoute(m)}function P(){return e.getRoutes().map(a=>a.record)}function x(a){return!!e.getRecordMatcher(a)}function E(a,m){if(m=C({},m||l.value),typeof a=="string"){const y=fe(n,a,m.path),S=e.resolve({path:y.path},m),K=s.createHref(y.fullPath);return C(y,S,{params:h(S.params),hash:J(y.hash),redirectedFrom:void 0,href:K})}let p;if("path"in a)p=C({},a,{path:fe(n,a.path,m.path).path});else{const y=C({},a.params);for(const S in y)y[S]==null&&delete y[S];p=C({},a,{params:f(a.params)}),m.params=f(m.params)}const v=e.resolve(p,m),k=a.hash||"";v.params=i(h(v.params));const A=Ct(r,C({},a,{hash:cn(k),path:v.path})),b=s.createHref(A);return C({fullPath:A,hash:k,query:r===Ne?pn(a.query):a.query||{}},v,{redirectedFrom:void 0,href:b})}function R(a){return typeof a=="string"?fe(n,a,l.value.path):C({},a)}function _(a,m){if(c!==a)return V(8,{from:m,to:a})}function O(a){return W(a)}function q(a){return O(C(R(a),{replace:!0}))}function L(a){const m=a.matched[a.matched.length-1];if(m&&m.redirect){const{redirect:p}=m;let v=typeof p=="function"?p(a):p;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=R(v):{path:v},v.params={}),C({query:a.query,hash:a.hash,params:"path"in v?{}:a.params},v)}}function W(a,m){const p=c=E(a),v=l.value,k=a.state,A=a.force,b=a.replace===!0,y=L(p);if(y)return W(C(R(y),{state:typeof y=="object"?C({},k,y.state):k,force:A,replace:b}),m||p);const S=p;S.redirectedFrom=m;let K;return!A&&kt(r,v,p)&&(K=V(16,{to:S,from:v}),Ce(v,v,!0,!1)),(K?Promise.resolve(K):we(S,v)).catch(B=>H(B)?H(B,2)?B:se(B):re(B,S,v)).then(B=>{if(B){if(H(B,2))return W(C({replace:b},R(B.to),{state:typeof B.to=="object"?C({},k,B.to.state):k,force:A}),m||S)}else B=be(S,v,!0,b,k);return Ee(S,v,B),B})}function st(a,m){const p=_(a,m);return p?Promise.reject(p):Promise.resolve()}function we(a,m){let p;const[v,k,A]=kn(a,m);p=de(v.reverse(),"beforeRouteLeave",a,m);for(const y of v)y.leaveGuards.forEach(S=>{p.push(N(S,a,m))});const b=st.bind(null,a,m);return p.push(b),U(p).then(()=>{p=[];for(const y of o.list())p.push(N(y,a,m));return p.push(b),U(p)}).then(()=>{p=de(k,"beforeRouteUpdate",a,m);for(const y of k)y.updateGuards.forEach(S=>{p.push(N(S,a,m))});return p.push(b),U(p)}).then(()=>{p=[];for(const y of a.matched)if(y.beforeEnter&&!m.matched.includes(y))if(T(y.beforeEnter))for(const S of y.beforeEnter)p.push(N(S,a,m));else p.push(N(y.beforeEnter,a,m));return p.push(b),U(p)}).then(()=>(a.matched.forEach(y=>y.enterCallbacks={}),p=de(A,"beforeRouteEnter",a,m),p.push(b),U(p))).then(()=>{p=[];for(const y of u.list())p.push(N(y,a,m));return p.push(b),U(p)}).catch(y=>H(y,8)?y:Promise.reject(y))}function Ee(a,m,p){for(const v of d.list())v(a,m,p)}function be(a,m,p,v,k){const A=_(a,m);if(A)return A;const b=m===$,y=D?history.state:{};p&&(v||b?s.replace(a.fullPath,C({scroll:b&&y&&y.scroll},k)):s.push(a.fullPath,k)),l.value=a,Ce(a,m,p,b),se()}let G;function ot(){G||(G=s.listen((a,m,p)=>{if(!ke.listening)return;const v=E(a),k=L(v);if(k){W(C(k,{replace:!0}),v).catch(Q);return}c=v;const A=l.value;D&&It(_e(A.fullPath,p.delta),ee()),we(v,A).catch(b=>H(b,12)?b:H(b,2)?(W(b.to,v).then(y=>{H(y,20)&&!p.delta&&p.type===X.pop&&s.go(-1,!1)}).catch(Q),Promise.reject()):(p.delta&&s.go(-p.delta,!1),re(b,v,A))).then(b=>{b=b||be(v,A,!1),b&&(p.delta&&!H(b,8)?s.go(-p.delta,!1):p.type===X.pop&&H(b,20)&&s.go(-1,!1)),Ee(v,A,b)}).catch(Q)}))}let ne=F(),Re=F(),Z;function re(a,m,p){se(a);const v=Re.list();return v.length?v.forEach(k=>k(a,m,p)):console.error(a),Promise.reject(a)}function it(){return Z&&l.value!==$?Promise.resolve():new Promise((a,m)=>{ne.add([a,m])})}function se(a){return Z||(Z=!a,ot(),ne.list().forEach(([m,p])=>a?p(a):m()),ne.reset()),a}function Ce(a,m,p,v){const{scrollBehavior:k}=t;if(!D||!k)return Promise.resolve();const A=!p&&Tt(_e(a.fullPath,0))||(v||!p)&&history.state&&history.state.scroll||null;return dt().then(()=>k(a,m,A)).then(b=>b&&Ot(b)).catch(b=>re(b,a,m))}const oe=a=>s.go(a);let ie;const le=new Set,ke={currentRoute:l,listening:!0,addRoute:g,removeRoute:w,hasRoute:x,getRoutes:P,resolve:E,options:t,push:O,replace:q,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:o.add,beforeResolve:u.add,afterEach:d.add,onError:Re.add,isReady:it,install(a){const m=this;a.component("RouterLink",yn),a.component("RouterView",Rn),a.config.globalProperties.$router=m,Object.defineProperty(a.config.globalProperties,"$route",{enumerable:!0,get:()=>j(l)}),D&&!ie&&l.value===$&&(ie=!0,O(s.location).catch(k=>{}));const p={};for(const k in $)p[k]=I(()=>l.value[k]);a.provide(te,m),a.provide(ve,Ve(p)),a.provide(me,l);const v=a.unmount;le.add(a),a.unmount=function(){le.delete(a),le.size<1&&(c=$,G&&G(),G=null,l.value=$,ie=!1,Z=!1),v()}}};return ke}function U(t){return t.reduce((e,n)=>e.then(()=>n()),Promise.resolve())}function kn(t,e){const n=[],r=[],s=[],o=Math.max(e.matched.length,t.matched.length);for(let u=0;u<o;u++){const d=e.matched[u];d&&(t.matched.find(c=>z(c,d))?r.push(d):n.push(d));const l=t.matched[u];l&&(e.matched.find(c=>z(c,l))||s.push(l))}return[n,r,s]}function Tn(){return M(te)}function Ln(){return M(ve)}let xn=qt(),Pn=[{path:"/",name:"Order",redirect:"/list"},{path:"/list",name:"List",component:()=>ce(()=>import("./index-627c9a68.js"),["./index-627c9a68.js","./axios-bb91c877.js","./index-6ada96a9.js","./axios-3111e043.css","./el-table-column-3d368070.js","./config-provider-50df6398.js","./el-button-27fa8f14.js","./el-button-2cb60ae5.css","./el-input-c3493547.js","./el-input-eda68dc7.css","./el-table-column-6c7c84cf.css","./el-select-531f20bf.js","./strings-a38906b4.js","./el-select-c3d1a4bc.css","./el-breadcrumb-item-b15210c9.js","./el-breadcrumb-item-a5da584b.css","./order-3e9cd4ed.js","./request-e41ef483.js","./_plugin-vue_export-helper-c27b6911.js","./zh-tw-e7607a85.js","./index-7443b347.css","./normalize-a99f45e8.css"],import.meta.url)},{path:"/info",name:"Info",component:()=>ce(()=>import("./index-f460a048.js"),["./index-f460a048.js","./axios-bb91c877.js","./index-6ada96a9.js","./axios-3111e043.css","./el-overlay-c7791c9a.js","./vnode-9cd9d478.js","./el-button-27fa8f14.js","./config-provider-50df6398.js","./el-button-2cb60ae5.css","./el-table-column-3d368070.js","./el-input-c3493547.js","./el-input-eda68dc7.css","./el-table-column-6c7c84cf.css","./el-overlay-f6b2674f.css","./qrcode.vue.esm-bb646d39.js","./strings-a38906b4.js","./qrcode.vue-7e66957b.css","./el-breadcrumb-item-b15210c9.js","./el-breadcrumb-item-a5da584b.css","./zh-tw-e7607a85.js","./order-3e9cd4ed.js","./request-e41ef483.js","./_plugin-vue_export-helper-c27b6911.js","./index-7b95daf7.js","./index-b20d8077.css","./el-message-f448e6ff.css","./normalize-a99f45e8.css"],import.meta.url)},{path:"/printcard",name:"PrintCard",component:()=>ce(()=>import("./printcard-1cbb6cb6.js"),["./printcard-1cbb6cb6.js","./axios-bb91c877.js","./index-6ada96a9.js","./axios-3111e043.css","./el-button-27fa8f14.js","./config-provider-50df6398.js","./el-button-2cb60ae5.css","./qrcode.vue.esm-bb646d39.js","./strings-a38906b4.js","./vnode-9cd9d478.js","./qrcode.vue-7e66957b.css","./order-3e9cd4ed.js","./request-e41ef483.js","./printcard-d43c6644.css"],import.meta.url)}];const An=Cn({history:xn,routes:Pn,scrollBehavior(t,e,n){return{top:0}}});class Sn{constructor(e){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,e),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let e="";this.settings.url&&!this.settings.asyncUrl&&(e=this.settings.url);let n=this;if(this.settings.asyncUrl)return void n.settings.asyncUrl(function(s){let o=n.getPrintWindow(s);n.settings.preview?n.previewIfrmaeLoad():n.print(o)},n.settings.vue);let r=this.getPrintWindow(e);this.settings.url||this.write(r.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(r)}addEvent(e,n,r){e.addEventListener?e.addEventListener(n,r,!1):e.attachEvent?e.attachEvent("on"+n,r):e["on"+n]=r}previewIfrmaeLoad(){let e=document.getElementById("vue-pirnt-nb-previewBox");if(e){let n=this,r=e.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(r,"load",function(){n.previewBoxShow(),n.removeCanvasImg(),n.settings.previewOpenCallback()}),this.addEvent(e.querySelector(".previewBodyUtilPrintBtn"),"click",function(){n.settings.beforeOpenCallback(),n.settings.openCallback(),r.contentWindow.print(),n.settings.closeCallback()})}}removeCanvasImg(){let e=this;try{if(e.elsdom){let n=e.elsdom.querySelectorAll(".canvasImg");for(let r=0;r<n.length;r++)n[r].remove()}}catch(n){console.log(n)}}print(e){var n=this;let r=document.getElementById(this.settings.id)||e.f,s=document.getElementById(this.settings.id).contentWindow||e.f.contentWindow;n.settings.beforeOpenCallback(),n.addEvent(r,"load",function(){s.focus(),n.settings.openCallback(),s.print(),r.remove(),n.settings.closeCallback(),n.removeCanvasImg()})}write(e){e.open(),e.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),e.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let e="",n="",r="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,o=>{e+=o}),[].forEach.call(document.querySelectorAll("link"),function(o){o.href.indexOf(".css")>=0&&(n+=`<link type="text/css" rel="stylesheet" href="${o.href}" >`)});let s=document.styleSheets;if(s&&s.length>0)for(let o=0;o<s.length;o++)try{if(s[o].cssRules||s[o].rules){let u=s[o].cssRules||s[o].rules;for(let d=0;d<u.length;d++)r+=u[d].cssText}}catch(u){console.log(s[o].href+u)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,o=>{n+=`<link type="text/css" rel="stylesheet" href="${o}">`}),`<head><title>${this.settings.popTitle}</title>${e}${n}<style type="text/css">${r}</style></head>`}getBody(){let e=this.settings.ids;return e=e.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(e)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(e){let n=e.querySelectorAll("canvas");for(let r=0;r<n.length;r++)if(!n[r].style.display){let s=n[r].parentNode,o=n[r].toDataURL("image/png"),u=new Image;u.className="canvasImg",u.style.display="none",u.src=o,s.appendChild(u)}return e}getFormData(e){let n=e.cloneNode(!0),r=n.querySelectorAll("input,select,textarea"),s=n.querySelectorAll(".canvasImg,canvas"),o=-1;for(let u=0;u<s.length;u++){let d=s[u].parentNode,l=s[u];l.tagName.toLowerCase()==="canvas"?d.removeChild(l):l.style.display="block"}for(let u=0;u<r.length;u++){let d=r[u],l=d.getAttribute("type"),c=r[u];if(l||(l=d.tagName==="SELECT"?"select":d.tagName==="TEXTAREA"?"textarea":""),d.tagName==="INPUT")l==="radio"||l==="checkbox"?d.checked&&c.setAttribute("checked",d.checked):(c.value=d.value,c.setAttribute("value",d.value));else if(l==="select"){o++;for(let i=0;i<e.querySelectorAll("select").length;i++){let f=e.querySelectorAll("select")[i];if(!f.getAttribute("newbs")&&f.setAttribute("newbs",i),f.getAttribute("newbs")==o){let h=e.querySelectorAll("select")[o].selectedIndex;d.options[h].setAttribute("selected",!0)}}}else c.innerHTML=d.value,c.setAttribute("html",d.value)}return n}getPrintWindow(e){var n=this.Iframe(e);return{f:n,win:n.contentWindow||n,doc:n.doc}}previewBoxShow(){let e=document.getElementById("vue-pirnt-nb-previewBox");e&&(document.querySelector("html").setAttribute("style","overflow: hidden"),e.style.display="block")}previewBoxHide(){let e=document.getElementById("vue-pirnt-nb-previewBox");e&&(document.querySelector("html").setAttribute("style","overflow: visible;"),e.querySelector("iframe")&&e.querySelector("iframe").remove(),e.style.display="none")}previewBox(){let e=document.getElementById("vue-pirnt-nb-previewBox"),n="previewBody";if(e)return e.querySelector("iframe")&&e.querySelector("iframe").remove(),{close:e.querySelector(".previewClose"),previewBody:e.querySelector(".previewBody")};let r=document.createElement("div");r.setAttribute("id","vue-pirnt-nb-previewBox"),r.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),r.style.zIndex=this.settings.zIndex;let s=document.createElement("div");s.setAttribute("class","previewHeader"),s.setAttribute("style","padding: 5px 20px;"),s.innerHTML=this.settings.previewTitle,r.appendChild(s),this.close=document.createElement("div");let o=this.close;o.setAttribute("class","previewClose"),o.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let u=document.createElement("div"),d=document.createElement("div");u.setAttribute("class","closeBefore"),u.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),d.setAttribute("class","closeAfter"),d.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),o.appendChild(u),o.appendChild(d),s.appendChild(o),this.previewBody=document.createElement("div");let l=this.previewBody;l.setAttribute("class",n),l.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),r.appendChild(l);let c=document.createElement("div");c.setAttribute("class","previewBodyUtil"),c.setAttribute("style","height: 32px;background: #474747;position: relative;"),l.appendChild(c),this.previewBodyUtilPrintBtn=document.createElement("div");let i=this.previewBodyUtilPrintBtn;return i.setAttribute("class","previewBodyUtilPrintBtn"),i.innerHTML=this.settings.previewPrintBtnLabel,i.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),c.appendChild(i),document.body.appendChild(r),{close:this.close,previewBody:this.previewBody}}iframeBox(e,n){let r=document.createElement("iframe");return r.style.border="0px",r.style.position="absolute",r.style.width="0px",r.style.height="0px",r.style.right="0px",r.style.top="0px",r.setAttribute("id",e),r.setAttribute("src",n),r}Iframe(e){let n=this.settings.id;e=e||new Date().getTime();let r=this,s=this.iframeBox(n,e);try{if(this.settings.preview){s.setAttribute("style","border: 0px;flex: 1;");let o=this.previewBox(),u=o.previewBody,d=o.close;u.appendChild(s),this.addEvent(d,"click",function(){r.previewBoxHide()})}else document.body.appendChild(s);s.doc=null,s.doc=s.contentDocument?s.contentDocument:s.contentWindow?s.contentWindow.document:s.document}catch(o){throw new Error(o+". iframes may not be supported in this browser.")}if(s.doc==null)throw new Error("Cannot find document.");return s}}var rt={directiveName:"print",mounted(t,e,n){let r=e.instance,s="";var o,u,d;u="click",d=()=>{if(typeof e.value=="string")s=e.value;else{if(typeof e.value!="object"||!e.value.id)return void window.print();{s=e.value.id;let c=s.replace(new RegExp("#","g"),"");document.getElementById(c)||(console.log("id in Error"),s="")}}l()},(o=t).addEventListener?o.addEventListener(u,d,!1):o.attachEvent?o.attachEvent("on"+u,d):o["on"+u]=d;const l=()=>{new Sn({ids:s,vue:r,url:e.value.url,standard:"",extraHead:e.value.extraHead,extraCss:e.value.extraCss,zIndex:e.value.zIndex||20002,previewTitle:e.value.previewTitle||"打印预览",previewPrintBtnLabel:e.value.previewPrintBtnLabel||"打印",popTitle:e.value.popTitle,preview:e.value.preview||!1,asyncUrl:e.value.asyncUrl,previewBeforeOpenCallback(){e.value.previewBeforeOpenCallback&&e.value.previewBeforeOpenCallback(r)},previewOpenCallback(){e.value.previewOpenCallback&&e.value.previewOpenCallback(r)},openCallback(){e.value.openCallback&&e.value.openCallback(r)},closeCallback(){e.value.closeCallback&&e.value.closeCallback(r)},beforeOpenCallback(){e.value.beforeOpenCallback&&e.value.beforeOpenCallback(r)}})}},install:function(t){t.directive("print",rt)}};const ye=pt(vt);ye.use(An);ye.use(rt);ye.mount("#app");export{Tn as a,Ln as u};
|