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

2 lines
16 KiB
JavaScript
Raw Normal View History

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.getPrototy
`,`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!==``