@labelbee/lb-annotation 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/es/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ $ yarn add @labelbee/lb-annotation
|
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
20
|
import React, { useEffect } from 'react';
|
|
21
|
-
import { AnnotationEngine } from '@
|
|
21
|
+
import { AnnotationEngine } from '@labelbee/lb-annotation';
|
|
22
22
|
|
|
23
23
|
const imgSrc =
|
|
24
24
|
'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Andre_Iguodala_2016.jpg/1200px-Andre_Iguodala_2016.jpg';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/*!
|
|
2
|
-
* sense-annotation v1.5.
|
|
2
|
+
* sense-annotation v1.5.3
|
|
3
3
|
* (c) 2020-2021
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/Object.defineProperty(exports,"__esModule",{value:!0});var _=require("lodash"),rgba=require("color-rgba");function _interopDefaultLegacy(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var ___default=_interopDefaultLegacy(_),rgba__default=_interopDefaultLegacy(rgba);const editStepWidth=320;var EPointCloudName;(function(r){r.PointCloud="pointCloudTool"})(EPointCloudName||(EPointCloudName={}));var EVideoToolName;(function(r){r.VideoTextTool="videoTextTool",r.VideoTagTool="videoTagTool",r.VideoClipTool="videoClipTool"})(EVideoToolName||(EVideoToolName={}));var EToolType;(function(r){r[r.Rect=0]="Rect",r[r.Tag=1]="Tag"})(EToolType||(EToolType={}));var EToolName;(function(r){r.Rect="rectTool",r.Tag="tagTool",r.Point="pointTool",r.PointMarker="pointMarkerTool",r.Segmentation="segmentationTool",r.Filter="filterTool",r.Text="textTool",r.Polygon="polygonTool",r.Line="lineTool",r.LineMarker="lineMarkerTool",r.Empty="emptyTool",r.FolderTag="folderTagTool",r.RectTrack="rectTrackTool",r.Face="faceTool",r.ClientAttribute="clientAttributeTool",r.OCRRelation="OCRRelationTool"})(EToolName||(EToolName={}));var ECheckModel;(function(r){r.Check="check"})(ECheckModel||(ECheckModel={}));var ERectPattern;(function(r){r[r.nothing=0]="nothing",r[r.RectBG=1]="RectBG",r[r.showOrder=2]="showOrder"})(ERectPattern||(ERectPattern={}));const TOOL_NAME={[EToolName.Rect]:"\u62C9\u6846",[EToolName.Tag]:"\u6807\u7B7E",[EToolName.Point]:"\u6807\u70B9",[EToolName.PointMarker]:"\u5217\u8868\u6807\u70B9",[EToolName.Segmentation]:"\u524D\u666F\u5206\u5272",[EToolName.Filter]:"\u7B5B\u9009",[EToolName.Text]:"\u6587\u672C",[EToolName.Polygon]:"\u591A\u8FB9\u5F62",[EToolName.Line]:"\u7EBF\u6761",[EToolName.LineMarker]:"\u5217\u8868\u7EBF\u6761",[EToolName.FolderTag]:"\u6587\u4EF6\u5939\u6807\u7B7E",[EToolName.RectTrack]:"\u62C9\u6846\u8DDF\u8E2A",[EToolName.Face]:"\u4EBA\u8138106\u5DE5\u5177",[EToolName.ClientAttribute]:"\u5BA2\u6237\u7AEF\u5C5E\u6027\u5DE5\u5177",[EToolName.OCRRelation]:"OCR\u5173\u8054\u5173\u7CFB\u5DE5\u5177",[EVideoToolName.VideoTextTool]:"\u89C6\u9891\u6587\u672C",[EVideoToolName.VideoTagTool]:"\u89C6\u9891\u6807\u7B7E",[EVideoToolName.VideoClipTool]:"\u89C6\u9891\u622A\u53D6",[EPointCloudName.PointCloud]:"\u70B9\u4E91"};var EDependPattern;(function(r){r[r.noDepend=1]="noDepend",r[r.dependOrigin=2]="dependOrigin",r[r.dependShape=3]="dependShape",r[r.dependLine=4]="dependLine",r[r.dependPolygon=5]="dependPolygon",r[r.dependPreShape=101]="dependPreShape",r[r.dependPreLine=102]="dependPreLine",r[r.dependPrePolygon=103]="dependPrePolygon"})(EDependPattern||(EDependPattern={}));var EFilterToolOperation;(function(r){r.lc="leftClick",r.rc="rightClick",r.clc="ctrlLeftClick",r.crc="ctrlRightClick"})(EFilterToolOperation||(EFilterToolOperation={}));const OPERATION_LIST={leftClick:"\u9F20\u6807\u5DE6\u952E",rightClick:"\u9F20\u6807\u53F3\u952E",ctrlLeftClick:"ctrl + \u9F20\u6807\u5DE6\u952E",ctrlRightClick:"ctrl + \u9F20\u6807\u53F3\u952E"};var EAnnotationMode;(function(r){r[r.Normal=1]="Normal",r[r.Modify=2]="Modify"})(EAnnotationMode||(EAnnotationMode={}));var ELineTypes;(function(r){r[r.Line=0]="Line",r[r.Curve=1]="Curve"})(ELineTypes||(ELineTypes={}));var ELineColor;(function(r){r[r.SingleColor=0]="SingleColor",r[r.MultiColor=1]="MultiColor"})(ELineColor||(ELineColor={}));var ESelectedType;(function(r){r[r.Form=1]="Form",r[r.Json=2]="Json"})(ESelectedType||(ESelectedType={}));var EDragTarget$1;(function(r){r[r.Point=0]="Point",r[r.Line=1]="Line",r[r.Plane=2]="Plane"})(EDragTarget$1||(EDragTarget$1={}));var EDrawPointPattern;(function(r){r[r.None=0]="None",r[r.Drawing=1]="Drawing",r[r.Edit=2]="Edit"})(EDrawPointPattern||(EDrawPointPattern={}));var EPageOperator$1;(function(r){r[r.Backward=0]="Backward",r[r.Forward=1]="Forward",r[r.JumpSkip=2]="JumpSkip",r[r.None=3]="None"})(EPageOperator$1||(EPageOperator$1={}));var EAuditStatus;(function(r){r[r.Wait=0]="Wait",r[r.Pass=1]="Pass",r[r.Fail=2]="Fail",r[r.Loading=3]="Loading"})(EAuditStatus||(EAuditStatus={}));var ETextType;(function(r){r[r.AnyString=0]="AnyString",r[r.Order=1]="Order",r[r.EnglishOnly=2]="EnglishOnly",r[r.NumberOnly=3]="NumberOnly",r[r.CustomFormat=4]="CustomFormat"})(ETextType||(ETextType={}));const TEXT_TYPE={0:"\u4EFB\u610F\u5B57\u7B26",1:"\u5E8F\u53F7",2:"\u4EC5\u82F1\u6587",3:"\u4EC5\u6570\u5B57"},TEXT_ATTRIBUTE_MAX_LENGTH=1e3,TEXT_ATTRIBUTE_LINE_HEIGHT=16;var EThumbnailOption;(function(r){r[r.ImgList=1e3]="ImgList",r[r.TrackPrediction=1001]="TrackPrediction",r[r.ImgSearch=1002]="ImgSearch"})(EThumbnailOption||(EThumbnailOption={}));const CLIENT_TOOL_HEAD_TYPE={[EPointCloudName.PointCloud]:"sensebeepc",[EToolName.ClientAttribute]:"sensebeepc-EnumAttributeTool",[EToolName.Face]:"sensebeepc-FacePointsLabellingTool",[EToolName.OCRRelation]:"sensebeepc-OCRRelationTool"},CLIENT_TOOL_NAME={[EPointCloudName.PointCloud]:"\u70B9\u4E91\u5BA2\u6237\u7AEF",[EToolName.ClientAttribute]:"\u5BA2\u6237\u7AEF\u5C5E\u6027\u5DE5\u5177",[EToolName.Face]:"\u4EBA\u8138106\u70B9\u5DE5\u5177",[EToolName.OCRRelation]:"OCR\u5173\u8054\u5173\u7CFB\u5DE5\u5177"},SEGMENT_NUMBER$2=16,edgeAdsorptionScope=10;var tool=Object.freeze({__proto__:null,editStepWidth,get EPointCloudName(){return EPointCloudName},get EVideoToolName(){return EVideoToolName},get EToolType(){return EToolType},get EToolName(){return EToolName},get ECheckModel(){return ECheckModel},get ERectPattern(){return ERectPattern},TOOL_NAME,get EDependPattern(){return EDependPattern},get EFilterToolOperation(){return EFilterToolOperation},OPERATION_LIST,get EAnnotationMode(){return EAnnotationMode},get ELineTypes(){return ELineTypes},get ELineColor(){return ELineColor},get ESelectedType(){return ESelectedType},get EDragTarget(){return EDragTarget$1},get EDrawPointPattern(){return EDrawPointPattern},get EPageOperator(){return EPageOperator$1},get EAuditStatus(){return EAuditStatus},get ETextType(){return ETextType},TEXT_TYPE,TEXT_ATTRIBUTE_MAX_LENGTH,TEXT_ATTRIBUTE_LINE_HEIGHT,get EThumbnailOption(){return EThumbnailOption},CLIENT_TOOL_HEAD_TYPE,CLIENT_TOOL_NAME,SEGMENT_NUMBER:SEGMENT_NUMBER$2,edgeAdsorptionScope}),__defProp$e=Object.defineProperty,__defProps$c=Object.defineProperties,__getOwnPropDescs$c=Object.getOwnPropertyDescriptors,__getOwnPropSymbols$e=Object.getOwnPropertySymbols,__hasOwnProp$e=Object.prototype.hasOwnProperty,__propIsEnum$e=Object.prototype.propertyIsEnumerable,__defNormalProp$e=(r,t,e)=>t in r?__defProp$e(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,__spreadValues$e=(r,t)=>{for(var e in t||(t={}))__hasOwnProp$e.call(t,e)&&__defNormalProp$e(r,e,t[e]);if(__getOwnPropSymbols$e)for(var e of __getOwnPropSymbols$e(t))__propIsEnum$e.call(t,e)&&__defNormalProp$e(r,e,t[e]);return r},__spreadProps$c=(r,t)=>__defProps$c(r,__getOwnPropDescs$c(t));function createSmoothCurvePoints(r,t=.5,e=!1,i=16){if(r.length<4)return r;const s=[],n=r.slice(0);let o,a,l,h,d,u,c,g,f,v,p,b,x;for(e?(n.unshift(r[r.length-1]),n.unshift(r[r.length-2]),n.unshift(r[r.length-1]),n.unshift(r[r.length-2]),n.push(r[0]),n.push(r[1])):(n.unshift(r[1]),n.unshift(r[0]),n.push(r[r.length-2]),n.push(r[r.length-1])),x=2;x<n.length-4;x+=2)for(l=(n[x+2]-n[x-2])*t,h=(n[x+4]-n[x-0])*t,d=(n[x+3]-n[x-1])*t,u=(n[x+5]-n[x+1])*t,b=0;b<=i;b++)p=b/i,c=2*Math.pow(p,3)-3*Math.pow(p,2)+1,g=-(2*Math.pow(p,3))+3*Math.pow(p,2),f=Math.pow(p,3)-2*Math.pow(p,2)+p,v=Math.pow(p,3)-Math.pow(p,2),o=c*n[x]+g*n[x+2]+f*l+v*h,a=c*n[x+1]+g*n[x+3]+f*d+v*u,s.push(o),s.push(a);const y=[];for(let I=0;I<s.length-1;I+=2)y.push({x:s[I],y:s[I+1]});if(e)for(let I=0;I<i+1;I++){const m=y.shift();y.push(m)}return y}const createSmoothCurvePointsFromPointList=(r,t=16)=>createSmoothCurvePoints(r.reduce((e,i)=>[...e,i.x,i.y],[]),.5,!1,t);function isInPolygon(r,t,e=ELineTypes.Line){let i=0,s,n,o,a;t=[...t],e===ELineTypes.Curve&&(t=createSmoothCurvePoints(t.reduce((h,d)=>[...h,d.x,d.y],[]),.5,!0,SEGMENT_NUMBER$2)),[o]=t;const l=t.length;for(s=1;s<=l;s++)a=t[s%l],r.x>Math.min(o.x,a.x)&&r.x<=Math.max(o.x,a.x)&&r.y<=Math.max(o.y,a.y)&&o.x!==a.x&&(n=(r.x-o.x)*(a.y-o.y)/(a.x-o.x)+o.y,(o.y===a.y||r.y<=n)&&i++),o=a;return i%2!=0}function getPolygonPointUnderZoom(r,t=1){return r.map(e=>__spreadProps$c(__spreadValues$e({},e),{x:e.x*t,y:e.y*t}))}const _MathUtils=class{static getRotate(r){return r+90>=360?r+90-360:r+90}static getLineLength(r,t){return Math.sqrt(Math.pow(t.y-r.y,2)+Math.pow(t.x-r.x,2))}};let MathUtils=_MathUtils;MathUtils.isInRange=(r,t)=>{const e=Math.min(...t),i=Math.max(...t),s=o=>o<=i&&o>=e;return(Array.isArray(r)?r:[r]).every(o=>s(o))},MathUtils.withinRange=(r,t)=>{const e=Math.min(...t),i=Math.max(...t);return r>i?i:r<e?e:r},MathUtils.calcViewportBoundaries=(r,t=!1,e=SEGMENT_NUMBER$2,i=1)=>{if(!r)return{top:0,bottom:0,left:0,right:0};const s=20/i,n=[],o=[];let a=r;t&&(a=createSmoothCurvePointsFromPointList(r,e)),a.forEach(({x:f,y:v})=>{n.push(f),o.push(v)});let l=Math.min(...n),h=Math.max(...n),d=Math.min(...o),u=Math.max(...o);const c=h-l,g=u-d;if(c<s){const f=(s-c)/2;l-=f,h+=f}if(g<s){const f=(s-g)/2;d-=f,u+=f}return{top:d,bottom:u,left:l,right:h}},MathUtils.getFootOfPerpendicular=(r,t,e,i=!1)=>{let s={x:0,y:0};const n=t.x-e.x,o=t.y-e.y;if(Math.abs(n)<1e-8&&Math.abs(o)<1e-8)return s=t,s;let a=(r.x-t.x)*(t.x-e.x)+(r.y-t.y)*(t.y-e.y);a/=n*n+o*o,s.x=t.x+a*n,s.y=t.y+a*o;const l=_MathUtils.getLineLength(r,s),h=2,d=Math.min(t.x,e.x),u=Math.max(t.x,e.x),c=Math.min(t.y,e.y),g=Math.max(t.y,e.y),f=!(_MathUtils.isInRange(r.x,[d,u])||_MathUtils.isInRange(r.y,[c,g])),v=r.x>u+h||r.x<d-h||r.y>g+h||r.y<c-h;return(i?f:v)?{footPoint:s,length:Infinity}:{footPoint:s,length:l}};const headerHeight=61,tipsHeight=40,footerHeight=40,sidebarWidth=240;var EStepType;(function(r){r[r.ANNOTATION=1]="ANNOTATION",r[r.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",r[r.PRE_ANNOTATION=3]="PRE_ANNOTATION",r[r.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(EStepType||(EStepType={}));const ANNOTATION_MAX_SIZE=1e3;var EPageOperator;(function(r){r[r.Backward=0]="Backward",r[r.Forward=1]="Forward",r[r.JumpSkip=2]="JumpSkip",r[r.None=3]="None"})(EPageOperator||(EPageOperator={}));var EDragStatus;(function(r){r[r.Start=0]="Start",r[r.Stop=1]="Stop",r[r.Wait=2]="Wait",r[r.Move=3]="Move"})(EDragStatus||(EDragStatus={}));var EDragTarget;(function(r){r[r.Point=0]="Point",r[r.Line=1]="Line",r[r.Plane=2]="Plane"})(EDragTarget||(EDragTarget={}));var ESortDirection;(function(r){r[r.ascend=0]="ascend",r[r.descend=1]="descend"})(ESortDirection||(ESortDirection={}));var EGrowthMode;(function(r){r[r.Intelligence=0]="Intelligence",r[r.Linear=1]="Linear"})(EGrowthMode||(EGrowthMode={}));var ELang;(function(r){r.Zh="zh_CN",r.US="en_US"})(ELang||(ELang={}));const DEFAULT_TEXT_OFFSET={offsetX:-10,offsetY:-10},DEFAULT_TEXT_SHADOW={shadowColor:"rgba(0,0,0,0.6)",shadowOffsetX:0,shadowOffsetY:2,shadowBlur:4};var annotation=Object.freeze({__proto__:null,headerHeight,tipsHeight,footerHeight,sidebarWidth,get EStepType(){return EStepType},ANNOTATION_MAX_SIZE,get EPageOperator(){return EPageOperator},get EDragStatus(){return EDragStatus},get EDragTarget(){return EDragTarget},get ESortDirection(){return ESortDirection},get EGrowthMode(){return EGrowthMode},get ELang(){return ELang},DEFAULT_TEXT_OFFSET,DEFAULT_TEXT_SHADOW}),__defProp$d=Object.defineProperty,__defProps$b=Object.defineProperties,__getOwnPropDescs$b=Object.getOwnPropertyDescriptors,__getOwnPropSymbols$d=Object.getOwnPropertySymbols,__hasOwnProp$d=Object.prototype.hasOwnProperty,__propIsEnum$d=Object.prototype.propertyIsEnumerable,__defNormalProp$d=(r,t,e)=>t in r?__defProp$d(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,__spreadValues$d=(r,t)=>{for(var e in t||(t={}))__hasOwnProp$d.call(t,e)&&__defNormalProp$d(r,e,t[e]);if(__getOwnPropSymbols$d)for(var e of __getOwnPropSymbols$d(t))__propIsEnum$d.call(t,e)&&__defNormalProp$d(r,e,t[e]);return r},__spreadProps$b=(r,t)=>__defProps$b(r,__getOwnPropDescs$b(t));class RectUtils{static composeResult(t,e,i,s,n){try{const o=JSON.parse(t),a=CommonToolUtils.getCurrentStepInfo(e,s),{dataSourceStep:l}=a,h=`step_${a.step}`;if(Object.assign(o,n),o[h]){const d=o[h];return d.result?(d.result=i,JSON.stringify(o)):JSON.stringify(__spreadProps$b(__spreadValues$d({},o),{[h]:__spreadProps$b(__spreadValues$d({},o[h]),{result:i})}))}return JSON.stringify(__spreadProps$b(__spreadValues$d({},o),{[h]:{dataSourceStep:l,toolName:a.tool,result:i}}))}catch(o){return t}}static changeCoordinateByRotate(t,e,i){const{x:s,y:n,width:o,height:a}=t,l=AxisUtils.changeCoordinateByRotate({x:s,y:n},e,i);switch(e%360){case 90:return __spreadProps$b(__spreadValues$d({},t),{x:l.x-a,y:l.y,width:a,height:o});case 180:return __spreadProps$b(__spreadValues$d({},t),{x:l.x-o,y:l.y-a});case 270:return __spreadProps$b(__spreadValues$d({},t),{x:l.x,y:l.y-o,width:a,height:o});default:return t}}static translateRect2Points(t){const{x:e,y:i,width:s,height:n}=t;return[{x:e,y:i},{x:e+s,y:i},{x:e+s,y:i+n},{x:e,y:i+n}]}static translatePoints2Rect(t,e){if(t.length!==4)return;const{x:i,y:s}=t[0],n=t[1].x-t[0].x,o=t[2].y-t[1].y;return __spreadProps$b(__spreadValues$d({},e),{x:i,y:s,width:n,height:o})}static getRectPointList(t,e=1){return[{x:t.x*e,y:t.y*e},{x:(t.x+t.width)*e,y:t.y*e},{x:(t.x+t.width)*e,y:(t.y+t.height)*e},{x:t.x*e,y:(t.y+t.height)*e}]}static getRectEdgeList(t,e=1){const i=this.getRectPointList(t,e),s=i.length;return i.map((n,o)=>({begin:n,end:i[(o+1)%s]}))}static isInRect(t,e,i=0,s=1){return t.x>=e.x*s-i&&t.x<=(e.x+e.width)*s+i&&t.y>=e.y*s-i&&t.y<=(e.y+e.height)*s+i}static getRectUnderZoom(t,e=1){const{x:i,y:s,width:n,height:o}=t;return __spreadProps$b(__spreadValues$d({},t),{x:i*e,y:s*e,width:n*e,height:o*e})}static isRectNotInPolygon(t,e){return this.getRectPointList(t).some(s=>!isInPolygon(s,e))}}function uuid(r=8,t=62){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];let s;if(t=t||e.length,r)for(s=0;s<r;s++)i[s]=e[0|Math.random()*t];else{let n;for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",s=0;s<36;s++)i[s]||(n=0|Math.random()*16,i[s]=e[s===19?n&3|8:n])}return i.join("")}var __defProp$c=Object.defineProperty,__getOwnPropSymbols$c=Object.getOwnPropertySymbols,__hasOwnProp$c=Object.prototype.hasOwnProperty,__propIsEnum$c=Object.prototype.propertyIsEnumerable,__defNormalProp$c=(r,t,e)=>t in r?__defProp$c(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,__spreadValues$c=(r,t)=>{for(var e in t||(t={}))__hasOwnProp$c.call(t,e)&&__defNormalProp$c(r,e,t[e]);if(__getOwnPropSymbols$c)for(var e of __getOwnPropSymbols$c(t))__propIsEnum$c.call(t,e)&&__defNormalProp$c(r,e,t[e]);return r};class TagUtil{static getTagKeyName(t,e){var i,s;if(!!e)return(s=(i=e.find(n=>n.value===t))==null?void 0:i.key)!=null?s:""}static getTagName([t="",e=""],i){if(!!i){for(const s of i)if(s.value===t){if(!s.subSelected)return console.error("\u6807\u7B7E\u89E3\u6790\u9519\u8BEF",t,e),"";for(const n of s.subSelected)if(n.value===e)return n.key}}}static getTagNameList(t,e){return Object.keys(t).length<=0?[]:Object.entries(t).reduce((i,s)=>{const[n,o]=s;if(o&&o.length>0){const a=o.split(";"),l={keyName:this.getTagKeyName(n,e),value:a.map(h=>this.getTagName([n,h],e))};return[...i,l]}return i},[]).filter(i=>i)}static getTagnameListWithoutConfig(t){return Object.keys(t).length<=0?[]:Object.entries(t).reduce((e,i)=>{const[s,n]=i,o=n.split(";"),a={keyName:s,value:o};return[...e,a]},[]).filter(e=>e)}static judgeResultIsInInputList(t,e,i){return!t||!e||!i?!1:i.filter(n=>{if(n.value===t&&n.subSelected){const o=e==null?void 0:e.split(";");return(n==null?void 0:n.subSelected.filter(a=>o.indexOf(a.value)>-1).length)>0}return!1}).length>0}static getDefaultResultByConfig(t){return t.reduce((e,i)=>(i.subSelected&&i.subSelected.forEach(s=>{var n;if(s.isDefault){const o=(n=e[i.value])!=null?n:"";let a=[];o.length>0&&(a=o.split(";")),a.push(s.value),e[i.value]=a.join(";")}}),e),{})}static getDefaultTagResult(t,e){const i=this.getDefaultResultByConfig(t);return e.length>0?e.map(s=>({id:uuid(),sourceID:s.id,result:__spreadValues$c({},i)})):[{id:uuid(),sourceID:"",result:__spreadValues$c({},i)}]}}var canvasEdit0='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ccc"/></g></g></svg>',canvasEdit1='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ff2323"/></g></g></svg>',canvasEdit2='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ffe232"/></g></g></svg>',canvasEdit3='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#01ff30"/></g></g></svg>',canvasEdit4='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#00ffea"/></g></g></svg>',canvasEdit5='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#0282fa"/></g></g></svg>',canvasEdit6='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#800cf9"/></g></g></svg>',canvasEdit7='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ff88f7"/></g></g></svg>',canvasEdit8='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#994217"/></g></g></svg>',baseEditLan='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#1f0bf9"/></g></g></svg>',baseEditQing='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#3fe"/></g></g></svg>',baseEditLv='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#33fe33"/></g></g></svg>',baseEditHuang='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#fdff37"/></g></g></svg>',baseEditFen='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#f70efa"/></g></g></svg>',INVALID_ICON='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#f33"/></g></g></svg>';const NULL_ICON=canvasEdit0,HEADER_HEIGHT=61,TAB_HEIGHT=80,SEARCH_HEIGHT=62,PADDING=20,TABLE_ROW_HEIGHT=55,PAGINATION_HEIGHT=55,TIPS_HEIGHT=40,FOOTER_HEIGHT=80,SIDERBAR_WIDTH=240,EDIT_STEP_WIDTH=320,THEME_COLOR="rgba(102, 111, 255, 1)",COLORS_ARRAY=["rgba(128, 12, 249, 1)","rgba(0, 255, 48, 1)","rgba(255, 136, 247, 1)","rgba(255, 226, 50, 1)","rgba(153, 66, 23, 1)","rgba(2, 130, 250, 1)","rgba(255, 35, 35, 1)","rgba(0, 255, 234, 1)"],ICON_ARRAY=[canvasEdit0,canvasEdit6,canvasEdit3,canvasEdit7,canvasEdit2,canvasEdit8,canvasEdit5,canvasEdit1,canvasEdit4],BASE_ICON={1:baseEditLan,3:baseEditQing,5:baseEditLv,7:baseEditHuang,9:baseEditFen},INVALID_COLOR="rgba(255, 51, 51, 1)",NULL_COLOR="rgba(204, 204, 204, 1)",FILTER_TOOL_COLOR={[EFilterToolOperation.lc]:"rgba(153, 51, 255, 1)",[EFilterToolOperation.rc]:"rgba(51, 153, 255, 1)",[EFilterToolOperation.clc]:"rgba(46, 230, 46, 1)",[EFilterToolOperation.crc]:"rgba(255, 51, 51, 1)"};var style=Object.freeze({__proto__:null,HEADER_HEIGHT,TAB_HEIGHT,SEARCH_HEIGHT,PADDING,TABLE_ROW_HEIGHT,PAGINATION_HEIGHT,TIPS_HEIGHT,FOOTER_HEIGHT,SIDERBAR_WIDTH,EDIT_STEP_WIDTH,THEME_COLOR,COLORS_ARRAY,ICON_ARRAY,BASE_ICON,INVALID_COLOR,NULL_COLOR,NULL_ICON,INVALID_ICON,FILTER_TOOL_COLOR}),EMessage;(function(r){r.NoRotateNotice="noRotateNotice",r.RectErrorSizeNotice="rectErrorSizeNotice",r.TextCheckNumberErrorNotice="textCheckNumberErrorNotice",r.TextCheckEnglishErrorNotice="textCheckEnglishErrorNotice",r.TextCheckCustomErrorNotice="textCheckCustomErrorNotice",r.UpperLimitErrorNotice="UpperLimitErrorNotice",r.LowerLimitErrorNotice="LowerLimitErrorNotice",r.InvalidImage="InvalidImage",r.DisableDelete="DisableDelete",r.ClearPartialData="ClearPartialData",r.MarkerFinish="MarkerFinish",r.LowerLimitPoint="LowerLimitPoint",r.NoRotateInDependence="noRotateInDependence"})(EMessage||(EMessage={}));const message$1={[EMessage.NoRotateNotice]:"This Image contains data and cannot be rotated",[EMessage.RectErrorSizeNotice]:"The drawing frame size is smaller than the minimum drawing size",[EMessage.TextCheckNumberErrorNotice]:"Please enter in number-only format",[EMessage.TextCheckEnglishErrorNotice]:"Please enter in English only format",[EMessage.TextCheckCustomErrorNotice]:"Please enter in the required format",[EMessage.UpperLimitErrorNotice]:"The number of vertices is not more than",[EMessage.LowerLimitErrorNotice]:"The number of vertices is not less than",[EMessage.InvalidImage]:"Invalid image, please skip this image",[EMessage.DisableDelete]:"Disable delete",[EMessage.ClearPartialData]:"Clear partial data",[EMessage.MarkerFinish]:"ListAnnotation is finished",[EMessage.LowerLimitPoint]:"\u5DF2\u5230\u8FBE\u6807\u70B9\u6570\u91CF\u4E0A\u9650",[EMessage.NoRotateInDependence]:"Disallow rotation in dependent cases"},message={[EMessage.NoRotateNotice]:"\u672C\u56FE\u542B\u6709\u6570\u636E\uFF0C\u65E0\u6CD5\u8FDB\u884C\u65CB\u8F6C",[EMessage.RectErrorSizeNotice]:"\u7ED8\u5236\u6846\u5C3A\u5BF8\u5C0F\u4E8E\u6700\u5C0F\u7ED8\u5236\u5C3A\u5BF8",[EMessage.TextCheckNumberErrorNotice]:"\u8BF7\u6309\u4EC5\u6570\u5B57\u7684\u683C\u5F0F\u8F93\u5165",[EMessage.TextCheckEnglishErrorNotice]:"\u8BF7\u6309\u4EC5\u82F1\u6587\u7684\u683C\u5F0F\u8F93\u5165",[EMessage.TextCheckCustomErrorNotice]:"\u8BF7\u6309\u8981\u6C42\u7684\u683C\u5F0F\u8F93\u5165",[EMessage.UpperLimitErrorNotice]:"\u9876\u70B9\u6570\u4E0D\u591A\u4E8E",[EMessage.LowerLimitErrorNotice]:"\u9876\u70B9\u6570\u4E0D\u5C11\u4E8E",[EMessage.InvalidImage]:"\u65E0\u6548\u56FE\u7247\uFF0C\u8BF7\u8DF3\u8FC7\u6B64\u56FE",[EMessage.DisableDelete]:"\u8BE5\u6570\u636E\u7981\u6B62\u5220\u9664",[EMessage.ClearPartialData]:"\u5B58\u5728\u90E8\u5206\u6570\u636E\u65E0\u6CD5\u6E05\u9664",[EMessage.MarkerFinish]:"\u5217\u8868\u6807\u6CE8\u5DF2\u5B8C\u6210",[EMessage.LowerLimitPoint]:"\u5DF2\u5230\u8FBE\u6807\u70B9\u6570\u91CF\u4E0A\u9650",[EMessage.NoRotateInDependence]:"\u4F9D\u8D56\u60C5\u51B5\u4E0B\u65E0\u6CD5\u8FDB\u884C\u65CB\u8F6C"};class Locale{}Locale.getMessagesByLocale=(r,t)=>{switch(t){case ELang.US:return message$1[r];case ELang.Zh:default:return message[r]}};var __defProp$b=Object.defineProperty,__defProps$a=Object.defineProperties,__getOwnPropDescs$a=Object.getOwnPropertyDescriptors,__getOwnPropSymbols$b=Object.getOwnPropertySymbols,__hasOwnProp$b=Object.prototype.hasOwnProperty,__propIsEnum$b=Object.prototype.propertyIsEnumerable,__defNormalProp$b=(r,t,e)=>t in r?__defProp$b(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,__spreadValues$b=(r,t)=>{for(var e in t||(t={}))__hasOwnProp$b.call(t,e)&&__defNormalProp$b(r,e,t[e]);if(__getOwnPropSymbols$b)for(var e of __getOwnPropSymbols$b(t))__propIsEnum$b.call(t,e)&&__defNormalProp$b(r,e,t[e]);return r},__spreadProps$a=(r,t)=>__defProps$a(r,__getOwnPropDescs$a(t));const REGEXP_NUMBER="^[0-9]+$",REGEXP_ENGLISH="^[A-Za-z]+$";class AttributeUtils{static getAttributeIcon(t,e,i=!0){var s;const n=e.findIndex(l=>l.value===t);let o=(s=ICON_ARRAY[n%ICON_ARRAY.length])!=null?s:NULL_ICON;i||(o=INVALID_ICON),o="";const a=new Image;return a.src=o,a}static checkString(t,e){let i="";switch(t){case ETextType.Order:case ETextType.NumberOnly:i=REGEXP_NUMBER;break;case ETextType.EnglishOnly:i=REGEXP_ENGLISH;break;case ETextType.CustomFormat:i=e;break}return i}static checkTextAttibute(t,e){if(t===void 0||t==="")return!0;try{return new RegExp(e).test(t)}catch(i){return!1}}static getAttributeShowText(t,e=[]){var i,s;try{const n=e.findIndex(o=>o.value===t);return(s=(i=e[n])==null?void 0:i.key)!=null?s:t}catch(n){return t}}static getAttributeIndex(t,e){try{const i=e.findIndex(s=>s.value===t);return i>=8?i%8:i}catch(i){return-1}}static getAttributeColor(t,e){try{const i=this.getAttributeIndex(t,e);return i===-1?NULL_COLOR:COLORS_ARRAY[i%COLORS_ARRAY.length]}catch(i){return NULL_COLOR}}static getTextAttribute(t,e){try{if(e===ETextType.Order){const i=t.map(n=>parseInt(n.textAttribute,10)).filter(n=>_.isNumber(n)&&n<Number.MAX_SAFE_INTEGER&&n>=0);return i.sort((n,o)=>n-o),`${(i.pop()||0)+1}`}return""}catch(i){return""}}static textChange(t,e,i){return i.map(s=>s.id===e?__spreadProps$a(__spreadValues$b({},s),{textAttribute:t}):s)}static getErrorNotice(t,e){switch(t){case ETextType.Order:case ETextType.NumberOnly:return Locale.getMessagesByLocale(EMessage.TextCheckNumberErrorNotice,e);case ETextType.EnglishOnly:return Locale.getMessagesByLocale(EMessage.TextCheckEnglishErrorNotice,e);case ETextType.CustomFormat:return Locale.getMessagesByLocale(EMessage.TextCheckCustomErrorNotice,e);default:return""}}static textAttributeValidate(t,e,i){try{return new RegExp(this.checkString(t,e)).test(i)}catch(s){}}static checkTextAttribute(t,e,i,s){let n=!1;return i.forEach(o=>{(o==null?void 0:o.textAttribute)===void 0||(o==null?void 0:o.textAttribute)===""||(s?o.id===s:!0)&&!this.textAttributeValidate(t,e,o.textAttribute)&&(n=!0)}),!!n}static changeTextAttributeInLog(t,e){return t==null?void 0:t.map(i=>i==null?void 0:i.map(s=>{if((e==null?void 0:e.findIndex(n=>(n==null?void 0:n.id)===(s==null?void 0:s.id)))>-1){const n=e==null?void 0:e.find(o=>(o==null?void 0:o.id)===(s==null?void 0:s.id));return __spreadProps$a(__spreadValues$b({},s),{textAttribute:n==null?void 0:n.textAttribute})}return s}))}static getTextIconSvg(t="",e,i=!1,s){if(i===!0){const n=(e==null?void 0:e.findIndex(o=>(o==null?void 0:o.value)===t))%COLORS_ARRAY.length+1;return ICON_ARRAY[n]}return s}static getAttributeByKeycode(t,e){var i;let s;return MathUtils.isInRange(t,[48,57])&&(s=t-48),MathUtils.isInRange(t,[96,105])&&(s=t-96),s===0?"":s?(i=e[s-1])==null?void 0:i.value:void 0}}class UnitUtils{static deg2rad(t){return t*Math.PI/180}static rad2deg(t){return t*180/Math.PI}}const DEFAULT_ZOOM=1,DEFAULT_CURRENT_POS={x:0,y:0},DEFAULT_ROTATE=0,DEFAULT_COLOR="";class DrawUtils{static drawLine(t,e,i,s={}){const n=t.getContext("2d"),{color:o=DEFAULT_COLOR,thickness:a=1,lineCap:l="round"}=s;n.save(),n.strokeStyle=o,n.lineWidth=a,n.lineCap=l,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(i.x+1,i.y+1),n.stroke(),n.restore()}static drawRect(t,e,i={}){const s=t.getContext("2d"),{color:n=DEFAULT_COLOR,thickness:o=1,lineCap:a="round"}=i;s.save(),s.strokeStyle=n,s.lineWidth=o,s.lineCap=a,s.beginPath(),s.fillStyle=n,s.strokeRect(e.x,e.y,e.width,e.height);let l="";if(e.attribute&&(l=`${l} ${e.attribute}`),this.drawText(t,{x:e.x,y:e.y-5},l),e.textAttribute){const d=`${~~e.width} * ${~~e.height}`.length*7,u=0,c=Math.max(20,e.width-d);this.drawText(t,{x:e.x,y:e.y+e.height+20+u},e.textAttribute,{textMaxWidth:c})}s.restore()}static drawRectWithFill(t,e,i={}){const s=t.getContext("2d"),{color:n=DEFAULT_COLOR}=i;s.save(),s.beginPath(),s.fillStyle=n,s.fillRect(e.x,e.y,e.width,e.height),s.restore()}static drawTag(t,e){var i;const s=t==null?void 0:t.parentNode,n=window.self.document.getElementById("tagToolTag");if(n&&s&&s.contains(n)&&(s==null||s.removeChild(n)),!((e==null?void 0:e.length)>0))return;const o=document.createElement("div");o.innerHTML=(i=e.reduce((a,l)=>`${a}${l.keyName}: ${l.value.join(" \u3001 ")}
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sense-annotation v1.5.
|
|
2
|
+
* sense-annotation v1.5.3
|
|
3
3
|
* (c) 2020-2021
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/import E,{isNumber as Rt,cloneDeep as pi,isObject as bi}from"lodash";import ee from"color-rgba";const xi=320;var lt;(function(r){r.PointCloud="pointCloudTool"})(lt||(lt={}));var ht;(function(r){r.VideoTextTool="videoTextTool",r.VideoTagTool="videoTagTool",r.VideoClipTool="videoClipTool"})(ht||(ht={}));var St;(function(r){r[r.Rect=0]="Rect",r[r.Tag=1]="Tag"})(St||(St={}));var m;(function(r){r.Rect="rectTool",r.Tag="tagTool",r.Point="pointTool",r.PointMarker="pointMarkerTool",r.Segmentation="segmentationTool",r.Filter="filterTool",r.Text="textTool",r.Polygon="polygonTool",r.Line="lineTool",r.LineMarker="lineMarkerTool",r.Empty="emptyTool",r.FolderTag="folderTagTool",r.RectTrack="rectTrackTool",r.Face="faceTool",r.ClientAttribute="clientAttributeTool",r.OCRRelation="OCRRelationTool"})(m||(m={}));var vt;(function(r){r.Check="check"})(vt||(vt={}));var Tt;(function(r){r[r.nothing=0]="nothing",r[r.RectBG=1]="RectBG",r[r.showOrder=2]="showOrder"})(Tt||(Tt={}));const yi={[m.Rect]:"\u62C9\u6846",[m.Tag]:"\u6807\u7B7E",[m.Point]:"\u6807\u70B9",[m.PointMarker]:"\u5217\u8868\u6807\u70B9",[m.Segmentation]:"\u524D\u666F\u5206\u5272",[m.Filter]:"\u7B5B\u9009",[m.Text]:"\u6587\u672C",[m.Polygon]:"\u591A\u8FB9\u5F62",[m.Line]:"\u7EBF\u6761",[m.LineMarker]:"\u5217\u8868\u7EBF\u6761",[m.FolderTag]:"\u6587\u4EF6\u5939\u6807\u7B7E",[m.RectTrack]:"\u62C9\u6846\u8DDF\u8E2A",[m.Face]:"\u4EBA\u8138106\u5DE5\u5177",[m.ClientAttribute]:"\u5BA2\u6237\u7AEF\u5C5E\u6027\u5DE5\u5177",[m.OCRRelation]:"OCR\u5173\u8054\u5173\u7CFB\u5DE5\u5177",[ht.VideoTextTool]:"\u89C6\u9891\u6587\u672C",[ht.VideoTagTool]:"\u89C6\u9891\u6807\u7B7E",[ht.VideoClipTool]:"\u89C6\u9891\u622A\u53D6",[lt.PointCloud]:"\u70B9\u4E91"};var kt;(function(r){r[r.noDepend=1]="noDepend",r[r.dependOrigin=2]="dependOrigin",r[r.dependShape=3]="dependShape",r[r.dependLine=4]="dependLine",r[r.dependPolygon=5]="dependPolygon",r[r.dependPreShape=101]="dependPreShape",r[r.dependPreLine=102]="dependPreLine",r[r.dependPrePolygon=103]="dependPrePolygon"})(kt||(kt={}));var rt;(function(r){r.lc="leftClick",r.rc="rightClick",r.clc="ctrlLeftClick",r.crc="ctrlRightClick"})(rt||(rt={}));const mi={leftClick:"\u9F20\u6807\u5DE6\u952E",rightClick:"\u9F20\u6807\u53F3\u952E",ctrlLeftClick:"ctrl + \u9F20\u6807\u5DE6\u952E",ctrlRightClick:"ctrl + \u9F20\u6807\u53F3\u952E"};var Ot;(function(r){r[r.Normal=1]="Normal",r[r.Modify=2]="Modify"})(Ot||(Ot={}));var T;(function(r){r[r.Line=0]="Line",r[r.Curve=1]="Curve"})(T||(T={}));var pt;(function(r){r[r.SingleColor=0]="SingleColor",r[r.MultiColor=1]="MultiColor"})(pt||(pt={}));var Mt;(function(r){r[r.Form=1]="Form",r[r.Json=2]="Json"})(Mt||(Mt={}));var F;(function(r){r[r.Point=0]="Point",r[r.Line=1]="Line",r[r.Plane=2]="Plane"})(F||(F={}));var Et;(function(r){r[r.None=0]="None",r[r.Drawing=1]="Drawing",r[r.Edit=2]="Edit"})(Et||(Et={}));var Ht;(function(r){r[r.Backward=0]="Backward",r[r.Forward=1]="Forward",r[r.JumpSkip=2]="JumpSkip",r[r.None=3]="None"})(Ht||(Ht={}));var Nt;(function(r){r[r.Wait=0]="Wait",r[r.Pass=1]="Pass",r[r.Fail=2]="Fail",r[r.Loading=3]="Loading"})(Nt||(Nt={}));var U;(function(r){r[r.AnyString=0]="AnyString",r[r.Order=1]="Order",r[r.EnglishOnly=2]="EnglishOnly",r[r.NumberOnly=3]="NumberOnly",r[r.CustomFormat=4]="CustomFormat"})(U||(U={}));const Ii={0:"\u4EFB\u610F\u5B57\u7B26",1:"\u5E8F\u53F7",2:"\u4EC5\u82F1\u6587",3:"\u4EC5\u6570\u5B57"},Bt=1e3,ie=16;var Ft;(function(r){r[r.ImgList=1e3]="ImgList",r[r.TrackPrediction=1001]="TrackPrediction",r[r.ImgSearch=1002]="ImgSearch"})(Ft||(Ft={}));const Li={[lt.PointCloud]:"sensebeepc",[m.ClientAttribute]:"sensebeepc-EnumAttributeTool",[m.Face]:"sensebeepc-FacePointsLabellingTool",[m.OCRRelation]:"sensebeepc-OCRRelationTool"},wi={[lt.PointCloud]:"\u70B9\u4E91\u5BA2\u6237\u7AEF",[m.ClientAttribute]:"\u5BA2\u6237\u7AEF\u5C5E\u6027\u5DE5\u5177",[m.Face]:"\u4EBA\u8138106\u70B9\u5DE5\u5177",[m.OCRRelation]:"OCR\u5173\u8054\u5173\u7CFB\u5DE5\u5177"},j=16,bt=10;var Ci=Object.freeze({__proto__:null,editStepWidth:xi,get EPointCloudName(){return lt},get EVideoToolName(){return ht},get EToolType(){return St},get EToolName(){return m},get ECheckModel(){return vt},get ERectPattern(){return Tt},TOOL_NAME:yi,get EDependPattern(){return kt},get EFilterToolOperation(){return rt},OPERATION_LIST:mi,get EAnnotationMode(){return Ot},get ELineTypes(){return T},get ELineColor(){return pt},get ESelectedType(){return Mt},get EDragTarget(){return F},get EDrawPointPattern(){return Et},get EPageOperator(){return Ht},get EAuditStatus(){return Nt},get ETextType(){return U},TEXT_TYPE:Ii,TEXT_ATTRIBUTE_MAX_LENGTH:Bt,TEXT_ATTRIBUTE_LINE_HEIGHT:ie,get EThumbnailOption(){return Ft},CLIENT_TOOL_HEAD_TYPE:Li,CLIENT_TOOL_NAME:wi,SEGMENT_NUMBER:j,edgeAdsorptionScope:bt}),Pi=Object.defineProperty,Di=Object.defineProperties,_i=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,Ai=Object.prototype.hasOwnProperty,Ri=Object.prototype.propertyIsEnumerable,re=(r,t,e)=>t in r?Pi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Si=(r,t)=>{for(var e in t||(t={}))Ai.call(t,e)&&re(r,e,t[e]);if(se)for(var e of se(t))Ri.call(t,e)&&re(r,e,t[e]);return r},Ti=(r,t)=>Di(r,_i(t));function $t(r,t=.5,e=!1,i=16){if(r.length<4)return r;const s=[],n=r.slice(0);let o,a,l,h,d,u,c,g,f,v,p,x,y;for(e?(n.unshift(r[r.length-1]),n.unshift(r[r.length-2]),n.unshift(r[r.length-1]),n.unshift(r[r.length-2]),n.push(r[0]),n.push(r[1])):(n.unshift(r[1]),n.unshift(r[0]),n.push(r[r.length-2]),n.push(r[r.length-1])),y=2;y<n.length-4;y+=2)for(l=(n[y+2]-n[y-2])*t,h=(n[y+4]-n[y-0])*t,d=(n[y+3]-n[y-1])*t,u=(n[y+5]-n[y+1])*t,x=0;x<=i;x++)p=x/i,c=2*Math.pow(p,3)-3*Math.pow(p,2)+1,g=-(2*Math.pow(p,3))+3*Math.pow(p,2),f=Math.pow(p,3)-2*Math.pow(p,2)+p,v=Math.pow(p,3)-Math.pow(p,2),o=c*n[y]+g*n[y+2]+f*l+v*h,a=c*n[y+1]+g*n[y+3]+f*d+v*u,s.push(o),s.push(a);const A=[];for(let k=0;k<s.length-1;k+=2)A.push({x:s[k],y:s[k+1]});if(e)for(let k=0;k<i+1;k++){const S=A.shift();A.push(S)}return A}const xt=(r,t=16)=>$t(r.reduce((e,i)=>[...e,i.x,i.y],[]),.5,!1,t);function ne(r,t,e=T.Line){let i=0,s,n,o,a;t=[...t],e===T.Curve&&(t=$t(t.reduce((h,d)=>[...h,d.x,d.y],[]),.5,!0,j)),[o]=t;const l=t.length;for(s=1;s<=l;s++)a=t[s%l],r.x>Math.min(o.x,a.x)&&r.x<=Math.max(o.x,a.x)&&r.y<=Math.max(o.y,a.y)&&o.x!==a.x&&(n=(r.x-o.x)*(a.y-o.y)/(a.x-o.x)+o.y,(o.y===a.y||r.y<=n)&&i++),o=a;return i%2!=0}function oe(r,t=1){return r.map(e=>Ti(Si({},e),{x:e.x*t,y:e.y*t}))}const yt=class{static getRotate(r){return r+90>=360?r+90-360:r+90}static getLineLength(r,t){return Math.sqrt(Math.pow(t.y-r.y,2)+Math.pow(t.x-r.x,2))}};let w=yt;w.isInRange=(r,t)=>{const e=Math.min(...t),i=Math.max(...t),s=o=>o<=i&&o>=e;return(Array.isArray(r)?r:[r]).every(o=>s(o))},w.withinRange=(r,t)=>{const e=Math.min(...t),i=Math.max(...t);return r>i?i:r<e?e:r},w.calcViewportBoundaries=(r,t=!1,e=j,i=1)=>{if(!r)return{top:0,bottom:0,left:0,right:0};const s=20/i,n=[],o=[];let a=r;t&&(a=xt(r,e)),a.forEach(({x:f,y:v})=>{n.push(f),o.push(v)});let l=Math.min(...n),h=Math.max(...n),d=Math.min(...o),u=Math.max(...o);const c=h-l,g=u-d;if(c<s){const f=(s-c)/2;l-=f,h+=f}if(g<s){const f=(s-g)/2;d-=f,u+=f}return{top:d,bottom:u,left:l,right:h}},w.getFootOfPerpendicular=(r,t,e,i=!1)=>{let s={x:0,y:0};const n=t.x-e.x,o=t.y-e.y;if(Math.abs(n)<1e-8&&Math.abs(o)<1e-8)return s=t,s;let a=(r.x-t.x)*(t.x-e.x)+(r.y-t.y)*(t.y-e.y);a/=n*n+o*o,s.x=t.x+a*n,s.y=t.y+a*o;const l=yt.getLineLength(r,s),h=2,d=Math.min(t.x,e.x),u=Math.max(t.x,e.x),c=Math.min(t.y,e.y),g=Math.max(t.y,e.y),f=!(yt.isInRange(r.x,[d,u])||yt.isInRange(r.y,[c,g])),v=r.x>u+h||r.x<d-h||r.y>g+h||r.y<c-h;return(i?f:v)?{footPoint:s,length:Infinity}:{footPoint:s,length:l}};const ki=61,Oi=40,Mi=40,Ei=240;var ut;(function(r){r[r.ANNOTATION=1]="ANNOTATION",r[r.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",r[r.PRE_ANNOTATION=3]="PRE_ANNOTATION",r[r.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"})(ut||(ut={}));const Hi=1e3;var Zt;(function(r){r[r.Backward=0]="Backward",r[r.Forward=1]="Forward",r[r.JumpSkip=2]="JumpSkip",r[r.None=3]="None"})(Zt||(Zt={}));var _;(function(r){r[r.Start=0]="Start",r[r.Stop=1]="Stop",r[r.Wait=2]="Wait",r[r.Move=3]="Move"})(_||(_={}));var Y;(function(r){r[r.Point=0]="Point",r[r.Line=1]="Line",r[r.Plane=2]="Plane"})(Y||(Y={}));var z;(function(r){r[r.ascend=0]="ascend",r[r.descend=1]="descend"})(z||(z={}));var ct;(function(r){r[r.Intelligence=0]="Intelligence",r[r.Linear=1]="Linear"})(ct||(ct={}));var q;(function(r){r.Zh="zh_CN",r.US="en_US"})(q||(q={}));const nt={offsetX:-10,offsetY:-10},mt={shadowColor:"rgba(0,0,0,0.6)",shadowOffsetX:0,shadowOffsetY:2,shadowBlur:4};var Ni=Object.freeze({__proto__:null,headerHeight:ki,tipsHeight:Oi,footerHeight:Mi,sidebarWidth:Ei,get EStepType(){return ut},ANNOTATION_MAX_SIZE:Hi,get EPageOperator(){return Zt},get EDragStatus(){return _},get EDragTarget(){return Y},get ESortDirection(){return z},get EGrowthMode(){return ct},get ELang(){return q},DEFAULT_TEXT_OFFSET:nt,DEFAULT_TEXT_SHADOW:mt}),Bi=Object.defineProperty,Fi=Object.defineProperties,$i=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,Ui=Object.prototype.propertyIsEnumerable,le=(r,t,e)=>t in r?Bi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Q=(r,t)=>{for(var e in t||(t={}))Zi.call(t,e)&&le(r,e,t[e]);if(ae)for(var e of ae(t))Ui.call(t,e)&&le(r,e,t[e]);return r},tt=(r,t)=>Fi(r,$i(t));class H{static composeResult(t,e,i,s,n){try{const o=JSON.parse(t),a=b.getCurrentStepInfo(e,s),{dataSourceStep:l}=a,h=`step_${a.step}`;if(Object.assign(o,n),o[h]){const d=o[h];return d.result?(d.result=i,JSON.stringify(o)):JSON.stringify(tt(Q({},o),{[h]:tt(Q({},o[h]),{result:i})}))}return JSON.stringify(tt(Q({},o),{[h]:{dataSourceStep:l,toolName:a.tool,result:i}}))}catch(o){return t}}static changeCoordinateByRotate(t,e,i){const{x:s,y:n,width:o,height:a}=t,l=I.changeCoordinateByRotate({x:s,y:n},e,i);switch(e%360){case 90:return tt(Q({},t),{x:l.x-a,y:l.y,width:a,height:o});case 180:return tt(Q({},t),{x:l.x-o,y:l.y-a});case 270:return tt(Q({},t),{x:l.x,y:l.y-o,width:a,height:o});default:return t}}static translateRect2Points(t){const{x:e,y:i,width:s,height:n}=t;return[{x:e,y:i},{x:e+s,y:i},{x:e+s,y:i+n},{x:e,y:i+n}]}static translatePoints2Rect(t,e){if(t.length!==4)return;const{x:i,y:s}=t[0],n=t[1].x-t[0].x,o=t[2].y-t[1].y;return tt(Q({},e),{x:i,y:s,width:n,height:o})}static getRectPointList(t,e=1){return[{x:t.x*e,y:t.y*e},{x:(t.x+t.width)*e,y:t.y*e},{x:(t.x+t.width)*e,y:(t.y+t.height)*e},{x:t.x*e,y:(t.y+t.height)*e}]}static getRectEdgeList(t,e=1){const i=this.getRectPointList(t,e),s=i.length;return i.map((n,o)=>({begin:n,end:i[(o+1)%s]}))}static isInRect(t,e,i=0,s=1){return t.x>=e.x*s-i&&t.x<=(e.x+e.width)*s+i&&t.y>=e.y*s-i&&t.y<=(e.y+e.height)*s+i}static getRectUnderZoom(t,e=1){const{x:i,y:s,width:n,height:o}=t;return tt(Q({},t),{x:i*e,y:s*e,width:n*e,height:o*e})}static isRectNotInPolygon(t,e){return this.getRectPointList(t).some(s=>!ne(s,e))}}function W(r=8,t=62){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];let s;if(t=t||e.length,r)for(s=0;s<r;s++)i[s]=e[0|Math.random()*t];else{let n;for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",s=0;s<36;s++)i[s]||(n=0|Math.random()*16,i[s]=e[s===19?n&3|8:n])}return i.join("")}var zi=Object.defineProperty,he=Object.getOwnPropertySymbols,Vi=Object.prototype.hasOwnProperty,Wi=Object.prototype.propertyIsEnumerable,ce=(r,t,e)=>t in r?zi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,de=(r,t)=>{for(var e in t||(t={}))Vi.call(t,e)&&ce(r,e,t[e]);if(he)for(var e of he(t))Wi.call(t,e)&&ce(r,e,t[e]);return r};class gt{static getTagKeyName(t,e){var i,s;if(!!e)return(s=(i=e.find(n=>n.value===t))==null?void 0:i.key)!=null?s:""}static getTagName([t="",e=""],i){if(!!i){for(const s of i)if(s.value===t){if(!s.subSelected)return console.error("\u6807\u7B7E\u89E3\u6790\u9519\u8BEF",t,e),"";for(const n of s.subSelected)if(n.value===e)return n.key}}}static getTagNameList(t,e){return Object.keys(t).length<=0?[]:Object.entries(t).reduce((i,s)=>{const[n,o]=s;if(o&&o.length>0){const a=o.split(";"),l={keyName:this.getTagKeyName(n,e),value:a.map(h=>this.getTagName([n,h],e))};return[...i,l]}return i},[]).filter(i=>i)}static getTagnameListWithoutConfig(t){return Object.keys(t).length<=0?[]:Object.entries(t).reduce((e,i)=>{const[s,n]=i,o=n.split(";"),a={keyName:s,value:o};return[...e,a]},[]).filter(e=>e)}static judgeResultIsInInputList(t,e,i){return!t||!e||!i?!1:i.filter(n=>{if(n.value===t&&n.subSelected){const o=e==null?void 0:e.split(";");return(n==null?void 0:n.subSelected.filter(a=>o.indexOf(a.value)>-1).length)>0}return!1}).length>0}static getDefaultResultByConfig(t){return t.reduce((e,i)=>(i.subSelected&&i.subSelected.forEach(s=>{var n;if(s.isDefault){const o=(n=e[i.value])!=null?n:"";let a=[];o.length>0&&(a=o.split(";")),a.push(s.value),e[i.value]=a.join(";")}}),e),{})}static getDefaultTagResult(t,e){const i=this.getDefaultResultByConfig(t);return e.length>0?e.map(s=>({id:W(),sourceID:s.id,result:de({},i)})):[{id:W(),sourceID:"",result:de({},i)}]}}var ue='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ccc"/></g></g></svg>',ji='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ff2323"/></g></g></svg>',Xi='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ffe232"/></g></g></svg>',Yi='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#01ff30"/></g></g></svg>',Gi='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#00ffea"/></g></g></svg>',Ki='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#0282fa"/></g></g></svg>',Ji='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#800cf9"/></g></g></svg>',qi='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#ff88f7"/></g></g></svg>',Qi='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#994217"/></g></g></svg>',ts='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#1f0bf9"/></g></g></svg>',es='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#3fe"/></g></g></svg>',is='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#33fe33"/></g></g></svg>',ss='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#fdff37"/></g></g></svg>',rs='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#f70efa"/></g></g></svg>',ge='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="a"><path d="M0,0H16V-16H0Z" fill="none"/></clipPath><clipPath id="b"><path d="M13.75-2.937H2.25a.5.5,0,0,0-.5.5v.563a.125.125,0,0,0,.125.125h12.25a.125.125,0,0,0,.125-.125v-.562A.5.5,0,0,0,13.75-2.937ZM4.027-4.25a.632.632,0,0,0,.094-.008l2.628-.461a.153.153,0,0,0,.083-.044l6.623-6.623a.156.156,0,0,0,0-.22l-2.6-2.6a.155.155,0,0,0-.111-.045.155.155,0,0,0-.111.045L4.012-7.581a.159.159,0,0,0-.044.083L3.508-4.87a.524.524,0,0,0,.147.466.529.529,0,0,0,.372.155Z" fill="none"/></clipPath></defs><g transform="translate(0 16)"><g clip-path="url(#a)"><path d="M-5-21H21V5H-5Z" fill="rgba(0,0,0,0)"/></g><g clip-path="url(#b)"><path d="M-3.25-19.25h22.5V3.25H-3.25Z" fill="#f33"/></g></g></svg>';const fe=ue,ns=61,os=80,as=62,ls=20,hs=55,cs=55,ds=40,us=80,gs=240,fs=320,vs="rgba(102, 111, 255, 1)",dt=["rgba(128, 12, 249, 1)","rgba(0, 255, 48, 1)","rgba(255, 136, 247, 1)","rgba(255, 226, 50, 1)","rgba(153, 66, 23, 1)","rgba(2, 130, 250, 1)","rgba(255, 35, 35, 1)","rgba(0, 255, 234, 1)"],It=[ue,Ji,Yi,qi,Xi,Qi,Ki,ji,Gi],ve={1:ts,3:es,5:is,7:ss,9:rs},ps="rgba(255, 51, 51, 1)",Ut="rgba(204, 204, 204, 1)",bs={[rt.lc]:"rgba(153, 51, 255, 1)",[rt.rc]:"rgba(51, 153, 255, 1)",[rt.clc]:"rgba(46, 230, 46, 1)",[rt.crc]:"rgba(255, 51, 51, 1)"};var xs=Object.freeze({__proto__:null,HEADER_HEIGHT:ns,TAB_HEIGHT:os,SEARCH_HEIGHT:as,PADDING:ls,TABLE_ROW_HEIGHT:hs,PAGINATION_HEIGHT:cs,TIPS_HEIGHT:ds,FOOTER_HEIGHT:us,SIDERBAR_WIDTH:gs,EDIT_STEP_WIDTH:fs,THEME_COLOR:vs,COLORS_ARRAY:dt,ICON_ARRAY:It,BASE_ICON:ve,INVALID_COLOR:ps,NULL_COLOR:Ut,NULL_ICON:fe,INVALID_ICON:ge,FILTER_TOOL_COLOR:bs}),L;(function(r){r.NoRotateNotice="noRotateNotice",r.RectErrorSizeNotice="rectErrorSizeNotice",r.TextCheckNumberErrorNotice="textCheckNumberErrorNotice",r.TextCheckEnglishErrorNotice="textCheckEnglishErrorNotice",r.TextCheckCustomErrorNotice="textCheckCustomErrorNotice",r.UpperLimitErrorNotice="UpperLimitErrorNotice",r.LowerLimitErrorNotice="LowerLimitErrorNotice",r.InvalidImage="InvalidImage",r.DisableDelete="DisableDelete",r.ClearPartialData="ClearPartialData",r.MarkerFinish="MarkerFinish",r.LowerLimitPoint="LowerLimitPoint",r.NoRotateInDependence="noRotateInDependence"})(L||(L={}));const ys={[L.NoRotateNotice]:"This Image contains data and cannot be rotated",[L.RectErrorSizeNotice]:"The drawing frame size is smaller than the minimum drawing size",[L.TextCheckNumberErrorNotice]:"Please enter in number-only format",[L.TextCheckEnglishErrorNotice]:"Please enter in English only format",[L.TextCheckCustomErrorNotice]:"Please enter in the required format",[L.UpperLimitErrorNotice]:"The number of vertices is not more than",[L.LowerLimitErrorNotice]:"The number of vertices is not less than",[L.InvalidImage]:"Invalid image, please skip this image",[L.DisableDelete]:"Disable delete",[L.ClearPartialData]:"Clear partial data",[L.MarkerFinish]:"ListAnnotation is finished",[L.LowerLimitPoint]:"\u5DF2\u5230\u8FBE\u6807\u70B9\u6570\u91CF\u4E0A\u9650",[L.NoRotateInDependence]:"Disallow rotation in dependent cases"},ms={[L.NoRotateNotice]:"\u672C\u56FE\u542B\u6709\u6570\u636E\uFF0C\u65E0\u6CD5\u8FDB\u884C\u65CB\u8F6C",[L.RectErrorSizeNotice]:"\u7ED8\u5236\u6846\u5C3A\u5BF8\u5C0F\u4E8E\u6700\u5C0F\u7ED8\u5236\u5C3A\u5BF8",[L.TextCheckNumberErrorNotice]:"\u8BF7\u6309\u4EC5\u6570\u5B57\u7684\u683C\u5F0F\u8F93\u5165",[L.TextCheckEnglishErrorNotice]:"\u8BF7\u6309\u4EC5\u82F1\u6587\u7684\u683C\u5F0F\u8F93\u5165",[L.TextCheckCustomErrorNotice]:"\u8BF7\u6309\u8981\u6C42\u7684\u683C\u5F0F\u8F93\u5165",[L.UpperLimitErrorNotice]:"\u9876\u70B9\u6570\u4E0D\u591A\u4E8E",[L.LowerLimitErrorNotice]:"\u9876\u70B9\u6570\u4E0D\u5C11\u4E8E",[L.InvalidImage]:"\u65E0\u6548\u56FE\u7247\uFF0C\u8BF7\u8DF3\u8FC7\u6B64\u56FE",[L.DisableDelete]:"\u8BE5\u6570\u636E\u7981\u6B62\u5220\u9664",[L.ClearPartialData]:"\u5B58\u5728\u90E8\u5206\u6570\u636E\u65E0\u6CD5\u6E05\u9664",[L.MarkerFinish]:"\u5217\u8868\u6807\u6CE8\u5DF2\u5B8C\u6210",[L.LowerLimitPoint]:"\u5DF2\u5230\u8FBE\u6807\u70B9\u6570\u91CF\u4E0A\u9650",[L.NoRotateInDependence]:"\u4F9D\u8D56\u60C5\u51B5\u4E0B\u65E0\u6CD5\u8FDB\u884C\u65CB\u8F6C"};class ${}$.getMessagesByLocale=(r,t)=>{switch(t){case q.US:return ys[r];case q.Zh:default:return ms[r]}};var Is=Object.defineProperty,Ls=Object.defineProperties,ws=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,Cs=Object.prototype.hasOwnProperty,Ps=Object.prototype.propertyIsEnumerable,be=(r,t,e)=>t in r?Is(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,xe=(r,t)=>{for(var e in t||(t={}))Cs.call(t,e)&&be(r,e,t[e]);if(pe)for(var e of pe(t))Ps.call(t,e)&&be(r,e,t[e]);return r},ye=(r,t)=>Ls(r,ws(t));const Ds="^[0-9]+$",_s="^[A-Za-z]+$";class D{static getAttributeIcon(t,e,i=!0){var s;const n=e.findIndex(l=>l.value===t);let o=(s=It[n%It.length])!=null?s:fe;i||(o=ge),o="";const a=new Image;return a.src=o,a}static checkString(t,e){let i="";switch(t){case U.Order:case U.NumberOnly:i=Ds;break;case U.EnglishOnly:i=_s;break;case U.CustomFormat:i=e;break}return i}static checkTextAttibute(t,e){if(t===void 0||t==="")return!0;try{return new RegExp(e).test(t)}catch(i){return!1}}static getAttributeShowText(t,e=[]){var i,s;try{const n=e.findIndex(o=>o.value===t);return(s=(i=e[n])==null?void 0:i.key)!=null?s:t}catch(n){return t}}static getAttributeIndex(t,e){try{const i=e.findIndex(s=>s.value===t);return i>=8?i%8:i}catch(i){return-1}}static getAttributeColor(t,e){try{const i=this.getAttributeIndex(t,e);return i===-1?Ut:dt[i%dt.length]}catch(i){return Ut}}static getTextAttribute(t,e){try{if(e===U.Order){const i=t.map(n=>parseInt(n.textAttribute,10)).filter(n=>Rt(n)&&n<Number.MAX_SAFE_INTEGER&&n>=0);return i.sort((n,o)=>n-o),`${(i.pop()||0)+1}`}return""}catch(i){return""}}static textChange(t,e,i){return i.map(s=>s.id===e?ye(xe({},s),{textAttribute:t}):s)}static getErrorNotice(t,e){switch(t){case U.Order:case U.NumberOnly:return $.getMessagesByLocale(L.TextCheckNumberErrorNotice,e);case U.EnglishOnly:return $.getMessagesByLocale(L.TextCheckEnglishErrorNotice,e);case U.CustomFormat:return $.getMessagesByLocale(L.TextCheckCustomErrorNotice,e);default:return""}}static textAttributeValidate(t,e,i){try{return new RegExp(this.checkString(t,e)).test(i)}catch(s){}}static checkTextAttribute(t,e,i,s){let n=!1;return i.forEach(o=>{(o==null?void 0:o.textAttribute)===void 0||(o==null?void 0:o.textAttribute)===""||(s?o.id===s:!0)&&!this.textAttributeValidate(t,e,o.textAttribute)&&(n=!0)}),!!n}static changeTextAttributeInLog(t,e){return t==null?void 0:t.map(i=>i==null?void 0:i.map(s=>{if((e==null?void 0:e.findIndex(n=>(n==null?void 0:n.id)===(s==null?void 0:s.id)))>-1){const n=e==null?void 0:e.find(o=>(o==null?void 0:o.id)===(s==null?void 0:s.id));return ye(xe({},s),{textAttribute:n==null?void 0:n.textAttribute})}return s}))}static getTextIconSvg(t="",e,i=!1,s){if(i===!0){const n=(e==null?void 0:e.findIndex(o=>(o==null?void 0:o.value)===t))%dt.length+1;return It[n]}return s}static getAttributeByKeycode(t,e){var i;let s;return w.isInRange(t,[48,57])&&(s=t-48),w.isInRange(t,[96,105])&&(s=t-96),s===0?"":s?(i=e[s-1])==null?void 0:i.value:void 0}}class Lt{static deg2rad(t){return t*Math.PI/180}static rad2deg(t){return t*180/Math.PI}}const As=1,Rs={x:0,y:0},Ss=0,X="";class C{static drawLine(t,e,i,s={}){const n=t.getContext("2d"),{color:o=X,thickness:a=1,lineCap:l="round"}=s;n.save(),n.strokeStyle=o,n.lineWidth=a,n.lineCap=l,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(i.x+1,i.y+1),n.stroke(),n.restore()}static drawRect(t,e,i={}){const s=t.getContext("2d"),{color:n=X,thickness:o=1,lineCap:a="round"}=i;s.save(),s.strokeStyle=n,s.lineWidth=o,s.lineCap=a,s.beginPath(),s.fillStyle=n,s.strokeRect(e.x,e.y,e.width,e.height);let l="";if(e.attribute&&(l=`${l} ${e.attribute}`),this.drawText(t,{x:e.x,y:e.y-5},l),e.textAttribute){const d=`${~~e.width} * ${~~e.height}`.length*7,u=0,c=Math.max(20,e.width-d);this.drawText(t,{x:e.x,y:e.y+e.height+20+u},e.textAttribute,{textMaxWidth:c})}s.restore()}static drawRectWithFill(t,e,i={}){const s=t.getContext("2d"),{color:n=X}=i;s.save(),s.beginPath(),s.fillStyle=n,s.fillRect(e.x,e.y,e.width,e.height),s.restore()}static drawTag(t,e){var i;const s=t==null?void 0:t.parentNode,n=window.self.document.getElementById("tagToolTag");if(n&&s&&s.contains(n)&&(s==null||s.removeChild(n)),!((e==null?void 0:e.length)>0))return;const o=document.createElement("div");o.innerHTML=(i=e.reduce((a,l)=>`${a}${l.keyName}: ${l.value.join(" \u3001 ")}
|