Files
fad_oa/ruoyi-ui/public/file-viewer/assets/chunk-5ZQYHXKU-D-OgLpMs.js

2 lines
16 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{n as e,r as t}from"./chunk-AGHRB4JF-Fz9kp2Fp.js";import{R as n,h as r,p as i,r as a,s as o}from"./chunk-CSCIHK7Q-VDPd5eNJ.js";import{Q as s,_ as c,a as l,c as u,d,f,g as ee,h as te,i as ne,l as re,m as ie,n as ae,o as oe,p as se,r as ce,s as le,t as ue,u as de,x as fe}from"./src-BrOGWJpF.js";import{t as pe}from"./dist-idVqPIzq.js";var me=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function p(e){return new me(e,!0)}function m(e){return new me(e,!1)}function he(e){return Number.isSafeInteger(e)&&e>=0}function h(e){return e!=null&&typeof e!=`function`&&he(e.length)}function ge(e){return e===`__proto__`}function g(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function v(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var y=`[object RegExp]`,b=`[object String]`,x=`[object Number]`,S=`[object Boolean]`,C=`[object Arguments]`,w=`[object Symbol]`,T=`[object Date]`,E=`[object Map]`,_e=`[object Set]`,ve=`[object Array]`,ye=`[object ArrayBuffer]`,be=`[object Object]`,xe=`[object DataView]`,Se=`[object Uint8Array]`,Ce=`[object Uint8ClampedArray]`,we=`[object Uint16Array]`,Te=`[object Uint32Array]`,Ee=`[object Int8Array]`,D=`[object Int16Array]`,O=`[object Int32Array]`,k=`[object Float32Array]`,A=`[object Float64Array]`,j=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function M(e){return j.Buffer!==void 0&&j.Buffer.isBuffer(e)}function N(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function De(e,t){return P(e,void 0,e,new Map,t)}function P(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(g(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=P(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,P(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(P(a,void 0,n,r,i));return t}if(M(e))return e.subarray();if(N(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=P(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),F(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),F(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),F(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,F(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),F(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),F(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),F(t,e,n,r,i),t}if(typeof e==`object`&&Oe(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),F(t,e,n,r,i),t}return e}function F(e,t,n=e,r,i){let a=[...Object.keys(t),..._(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=P(t[s],s,n,r,i))}}function Oe(e){switch(v(e)){case C:case ve:case ye:case xe:case S:case T:case k:case A:case Ee:case D:case O:case E:case x:case be:case y:case _e:case b:case w:case Se:case Ce:case we:case Te:return!0;default:return!1}}function ke(e,t){return De(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(v(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),F(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case x:case b:case S:{let t=new e.constructor(e?.valueOf());return F(t,e),t}case C:{let t={};return F(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function I(e){return ke(e)}function L(e){return typeof e==`object`&&!!e&&v(e)===`[object Arguments]`}function R(e){return typeof e==`object`&&!!e}function Ae(e){return R(e)&&h(e)}function z(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(z.Cache||Map),n}z.Cache=Map;function je(){}function B(e){return N(e)}function V(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Me(e){if(g(e))return e;if(Array.isArray(e)||N(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function Ne(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=H(i,t,r,new Map)}return i}function H(e,t,n,r){if(g(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return Me(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),..._(t)];for(let a=0;a<i.length;a++){let o=i[a];if(ge(o))continue;let s=t[o],c=e[o];if(L(s)&&(s={...s}),L(c)&&(c={...c}),M(s)&&(s=I(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(Ae(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||R(c)&&R(s)&&(V(c)||V(s)||B(c)||B(s))?e[o]=H(c,s,n,r):c==null&&V(s)?e[o]=H({},s,n,r):c==null&&B(s)?e[o]=I(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function Pe(e,...t){return Ne(e,...t,je)}var Fe=pe(),Ie={curveBasis:c,curveBasisClosed:ee,curveBasisOpen:te,curveBumpX:p,curveBumpY:m,curveBundle:ie,curveCardinalClosed:f,curveCardinalOpen:d,curveCardinal:se,curveCatmullRomClosed:re,curveCatmullRomOpen:u,curveCatmullRom:de,curveLinear:fe,curveLinearClosed:le,curveMonotoneX:l,curveMonotoneY:oe,curveNatural:ne,curveStep:ce,curveStepAfter:ue,curveStepBefore:ae},Le=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Re=e(function(e,t){let r=ze(e,/(?:init\b)|(?:initialize\b)/),o={};if(Array.isArray(r)){let e=r.map(e=>e.args);n(e),o=a(o,[...e])}else o=r.args;if(!o)return;let s=i(e,t),c=`config`;return o[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),o[s]=o[c],delete o[c]),o},`detectInit`),ze=e(function(e,n=null){try{let i=RegExp(`[%]{2}(?![{]${Le.source})(?=[}][%]{2}).*
`,`ig`);e=e.trim().replace(i,``).replace(/'/gm,`"`),t.debug(`Detecting diagram directive${n===null?``:` type:`+n} based on the text:${e}`);let a,o=[];for(;(a=r.exec(e))!==null;)if(a.index===r.lastIndex&&r.lastIndex++,a&&!n||n&&a[1]?.match(n)||n&&a[2]?.match(n)){let e=a[1]?a[1]:a[2],t=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:e,args:t})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return t.error(`ERROR: ${r.message} - Unable to parse directive type: '${n}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),Be=e(function(e){return e.replace(r,``)},`removeDirectives`),Ve=e(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?Ie[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}e(U,`interpolateToCurve`);function He(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,Fe.sanitizeUrl)(n)}e(He,`formatUrl`);var Ue=e((e,...n)=>{let r=e.split(`.`),i=r.length-1,a=r[i],o=window;for(let n=0;n<i;n++)if(o=o[r[n]],!o){t.error(`Function name: ${e} not found in window`);return}o[a](...n)},`runFunc`);function W(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}e(W,`distance`);function We(e){let t,n=0;return e.forEach(e=>{n+=W(e,t),t=e}),G(e,n/2)}e(We,`traverseEdge`);function Ge(e){return e.length===1?e[0]:We(e)}e(Ge,`calcLabelPosition`);var Ke=e((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=e((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:Ke((1-i)*n.x+i*t.x,5),y:Ke((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),qe=e((e,n,r)=>{t.info(`our points ${JSON.stringify(n)}`),n[0]!==r&&(n=n.reverse());let i=G(n,25),a=e?10:5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(n[0].x+i.x)/2,s.y=-Math.cos(o)*a+(n[0].y+i.y)/2,s},`calcCardinalityPosition`);function Je(e,n,r){let i=structuredClone(r);t.info(`our points`,i),n!==`start_left`&&n!==`start_right`&&i.reverse();let a=G(i,25+e),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return n===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):n===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):n===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}e(Je,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}e(K,`getStylesFromArray`);var Ye=0,Xe=e(()=>(Ye++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Ye),`generateId`);function Ze(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}e(Ze,`makeRandomHex`);var Qe=e(e=>Ze(e.length),`random`),$e=e(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),et=e(function(e,t){let n=t.text.replace(o.lineBreakRegex,` `),[,r]=Z(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),tt=z((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),o.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=J(`${e} `,n),c=J(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=nt(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),nt=z((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(J(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function q(e,t){return Y(e,t).height}e(q,`calculateTextHeight`);function J(e,t){return Y(e,t).width}e(J,`calculateTextWidth`);var Y=z((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=Z(n),c=[`sans-serif`,r],l=e.split(o.lineBreakRegex),u=[],d=s(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of c){let t=0,n={width:0,height:0,lineHeight:0};for(let r of l){let o=$e();o.text=r||``;let s=et(f,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),rt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{e(this,`InitIDGenerator`)}},X,it=e(function(e){return X||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),X.innerHTML=e,unescape(X.textContent)},`entityDecode`);function at(e){return`str`in e}e(at,`isDetailedError`);var ot=e((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Z=e(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Q(e,t){return Pe({},e,t)}e(Q,`cleanAndMerge`);var st={assignWithDepth:a,wrapLabel:tt,calculateTextHeight:q,calculateTextWidth:J,calculateTextDimensions:Y,cleanAndMerge:Q,detectInit:Re,detectDirective:ze,isSubstringInArray:Ve,interpolateToCurve:U,calcLabelPosition:Ge,calcCardinalityPosition:qe,calcTerminalLabelPosition:Je,formatUrl:He,getStylesFromArray:K,generateId:Xe,random:Qe,runFunc:Ue,entityDecode:it,insertTitle:ot,isLabelCoordinateInPath:$,parseFontSize:Z,InitIDGenerator:rt},ct=e(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),lt=e(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),ut=e((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function dt(e){return e??null}e(dt,`handleUndefinedAttr`);function $(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}e($,`isLabelCoordinateInPath`);export{O as A,Te as B,ve as C,k as D,T as E,y as F,h as G,Ce as H,_e as I,p as K,b as L,E as M,x as N,A as O,be as P,w as R,ye as S,xe as T,v as U,Se as V,g as W,tt as _,lt as a,M as b,ut as c,U as d,at as f,st as g,Be as h,Q as i,Ee as j,D as k,K as l,Qe as m,q as n,ct as o,Z as p,m as q,J as r,Xe as s,Y as t,dt as u,B as v,S as w,C as x,L as y,we as z};