","
","
"];for(let n=0;n{"<"===e&&(t=!0,n=!1),">"===e&&(n=!0,t=!1);return t&&!n?e:e.replace(/[ ]/g," ")}).join("")}function w(e){let t=0,n=0;for(;n<2;)n++,c.test(e)&&(e=e.replace(c,""),t++);return{value:e,tabSize:t}}function C(e){const t=e.childNodes;return[...new Array(t.length)].map((e,n)=>t.item(n))}function x(e,t){const n=document.createElement("div");n.innerHTML=e,n.id="getcssstyles";return k(n).reduce((e,n)=>{const o=S(n,{endID:"getcssstyles",endStyle:t});return o&&!e.includes(o)&&e.push(o),e},[])}function S(e,t){const{endID:n,endStyle:o}=t;let i=e.parentElement;for(;i;){const e=i.style[o];if(e)return e;if(i.id===n)return;i=i.parentElement}}function k(e){let t=C(e);const n=t.filter(e=>e.nodeType===Node.TEXT_NODE);for(;t.length;){const e=t[0];if(e.nodeType===Node.ELEMENT_NODE){const n=C(e);t=[...t,...n]}else n.push(e);t.shift()}return n}t.replaceOldFontSize=m,t.getTextFormatFromHTML=function(e){const t=d(e);if(t&&t.childNodes){const e=t.childNodes[0];if(1===e.childNodes.length&&"#text"!==e.childNodes[0].nodeName)return y(e.firstChild)}return{}},t.adjustHTMLLineHeight=function(e){if(!e)return"";const t=d(e),n=e=>{if("#text"!==e.nodeName){const{fontSize:t,lineHeight:o}=y(e);if(!o&&t){const n=e;let o=n.getAttribute("style");o=o?`${o}; line-height: ${t+6}px`:`line-height: ${t+6}px`,o=o.replace(/(font-size:\d*\.*\d*(rem|em));*/,""),o=o.replace(/(font-size:\d*\.*\d*pt);*/,`font-size: ${t}px;`),n.setAttribute("style",o)}e.childNodes.length&&e.childNodes.forEach(e=>n(e))}};if(t){const e=t.childNodes[0];return e.childNodes.forEach(e=>{n(e)}),e.innerHTML}return e},t.isMultiLine=v,t.resetRichTextElements=function(e){const t=document.createElement("div");t.innerHTML=e;let n=[...new Array(t.children.length)].map((e,n)=>null==t?void 0:t.children[n]),o=0,i=o,s=0;for(;0!==n.length;){const e=n[0];if(e){let t=e.getAttribute("style");if(t&&/(font-size)|(letter-spacing)|(line-height)/.test(t)){const n=g(e.style.fontSize),a=g(e.style.lineHeight),l=g(e.style.letterSpacing);n>o&&(o=n),a>i&&(i=a),l>s&&(s=l),t=t.replace(/(font-size:\s*\d*\.*\d*px);*/,`font-size: ${n/r.FontBoxScale}px;`),t=t.replace(/(line-height:\s*\d*\.*\d*px);*/,`line-height: ${a/r.FontBoxScale}px;`),t=t.replace(/(letter-spacing:\s*\d*\.*\d*px);*/,`letter-spacing: ${l/r.FontBoxScale}px;`),e.setAttribute("style",t)}if(e.hasChildNodes()){const t=[...new Array(e.children.length)].map((t,n)=>e.children[n]);n=n.concat(t)}}n.shift()}return{text:t.innerHTML,style:{maxFontSize:o,maxLineHeight:Math.max(o,i),maxLetterSpacing:s}}},t.measureTextSize=function(e,t,n){let o=u(m(t,"out"),!!n&&n.isMultiText,(e,t)=>{(null==n?void 0:n.indent)&&(t["text-indent"]=[/^.*$/])});(null==n?void 0:n.isRich)||(o=_(o));const{defaultWidth:i,defaultHeight:s,isMultiText:l,wrap:c,editing:d}=n||{},h=Object.assign({},e);i&&(h.width=i),l?c?(h.whiteSpace="pre-wrap",h.wordBreak="break-word",h.wordWrap="break-word"):h.whiteSpace="nowrap":delete h.whiteSpace;const p=v(o),f={style:h,text:o,option:n},y=function(e){let t=0;if(e.length>0)for(let n=0;n{!function(e,t,n,o){const i={color:e.style.color||"","font-size":e.style.fontSize,"font-family":e.style.fontFamily,"font-style":e.style.fontStyle,"font-weight":e.style.fontWeight,"text-decoration-line":e.style.textDecorationLine};if(!o)switch(t){case"foreColor":i.color=n;break;case"fontSize":i["font-size"]=n+"px";break;case"fontName":i["font-family"]=n;break;case"italic":i["font-style"]=n?"italic":"normal";break;case"bold":i["font-weight"]=n?"bold":"normal";break;case"strike":{const e=i["text-decoration-line"]||"";i["text-decoration-line"]=n?e+" line-through":e.replace("line-through","");break}case"underline":{const e=i["text-decoration-line"]||"";i["text-decoration-line"]=n?e+" underline":e.replace("underline","");break}}const r=Object.keys(i).filter(e=>i[e]).map(e=>`${e}: ${i[e]};`).join("");setTimeout(()=>{r&&e.setAttribute("style",r)},0)}(e,n,o,0===t&&!i||t===s-1&&!r)})}(c===l?[l]:function(e,t){let n=e.nextElementSibling;const o=[e];for(;n&&(o.push(n),n!==t);)n=n.nextElementSibling;return o}(l,c),{command:e,value:t,firstLiHasSelected:h,lastLiHasSelected:p})},t.execCommandFontSize=function(e,t,n){const o=document.execCommand("fontSize",!1,"7");if(document.execCommand("styleWithCSS"),!o)return;document.querySelectorAll(e+' span[style*="xxx-large"]').forEach(e=>{const o=e;"span"===o.tagName.toLowerCase()&&(o.style.fontSize=t+"px",n&&(o.style.lineHeight=n/r.FontBoxScale+"px"))}),document.querySelectorAll(e+' font[size*="7"]').forEach(e=>{"font"===e.tagName.toLowerCase()&&(e.removeAttribute("size"),e.style.fontSize=t+"px",n&&(e.style.lineHeight=n/r.FontBoxScale+"px"))})},t.containerValue=function(e,t,n=!1){return n?-1!==e.toLowerCase().indexOf(t.toLowerCase()):-1!==e.indexOf(t)},t.transBlankChart=function(e){return e?e.replace(/[ ]/g," "):e},t.transBlankChartNotInTag=_,t.insertOrderedList=function(e,t){const n=document.createElement("div");return n.id="insertOrderedList",n.innerHTML=""+e,n.querySelectorAll("ul,ol").forEach(e=>function(e,t){const n=e.parentElement;if(!n)return;const o=document.createDocumentFragment();e.childNodes.forEach(e=>{const n=document.createElement(t);if(1===e.nodeType){const t=e;n.innerHTML=t.innerHTML;const o=t.getAttribute("style");o&&n.setAttribute("style",o)}else n.appendChild(e.cloneNode());o.appendChild(n)}),n.replaceChild(o,e)}(e,"p")),t?function(e,t,n){const o=document.createElement(t);return e.childNodes.forEach(e=>{const t=document.createElement(n);if(1===e.nodeType){const n=e,o=n.getAttribute("style");if(l.includes(e.nodeName))t.innerHTML=n.innerHTML,o&&t.setAttribute("style",o);else{const e=document.createElement(n.tagName);e.innerHTML=n.innerHTML,o&&e.setAttribute("style",o),t.appendChild(e)}}else t.appendChild(e.cloneNode());o.appendChild(t)}),o.outerHTML}(n,("order"===t?"OL":"unOrder"===t&&"UL")||"DIV","li"):n.innerHTML},t.getNewCSSStyle=function(e,t,n,o){const i=((null==n?void 0:n.split(";"))||[]).reduce((e,t)=>{if(!(t=t.trim()))return e;const n=t.split(":").map(e=>e.trim());return e.push(n),e},[])||[],r=i.findIndex(t=>t[0]===e);if(-1===r)i.push([e,o?o(""):t]);else{const e=i[r];e[1]=o?o(e[1]):t,i.splice(r,1,e)}return i.reduce((e,t)=>t[1]&&e+t.join(":")+";","")},t.execCommandIndent=function(e){const t=[...new Array(2)].map(()=>" ").join(""),n=e.parentElement,o=document.createDocumentFragment(),i=document.createElement("span");if(i.innerHTML=t,1===e.nodeType){const n=e,r=document.createElement(n.tagName);if("BR"===n.tagName)o.appendChild(r),o.appendChild(i);else if(l.includes(n.tagName))r.innerHTML=t+n.innerHTML,o.appendChild(r);else{const e=r.getAttribute("style");e&&r.setAttribute("style",e),r.innerHTML=n.innerHTML,o.appendChild(i),o.appendChild(r)}}else o.appendChild(i),o.appendChild(e.cloneNode());return null==n||n.replaceChild(o,e),2},t.execCommandOutdent=function(e){if(1===e.nodeType&&l.includes(e.nodeName)){const t=e;t.innerText=w(t.innerText).value,function(e){const t=[];let n=e.previousSibling;for(;n&&!l.includes(n.nodeName);)t.unshift(n),n=n.previousSibling;let o=0;t.forEach(e=>{if(2!==o)if(1===e.nodeType){const t=e,{value:n,tabSize:i}=w(t.innerText);t.innerText=n,o+=i}else if(e.nodeValue){const{value:t,tabSize:n}=w(e.nodeValue);e.nodeValue=t,o+=n}})}(t)}else{let t=e.parentElement;for(;t;){if(l.includes(t.nodeName)){const e=t,{value:n,tabSize:o}=w(e.innerText);return e.innerText=n,o}t=t.parentElement}}return 2},t.getHTMLElementChildren=function(e){const t=e.childNodes;return[...new Array(t.length)].reduce((e,n,o)=>{const i=t.item(o);return i.nodeType===Node.ELEMENT_NODE&&e.push(i),e},[])},t.getChildNodes=C,t.getRichStylesByName=x,t.getCSSStyleValue=function(e,t){return e.reduce((e,n)=>{const o=n[t];return o&&!e.includes(o)&&e.push(o),e},[])},t.getManyRichStyleByHTMLString=function(e){return Object.keys(s).reduce((t,n)=>{const o=n;return t[o]=x(e,o),t},{color:[],fontFamily:[],fontSize:[],fontWeight:[],fontStyle:[],textDecorationLine:[],textAlign:[]})},t.getTextFormatByHTMLString=function(e,t){const n=document.createElement("div");return n.id="jojo",n.innerHTML=e,function(e){const t={},{fontFamily:n,fontSize:o,color:i,fontWeight:s,fontStyle:a,textAlign:l,textDecorationLine:c}=e;if(n&&(t.fontFamily=r.getFontKey(n)),o&&(t.fontSize=parseInt(o.split("px")[0])),i&&(t.color=i),s&&(t.fontStyle={bold:"bold"===s||parseInt(s)>400}),a&&(t.fontStyle=Object.assign(Object.assign({},t.fontStyle||{}),{italic:"italic"===a})),c){c.includes("line-through")&&(t.fontStyle=Object.assign(Object.assign({},t.fontStyle||{}),{strike:!0}));c.includes("underline")&&(t.fontStyle=Object.assign(Object.assign({},t.fontStyle||{}),{underline:!0}))}return l&&(t.textAlign=l),t}(k(n).reduce((e,o)=>Object.keys(e).reduce((e,i)=>{const r=i,s=S(o,{endID:n.id,endStyle:r});if(!s)return delete e[r],e;const a=e[r];if(void 0===a)return e;return t[r]!==s&&""===a?(e[r]=s,e):s!==a?(delete e[r],e):e},e),{color:"",fontFamily:"",fontSize:"",fontWeight:"",fontStyle:"",textAlign:"",textDecorationLine:""}))},t.getListTypeByHTMLString=function(e){const t=document.createElement("div");if(t.innerHTML=e,1===t.childNodes.length){const e=t.firstChild;switch(null==e?void 0:e.nodeName){case"UL":return"unOrder";case"OL":return"order"}}}},function(e,t,n){var o=n(28);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(388);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"IButtonProps",{enumerable:!0,get:function(){return o.IButtonProps}});var i=n(968);Object.defineProperty(t,"ButtonGroup",{enumerable:!0,get:function(){return i.default}});var r=n(269);Object.defineProperty(t,"Badge",{enumerable:!0,get:function(){return r.default}});var s=n(971);Object.defineProperty(t,"CalcInput",{enumerable:!0,get:function(){return s.default}});var a=n(974);Object.defineProperty(t,"Carousel",{enumerable:!0,get:function(){return a.default}});var l=n(390);Object.defineProperty(t,"ICarouselItem",{enumerable:!0,get:function(){return l.ICarouselItem}});var c=n(391);Object.defineProperty(t,"CheckBox",{enumerable:!0,get:function(){return c.default}});var u=n(980);Object.defineProperty(t,"CheckBoxGroup",{enumerable:!0,get:function(){return u.default}});var d=n(982);Object.defineProperty(t,"ColorPicker",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ColorInput",{enumerable:!0,get:function(){return d.ColorInput}}),Object.defineProperty(t,"colorPanelManager",{enumerable:!0,get:function(){return d.colorPanelManager}});var h=n(392);Object.defineProperty(t,"Dialog",{enumerable:!0,get:function(){return h.default}});var p=n(1024);Object.defineProperty(t,"ErrorHandler",{enumerable:!0,get:function(){return p.default}});var f=n(1025);Object.defineProperty(t,"FloatPanel",{enumerable:!0,get:function(){return f.default}});var m=n(1027);Object.defineProperty(t,"HelpIcon",{enumerable:!0,get:function(){return m.default}});var g=n(60);Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return g.default}});var y=n(1029);Object.defineProperty(t,"IconButton",{enumerable:!0,get:function(){return y.default}});var v=n(1031);Object.defineProperty(t,"IconLabel",{enumerable:!0,get:function(){return v.default}});var b=n(1033);Object.defineProperty(t,"IconLink",{enumerable:!0,get:function(){return b.default}});var _=n(270);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return _.default}});var w=n(399);Object.defineProperty(t,"InputNumber",{enumerable:!0,get:function(){return w.default}});var C=n(1037);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return C.default}});var x=n(394);Object.defineProperty(t,"List",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"IListItem",{enumerable:!0,get:function(){return x.IListItem}});var S=n(1039);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return S.default}});var k=n(1041);Object.defineProperty(t,"Notice",{enumerable:!0,get:function(){return k.default}});var P=n(1043);Object.defineProperty(t,"Pagination",{enumerable:!0,get:function(){return P.default}});var T=n(1045);Object.defineProperty(t,"Panel",{enumerable:!0,get:function(){return T.default}});var M=n(400);Object.defineProperty(t,"PopupMenu",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"IMenuItem",{enumerable:!0,get:function(){return M.IMenuItem}});var A=n(1048);Object.defineProperty(t,"PopupPanel",{enumerable:!0,get:function(){return A.default}});var O=n(1050);Object.defineProperty(t,"Tree",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"TreeItemData",{enumerable:!0,get:function(){return O.TreeItemData}}),Object.defineProperty(t,"cloneTreeItemData",{enumerable:!0,get:function(){return O.cloneTreeItemData}}),Object.defineProperty(t,"searchTreeNodes",{enumerable:!0,get:function(){return O.searchTreeNodes}}),Object.defineProperty(t,"searchNodes",{enumerable:!0,get:function(){return O.searchNodes}}),Object.defineProperty(t,"findNode",{enumerable:!0,get:function(){return O.findNode}}),Object.defineProperty(t,"findRootNode",{enumerable:!0,get:function(){return O.findRootNode}}),Object.defineProperty(t,"modifyAllChilrenExpand",{enumerable:!0,get:function(){return O.modifyAllChilrenExpand}}),Object.defineProperty(t,"builderTreeItemData",{enumerable:!0,get:function(){return O.builderTreeItemData}});var E=n(1052);Object.defineProperty(t,"ProgressBar",{enumerable:!0,get:function(){return E.default}});var D=n(1054);Object.defineProperty(t,"RadioButtonGroup",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return D.Radio}}),Object.defineProperty(t,"IRadioItemProp",{enumerable:!0,get:function(){return D.IRadioItemProp}});var I=n(172);Object.defineProperty(t,"ScrollBars",{enumerable:!0,get:function(){return I.default}});var L=n(1058);Object.defineProperty(t,"SearchBox",{enumerable:!0,get:function(){return L.default}});var N=n(393);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return N.default}});var j=n(1060);Object.defineProperty(t,"Slider",{enumerable:!0,get:function(){return j.default}});var R=n(1062);Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return R.default}});var z=n(1064);Object.defineProperty(t,"TabBar",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(t,"ITabBarItem",{enumerable:!0,get:function(){return z.ITabBarItem}});var B=n(1066);Object.defineProperty(t,"TabPanel",{enumerable:!0,get:function(){return B.default}});var F=n(1068);Object.defineProperty(t,"Tag",{enumerable:!0,get:function(){return F.default}});var H=n(1070);Object.defineProperty(t,"TextArea",{enumerable:!0,get:function(){return H.default}});var Y=n(1072);Object.defineProperty(t,"TileList",{enumerable:!0,get:function(){return Y.default}});var W=n(208);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return W.default}});var V=n(133);Object.defineProperty(t,"withAutoClose",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(t,"IAutoCloseComponentProps",{enumerable:!0,get:function(){return V.IAutoCloseComponentProps}}),Object.defineProperty(t,"PopupManager",{enumerable:!0,get:function(){return V.PopupManager}}),Object.defineProperty(t,"IPopupComponent",{enumerable:!0,get:function(){return V.IPopupComponent}}),Object.defineProperty(t,"IAutoCloseProps",{enumerable:!0,get:function(){return V.IAutoCloseProps}});var U=n(1074);Object.defineProperty(t,"Zoomer",{enumerable:!0,get:function(){return U.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AndDesignColors=t.RulerActiveAreaColor=t.RuleGraduationColor=t.SystemGreenColor=t.SystemDarkColor=t.DefaultTableInnerStrokeColor=t.DefaultTableOuterStrokeColor=t.DefaultSelectColor=t.DisabledIconColor=t.DefaultIconColor=t.DisabledTextColor=t.DefaultTextColor=t.PressedStrokeColor=t.HoverStrokeColor=t.FocusStrokeColor=t.SelectedStrokeColor=t.DisabledStrokeColor=t.DefaultStrokeColor1=t.DefaultStrokeColor=t.DisabledDarkFillColor=t.DefaultDarkFillColor=t.DisabledWhiteFillColor=t.DefaultWhiteFillColor=t.GrayColor=t.LightGrayColor=t.SilverWhiteColor=t.DarkRedColor=t.LightRedColor=t.HalfTransparentDarkGreenColor=t.PaleRedColor=t.DeepBlueColor=t.BlueColor=t.RedColor=t.DarkGreenColor=t.DarkGrayColor=t.BlackColor=t.WhiteColor=t.TextShadowColor=t.ShadowColor=t.TransparentColor=void 0,t.TransparentColor={r:0,g:0,b:0,a:0},t.ShadowColor={r:0,g:0,b:0,a:.15},t.TextShadowColor={r:0,g:0,b:0,a:.15},t.WhiteColor={r:255,g:255,b:255,a:1},t.BlackColor={r:0,g:0,b:0,a:1},t.DarkGrayColor={r:112,g:112,b:112,a:1},t.DarkGreenColor={r:74,g:214,b:98,a:1},t.RedColor={r:254,g:64,b:102,a:1},t.BlueColor={r:65,g:143,b:215,a:1},t.DeepBlueColor={r:0,g:157,b:255,a:1},t.PaleRedColor={r:255,g:217,b:224,a:1},t.HalfTransparentDarkGreenColor={r:65,g:143,b:215,a:.6},t.LightRedColor={r:254,g:64,b:102,a:.9},t.DarkRedColor={r:254,g:64,b:102,a:.8},t.SilverWhiteColor={r:240,g:240,b:240,a:1},t.LightGrayColor={r:226,g:226,b:226,a:1},t.GrayColor={r:153,g:153,b:153,a:1},t.DefaultWhiteFillColor=t.WhiteColor,t.DisabledWhiteFillColor=Object.assign(Object.assign({},t.WhiteColor),{a:.3}),t.DefaultDarkFillColor={r:240,g:240,b:240,a:1},t.DisabledDarkFillColor={r:224,g:224,b:224,a:1},t.DefaultStrokeColor={r:119,g:119,b:119,a:1},t.DefaultStrokeColor1={r:121,g:121,b:121,a:1},t.DisabledStrokeColor={r:119,g:119,b:119,a:.3},t.SelectedStrokeColor={r:65,g:143,b:215,a:1},t.FocusStrokeColor={r:65,g:143,b:215,a:1},t.HoverStrokeColor={r:65,g:143,b:215,a:1},t.PressedStrokeColor={r:65,g:143,b:215,a:1},t.DefaultTextColor={r:51,g:51,b:51,a:1},t.DisabledTextColor={r:119,g:119,b:119,a:.3},t.DefaultIconColor={r:119,g:119,b:119,a:1},t.DisabledIconColor=Object.assign(Object.assign({},t.BlackColor),{a:.3}),t.DefaultSelectColor={r:119,g:119,b:119,a:1},t.DefaultTableOuterStrokeColor={r:216,g:216,b:216,a:1},t.DefaultTableInnerStrokeColor={r:216,g:216,b:216,a:1},t.SystemDarkColor={r:153,g:165,b:190,a:1},t.SystemGreenColor={r:27,g:190,b:10,a:1},t.RuleGraduationColor={r:66,g:81,b:108,a:1},t.RulerActiveAreaColor={r:34,g:49,b:75,a:1},t.AndDesignColors={PrimaryColor:{r:24,g:144,b:255,a:1},LinkColor:{r:24,g:144,b:255,a:1},SuccessColor:{r:82,g:196,b:26,a:1},WarningColor:{r:250,g:173,b:20,a:1},ErrorColor:{r:245,g:34,b:45,a:1},HeadingColor:{r:0,g:0,b:0,a:.85},TextColor:{r:0,g:0,b:0,a:.65},TextSecondDarkColor:{r:0,g:0,b:0,a:.45},DisabledColor:{r:0,g:0,b:0,a:.25},BorderColor:{r:217,g:217,b:217,a:1},BoxShadowColor:{r:0,g:0,b:0,a:.15}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortPredefinedStates=t.isPredefinedState=t.getPredefinedStateName=t.predefinedComponentStates=t.containerPresetState=t.disabledState=t.allTogglePredefinedStates=t.PredefinedStates=void 0;const o=n(1);var i;!function(e){e.normal="normal",e.hover="hover",e.pressed="pressed",e.toggleCheck="toggleCheck",e.checked="checked",e.unchecked="unchecked",e.focus="focus",e.blur="blur",e.disabled="disabled"}(i=t.PredefinedStates||(t.PredefinedStates={})),t.allTogglePredefinedStates=[i.disabled,i.checked],t.disabledState={type:i.disabled,name:o.default("state.disabled")},t.containerPresetState=[{type:i.checked,name:o.default("state.checked")},t.disabledState,{type:i.hover,name:o.default("state.hover")},{type:i.pressed,name:o.default("state.pressed")}],t.predefinedComponentStates=[{type:i.checked,name:o.default("state.checked")},t.disabledState,{type:i.hover,name:o.default("state.hover")},{type:i.pressed,name:o.default("state.pressed")},{type:i.focus,name:o.default("state.focus")}],t.getPredefinedStateName=function(e){const n=t.predefinedComponentStates.find(t=>t.type===e);return n?n.name:""},t.isPredefinedState=function(e){return[i.normal,i.hover,i.pressed,i.checked,i.disabled,i.focus].includes(e)},t.sortPredefinedStates=function(e){const n=[];t.predefinedComponentStates.forEach(t=>{e.includes(t.type)&&n.push(t.type)}),-1!==e.indexOf(i.normal)&&n.unshift(i.normal),e.splice(0,e.length,...n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MockPlusLang=void 0;const o=n(6),i=n(1539),r=n(1540),s=n(1541),a=n(57);!function(e){e.ZH="zh-cn",e.EN="en-us",e.TW="zh-tw"}(t.MockPlusLang||(t.MockPlusLang={}));const l={"zh-cn":i.default,"en-us":r.default,"zh-tw":s.default};let c=l[window.LANG||"zh-cn"];try{if(!a.isFigma()){const e=null===localStorage||void 0===localStorage?void 0:localStorage.getItem("mockplus_language");c=e&&l[e]||c}}catch(e){}t.default=(e,...t)=>{let n="";const i=e.split(".");return o.each(i,e=>{n=n?n[e]:c[e]}),n?n.replace(/{(\d+)}/g,(e,n)=>o.isUndefined(t[n])?e:t[n]):(console.log(`i18n 错误: ${e} not exist.`),"")}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeparatorPropertyName=t.StrokePropertyName=t.StrokePosition=t.PresetDashModel=t.StrokeLineCap=t.StrokeLineJoin=void 0,function(e){e.Miter="miter",e.Round="round",e.Bevel="bevel"}(t.StrokeLineJoin||(t.StrokeLineJoin={})),function(e){e.Butt="butt",e.Round="round",e.Square="square"}(t.StrokeLineCap||(t.StrokeLineCap={})),function(e){e.solid="solid",e.longDash="long-dash",e.middleDash="middle-dash",e.shortDash="short-dash",e.dashDot="dash-dot",e.dashDotDot="dash-dot-dot",e.longDashDot="long-dash-dot",e.dot="dot",e.unset="unset"}(t.PresetDashModel||(t.PresetDashModel={})),function(e){e.inner="inner",e.center="center",e.outer="outer"}(t.StrokePosition||(t.StrokePosition={})),t.StrokePropertyName="stroke",t.SeparatorPropertyName="separator"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i=n(2),r=n(96);n(1463),n(1468);const s=e=>{const{cls:t,color:n,tooltip:s,toolTipDirection:a,size:l,solid:c,disabled:u,tooltipAlign:d,disableHover:h,disableHoverColor:p,clickArea:f,tooltipStyle:m,allowDisabledClick:g,theme:y,hidden:v,onClick:b,onContextMenu:_}=e,w=o.createElement("i",{className:i.default("dsm-c-icon","idoc_iconfont","icon-_"+t,{"dsm-c-icon-solid":c,"dsm-c-icon-disabled":u,"dsm-c-icon-solid-disabled":u&&c,"dsm-c-icon-solid-disableHover":h,"dsm-c-icon-solid-disableHoverColor":p,"dsm-c-icon-orea":!!f,"dsm-c-icon-blue":"blue"===y,"dsm-c-icon-hidden":v}),style:{fontSize:l,width:f?f.width:l,height:f?f.height:l,color:n},onClick:!u||g?b:void 0,onContextMenu:u?void 0:_});return s?o.createElement(r.default,{text:s,align:d,theme:"small",tipStyle:m,direction:a},w):w};s.defaultProps={solid:!1,cls:"tag_peace",size:16,tooltip:"",color:"",toolTipDirection:"down",tooltipAlign:"center",disabled:!1,disableHover:!1,disableHoverColor:!1},t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boundsToNinePoints=t.boundsToPoints=t.createBoundsBySize=t.rotate=t.rotatePoint=t.getPointAngle=t.roundPoint=t.offsetPoint=t.tranDeltaToOffset=t.getBoundsOffset=t.isEqualBounds=t.empty=t.getRoundedPositionOfPoint=t.getBoundsWithPoints=t.size=t.intersect=t.union=t.initBoundsWithPositionAndSize=t.getPointsBounds=t.initByRect=t.create=t.init=t.setLocation=t.round=t.scale=t.inflateSide=t.inflate=t.offsetBounds=t.isContainer=t.isIntersetLine=t.isIntersect=t.isContainerPoint2=t.isContainerPoint=t.isEmpty=t.center=t.bottomLeft=t.topRight=t.bottomRight=t.topLeft=t.isEqualSize=t.isEqualPoints=t.isEqualPoint=t.isEqualPosition=t.transPositionToPoint=t.transPointToPosition=void 0;const o=n(7);function i(e){return{left:e.x,top:e.y}}function r(e){return{x:e.left,y:e.top}}function s(e,t,n){return o.sameNumber(e.top,t.top,n)&&o.sameNumber(e.left,t.left,n)}function a(e,t,n){return s(i(e),i(t),n)}function l(e){return{left:e.left,top:e.top}}function c(e){return{left:e.right,top:e.bottom}}function u(e){return{left:e.right,top:e.top}}function d(e){return{left:e.left,top:e.bottom}}function h(e){return 0===e.height||0===e.width}function p(e,{left:t,top:n},i){const r=e.left-o.EPSILON,s=e.top-o.EPSILON,a=e.right+o.EPSILON,l=e.bottom+o.EPSILON;return i?r<=t&&a>=t&&s<=n&&l>=n:rt&&sn}function f(e,t){const{start:n,end:o}=e,{start:i,end:r}=t,s=(i.x-n.x)*(o.y-n.y)-(o.x-n.x)*(i.y-n.y),a=(r.x-n.x)*(o.y-n.y)-(o.x-n.x)*(r.y-n.y),l=(n.x-i.x)*(r.y-i.y)-(r.x-i.x)*(n.y-i.y),c=(o.x-i.x)*(r.y-i.y)-(r.x-i.x)*(o.y-i.y);return s*a<0&&l*c<0}function m(e,t){const{left:n,top:o}=t;return Object.assign(Object.assign({},e),{left:e.left+n,top:e.top+o,right:e.right+n,bottom:e.bottom+o})}function g(e,t){const n=t.left-e.left,o=t.top-e.top;return Object.assign(Object.assign({},e),{width:n,height:o,bottom:t.top,right:t.left})}function y(e,t,n,o){return g({left:e,top:t},{left:n,top:o})}function v(e,t){const n={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY},{left:i,top:r,right:s,bottom:a}=e.reduce((e,t)=>(e.top=o.min(e.top,t.y),e.left=o.min(e.left,t.x),e.right=o.max(e.right,t.x),e.bottom=o.max(e.bottom,t.y),e),Object.assign({},n));return{left:i,top:r,right:s,bottom:a,width:t?Math.round(s-i):s-i,height:t?Math.round(a-r):a-r}}function b(){return{left:0,top:0,right:0,width:0,height:0,bottom:0}}function _(e,t){const{x:n,y:o}=e,{x:i,y:r}=t;let s=0;return n===i?s=o>r?90:270:o===r?s=ni&&or?s=180+s:na(e,t[n]))},t.isEqualSize=function(e,t){return o.sameNumber(e.width,t.width)&&o.sameNumber(e.height,t.height)},t.topLeft=l,t.bottomRight=c,t.topRight=u,t.bottomLeft=d,t.center=function(e){const{left:t,top:n,width:i,height:r}=e;return{left:t+o.round(i/2),top:n+o.round(r/2)}},t.isEmpty=h,t.isContainerPoint=p,t.isContainerPoint2=function(e,t,...n){return n.some(n=>p(n,e,t))},t.isIntersect=function(e,t){if(h(t))return p(e,l(t))||p(e,c(t));if(h(e))return p(t,l(e))||p(t,c(e));const{left:n,top:i,right:r,bottom:s}=e,{left:a,top:u,right:d,bottom:f}=t,m=o.max(n,a),g=o.max(i,u),y=o.min(r,d),v=o.min(s,f);return y-m>0&&v-g>0},t.isIntersetLine=function(e,t){const n=r(l(e)),o=r(u(e)),s=r(d(e)),a=r(c(e)),h=i(t.start),m=i(t.end);let g=p(e,h)||p(e,m);return g||(g=f(t,{start:n,end:a})||f(t,{start:o,end:s})),g},t.isContainer=function(e,t,n){return p(e,l(t),n)&&p(e,u(t),n)&&p(e,d(t),n)&&p(e,c(t),n)},t.offsetBounds=m,t.inflate=function(e,t){let{left:n,top:o,right:i,bottom:r,width:s,height:a}=e;return{left:n-t.left,top:o-t.top,right:i+t.left,bottom:r+t.top,width:s+2*t.left,height:a+2*t.top}},t.inflateSide=function(e,t){let{left:n,top:o,right:i,bottom:r}=e;return e.left=n-t.left,e.top=o-t.top,e.right=i+t.right,e.bottom=r+t.bottom,e.width=e.right-e.left,e.height=e.bottom-e.top,Object.assign({},e)},t.scale=function(e,t){const{left:n,top:o,right:i,bottom:r,width:s,height:a}=e;return{left:n*t,top:o*t,right:i*t,bottom:r*t,width:s*t,height:a*t}},t.round=function(e){let{left:t,top:n,right:i,bottom:r}=e;return t=o.round(t),n=o.round(n),i=o.round(i),r=o.round(r),{left:t,top:n,right:i,bottom:r,width:i-t,height:r-n}},t.setLocation=function(e,t){return m(e,{left:t.left-e.left,top:t.top-e.top})},t.init=g,t.create=function(e){return g(l(e),c(e))},t.initByRect=y,t.getPointsBounds=function(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.forEach(e=>{t=o.min(t,e.x),n=o.min(n,e.y),i=o.max(i,e.x),r=o.max(r,e.y)}),y(t,n,i,r)},t.initBoundsWithPositionAndSize=function(e,t){const{height:n,width:o}=t;return g(i(e),i({x:e.x+o,y:e.y+n}))},t.union=function(...e){if(!e.length)return{left:0,top:0,right:0,width:0,height:0,bottom:0};if(1===e.length)return e[0];const t=[...e],n=t.shift();let{left:i,top:r,right:s,bottom:a}=n;return t.forEach(e=>{i=o.min(i,e.left),r=o.min(r,e.top),s=o.max(s,e.right),a=o.max(a,e.bottom)}),g({top:r,left:i},{left:s,top:a})},t.intersect=function(...e){if(!e.length)return{left:0,top:0,right:0,width:0,height:0,bottom:0};if(1===e.length)return e[0];const t=[...e],n=t.shift();let{left:i,top:r,right:s,bottom:a}=n;return t.forEach(e=>{i=o.max(i,e.left),r=o.max(r,e.top),s=o.min(s,e.right),a=o.min(a,e.bottom)}),s<=i||a<=r?{left:0,top:0,right:0,width:0,height:0,bottom:0}:g({left:i,top:r},{left:s,top:a})},t.size=function(e){const{width:t,height:n}=e;return Math.hypot(t,n)},t.getBoundsWithPoints=v,t.getRoundedPositionOfPoint=function(e){return{x:o.round(2*e.x)/2,y:o.round(2*e.y)/2}},t.empty=b,t.isEqualBounds=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},t.getBoundsOffset=function(e,t){return{left:o.round(e.left-t.left),top:o.round(e.top-t.top),right:o.round(t.right-e.right),bottom:o.round(t.bottom-e.bottom)}},t.tranDeltaToOffset=function(e){return{left:-e.x,right:e.x,top:-e.y,bottom:e.y}},t.offsetPoint=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},t.roundPoint=function(e){return{x:o.round(e.x),y:o.round(e.y)}},t.getPointAngle=_,t.rotatePoint=w,t.rotate=function(e,t,n){return v(C(e).map(e=>w(e,t,n)))},t.createBoundsBySize=function(e){return{left:0,top:0,bottom:e.height,right:e.width,width:e.width,height:e.height}},t.boundsToPoints=C,t.boundsToNinePoints=function(e){const{left:t,top:n,right:i,bottom:r,width:s,height:a}=e,l=o.round(s/2),c=o.round(a/2);return[{x:t,y:n},{x:t+l,y:n},{x:i,y:n},{x:i,y:n+c},{x:i,y:r},{x:t+l,y:r},{x:t,y:r},{x:t,y:n+c},{x:t+l,y:n+c}]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCompChangeByNewPosition=t.flattComps=t.getSelectionFrameTypeByConstraint=t.updateCompDataBaseOnContainer=t.setDefaultStatusOfSelectionGroupChild=t.updateChildrenPositionByGrid=t.getTwoDimensionalArray=t.getMaxIndexOfComponents=t.updateChildDataByFlip=t.getModifyAttrArtboardPatches=t.getModifyFlipAttrPatches=t.setMovingDataFromClonedCompsToOrgin=t.setMovingDataFromOriginToClonedComps=t.getCurrentMousePosition=t.extractDynamicInfo=t.writeMasterID=t.filterInvalidateComps=t.generatorFnMapWithEnumValue=t.getParentByFilter=t.getMovingTipsPosition=t.getPadding=t.getBoundsOffsetBySizeChange=t.getAdjustDiffWhenMove=t.allCompsSatisfy=t.getGapByControlOffset=t.extractComps=t.findParentByFiltering=t.findChildrenByFiltering=t.setValueWithFontstyle=t.transRadius=t.translateSizeMode=t.getTextCompInSealed=t.getCheckedTextStylePatchesWhenMainTextStyleChange=t.getChangedValue=t.tansPointInArtBoardToGroup=t.mapVectorToTargetCoordinates=t.reverseMapPosition=t.mapPositionToTargetCoordinates=t.getLayoutDirection=t.getAnchors=t.getAnchorsList=t.getCompBoundsInPage=t.getCompsBoundsInArtboard=t.getCompAbsoluteBounds=t.getCompBoundsInArtboard=t.getCompAbsoluteMatrixWithParentMatrix=t.getCompAbsoluteMatrix=t.getCompLocalMatrix=t.getBoundsInParent=t.resetInteractionTargetID=t.resetValueMap=t.resetID=t.getSelectionBoxPoints=void 0;const o=n(6),i=n(873),r=n(7),s=n(24),a=n(24),l=n(38),c=n(10),u=n(30),d=n(100),h=n(22),p=n(344),f=n(256),m=n(150),g=n(18),y=n(13),v=n(61),b=n(5),_=n(5),w=n(42),C=n(32),x=n(27),S=n(347),k=n(156),P=n(52);function T(e){const t={};return e.forEach(e=>{const n=x.getNewID();if(t[e._id]=n,e._id=n,e.components){const n=T(e.components);for(let e in n)t[e]=n[e]}}),t}function M(e,t){const n=[],o=e=>{n.push(...e),e.forEach(e=>{e.components&&o(e.components)})};o(e),n.forEach(e=>{const{interaction:n,type:o}=e;if(b.CConnector===o){const{startPoint:n,endPoint:o}=e.value;if(n.id){const e=t[n.id];n.id=e||""}if(o.id){const e=t[o.id];o.id=e||""}}for(let e in n){const o=n[e];o&&o.actions.forEach(e=>{if("component"===e.type){const n=e.target,o=t[n];o&&(e.target=o)}})}})}function A({size:e,position:t,rotate:n,scale:o,isRoot:s}){let a;const l=n||0,c=o||1,u=(null==t?void 0:t.x)||0,d=(null==t?void 0:t.y)||0,h=(null==e?void 0:e.width)||0,p=(null==e?void 0:e.height)||0;if(s)a=i.Matrix.identity,a.m31=a.m32=0;else if(r.sameNumber(l,0)&&r.sameNumber(c,1))a=i.Matrix.identity,a.m31=u,a.m32=d;else if(r.sameNumber(l,0))a=i.Matrix.identity,a.m31=u,a.m32=d,a.m11=c,a.m22=c;else{const e=i.Matrix.identity;e.m11=c,e.m22=c,a=e.clone();const t=i.Matrix.identity;t.m31=-.5*h*c,t.m32=-.5*p*c;const n=i.Matrix.identity;n.m31=.5*h*c,n.m32=.5*p*c;const o=i.Matrix.createRotation(l*(Math.PI/180));o.multiplyMatrix(n),t.multiplyMatrix(o),a.multiplyMatrix(t);const r=i.Matrix.identity;r.m31=u,r.m32=d,a.multiplyMatrix(r)}return a}function O(e,t=1){const{size:n,position:o,rotate:i}=e,r=A({scale:t,size:n,position:o,rotate:i,isRoot:e.isArtboard});let s;if(e.parent){const t=r.clone();t.multiplyMatrix(O(e.parent)),s=t}else s=r;return s}function E(e,t,n=1){const{size:o,position:i,rotate:r}=e,s=A({scale:n,size:o,position:i,rotate:r,isRoot:e.isArtboard});let a;if(e.parent){const e=s.clone();e.multiplyMatrix(t),a=e}else a=s;return a}function D(e,t){if(t)return I(e,t);const{size:n}=e;return O(e).multiplyRect({left:0,top:0,right:n.width,bottom:n.height})}function I(e,t){const{size:n}=e;return E(e,t).multiplyRect({left:0,top:0,right:n.width,bottom:n.height})}function L(e){const t={left:!1,right:!1,top:!1,bottom:!1,center:!1,middle:!1};switch(e.horizontal){case l.HorizontalAlign.Left:t.left=!0;break;case l.HorizontalAlign.Right:t.right=!0;break;case l.HorizontalAlign.LeftAndRight:t.left=!0,t.right=!0;break;case l.HorizontalAlign.Center:t.center=!0}switch(e.vertical){case l.VerticalAlign.Top:t.top=!0;break;case l.VerticalAlign.Bottom:t.bottom=!0;break;case l.VerticalAlign.TopAndBottom:t.top=!0,t.bottom=!0;break;case l.VerticalAlign.Middle:t.middle=!0}return t}function N(e){return e.reduce((e,t)=>{const n=t.dynamicInfo;return!o.isEmpty(n)&&(e[t.id]=n),e},{})}function j(e,t,n){return{do:{[e]:[c.Ops.replace(t,n.newValue)]},undo:{[e]:[c.Ops.replace(t,n.oldValue)]}}}function R(e,t,n){const o=new y.UIComponent(e,t,!1),i=new v.ArtboardPatchesClass;n.horizontal&&k.updatePatchesByWhenFlip(o,k.IFlipModel.Horizontal,i),n.vertical&&k.updatePatchesByWhenFlip(o,k.IFlipModel.Vertical,i);const r=C.extractDynamicInfoFromPatch(i)[e._id];r&&(void 0!==r.rotate&&(e.rotate=r.rotate),void 0!==r.value&&(e.value=r.value))}t.getSelectionBoxPoints=function(e){if(0===e.size)return null;if(1===e.size){return e.values().next().value.getBoxPointsInArtboard(!1)}let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.forEach(e=>{e.getBoxPointsInArtboard(!1).forEach(e=>{e.xo&&(o=e.x),e.yi&&(i=e.y)})}),[{x:t,y:n},{x:o,y:n},{x:o,y:i},{x:t,y:i}]},t.resetID=T,t.resetValueMap=function e(t,n){t.forEach(t=>{var o,i;if(t.lib){const e=w.getComponent(t.lib);(null===(o=null==e?void 0:e.editor)||void 0===o?void 0:o.onClone)&&e.editor.onClone(t,n)}(null===(i=t.components)||void 0===i?void 0:i.length)&&e(t.components,n)})},t.resetInteractionTargetID=M,t.getBoundsInParent=function({size:e,rotate:t,position:n}){return A({size:e,position:n,rotate:t}).multiplyRect({left:0,top:0,right:e.width,bottom:e.height})},t.getCompLocalMatrix=function(e,t=1){const{size:n,position:o,rotate:i}=e;return A({size:n,position:o,rotate:i,scale:t,isRoot:e.isArtboard})},t.getCompAbsoluteMatrix=O,t.getCompAbsoluteMatrixWithParentMatrix=E,t.getCompBoundsInArtboard=D,t.getCompAbsoluteBounds=I,t.getCompsBoundsInArtboard=function(e){if(!e.length)return s.empty();const t=O(e[0].parent);return s.union(...e.map(e=>I(e,t)))},t.getCompBoundsInPage=function(e,t){const n=e.getRootNode(),{x:o,y:i}=n.position,r=D(e,t);return s.offsetBounds(r,{left:o,top:i})},t.getAnchorsList=function(e){const t=Object.keys(e[0].layout),n={};t.forEach(t=>{n[t]=!e.some(n=>n.layout[t]!==(e[0]&&e[0].layout[t]))});const o={left:!0,top:!0,bottom:!0,right:!0,center:!1,middle:!1},i=L(e[0].layout);return Object.keys(o).forEach(t=>{o[t]=!e.some(e=>L(e.layout)[t]!==i[t])}),{layout:{responsive:n.responsive?e[0].layout.responsive:void 0,auto:n.auto?e[0].layout.auto:void 0,vertical:n.vertical?e[0].layout.vertical:void 0,horizontal:n.horizontal?e[0].layout.horizontal:void 0,fixedWidth:n.fixedWidth?e[0].layout.fixedWidth:void 0,fixedHeight:n.fixedHeight?e[0].layout.fixedHeight:void 0},anchors:{left:o.left?i.left:void 0,right:o.right?i.right:void 0,top:o.top?i.top:void 0,bottom:o.bottom?i.bottom:void 0,center:o.center?i.center:void 0,middle:o.middle?i.middle:void 0}}},t.getAnchors=L,t.getLayoutDirection=function(e){const t={horizontal:l.HorizontalAlign.Auto,vertical:l.VerticalAlign.Auto};return!e.center||e.left||e.right?e.left&&e.right?t.horizontal=l.HorizontalAlign.LeftAndRight:e.left&&!e.right?t.horizontal=l.HorizontalAlign.Left:!e.left&&e.right?t.horizontal=l.HorizontalAlign.Right:e.left||e.right||(t.horizontal=l.HorizontalAlign.Auto):t.horizontal=l.HorizontalAlign.Center,!e.middle||e.top||e.bottom?e.top&&e.bottom?t.vertical=l.VerticalAlign.TopAndBottom:e.top&&!e.bottom?t.vertical=l.VerticalAlign.Top:!e.top&&e.bottom?t.vertical=l.VerticalAlign.Bottom:e.top||e.bottom||(t.vertical=l.VerticalAlign.Auto):t.vertical=l.VerticalAlign.Middle,t},t.mapPositionToTargetCoordinates=function(e,t,n){const o=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI);return{x:e.x*o-e.y*i+n.x,y:e.y*o+e.x*i+n.y}},t.reverseMapPosition=function(e,t,n){const o=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI);return{x:e.x*o+e.y*i-n.x*o-n.y*i,y:e.y*o-e.x*i+n.x*i-n.y*o}},t.mapVectorToTargetCoordinates=function(e,t){const n=Math.cos(t/180*Math.PI),o=Math.sin(t/180*Math.PI),{x:i,y:r}=e;return{x:i*n-r*o,y:r*n+i*o}},t.tansPointInArtBoardToGroup=function(e,t){let n=t,o=0;const i=t.getBoxPointsInArtboard()[0];for(;n instanceof y.UIComponent&&!n.isArtboard;)o+=n.rotate,n=n.parent;const r=Math.cos(o/180*Math.PI),s=Math.sin(o/180*Math.PI);return e.map(e=>({x:e.x*r+e.y*s-i.x*r-i.y*s,y:e.y*r-e.x*s+i.x*s-i.y*r}))},t.getChangedValue=function(e,t){const n={},i=Object.keys(e);for(const r of i){const i=r,s=e[i],a=t[i];o.isEqual(s,a)||(n[i]=s)}return n},t.getCheckedTextStylePatchesWhenMainTextStyleChange=function(e,t,n){var o,i;const r={do:{},undo:{}};if(f.CompTextStyleNameConfig[(null===(o=e.lib)||void 0===o?void 0:o.type)||e.type].entireTextStyleName===t){const t=(null===(i=e.lib)||void 0===i?void 0:i.type)||e.type;if(f.CompTextStyleNameConfig[t]){const o=f.CompTextStyleNameConfig[t].checkedTextStyleName;if(o){const t=e.getCurrentPropertiesPath("properties/"+o),i=e.properties,s=i[o],a=Object.assign(Object.assign({},s),n);r.do[e.id]=[c.Ops.replace(t,a)],r.undo[e.id]=[c.Ops.replace(t,i[o])]}}}return r},t.getTextCompInSealed=function e(t){let n=t.components.find(e=>[b.CPureText,b.CText,b.CInput].includes(e.type))||null;if(!n)for(let o=0;ot?(e=>r.min(e/s*100,100))(e):(e=>r.min(e/100*s,s))(e);if(e.isPercent!==t.isPercent){let{topLeft:n,topRight:o,bottomRight:i,bottomLeft:s}=t;return n&&(n=r.round(c(n,e.isPercent))),o&&(o=r.round(c(o,e.isPercent))),i&&(i=r.round(c(i,e.isPercent))),s&&(s=r.round(c(s,e.isPercent))),{prop:a,name:l,topLeft:n,topRight:o,bottomLeft:s,bottomRight:i,isPercent:e.isPercent,disabled:e.disabled}}{let{topLeft:t,topRight:n,bottomRight:o,bottomLeft:i,isPercent:c}=e;return t&&(t=c?r.min(t,100):r.min(s,t)),n&&(n=c?r.min(n,100):r.min(s,n)),i&&(i=c?r.min(i,100):r.min(s,i)),o&&(o=c?r.min(o,100):r.min(s,o)),{prop:a,name:l,topLeft:t,topRight:n,bottomLeft:i,bottomRight:o,isPercent:e.isPercent,disabled:e.disabled}}},t.setValueWithFontstyle=(e,t)=>{const n=!!(null==t?void 0:t.underline),o=!!(null==t?void 0:t.strike),i=!!(null==t?void 0:t.bold),r=!!(null==t?void 0:t.italic),s=new S.FontStyleHelper,{value:a}=s.changeTextFontStyle(e,[{type:"underline",boolean:n},{type:"strike",boolean:o},{type:"bold",boolean:i},{type:"italic",boolean:r}]);return a},t.findChildrenByFiltering=function(e,t){if(!e.isContainer)return;const n=[],o=e=>{const i=e.components.filter(t);if(i.length)n.push(...i);else{e.components.filter(e=>e.isContainer).forEach(e=>{o(e)})}};return o(e),n.length?n:void 0},t.findParentByFiltering=function(e,t){if(!e)return;let n=void 0;const o=e=>{e.parent&&(e.parent&&t(e.parent)?n=e.parent:o(e.parent))};return o(e),n},t.extractComps=function e(t){const n=[...t];return t.forEach(t=>{t instanceof y.UIContainerComponent&&n.push(...e(t.components))}),n},t.getGapByControlOffset=function(e,t){const{type:n,rowIndex:o,colIndex:i}=t,r="horizontal"===n?i:o;return("horizontal"===n?e.x:e.y)*(2/(2*r+1))},t.allCompsSatisfy=function(e,t){return e.reduce((e,n)=>e=e&&t(n),!0)},t.getAdjustDiffWhenMove=function(e,t){const{horizontal:n,vertical:o}=e;let i={x:t.x,y:t.y};return n||(i.x=0),o||(i.y=0),i},t.getBoundsOffsetBySizeChange=function(e,t){const{width:n,height:o}=e,{width:i,height:r}=t;return{right:i-n,bottom:r-o,top:0,left:0}},t.getPadding=function(e){if(!e||e.disabled)return{left:0,right:0,top:0,bottom:0};const{left:t,right:n,top:o,bottom:i}=e;return{left:t||0,right:n||0,top:o||0,bottom:i||0}},t.getMovingTipsPosition=function(e,t,n){t=t||90,n=n||20;const o=e.pageX+t+16>window.innerWidth,i=e.pageY+n+16>window.innerHeight;return o?{left:window.innerWidth-t,top:e.clientY+16}:i?{left:e.clientX+16,top:window.innerHeight-n}:{left:e.clientX+16,top:e.clientY+16}},t.getParentByFilter=function e(t,n){const o=t.parent;if(o)return n(o)?o:e(o,n)},t.generatorFnMapWithEnumValue=function(e,t){return o.fromPairs(e.map(e=>[""+e,o.partial(t,e)]))},t.filterInvalidateComps=function e(t){const n=t.filter(e=>!!e);return n.forEach(t=>{t.components&&(t.components=e(t.components))}),n},t.writeMasterID=function e(t){var n;t.masterID=t._id,null===(n=t.components)||void 0===n||n.forEach(e)},t.extractDynamicInfo=N,t.getCurrentMousePosition=function(e){const{pageY:t,pageX:n}=e;return{x:n,y:t}},t.setMovingDataFromOriginToClonedComps=function(e,t){const n=N(e);t.forEach(({comp:e,source:t})=>{e.dynamicInfo=n[t]}),C.clearCompDynamicInfo(e)},t.setMovingDataFromClonedCompsToOrgin=function(e,t){const n=t.map(({comp:e})=>e),o=t.reduce((e,{comp:t,source:n})=>(e[n]=t.dynamicInfo,e),{});e.forEach(e=>{e.dynamicInfo=o[e.id]}),C.clearCompDynamicInfo(n)},t.getModifyFlipAttrPatches=function(e,t,n){const o=t===k.IFlipModel.Horizontal?"horizontal":"vertical";let i=new v.ArtboardPatchesClass;return e.reduce((e,t)=>{const i=Object.assign(Object.assign({},t.flip||{}),{[o]:n}),r=void 0===t.flip?void 0:t.flip,s=j(t.id,"/flip",{oldValue:r,newValue:i});return e.coverPatches(s)},i)},t.getModifyAttrArtboardPatches=j,t.updateChildDataByFlip=R,t.getMaxIndexOfComponents=function(e,t){const n=t.reduce((t,n,o)=>(e.find(e=>e.id===n.id)&&t.push(o),t),[]);return Math.max(-1,...n)},t.getTwoDimensionalArray=function(e,t,n){const i=new Array(t).fill(1).map(()=>{const e=o.cloneDeep(n);return M([e],T([e])),e});return new Array(e).fill(1).map(()=>o.cloneDeep(i).map(e=>(M([o.cloneDeep(e)],T([e])),e)))},t.updateChildrenPositionByGrid=function(e,t,n){let o=0;return e.forEach(e=>{let i=0,r=0;e.forEach(e=>{const t=e.position;t.y=o,t.x=i,i+=e.size.width+n,r=Math.max(r,e.size.height)}),o+=r+t}),e},t.setDefaultStatusOfSelectionGroupChild=function(e,t){return e.forEach(e=>function e(t,n){var o;const{properties:i,states:r}=t;r[n]||(r[n]={enabled:!0,properties:{}});const s=r[n];s.enabled=!0,s.properties||(s.properties={}),Object.keys(i).forEach(e=>{var t;const n=i[e],o=n.prop||e,r=s.properties[e];switch(o){case u.FillPropertyName:{const t=n;r||t.type!==u.FillType.solid||(s.properties[e]=Object.assign(Object.assign({},t),{color:g.DeepBlueColor}));break}case h.StrokePropertyName:case p.IconPropertyName:!r&&(s.properties[e]=Object.assign(Object.assign({},n),{color:g.DeepBlueColor}));break;case d.TextFormatExPropertyName:o!==d.TextFormatExPropertyName||(null===(t=i[u.FillPropertyName])||void 0===t?void 0:t.disabled)?!r&&(s.properties[e]=Object.assign(Object.assign({},n),{color:g.DeepBlueColor})):!r&&(s.properties[e]=Object.assign(Object.assign({},n),{color:g.WhiteColor}))}}),null===(o=t.components)||void 0===o||o.forEach(t=>e(t,n))}(e,t)),e[0].selected=!0,e},t.updateCompDataBaseOnContainer=function(e,t){const n=e.flip;((null==n?void 0:n.horizontal)||(null==n?void 0:n.vertical))&&R(t,e,{horizontal:!!(null==n?void 0:n.horizontal),vertical:!!(null==n?void 0:n.vertical)})},t.getSelectionFrameTypeByConstraint=function(e){return e===_.SizeMode.custom?m.default.box:e===_.SizeMode.ratio?m.default.corner:e===_.SizeMode.horizontal?m.default.leftMiddle_to_rightMiddle:e===_.SizeMode.vertical?m.default.topMiddle_to_bottomMiddle:e===_.SizeMode.none?m.default.none:m.default.box},t.flattComps=e=>{const t=[],n=e=>{t.push(...e),e.forEach(e=>{e instanceof y.UIContainerComponent&&n(e.components)})};return n([e]),t},t.getCompChangeByNewPosition=function(e,t){const{width:n,height:o}=e.getViewBoundsInParent(),i=P.getCenter(t,{height:o,width:n},0),r=a.getRoundedPositionOfPoint(P.getNWPoint(i,e.size,0));return e.isLayoutCenterAtHorizontal&&(r.x=e.position.x),e.isLayoutMiddleAtVertical&&(r.y=e.position.y),{id:e.id,type:C.ComponentChangeType.Edit,position:r,size:e.size,rotate:e.rotate}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GUID=t.getNewID=t.setSeed=t.getRandomSeed=void 0;let o=0,i=r();function r(){return Math.round(1e6*Math.random()).toString(36)}t.getRandomSeed=r,t.setSeed=function(e){i=e},t.getNewID=function(){return o++,`${i}-${o.toString(32)}`},t.GUID=function(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCommonComponent=void 0;const o=n(38);t.makeCommonComponent=(e,t,n)=>Object.assign({_id:e,type:t,connectors:[],layout:{responsive:!1,auto:!0,fixedWidth:!1,fixedHeight:!1,horizontal:o.HorizontalAlign.Auto,vertical:o.VerticalAlign.Auto},properties:{},interaction:{},size:{width:0,height:0},position:{x:0,y:0},v:0,states:{}},n,{_id:e})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FillPropertyName=t.FillType=void 0,function(e){e.solid="solid",e.linear="linear",e.radial="radial"}(t.FillType||(t.FillType={})),t.FillPropertyName="fill"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={VK_A:65,VK_B:66,VK_C:67,VK_D:68,VK_E:69,VK_F:70,VK_G:71,VK_H:72,VK_I:73,VK_J:74,VK_K:75,VK_L:76,VK_M:77,VK_N:78,VK_O:79,VK_P:80,VK_Q:81,VK_R:82,VK_S:83,VK_T:84,VK_U:85,VK_V:86,VK_W:87,VK_X:88,VK_Y:89,VK_Z:90,VK_0:48,VK_1:49,VK_2:50,VK_3:51,VK_4:52,VK_5:53,VK_6:54,VK_7:55,VK_8:56,VK_9:57,VK_NUM_0:96,VK_NUM_1:97,VK_NUM_2:98,VK_NUM_3:99,VK_NUM_4:100,VK_NUM_5:101,VK_NUM_6:102,VK_NUM_7:103,VK_NUM_8:104,VK_NUM_9:105,VK_NUM_STAR:106,VK_NUM_PLUS:107,VK_NUM_PLUS_FF:61,VK_NUM_ENTER:108,VK_NUM_SUBTRACT:109,VK_NUM_SUBTRACT_FF:173,VK_NUM_DOT:110,VK_NUM_DIVIDE:111,VK_F1:112,VK_F2:113,VK_F3:114,VK_F4:115,VK_F5:116,VK_F6:117,VK_F7:118,VK_F8:119,VK_F9:120,VK_F10:121,VK_F11:122,VK_F12:123,VK_BACKSPACE:8,VK_TAB:9,VK_CLEAR:12,VK_ENTER:13,VK_SHIFT:16,VK_CTRL:17,VK_ALT:18,VK_CAPE_LOCK:20,VK_ESCAPE:27,VK_SPACE:32,VK_PAGE_UP:33,VK_PAGE_DOWN:34,VK_END:35,VK_HOME:36,VK_LEFT:37,VK_UP:38,VK_RIGHT:39,VK_DOWN:40,VK_INSERT:45,VK_DEL:46,VK_NUM_LOCK:144,VK_SEMICOLON:186,VK_EQUAL:187,VK_COMMA:188,VK_SUBTRACT:189,VK_DOT:190,VK_DIVIDE:191,VK_WAVE:192,VK_LEFT_SQUARE_BRACKET:219,VK_SLASH:220,VK_RIGHT_SQUARE_BRACKET:221,VK_QUOTATION:222}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLineValueByZoom=t.getOffsetByNewSizeAndFixPoint=t.getResizeListLayout=t.getResizeMySelfLayout=t.getResizeResultByParentChange=t.getCompSizeChangeByOffSet=t.getAdjustedZeroOffset=t.clearCompDynamicInfo=t.setCompData=t.setCompDynamicInfo=t.getSuchChild=t.addLayoutToBackup=t.getBackupAllCompsLayout=t.getChildLayout=t.getDoByCompDynamicInfo=t.getCompUpperComponents=t.getCompChildrenWithoutGroupContainer=t.getCompAndItsChildren=t.getResizeSingLinePatch=t.extractDynamicInfoFromPatch=t.getCompInitialStatusForResize=t.getCompAndChildrenInitialStatusForResize=t.getLineSelectionFrameType=t.isDragStartOrEndPoint=t.getMinSizeOfComp=t.getAllPointsByDraggingPoint=t.getAllPointsByCornerPoint=t.getOffsetBySizeChange=t.getMinMaxXY=t.getAdjustedDiffAvoidReverse=t.responsiveFixedHeightStrategy=t.responsiveFixedWidthStrategy=t.getNewPositionWhenCenter=t.updateSizeAsLockedRatio=t.updateUnChangedComponentsPatches=t.updateEditComponentsPatches=t.EditType=t.ComponentChangeType=void 0;const o=n(6),i=n(127),r=n(24),s=n(24),a=n(7),l=n(112),c=n(99),u=n(15),d=n(10),h=n(38),p=n(150),f=n(1114),m=n(1115),g=n(19),y=n(52),v=n(111),b=n(25),_=n(33),w=n(135),C=n(11),x=n(5),S=n(5),k=n(13),P=n(82),T=n(93);var M;function A(e,t,n){if(n){const n=Math.abs(t.width-e.width),o=Math.abs(t.height-e.height);let i=n>.9,r=o>.9;if(i&&r){o-n>3?i=!1:r=!1}const s=e.width/e.height;return i?t.height=t.width/s:r&&(t.width=t.height*s),t}return t}function O(e,t,n,o,r){let s={x:e.x,y:e.y};const{before:l,after:c}=r.container;switch(o.horizontal){case h.HorizontalAlign.Left:s.x=e.x+n.left;break;case h.HorizontalAlign.Right:s.x=e.x+n.right;break;case h.HorizontalAlign.LeftAndRight:i.ok(!1,"组件不能既固定宽度,又两边都锚定.");break;case h.HorizontalAlign.Auto:a.isEqual0(l.size.width-t.width)?s.x=e.x+n.left+n.right:s.x=(e.x-l.position.x)/(l.size.width-t.width)*(c.size.width-t.width)+c.position.x;break;case h.HorizontalAlign.Center:s.x=c.position.x+c.size.width/2-t.width/2;break;default:i.ok(!1,"不该有这种情况")}return s}function E(e,t,n,o,r){let s={x:e.x,y:e.y};const{before:l,after:c}=r.container;switch(o.vertical){case h.VerticalAlign.Top:s.y=e.y+n.top;break;case h.VerticalAlign.Bottom:s.y=e.y+n.bottom;break;case h.VerticalAlign.TopAndBottom:i.ok(!1,"组件不能既固定宽度,又两边都锚定.");break;case h.VerticalAlign.Auto:a.isEqual0(e.y-l.position.y)?s.y=e.y+n.top+n.bottom:s.y=(e.y-l.position.y)/(l.size.height-t.height)*(c.size.height-t.height)+c.position.y;break;case h.VerticalAlign.Middle:s.y=c.position.y+c.size.height/2-t.height/2;break;default:i.ok(!1,"不该有这种情况")}return s}function D(e){return e.reduce((e,t)=>({minX:t.xe.maxX?t.x:e.maxX,maxY:t.y>e.maxY?t.y:e.maxY}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0})}function I(e){switch(e.type){case x.CLine:return{width:f.MinSizeOfLine,height:f.MinSizeOfLine};case x.CPath:return{width:f.MinSizeOfPath,height:f.MinSizeOfPath};case x.CTable:return w.getTableMinSizeFromValue(e.value);default:return{width:f.MinSizeOfNormalComp,height:f.MinSizeOfNormalComp}}}function L(e){const{id:t,position:n,size:o}=e;return{id:t,position:n,positionPath:e.getCurrentPositionPath(),size:o,sizePath:e.getCurrentSizePath(),value:e.value,valuePath:[x.CCompoundPath,x.CPath].includes(e.type)?"/value":e.getCurrentPropertiesPath("/value")}}function N(e,t,n,o){let i=[];return e.forEach(e=>{if((!e.hidden||e.hidden&&!o)&&i.push(e),(!e.hidden||!o)&&e.components){const r=e instanceof k.UISymbolComponent&&!e.isGroup;if(t&&r)return;if(n&&e.isSealed)return;i=i.concat(N(e.components,t,n,o))}}),i}!function(e){e.Edit="edit",e.Add="added",e.Removed="removed"}(M=t.ComponentChangeType||(t.ComponentChangeType={})),function(e){e.move="move",e.resize="resize",e.rotate="rotate"}(t.EditType||(t.EditType={})),t.updateEditComponentsPatches=function(e,t,n,i){t.filter(e=>e.type===M.Edit).forEach(t=>{var r;const l=[],h=[],{id:p,value:f,position:m,specialSetting:y,rotate:v,size:b}=t,w=e.find(e=>p===e.id);if(!w)return;const S=null==y?void 0:y.isResizeSingleLine,{x:k,y:P}=w.position,T=m.x-n.x,M=m.y-n.y,{size:A,states:O,fixContent:E,autoSize:D}=w,I=a.notSameNumber(A.width,b.width)||a.notSameNumber(A.height,b.height),L={x:a.notSameNumber(k,T)?T:k,y:a.notSameNumber(P,M)?M:P};if(!o.isEqual(w.position,L)){const e=w.getCurrentPositionPath();l.push(d.Ops.replace(e,L)),h.push(d.Ops.replace(e,w.position))}if(w.rotate!==v){const e=w.getCurrentRotatePath();l.push(d.Ops.replace(e,v)),h.push(d.Ops.replace(e,w.rotate))}if(!w.isGroup&&I){const e=w.currentStateID,n=[x.CText,x.CPureText].includes(w.type)&&Boolean(e),i=w.getCurrentSizePath(n);if(l.push(d.Ops.replace(""+i,Object.assign(Object.assign({},A),b))),h.push(d.Ops.replace(""+i,A)),e&&e!==g.PredefinedStates.normal&&!w.states[e]){const t="/states/"+e;l.unshift(d.Ops.add(t,{properties:{},disabled:!1})),h.push(d.Ops.remove(t))}E&&D&&Object.keys(O).forEach(e=>{var n;const i=O[e],r=null===(n=i.properties)||void 0===n?void 0:n.textFormat;if(e!==w.currentStateID){const n=C.StyleHelper.initCSSStyleParser(r&&i.properties||w.$data.properties),s=u.measureTextSize(n.getTextStyle(),""+(t.value||w.value),{wrap:null==r?void 0:r.wrap,isMultiText:!0}),a=i.size||A;o.isEqual(s,a)||(w.states[e]?l.push(d.Ops.add(`/states/${e}/size`,s)):l.push(d.Ops.add("/states/"+e,{size:s,disabled:!1})),h.push(d.Ops.replace(`/states/${e}/size`,a)))}})}const N=s.initBoundsWithPositionAndSize(m,b),j=w.type;if(S&&f){const e=w.value;if(!o.isEqual(f,e)){let t;t=c.enumToArray(g.PredefinedStates).includes(w.currentStateID)?"/value":w.getCurrentPropertiesPath("/value"),l.push(d.Ops.replace(""+t,f)),h.push(d.Ops.replace(""+t,e))}}if(!S&&!w.isContainer||[x.CCompoundPath,x.CTable].includes(j)){const e=w.updateValueOrPropertiesWithBoundsChanged(N);if(e){const t=w.id;e.do[t].forEach(e=>{l.push(e)}),e.undo[t].forEach(e=>{h.push(e)})}}if(l.length>0){const e=i.do[p],t=i.undo[p];i.do[p]=e?[...e,...l]:l,i.undo[p]=t?[...t,...h]:h}if(j===x.CCompoundPath){const e=w.size,t={x:N.width/(e.width||1),y:N.height/(e.height||1)};w.updateChildrenOfCompoundPathByZoom(t,i)}if(j===x.CTable){const e=null===(r=l.find(e=>/value$/.test(e.path)))||void 0===r?void 0:r.value;if(e&&(I||t.value)){const t=w.updateTextCompSize(e);t&&_.coverPatches(i,t)}}const R=w.updateRadialGradientPatchesWithNewSize(N);_.coverPatches(i,R)})},t.updateUnChangedComponentsPatches=function(e,t,n){e.forEach(e=>{if(e.isConnector)return;const o=[],i=[],r=e.position,s={x:r.x-t.x,y:r.y-t.y};if(t.x||t.y){const t=e.getCurrentPositionPath();o.push(d.Ops.replace(t,s)),i.push(d.Ops.replace(t,e.position))}o.length>0&&(n.do[e.id]=o,n.undo[e.id]=i)})},t.updateSizeAsLockedRatio=A,t.getNewPositionWhenCenter=function(e,t,n,o,i){const r=y.getCenter({x:0,y:0},o),s=y.getNWPoint(r,n,0);let a={x:t.x,y:t.y};return(e instanceof k.UIComponent&&e.isLayoutMiddleAtVertical||(null==i?void 0:i.isLayoutMiddleAtVertical))&&(a.y=s.y),(e instanceof k.UIComponent&&e.isLayoutCenterAtHorizontal||(null==i?void 0:i.isLayoutCenterAtHorizontal))&&(a.x=s.x),a},t.responsiveFixedWidthStrategy=O,t.responsiveFixedHeightStrategy=E,t.getAdjustedDiffAvoidReverse=function(e,t,n,o,i){const r=[p.SelectionPoints.rightTop,p.SelectionPoints.rightBottom,p.SelectionPoints.rightMiddle].includes(e),s=[p.SelectionPoints.leftTop,p.SelectionPoints.leftBottom,p.SelectionPoints.leftMiddle].includes(e),a=[p.SelectionPoints.leftTop,p.SelectionPoints.topMiddle,p.SelectionPoints.rightTop].includes(e),l=[p.SelectionPoints.rightBottom,p.SelectionPoints.bottomMiddle,p.SelectionPoints.leftBottom].includes(e);let c=b.mapVectorToTargetCoordinates({x:t.x,y:t.y},-i);const u=n.width-o.width,d=n.height-o.height;return r&&-c.x>u&&(c.x=-u),s&&c.x>u&&(c.x=u),a&&c.y>d&&(c.y=d),l&&-c.y>=d&&(c.y=-d),b.mapVectorToTargetCoordinates(c,i)},t.getMinMaxXY=D,t.getOffsetBySizeChange=function(e,t){const{height:n,width:o}=e,{height:i,width:r}=t;return{left:0,right:r-o,top:0,bottom:i-n}},t.getAllPointsByCornerPoint=function(e){const t=e.map((t,n)=>{const o=e[(n+1)%4];return{x:(o.x+t.x)/2,y:(o.y+t.y)/2}});return e.concat(t)},t.getAllPointsByDraggingPoint=function(e){const{originalPoints:t,dragIndex:n,newPoint:o,isWidthHeightBothChange:i,resizingCenterAnchorComp:r,rotateAngle:s}=e;return y.dragResizePoint(t,n,o,i,s,r)},t.getMinSizeOfComp=I,t.isDragStartOrEndPoint=function(e,t,n){const{value:o,size:i}=e;let{startPoint:r,endPoint:a}=o;r=r||{x:0,y:0},a=a||{x:i.width,y:i.height};const l=b.tansPointInArtBoardToGroup(t,e.parent),c=l[n],{minX:u,minY:d}=D(l),h={x:c.x-u,y:c.y-d};return{isDraggingStartPoint:s.isEqualPoint(h,r,.5),isDraggingEndPoint:s.isEqualPoint(h,a,.5)}},t.getLineSelectionFrameType=function(e){const t=e.value;if(t){const n=e.size,{startPoint:o,endPoint:i}=t,r=o||{x:0,y:0},s=i||{x:n.width,y:n.height};return(r.y-s.y)/(r.x-s.x)>0?p.default.leftTop_to_rightBottom:p.default.leftBottom_to_rightTop}return p.default.leftTop_to_rightBottom},t.getCompAndChildrenInitialStatusForResize=function e(t){let n=[];return t.forEach(t=>{n.push(L(t)),t instanceof k.UIContainerComponent&&t.components&&(n=n.concat(e(t.components)))}),n},t.getCompInitialStatusForResize=L,t.extractDynamicInfoFromPatch=function(e,t){return Object.entries(e.do).reduce((e,[n,o])=>{let i={editType:t};return o.forEach(e=>{const t=e.value;if(e.path.includes("size")&&!i.size&&(i.size=t),e.path.includes("position")&&(i.position=t),e.path.includes("value")&&(i.value=t),e.path.includes("rotate")&&(i.rotate=t),e.path.includes("properties")){const n=e.path.replace("properties","").replace(/\//g,"").replace(".","").replace(/\//g,"");i.properties=n?{[n]:t}:t}e.path.includes("autoSize")&&(i.autoSize=t)}),e[n]=i,e},{})},t.getResizeSingLinePatch=function(e,t,n){var o;const i=e,{startPoint:r,endPoint:s}=i.value,{newPoints:c,dragIndex:u,dragStartOrEndPointInfo:d}=n,{isDraggingStartPoint:h}=d,p=b.tansPointInArtBoardToGroup(c,e.parent),f=b.tansPointInArtBoardToGroup(t,e.parent),{minX:m,minY:g,maxX:y,maxY:v}=D(p);let _=r,w=s;const C={height:v-g,width:y-m,lockedRatio:e.lockedRatio},x={0:2,1:3,2:0,3:1},S=x[u],k=Object.assign({},f[S]),P=p.findIndex(e=>a.isMoreOrLess(e.x,k.x,.5)&&a.isMoreOrLess(e.y,k.y,.5)),T=a.depthClone(Object.assign({},p[x[P]]));k.x-=m,k.y-=g,T.x-=m,T.y-=g,a.isMoreOrLess(k.x,T.x,.5)&&(T.x=k.x),a.isMoreOrLess(k.y,T.y,.5)&&(T.y=k.y),h?(_=T,w=k):(_=k,w=T);const A=e=>{e.x%1>.7?e.x=Math.ceil(e.x):e.x%1<.3?e.x=Math.floor(e.x):e.x=Math.floor(e.x)+.5,e.y%1>.7?e.y=Math.ceil(e.y):e.y%1<.3?e.y=Math.floor(e.y):e.y=Math.floor(e.y)+.5};A(_),A(w);const O={startPoint:_,endPoint:w},E=l.getOffsetByPoints(f,p,0),I=e.position,L={x:a.round(I.x+E.left),y:a.round(I.y+E.top)},N={id:e.id,type:M.Edit,position:L,size:C,rotate:e.rotate,value:O,specialSetting:{isResizeSingleLine:!0}};return(null===(o=i.parent)||void 0===o?void 0:o.getPositionPatchesOfChildrenChanged([N],!0)).patches},t.getCompAndItsChildren=N,t.getCompChildrenWithoutGroupContainer=function e(t){let n=[];return t.components.forEach(t=>{t.isGroup?n=n.concat(e(t)):n.push(t)}),n},t.getCompUpperComponents=function e(t){let n=[];return t.forEach(t=>{let o=t.parent;o&&!o.isArtboard&&(n.push(o),n=n.concat(o.components.filter(e=>e.id!==t.id)),n=n.concat(e([o])))}),n};const j=e=>![x.CPath,x.CCompoundPath].includes(e);function R(e){const t=v.collectComponentsLayout(e.components,r.createBoundsBySize(e.size));return e.components.forEach(e=>{if(e instanceof k.UIContainerComponent){const n=R(e);e.components.forEach(e=>{const o=n.get(e);o&&t.set(e,o)})}}),t}function z(e,t,n){t.forEach(t=>{const o=n.get(t);o&&e.set(t,o)})}function B(e){return o.mapValues(e,e=>a.sameNumber(e,0)?0:e)}t.getDoByCompDynamicInfo=function(e,t=!0){let n={},i={};return N(e,!0).forEach(e=>{var r;const s=e.id;if(!i[s]){const r=e.currentState.position||e.toJSON().position,l=e.currentState.size||e.toJSON().size,c=e.currentState.value||e.toJSON().value,u=e.properties,{dynamicInfo:{position:h,size:p,value:f,properties:m,autoSize:g}}=e;if(h&&!o.isEqual(r,h)){const o=e.getCurrentPositionPath();e.rotate&&0!==e.rotate&&(t=!1);const i=t&&j(e.type)?{x:a.round(h.x),y:a.round(h.y)}:h;(n[e.id]||(n[e.id]=[])).push(d.Ops.replace(o,i))}if(p){if(a.notSameNumber(l.width,p.width)||a.notSameNumber(l.height,p.height)){const i=[x.CText,x.CPureText].includes(e.type)&&Boolean(e.currentStateID),r=e.getCurrentSizePath(i),s=t&&j(e.type)?o.mapValues(p,e=>a.round(e)):p;(n[e.id]||(n[e.id]=[])).push(d.Ops.replace(""+r,Object.assign(Object.assign({},l),s))),e instanceof k.UISymbolComponent&&(n[e.id]||(n[e.id]=[])).push(d.Ops.replace("/sizeVersion",Math.min(e.sizeVersion+1,e.symbolSizeVersion+1)))}}if(f&&!e.isRefValue()){if(!o.isEqual(f,c)){const t=[x.CCompoundPath,x.CPath].includes(e.type)||e.type===x.CPath?"/value":e.getCurrentPropertiesPath("/value");(n[e.id]||(n[e.id]=[])).push(d.Ops.replace(""+t,f))}}if(null==m?void 0:m.fill){if(!o.isEqual(m.fill,u.fill)){const t=e.getCurrentPropertiesPath("properties/fill");(n[e.id]||(n[e.id]=[])).push(d.Ops.replace(""+t,m.fill))}}if(null==m?void 0:m.cell){const t=(e.currentState.properties||e.toJSON().properties).cell;if(!o.isEqual(m.cell,t)){const t=e.getCurrentPropertiesPath("properties/cell");(n[e.id]||(n[e.id]=[])).push(d.Ops.replace(""+t,m.cell))}}if(void 0!==g){if(!o.isEqual(g,e.$data.autoSize)){const t="./autoSize";(n[e.id]||(n[e.id]=[])).push(d.Ops.replace(""+t,g))}}i[s]=!0}if(null===(r=n[e.id])||void 0===r?void 0:r.length){const t=e.currentStateID;t&&!e.states[t]&&n[e.id].unshift(d.Ops.add("/states/"+t,{disabled:!1,properties:{}}))}}),n},t.getChildLayout=R,t.getBackupAllCompsLayout=function(e){const t=T.getViewBoundsOfComponents(e);let n=v.collectComponentsLayout(e,t);const o=N(e);return e.forEach(e=>{if(e instanceof k.UIContainerComponent){const t=v.collectComponentsLayout(e.components,r.createBoundsBySize(e.size));z(n,o,t),e.components.forEach(e=>{if(e.isContainer){const t=R(e);z(n,o,t)}})}}),n},t.addLayoutToBackup=z,t.getSuchChild=function e(t,n,o=!0){const i=t.components;let r=[];return o?null==i||i.forEach(t=>{var i;(null===(i=t.components)||void 0===i?void 0:i.length)?r=r.concat(e(t,n,o)):n(t)&&r.push(t)}):null==i||i.forEach(e=>{n(e)&&r.push(e)}),r},t.setCompDynamicInfo=function(e,t){e.forEach(e=>{t[e.id]&&(e.dynamicInfo=Object.assign({position:e.position,size:e.size,value:e.currentState.value,autoSize:e.autoSize,properties:e.properties},t[e.id]))})},t.setCompData=function(e,t){e.forEach(e=>{const n=t[e.id];if(n){const{position:t,size:o,value:i}=n,r=e.toJSON();t&&(r.position=t),o&&(r.size=o),i&&(r.value=i)}})},t.clearCompDynamicInfo=function(e){e.forEach(e=>{e.dynamicInfo={},e.initialResizeInfo={}})},t.getAdjustedZeroOffset=B,t.getCompSizeChangeByOffSet=function(e,t){let n,o,i=B(e);o=-i.top+i.bottom,n=-i.left+i.right;const{horizontal:r,vertical:s}=t.centerLayoutInfo;return(r||t.rotate&&s)&&(n=-i.left+i.right),(s||t.rotate&&r)&&(o=-i.top+i.bottom),{heightChange:o,widthChange:n}},t.getResizeResultByParentChange=function(e,t,n,o){const r=e.size,s=e.size,l=e.position,c=P.makeUIComponent(e);let u={x:l.x,y:l.y},d={width:r.width,height:r.height},p=o.shift;p=!e.layout.responsive||o.shift;const{before:f,after:m,isResponsive:g}=o.container;if(p){const i=o.scale.h,s=o.scale.v;let a={width:r.width*i,height:r.height*s};return a=A(r,a,!g&&o.shift&&!e.layout.responsive||!!r.lockedRatio),u={x:m.position.x+(l.x-f.position.x)*i,y:m.position.y+(l.y-f.position.y)*s},a=c.adjustZeroSize(a),c.updateSizeWhenResizeText(a,r),e.layout.responsive&&!e.layout.auto&&(n.fixedHeight&&(a.height=r.height,u.y=E(l,r,t,n,o).y),n.fixedWidth&&(a.width=r.width,u.x=O(l,r,t,n,o).x)),{position:u,size:a,rotate:e.rotate||0}}const v=c.rotate;let _=c.getBoxPointsInParent()[0];if(n.fixedWidth)switch(n.horizontal){case h.HorizontalAlign.Left:u.x=l.x+t.left;break;case h.HorizontalAlign.Right:u.x=l.x+t.right;break;case h.HorizontalAlign.LeftAndRight:i.ok(!1,"组件不能既固定宽度,又两边都锚定.");break;case h.HorizontalAlign.Auto:a.isEqual0(f.size.width-r.width)?u.x=l.x+t.left+t.right:(c.initialResizeInfo.xDistributionRatio||(c.initialResizeInfo.xDistributionRatio=(l.x-f.position.x)/(f.size.width-r.width)),u.x=c.initialResizeInfo.xDistributionRatio*(m.size.width-r.width)+m.position.x);break;case h.HorizontalAlign.Center:u.x=m.position.x+m.size.width/2-r.width/2;break;default:i.ok(!1,"不该有这种情况")}else switch(n.horizontal){case h.HorizontalAlign.Auto:u.x=m.position.x+(l.x-f.position.x)*o.scale.h,d.width=r.width*o.scale.h,_.x=y.getNWPoint(y.getCenter(u,d,0),d,e.rotate||0).x;break;case h.HorizontalAlign.Center:d.width=r.width*o.scale.h,u.x=m.position.x+m.size.width/2-d.width/2;break;case h.HorizontalAlign.Right:{d.width=r.width*o.scale.h;const n=f.size.width-l.x-r.width;u.x=m.size.width-d.width-n+t.left,a.notSameNumber(t.right,0)&&(_.x=y.getNWPoint(y.getCenter(u,d,0),d,e.rotate||0).x);break}case h.HorizontalAlign.LeftAndRight:{d.width=Math.max(I(c).width,r.width+t.right-t.left);const e=b.mapVectorToTargetCoordinates({x:t.left,y:0},c.rotate);c.rotate?a.notSameNumber(t.left,0)&&(_.x+=e.x,_.y+=e.y):(c.initialResizeInfo.right||(c.initialResizeInfo.right=f.size.width-l.x-r.width),u.x=l.x+t.left,c.type===S.CPath&&0===s.width&&(d.width=0));break}default:0!==t.left&&(u.x=l.x+t.left),t.right-t.left!=0&&(d.width=r.width*o.scale.h),a.notSameNumber(t.left,0)&&(_.x=y.getNWPoint(y.getCenter(u,d,0),d,c.rotate).x)}if(n.fixedHeight)switch(n.vertical){case h.VerticalAlign.Top:u.y=l.y+t.top;break;case h.VerticalAlign.Bottom:u.y=l.y+t.bottom;break;case h.VerticalAlign.TopAndBottom:i.ok(!1,"组件不能既固定宽度,又两边都锚定.");break;case h.VerticalAlign.Auto:a.isEqual0(f.size.height-r.height)?u.y=l.y+t.top+t.bottom:(c.initialResizeInfo.yDistributionRatio||(c.initialResizeInfo.yDistributionRatio=(l.y-f.position.y)/(f.size.height-r.height)),u.y=c.initialResizeInfo.yDistributionRatio*(m.size.height-r.height)+m.position.y,_.y=y.getNWPoint(y.getCenter(u,d,0),d,c.rotate).y);break;case h.VerticalAlign.Middle:u.y=m.position.y+m.size.height/2-r.height/2;break;default:i.ok(!1,"不该有这种情况")}else switch(n.vertical){case h.VerticalAlign.Auto:u.y=m.position.y+(l.y-f.position.y)*o.scale.v,d.height=r.height*o.scale.v,_.y=y.getNWPoint(y.getCenter(u,d,0),d,c.rotate).y;break;case h.VerticalAlign.Middle:u.y=m.position.y+m.size.height/2-d.height/2,d.height=r.height*o.scale.v;break;case h.VerticalAlign.TopAndBottom:{d.height=Math.max(I(c).height,r.height+t.bottom-t.top);const e=b.mapVectorToTargetCoordinates({x:0,y:t.top},c.rotate);c.type===S.CPath&&0===s.height&&(d.height=0),c.rotate?t.top&&(_.y+=e.y,_.x+=e.x):u.y=l.y+t.top;break}case h.VerticalAlign.Bottom:{d.height=r.height*o.scale.v;const e=f.size.height-l.y-r.height;u.y=m.size.height-d.height-e+t.top,_=y.getNWPoint(y.getCenter(u,d,0),d,c.rotate);break}default:0!==t.top&&(u.y=l.y+t.top),t.bottom-t.top!=0&&(d.height=r.height*o.scale.v)}d=c.adjustZeroSize(d),c.updateSizeWhenResizeText(d,r),d=A(r,d,c.lockedRatio);const w=a.notSameNumber(d.height,r.height)||a.notSameNumber(d.width,r.width);return c.rotate&&w&&(u=y.getNWPoint(y.getCenter(_,d,c.rotate),d,0)),{position:{x:u.x,y:u.y},size:d,rotate:v}},t.getResizeMySelfLayout=function(){return{horizontal:h.HorizontalAlign.LeftAndRight,vertical:h.VerticalAlign.TopAndBottom,fixedHeight:!1,fixedWidth:!1}},t.getResizeListLayout=function(e,t,n,o={shift:!1}){const i=t,r={do:{},undo:{}},s=e.getCoordinateOffset(n),{layout:l,cell:c}=e.properties,{left:u,right:d}=e.padding,{shift:h}=o;if("vertical"===l.direction)if(c.ratioHeight){const o=e.components.map((o,c)=>{let u,d=a.depthClone(i);const p=e.components.length,f=((null==l?void 0:l.verticalGap)||0)*(p-1);u=(n.size.height-f)/p-o.size.height,a.isNotEqual0(t.bottom)&&(d.bottom=u),a.isNotEqual0(t.top)&&(d.top=-u);const m=o.resizeMySelf(d,h);return m.patches&&_.coverPatches(r,m.patches),(a.isNotEqual0(t.top)||a.isNotEqual0(t.bottom))&&(m.position={x:o.position.x,y:o.position.y+u*c+t.top}),{id:o.id,type:M.Edit,position:{x:m.position.x+s.x,y:m.position.y+s.y},size:m.size,rotate:m.rotate}}),c=e.getPositionPatchesOfChildrenChanged(o,!1);c.patches&&_.coverPatches(r,c.patches)}else{const t=e.components.map(e=>{const t=Object.assign(Object.assign({},i),{top:0,bottom:0}),n=e.resizeMySelf(t,h);n.patches&&_.coverPatches(r,n.patches),(a.isNotEqual0(i.top)||a.isNotEqual0(i.left))&&(n.position={x:e.position.x+i.left,y:e.position.y+i.top});const o={x:n.position.x+s.x,y:n.position.y+s.y};return{id:e.id,type:M.Edit,position:o,size:n.size,rotate:n.rotate}}),n=e.getPositionPatchesOfChildrenChanged(t,!1);n.patches&&_.coverPatches(r,n.patches)}else if(c.ratioWidth){const t={x:0,width:u};let o=0;const c=e.components.length,p=l&&l.horizontalGap||0,f=p*(c-1),m=(n.size.width-f-u-d)/c,g=m%1,y=m-g,v=e.components.map((e,n)=>{let l=y-e.size.width;o+=g,o>=1&&(o-=1,l+=1);let c=a.depthClone(i);a.isNotEqual0(i.right)&&(c.right=l),a.isNotEqual0(i.left)&&(c.left=-l),a.isNotEqual0(i.left)&&a.isNotEqual0(i.right)&&(c.left=0,c.right=l);const{position:u,size:d,rotate:f,patches:m}=e.resizeMySelf(c,h);return m&&_.coverPatches(r,m),u.x=t.x+t.width+(0===n?0:p),t.x=u.x,t.width=d.width,{id:e.id,type:M.Edit,position:{x:u.x,y:u.y+s.y},size:d,rotate:f}}),b=e.getPositionPatchesOfChildrenChanged(v,!1);b.patches&&_.coverPatches(r,b.patches)}else{const n=e.components.map(e=>{const n={left:0,right:0,top:t.top,bottom:t.bottom},o=e.resizeMySelf(n,h);return o.patches&&_.coverPatches(r,o.patches),a.isNotEqual0(i.left)&&(o.position={x:o.position.x+i.left,y:o.position.y}),{id:e.id,type:M.Edit,position:{x:o.position.x+s.x,y:o.position.y+s.y},size:o.size,rotate:o.rotate}}),o=e.getPositionPatchesOfChildrenChanged(n,!1);o.patches&&_.coverPatches(r,o.patches)}return r},t.getOffsetByNewSizeAndFixPoint=function(e,t,n,o,i){let r=t,s=e;if(1===o.length&&i){const e=o[0],n=e.getViewBoundsInParent();s={height:n.height,width:n.width},r=b.getBoundsInParent({size:t,rotate:e.rotate,position:e.position})}const a=r.width-s.width,l=r.height-s.height,c=-Math.floor(a/2),u=Math.ceil(a/2),d=-Math.floor(l/2),h=Math.ceil(l/2);return{[m.TransformOriginType.NW]:{left:0,top:0,right:a,bottom:l},[m.TransformOriginType.NE]:{left:-a,top:0,right:0,bottom:l},[m.TransformOriginType.SE]:{left:-a,top:-l,right:0,bottom:0},[m.TransformOriginType.SW]:{left:0,top:-l,right:a,bottom:0},[m.TransformOriginType.N]:{left:c,top:0,right:u,bottom:l},[m.TransformOriginType.E]:{left:-a,top:d,right:0,bottom:h},[m.TransformOriginType.S]:{left:c,top:-l,right:u,bottom:0},[m.TransformOriginType.W]:{left:0,top:d,right:a,bottom:h},[m.TransformOriginType.MIDDLE]:{left:c,top:d,right:u,bottom:h}}[n]},t.getLineValueByZoom=function(e,t){const{startPoint:n,endPoint:o}=e;return{startPoint:{x:n.x*t.x,y:n.y*t.y},endPoint:{x:o.x*t.x,y:o.y*t.y}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortPatches=t.OperationOrder=t.mergePatches=t.assignPatches=t.coverPatches=t.convertUIOperationToPagePatches=void 0;const o=n(7);t.convertUIOperationToPagePatches=function(e,t){return{[e.ownerArtboardID]:{do:{[e.id]:t.do},undo:{[e.id]:t.undo}}}},t.coverPatches=function(e,t){for(let n in t.do)e.do[n]=e.do[n]?e.do[n].filter(e=>!t.do[n].some(t=>t.path===e.path)):[],e.undo[n]=e.undo[n]?e.undo[n].filter(e=>!t.undo[n].some(t=>t.path===e.path)):[],e.do[n].push(...t.do[n]),e.undo[n].push(...t.undo[n]);return e},t.assignPatches=function(e,t){const{do:n,undo:i}=e,{do:r,undo:s}=t;return o.depthClone({do:Object.assign(Object.assign({},n),r),undo:Object.assign(Object.assign({},i),s)})},t.mergePatches=function(e,t){for(let n in t.do)e.do[n]=e.do[n]?e.do[n].filter(e=>!t.do[n].some(t=>("remove-children"===e.op&&"remove-children"===t.op&&(t.value=[...e.value,...t.value]),"add-children"===e.op&&"add-children"===t.op&&e.path===t.path&&(t.value=[...e.value,...t.value]),t.path===e.path&&t.op===e.op))):[],e.do[n].push(...t.do[n]),e.undo[n]=e.undo[n]?e.undo[n].filter(e=>!t.undo[n].some(t=>("remove-children"===e.op&&"remove-children"===t.op&&(t.value=[...e.value,...t.value]),"add-children"===e.op&&"add-children"===t.op&&e.path===t.path&&(t.value=[...e.value,...t.value]),t.path===e.path&&t.op!==e.op))):[],e.undo[n].push(...t.undo[n]);return e},t.OperationOrder=["remove-children","add-children"].reduce((e,t,n)=>Object.assign(Object.assign({},e),{[t]:n}),{}),t.sortPatches=function(e){for(let n in e.do)e.do[n].sort((e,n)=>t.OperationOrder[e.op]-t.OperationOrder[n.op]),e.undo[n].sort((e,n)=>t.OperationOrder[e.op]-t.OperationOrder[n.op])}},function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t0?i(o(e),9007199254740991):0}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(835)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerticalAlign=t.HorizontalAlign=void 0,function(e){e.Auto="auto",e.Left="left",e.Right="right",e.LeftAndRight="left&right",e.Center="center"}(t.HorizontalAlign||(t.HorizontalAlign={})),function(e){e.Auto="auto",e.Top="top",e.Bottom="bottom",e.TopAndBottom="top&bottom",e.Middle="middle"}(t.VerticalAlign||(t.VerticalAlign={}))},function(e,t,n){e.exports=!n(26)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(16),i=n(300),r=n(84),s=Object.defineProperty;t.f=n(39)?Object.defineProperty:function(e,t,n){if(o(e),t=r(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetPathValueRotate=t.getNewPathPropertiesByScalingTheStrokeAndShadow=t.translateMaskDataOfRect=t.isClosedPathWithArea=t.getAnotherPointBySegType=t.updateSegType=t.getSegType=t.isAllowedSegRadiusEdit=t.getSegsType=t.supportedPathProperties=t.compoundPath=t.getPathItemOfComp=t.onPathValueZoom=t.scalePath=t.transformPathDataToPath=t.calcaulateMaxRadius=t.isSegWithRadius=void 0;const o=n(6),i=n(7),r=n(348),s=n(38),a=n(22),l=n(30),c=n(101),u=n(258),d=n(5),h=n(29),p=n(42),f=n(1303),m=n(27),g=n(202),y=n(446);t.isSegWithRadius=e=>{const{previous:t,next:n,radius:o,handleIn:i,handleOut:r}=e;return!!o&&(!(r&&!r.equals(new f.default.Point(0,0)))&&(!(i&&!i.equals(new f.default.Point(0,0)))&&(!!t&&(!(t.handleOut&&!t.handleOut.equals(new f.default.Point(0,0)))&&(!!n&&!(n.handleIn&&!n.handleIn.equals(new f.default.Point(0,0))))))))},t.calcaulateMaxRadius=(e,t=1)=>{const{previous:n,next:o,point:r}=e;if(!(null==n?void 0:n.point)||!(null==o?void 0:o.point)||!r)return 0;const s=n.point.subtract(r),a=o.point.subtract(r);let l=s.getDistance(new f.default.Point(0,0))/t,c=a.getDistance(new f.default.Point(0,0))/t;const u=i.min(l,c),d=Math.PI-a.getAngleInRadians(s);return[0,Math.PI,-Math.PI].includes(d)?0:u/Math.tan(d/2)};const v=(e,n)=>{var o,i;const{previous:r,next:s}=e;if(!t.isSegWithRadius(e))return!1;if((null===(o=e.previous)||void 0===o?void 0:o.point)&&(null===(i=e.next)||void 0===i?void 0:i.point)){const t=e.previous.point.subtract(e.point),o=e.next.point.subtract(e.point);let i=t.getDistance(new f.default.Point(0,0));!r.radius||r.handleOut&&!r.handleOut.equals(new f.default.Point(0,0))||(i/=2);let a=o.getDistance(new f.default.Point(0,0));!s.radius||s.handleIn&&!s.handleIn.equals(new f.default.Point(0,0))||(a/=2);const l=Math.PI-o.getAngleInRadians(t);if([0,Math.PI,-Math.PI].includes(l))return void(e.radius=void 0);const c=e.radius||0,u=Math.min(c*Math.tan(l/2),i,a),d=u/Math.tan(l/2),h=Math.tan(l/4)*(4/3)*d,p=e.point.add(new f.default.Point(u,0)),m=new f.default.Point(h,0),g=new f.default.Segment(p.clone().rotate(t.angle||0,e.point),void 0,m.clone().rotate((t.angle||0)-180,new f.default.Point(0,0)));g.hidden=!0;const y=new f.default.Segment(p.clone().rotate(o.angle||0,e.point),m.clone().rotate((o.angle||0)-180,new f.default.Point(0,0)),void 0);y.hidden=!0;const v=e.index;n.removeSegment(v),n.insertSegments(v,[g,y])}};t.transformPathDataToPath=e=>{var t;let n="";const o=null===(t=_(e).segments)||void 0===t?void 0:t.map(w);if(o){n=b({data:o,closed:e.closed}).pathData||""}return n},t.scalePath=(e,t,n)=>{const o=e.data.map(e=>{const{point:o,handleIn:r,handleOut:s,radius:a}=e;let l=a;return a&&n&&(l=a*i.min(t.x,t.y)),{point:{x:o.x*t.x,y:o.y*t.y},handleIn:{x:r.x*t.x,y:r.y*t.y},handleOut:{x:s.x*t.x,y:s.y*t.y},radius:l}});return{closed:e.closed,data:o}};const b=e=>{let t=document.getElementById("paperCanvas");t||(t=document.createElement("canvas"),t.id="paperCanvas");const n=new f.default.Path(e.data.map(e=>{const t=new f.default.Segment(new f.default.Point(e.point),new f.default.Point(e.handleIn),new f.default.Point(e.handleOut));return t.radius=e.radius,t}));return n.closed=!!e.closed,n},_=e=>{var n,o;const i=b(e);for(;null===(n=i.segments)||void 0===n?void 0:n.find(e=>t.isSegWithRadius(e));){const e=null===(o=i.segments)||void 0===o?void 0:o.find(e=>t.isSegWithRadius(e));v(e,i)}return i};t.onPathValueZoom=(e,t)=>{if(1===t.x&&1===t.y)return e;const n=e=>({x:e.x*t.x,y:e.y*t.y});return{data:e.data.map(e=>{const{point:t,handleOut:o,handleIn:i,radius:r}=e;return{point:n(t),handleIn:n(i),handleOut:n(o),radius:r}}),closed:e.closed}};t.getPathItemOfComp=(e,n)=>{let o;const i=g.componentToSvgValue(e);if(!i)return new f.default.Path;const{data:r}=i;let s="";return r.forEach(e=>{s+=t.transformPathDataToPath(e)+" "}),o=(e=>f.default.PathItem.create(e))(s),o.rotate(e.rotate||0),n&&o.translate(new f.default.Point(e.position.x-n.x,e.position.y-n.y)),o};const w=e=>{const{point:t,handleOut:n,handleIn:o}=e;return{point:{x:(null==t?void 0:t.x)||0,y:(null==t?void 0:t.y)||0},handleIn:{x:(null==o?void 0:o.x)||0,y:(null==o?void 0:o.y)||0},handleOut:{x:(null==n?void 0:n.x)||0,y:(null==n?void 0:n.y)||0}}};t.compoundPath=(e,n)=>{var l;if(e.length<2)return;const c=e[0],u=e.slice(1,e.length),g=e.map(e=>e.position).reduce((e,t)=>({x:i.min(e.x,t.x),y:i.min(e.y,t.y)}));let y=t.getPathItemOfComp(c,g);y.closePath();let v=[];u.forEach(e=>{const n=t.getPathItemOfComp(e,g);n.closePath(),v.push(n)});const b=[y,...v].filter(e=>i.sameNumber(Math.abs(e.area),0)),_=b.map(e=>e.bounds).filter(e=>null!==e),x=_.length?_.reduce((e,t)=>e.unite(t)):void 0,S=v.reduce((e,t)=>((e,t,n)=>{switch(n){case r.CompoundOperation.Exclude:return e.exclude(t);case r.CompoundOperation.Intersect:return e.intersect(t);case r.CompoundOperation.Subtract:return e.subtract(t);case r.CompoundOperation.Unite:default:return e.unite(t)}})(e,t,n),y),{className:k,bounds:P,closed:T,children:M}=S;let A=P;if([r.CompoundOperation.Unite,r.CompoundOperation.Exclude].includes(n)&&x&&(A=A?A.unite(x):x),!A)return;if(!(null==A?void 0:A.width)||!(null==A?void 0:A.height))return;if(A.width<1||A.height<1)return;S.translate(new f.default.Point(-(A.left||0),-(A.top||0)));const O=[];if("Path"===k){const e={data:[],closed:!1};e.data=(null===(l=S.segments)||void 0===l?void 0:l.map(w))||[],e.closed=!!T,O.push(e)}else"CompoundPath"===k&&O.push(...(null==M?void 0:M.map(e=>{var t;return{data:(null===(t=e.segments)||void 0===t?void 0:t.map(w))||[],closed:!!e.closed}}))||[]);if([r.CompoundOperation.Unite,r.CompoundOperation.Exclude].includes(n)&&b.forEach(e=>{var t;e.translate(new f.default.Point(-((null==A?void 0:A.left)||0),-((null==A?void 0:A.top)||0)));const{className:n,children:o}=e;if("Path"===n){const n={data:[],closed:!1};n.data=(null===(t=e.segments)||void 0===t?void 0:t.map(w))||[],n.closed=!1,O.push(n)}else"CompoundPath"===n&&O.push(...(null==o?void 0:o.map(e=>{var t;return{data:(null===(t=e.segments)||void 0===t?void 0:t.map(w))||[],closed:!1}}))||[])}),!O.length)return;const E=e.map(e=>{const t=i.depthClone(e);return t.position={x:t.position.x-g.x-((null==A?void 0:A.left)||0),y:t.position.y-g.y-((null==A?void 0:A.top)||0)},t.layout={responsive:!0,auto:!1,horizontal:s.HorizontalAlign.LeftAndRight,vertical:s.VerticalAlign.TopAndBottom,fixedHeight:!1,fixedWidth:!1},t._currentState=void 0,t.selected=!1,t.disabled=!1,t}),D=i.depthClone(e[0].properties);Object.keys(D).filter(e=>!C.includes(e)).forEach(e=>delete D[e]);const I=O.find(e=>!e.closed);D.stroke&&I&&(D.stroke.position=a.StrokePosition.center);const L=h.makeCommonComponent(m.getNewID(),d.CCompoundPath,{name:p.getDefaultComponentName(d.CCompoundPath),size:{width:A.width,height:A.height},position:{x:g.x+(A.left||0),y:g.y+(A.top||0)},opacity:o.isUndefined(e[0].opacity)?100:e[0].opacity,properties:Object.assign(Object.assign({},D),{compoundModel:{prop:"enum",componentOperation:n,disabled:!1,hidden:!0}}),components:E,value:O});return delete L.properties.padding,L};const C=[l.FillPropertyName,a.StrokePropertyName,u.ShadowPropertyName];t.supportedPathProperties=[l.FillPropertyName,a.StrokePropertyName,u.ShadowPropertyName,c.LinePropertyName],t.getSegsType=e=>{if(!e.length)return;let n=y.SegType.Straight;for(let o=0;o{const{type:t,handleIn:n,handleOut:o}=e;return t||(e.isSmooth()?i.sameNumber((null==n?void 0:n.length)||0,(null==o?void 0:o.length)||0)?y.SegType.Mirrored:y.SegType.Asymmetric:i.sameNumber((null==n?void 0:n.length)||0,0)&&i.sameNumber((null==o?void 0:o.length)||0,0)?y.SegType.Straight:y.SegType.Disconnected)},t.updateSegType=e=>{const n=t.getSegType(e.clone());switch(n){case y.SegType.Straight:case y.SegType.Disconnected:e.type=n;break;case y.SegType.Mirrored:e.type!==y.SegType.Disconnected&&e.type!==y.SegType.Asymmetric&&(e.type=n);break;case y.SegType.Asymmetric:e.type!==y.SegType.Disconnected&&(e.type=n)}},t.getAnotherPointBySegType=(e,t,n)=>{switch(e){case y.SegType.Straight:case y.SegType.Mirrored:return new f.default.Point(-t.x,-t.y);case y.SegType.Asymmetric:{if(!n)return n;const e=t.angle;return new f.default.Point(n.length||0,0).rotate((e||0)+180,new f.default.Point(0,0))}case y.SegType.Disconnected:default:return n}},t.isClosedPathWithArea=e=>{const{data:t,closed:n}=e;if(!n)return!1;if(t.length<2)return!1;const i=t[0],r=i.point,s=t.find(e=>!o.isEqual(r,e.point));let a;if(s){const e=s.point;a=(e.y-r.y)/(e.x-r.x)}return!(!o.isUndefined(a)&&!t.some(e=>!x(e)||!S(e,i,a)))};const x=e=>o.isEqual(e.handleIn,{x:0,y:0})||o.isEqual(e.handleOut,{x:0,y:0}),S=(e,t,n)=>{const{point:r}=e,{point:s}=t;if(o.isEqual(r,s))return!0;const a=(r.y-s.y)/(r.x-s.x);return!!(i.sameNumber(a,n)||Math.abs(a)===1/0&&Math.abs(n)===1/0)};t.translateMaskDataOfRect=(e,t,n,o)=>{const i=new f.default.Path(e);if(!o)return e;const{left:r,right:s,top:a,bottom:l}=t,c=new f.default.Point(0,0);return r&&!s&&i.scale(o/n.width+1,1,c),!r&&s&&(i.scale(o/n.width+1,1,c),i.translate(new f.default.Point(-o,0))),a&&!l&&i.scale(1,o/n.height+1,c),!a&&l&&(i.scale(1,o/n.height+1,c),i.translate(new f.default.Point(0,-o))),i.pathData||e},t.getNewPathPropertiesByScalingTheStrokeAndShadow=function(e,t){const n=i.depthClone(e),{stroke:o,shadow:r}=n;return o&&(o.dashArray&&(o.dashArray=o.dashArray.map(e=>e*t)),o.thickness&&(o.thickness*=t)),r&&(r.blur&&(r.blur*=t),r.x&&(r.x*=t),r.y&&(r.y*=t)),n},t.resetPathValueRotate=function(e,t,n){var o,i,r,s,a,l;const c=_(e);c.rotate(t);const u=(null===(o=c.bounds)||void 0===o?void 0:o.x)||0,d=(null===(i=c.bounds)||void 0===i?void 0:i.y)||0,h={width:(null===(r=c.bounds)||void 0===r?void 0:r.width)||0,height:(null===(s=c.bounds)||void 0===s?void 0:s.height)||0},p={x:n.x+u,y:n.y+d};return c.translate(new f.default.Point({x:-u,y:-d})),{newValue:{data:null!==(l=null===(a=c.segments)||void 0===a?void 0:a.map(e=>w(e)))&&void 0!==l?l:[],closed:!!c.closed},newSize:h,newPosition:p}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLibDataByShortCut=t.makeComponentByKeyOrType=t.getLibByType=t.getLibByShortCutOrType=t.getLibData=t.getNameForNewComponent=t.getDefaultComponentName=t.getComponentValueEditorInfo=t.getComponentSupportValueEditorType=t.getSealedCompoundComponentLib=t.getComponent=t.makeComponentItem=t.makeVideoComponent=t.makeImageComponent=t.makeComponent=t.ComponentLibs=void 0;const o=n(127),i=n(6),r=n(99),s=n(46),a=n(30),l=n(38),c=n(101),u=n(22),d=n(128),h=n(22),p=n(1),f=n(27),m=n(47),g=n(55),y=n(18),v=n(884),b=n(19),_=n(18),w=n(5),C=n(352),x=n(432),S=n(1236),k=n(1237),P=n(1297),T=n(203),M=n(273);t.ComponentLibs=[C.default,S.default,x.default,P.default,k.default];const A={Rect:w.CRect,Ellipse:w.CEllipse,Icon:w.CIcon,Image:w.CImage,Line:w.CLine,Path:w.CPath,Polygon:w.CPolygon,Text:w.CText,Paragraph:w.CParagraph,Input:w.CInput,Group:w.CGroup,CanvasPanel:w.CCanvasPanel,Frame:w.CFrame,StackPanel:w.CStackPanel,WrapPanel:w.CWrapPanel,GridPanel:w.CGridPanel,ContentPanel:w.CContentPanel,ListLayoutPanel:w.CListLayoutPanel,Select:w.CSelect,Range:w.CSlider,QRCode:w.CQRCode,NumericStep:w.CNumericStep,Arc:w.CArc,PureText:w.CPureText,Symbol:w.CSymbol},O={TextAlign:s.TextAlign,FillType:a.FillType,PredefinedStates:b.PredefinedStates,HorizontalAlign:l.HorizontalAlign,VerticalAlign:l.VerticalAlign,LinePointType:c.LinePointType,StrokeLineCap:u.StrokeLineCap,StrokeLineJoin:u.StrokeLineJoin,TextVerticalAlign:s.VerticalAlign,InputModel:d.InputModel,StrokePosition:h.StrokePosition};function E(e){let t=e;const n=e.match(/@@[a-z\d\.\-\{\s\}]+/gi);n&&n.forEach(e=>{const n=function(e){if("id"===e)return f.getNewID();if("defaultShadow"===e)return m.getDefaultShadow();if("textShadow"===e)return m.getTextShadow();if("defaultStrokeColor"===e)return _.DefaultStrokeColor;if("defaultTextColor"===e)return _.DefaultTextColor;if(e.indexOf(".")>0){const t=e.split("."),[n,i]=t;if(o.equal(t.length,2),O[n])return r.getEnumValue(O[n],i);switch(n){case"SystemColors":return y[i];case"AntDesignColors":return v[i];case"C":return A[i]}}return""}(e.substr(2));n?t=t.replace(e,JSON.stringify(n)):console.warn(`Not supported pattern ${e}.`)});try{return new Function(`return ${t};`)()}catch(e){throw console.log(t),e}}function D(e,t){e.components&&(e.components=e.components.map(e=>D(e,t)));const n=f.getNewID(),o=e._id;t&&o&&(t[o]=n);const i=Object.assign({layout:{vertical:l.VerticalAlign.Auto,horizontal:l.HorizontalAlign.Auto,fixedWidth:!1,fixedHeight:!1,auto:!0,responsive:!0},position:{x:0,y:0},properties:{},interaction:{},size:{width:0,height:0},v:0,states:{}},e,{_id:n});return function(e){const{type:t,size:n,components:o,properties:i}=e;if(t===w.CListLayoutPanel){const{cell:t,layout:r}=i;if(r)if("vertical"===r.direction)if(t){let i=n.height/(null==o?void 0:o.length);t.ratioHeight||(i=t.rowHeight||i);let r=0;null==o||o.forEach(e=>{e.size.height=i,e.position.y=r,r+=i}),e.size.height=i*o.length}else{let e=0;null==o||o.forEach(t=>{t.position.y=e,e+=t.size.height})}else if(t){let i=n.width/(null==o?void 0:o.length);t.ratioWidth||(i=t.columnWidth||i);let r=0;null==o||o.forEach(e=>{e.size.width=i,e.position.x=r,r+=i}),e.size.width=i*o.length}else{let e=0;null==o||o.forEach(t=>{t.position.x=e,e+=t.size.width})}}}(i),i}function I(e,t){if(e.interaction){Object.keys(e.interaction).forEach(n=>{e.interaction[n].actions.forEach(n=>{if("component"===n.type){const o=t[n.target];o?n.target=o:"@self"===n.target&&(n.target=e._id)}})})}e.components&&e.components.forEach(e=>I(e,t))}function L(e,t,n){let o=void 0;if("basic"===e||"container"===e||"fast"===e){const e=C.default.components.find(e=>e.type===t);if(!(null==e?void 0:e.lib)){const e=C.default.make(t);if(m.mergePropertyCacheToComp(e),C.DefaultBasicComponentsSize[t]){const o=C.DefaultBasicComponentsSize[t][n];o&&(e.size=Object.assign(Object.assign({},e.size),o))}return e}o=e}if(o||(o=N({id:e,type:t})),o&&o.template){let i=o.template.trim();(o.isList||t===w.CSelect)&&o.item&&(i=function(e,t){let n=e;const o=/@@ITEM-([a-z\d\-\{\s\}\u4e00-\u9fa5|]*)/gi;let i;for(;null!==(i=o.exec(e));){const e=i[1].split("|"),o=t.replace(/{(\d+)}/g,(t,n)=>void 0===e[n]?t:e[n]);n=n.replace(i[0],o)}return n}(i,o.item));const r=E(i),s=Object.assign({},r,{lib:{id:e,type:t}});o.initialization&&o.initialization(n,s);const a={},l=D(s,a);return I(l,a),l.layout&&(l.layout=Object.assign({},l.layout,Object.assign(Object.assign({},r.layout),{responsive:!1}))),l}const i=C.default.make(t,"No supported.");return"basic"!==e&&"container"!==e?Object.assign(Object.assign({},i),{lib:{id:e,type:t}}):i}function N(e){const n=t.ComponentLibs.find(t=>t.id===e.id);if(n)return n.components.find(t=>t.type===e.type)}t.makeComponent=L,t.makeImageComponent=function(e,t,n){const o=f.getNewID();return T.makeImage(o,e,t,n)},t.makeVideoComponent=function(e,t,n){const o=f.getNewID();return M.makeVideo(o,e,t,n)},t.makeComponentItem=function(e,t,n,o){const i=N({id:e,type:t});if(!i||!i.item)throw new Error("尝试获取没有配置 item 的组件的 item.");const r=i.item,s=o||(i.itemArgs?i.itemArgs.map(e=>e.value):[]),a=E(r.replace(/{(\d+)}/g,(e,t)=>{if(void 0===s[t]){if(i.itemArgs){const e=i.itemArgs[t];if(e)return e.value}return e}return s[t]}).trim()),l={},c=D(a,l);return I(a,l),c},t.getComponent=N,t.getSealedCompoundComponentLib=function(e){return x.default.components.find(t=>t.type===e)};const j={[w.CParagraph]:g.default.RichText,[w.CInput]:g.default.PureText,[w.CTextArea]:g.default.PureText,[w.CText]:g.default.RichText,[w.CImage]:g.default.Image,[w.CSnapshot]:g.default.Snapshot,[w.CIcon]:g.default.Icon,[w.CVideo]:g.default.Video,[w.CAudio]:g.default.Audio,[w.CQRCode]:g.default.PureText,[w.CSvg]:g.default.Svg,[w.CContentPanel]:g.default.ItemValue,[w.CSelect]:g.default.ItemValue,[w.CNumericStep]:g.default.PureText,[w.CPureText]:g.default.PureText,[w.CTree]:g.default.Tree,[w.CSelectPanel]:g.default.ItemValue,[w.CFrame]:g.default.PureText};function R(e,t){const n=j[e];if(!i.isUndefined(n))return{type:n};if(t){const e=N(t);return e&&e.value?e.value:null}return null}t.getComponentSupportValueEditorType=function(e,t){const n=R(e,t);if(n)return n.type},t.getComponentValueEditorInfo=R;const z={[w.CAudio]:p.default("resource.components.audio"),[w.CCanvasPanel]:p.default("resource.components.canvasPanel"),[w.CCompoundPath]:p.default("resource.components.compoundPath"),[w.CContentPanel]:p.default("resource.components.contentPanel"),[w.CConnector]:p.default("resource.components.connector"),[w.CEllipse]:p.default("resource.components.ellipse"),[w.CGroup]:p.default("resource.components.group"),[w.CIcon]:p.default("resource.icon"),[w.CImage]:p.default("resource.components.image"),[w.CSnapshot]:p.default("resource.components.snapshot"),[w.CInput]:p.default("resource.components.input"),[w.CKeyboard]:p.default("resource.components.keyboard"),[w.CLine]:p.default("resource.components.line"),[w.CListLayoutPanel]:p.default("resource.components.listLayoutPanel"),[w.CNumericStep]:p.default("resource.components.numericStep"),[w.CParagraph]:p.default("resource.components.paragraph"),[w.CPath]:p.default("resource.components.path"),[w.CPolygon]:p.default("resource.components.polygon"),[w.CQRCode]:p.default("resource.components.qrcode"),[w.CRect]:p.default("resource.components.rect"),[w.CSlider]:p.default("resource.components.slider"),[w.CSelect]:p.default("resource.components.select"),[w.CStackPanel]:p.default("resource.components.stackPanel"),[w.CSelectPanel]:p.default("resource.components.selectPanel"),[w.CTextArea]:p.default("resource.components.textarea"),[w.CText]:p.default("resource.components.text"),[w.CVideo]:p.default("resource.components.video"),[w.CWrapPanel]:p.default("resource.components.wrapPanel"),[w.CPureText]:p.default("resource.components.pureText"),[w.CTable]:p.default("resource.components.table"),[w.CTree]:p.default("resource.components.tree")};function B(e,t){if(t){const e=N(t);if(e)return e.name}return z[e]||e||"component"}function F(e){let t=Y(e);return t||(t=H(e)),t}function H(e){for(let n=0,o=t.ComponentLibs.length;nt.type.toLowerCase()===e.toLowerCase());if(i)return{type:o.id,data:i}}}function Y(e){const n=e.toLowerCase().trim();for(let e=0,o=t.ComponentLibs.length;ee.lib?e.lib.id===t.id&&e.lib.type===t.type:e.type===t.type).length;return`${B(t.type,t)}${n+1}`},t.getLibData=function(e){for(let n=0,o=t.ComponentLibs.length;nt.type===e);if(o)return o}},t.getLibByShortCutOrType=F,t.getLibByType=H,t.makeComponentByKeyOrType=function(e,t){const n=F(e.toUpperCase());return L(n.type,n.data.type,t)},t.getLibDataByShortCut=Y},function(e,t,n){var o=n(85);e.exports=function(e){return Object(o(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(6),i=n(110),r=n(90),s={appType:"web",customSize:{width:1e3,height:1e3},selected:{pad:0,phone:0,web:0}};var a,l;!function(e){e[e.half=.5]="half",e[e.one=1]="one",e[e.two=2]="two",e.fitComp="fitComp"}(a||(a={})),function(e){e.Component_Copy="MOCKPLUS-COMPONENT-DATA-COPIED",e.Component_Cut="MOCKPLUS-COMPONENT-DATA-CUT",e.Artboard_Copy="MOCKPLUS-ARTBOARD-DATA-COPIED",e.Table_Copy="MOCKPLUS-TABLE-COPIED",e.Normal=""}(l||(l={}));const c=new class{constructor(){this.currentScale=1,this.searchCache={},this._previewScale=1,this.cache={},this.currentScale=(this.scaleValue||100)/100}getValue(e,t){let n=this.cache[e];return o.isUndefined(n)&&(n=i.loadFromCache(e,t)),this.cache[e]=n,n}saveValue(e,t){new Promise(()=>{i.saveToCahche(e,t)}),this.cache[e]=t}get snapshotSelectedInfo(){return this.getValue("snapshotSelectedInfo",{})}set snapshotSelectedInfo(e){this.saveValue("snapshotSelectedInfo",e)}get snapshotSizeSelectedInfo(){return this.getValue("snapshotSizeSelectedInfo",a.one)}set snapshotSizeSelectedInfo(e){this.saveValue("snapshotSizeSelectedInfo",e)}get navigationMapVisible(){return this.getValue("showNavigation",!1)}set navigationMapVisible(e){this.saveValue("showNavigation",e)}get leftPanelType(){return this.getValue("leftPanelType",2)}set leftPanelType(e){this.saveValue("leftPanelType",e)}get leftPanelWidth(){return this.getValue("leftPanelWidth",240)}set leftPanelWidth(e){this.saveValue("leftPanelWidth",e)}get previewControllerPanelWidth(){return this.getValue("previewControllerPanelWidth",280)}set previewControllerPanelWidth(e){this.saveValue("previewControllerPanelWidth",e)}get rightPanelVisible(){return this.getValue("rightPanelVisible",!0)}set rightPanelVisible(e){this.saveValue("rightPanelVisible",e)}getIconLibrariesCollapse(e){return this.getValue("iconLibrariesCollapseList",e)}set iconLibrariesCollapse(e){this.saveValue("iconLibrariesCollapseList",e)}get componentLibrariesCollapse(){return this.getValue("compLibCollapseList",[])}set componentLibrariesCollapse(e){this.saveValue("compLibCollapseList",e)}get propertyPanelSelected(){return this.getValue("propertyPanelSelected")}set propertyPanelSelected(e){this.saveValue("propertyPanelSelected",e)}get propertyItemCollapse(){return this.getValue("property-item-collapse",{})}set propertyItemCollapse(e){this.saveValue("property-item-collapse",e)}get statePanelVisible(){return this.getValue("statePanelVisible",!0)}set statePanelVisible(e){this.saveValue("statePanelVisible",e)}get artboardPanelVisible(){return this.getValue("artboardPanelVisible",!1)}set artboardPanelVisible(e){this.saveValue("artboardPanelVisible",e)}getStatePanelPoint(e){return this.getValue("state-panel-point",e)}set statePanelPoint(e){this.saveValue("state-panel-point",e)}getArtpanelPanelPoint(e){return this.getValue("artboard-panel-point",e)}set artboardPanelPoint(e){this.saveValue("artboard-panel-point",e)}get resourceGroupCollapse(){return this.getValue("resourceGroupCollpase",[])}set resourceGroupCollapse(e){this.saveValue("resourceGroupCollpase",e)}get resourceLibrariesLayout(){return this.getValue("resourceLibrariesLayout","list")}set resourceLibrariesLayout(e){this.saveValue("resourceLibrariesLayout",e)}set fileUploadOption(e){this.saveValue("fileUploadOption",e)}get fileUploadOption(){return this.getValue("fileUploadOption",{fitComp:!0,holdRetio:!0})}set previewOption(e){this.saveValue("previewOption",e)}get previewOption(){return this.getValue("previewOption",[])}set defaultShowControlPanel(e){this.saveValue("defaultShowControlPanel",e)}get defaultShowControlPanel(){return this.getValue("defaultShowControlPanel",!0)}set shareOption(e){this.saveValue("shareOptions",e)}get shareOption(){return this.getValue("shareOptions",[])}set prevCompActionCommandType(e){this.saveValue("prevCompActionCommandType",e)}get prevCompActionCommandType(){return this.getValue("prevCompActionCommandType")}set prevCompActions(e){this.saveValue("prevCompAction",e)}get prevCompActions(){return this.getValue("prevCompAction")}set prevPageAction(e){this.saveValue("prevPageAction",e)}get prevPageAction(){return this.getValue("prevPageAction")}set prevFragmentAction(e){this.saveValue("prevFragmentAction",e)}get prevFragmentAction(){return this.getValue("prevFragmentAction")}set prevFragmentCustomEffect(e){this.saveValue("prevFragmentCustomEffect",e)}get prevFragmentCustomEffect(){return this.getValue("prevFragmentCustomEffect")}set prevFragmentCenterEffect(e){this.saveValue("prevFragmentCenterEffect",e)}get prevFragmentCenterEffect(){return this.getValue("prevFragmentCenterEffect")}getLastSearchValue(e){return this.searchCache[e]||""}cacheLastSearchValue(e,t){this.searchCache[e]=t}get skipSelectingGroupTeaching(){return!!this.getValue("skipSelectingGroupTeaching")}set skipSelectingGroupTeaching(e){this.saveValue("skipSelectingGroupTeaching",e)}get lastUsedDesignRepositoryID(){return this.getValue("lastUsedDesignRepositoryID")}set lastUsedDesignRepositoryID(e){this.saveValue("lastUsedDesignRepositoryID",e)}getLastSelectComponentGroup(e){return this.getValue("lastSelectCompResGroup",{})[e]}setLastSelectComponentGroup(e){const{libID:t,groupID:n}=e;let o=this.getValue("lastSelectCompResGroup",{});o=Object.assign(Object.assign({},o),{[t]:n}),this.saveValue("lastSelectCompResGroup",o)}get syncComponentResourceByAdd(){return this.getValue("syncComponentResourceByAdd",!1)}set syncComponentResourceByAdd(e){this.saveValue("syncComponentResourceByAdd",e)}get selectedResourcesWithGroupID(){return this.getValue("selectedResourcesWithGroupID",{})}getSelectResourceGroupIDs(e){return this.selectedResourcesWithGroupID[e]}setSelectResourceGroupIDs(e){const{libID:t,groupIDs:n}=e;this.saveValue("selectedResourcesWithGroupID",Object.assign(Object.assign({},this.selectedResourcesWithGroupID),{[t]:n}))}get minimalist(){return this.getValue("minimalist",!0)}set minimalist(e){this.saveValue("minimalist",e)}get previewControllPanelWidth(){return this.getValue("previewControllPanelWidth",280)}set previewControllPanelWidth(e){this.saveValue("previewControllPanelWidth",e)}get showPageNumber(){return this.getValue("showPageNumber",!1)}set showPageNumber(e){this.saveValue("showPageNumber",e)}get showTrash(){return this.getValue("showTrash",!1)}set showTrash(e){this.saveValue("showTrash",e)}get scaleValue(){return this.getValue("workpaceScale",100)}set scaleValue(e){this.currentScale=e/100,this.saveValue("workpaceScale",e)}get previewScale(){const e=parseInt(this.getValue("previewScale",100));return r.default.max(0,isNaN(e)?1:e)}set previewScale(e){this.saveValue("previewScale",e)}get scale(){return this.currentScale}get defaultNoneImageModel(){return this.getValue("imageStyle","placeholder")}set defaultNoneImageModel(e){this.saveValue("imageStyle",e)}get recentOpenProjects(){return this.getValue("recentOpenProjects",[])}addRecentOpenProject(e){const t=this.recentOpenProjects;-1===t.indexOf(e)&&this.saveValue("recentOpenProjects",[...t,e])}get tableClipboardData(){return this.getValue(l.Table_Copy)}set tableClipboardData(e){this.saveValue(l.Table_Copy,e)}get strokeDashMode(){return this.getValue("strokeDashMode","custom")}set strokeDashMode(e){this.saveValue("strokeDashMode",e)}get previewNavbarOpt(){return this.getValue("previewNavbarOpt",[])}set previewNavbarOpt(e){this.saveValue("previewNavbarOpt",e)}get lastSelectedTeamIDs(){return this.getValue("lastSelectedTeamIDs",{})}set lastSelectedTeamIDs(e){this.saveValue("lastSelectedTeamIDs",e)}getLastSelectedTeamIDByUserID(e){return this.lastSelectedTeamIDs[e]}setLastSelectedTeamIDByUserID(e,t){this.lastSelectedTeamIDs=Object.assign(Object.assign({},this.lastSelectedTeamIDs),{[e]:t})}get lastSelectedDesktopPanel(){return this.getValue("lastSelectedDesktopPanel")}set lastSelectedDesktopPanel(e){this.saveValue("lastSelectedDesktopPanel",e)}get needScaleRadius(){return this.getValue("needScaleRadius",!1)}set needScaleRadius(e){this.saveValue("needScaleRadius",e)}get needScaleShadow(){return this.getValue("needScaleShadow",!1)}set needScaleShadow(e){this.saveValue("needScaleShadow",e)}set lastIconSize(e){this.cache.lastIconSize=e}get lastIconSize(){return this.cache.lastIconSize||24}get ruleVisible(){return this.getValue("showRuler",!0)}set ruleVisible(e){this.saveValue("showRuler",e)}get showAllGuides(){return this.getValue("showAllGuides",!0)}set showAllGuides(e){this.saveValue("showAllGuides",e)}get appModule(){return this.getValue("appModule","rp")}set appModule(e){this.saveValue("appModule",e)}get appOrderType(){return this.getValue("appOrderType","rpAccessedAt")}set appOrderType(e){this.saveValue("appOrderType",e)}get appOrderValue(){return this.getValue("appOrderValue")}set appOrderValue(e){this.saveValue("appOrderValue",e)}get shareAndInvite(){return this.getValue("shareAndInvite",!0)}set shareAndInvite(e){this.saveValue("shareAndInvite",e)}get lastEmailForLogin(){return this.getValue("lastEmailForLogin")}set lastEmailForLogin(e){this.saveValue("lastEmailForLogin",e)}get createApp(){return this.getValue("rp_project_size",s)}set createApp(e){this.saveValue("rp_project_size",e)}set createAppCustomSize(e){this.createApp=Object.assign(Object.assign({},this.createApp),{customSize:e})}set createAppType(e){this.createApp=Object.assign(Object.assign({},this.createApp),{appType:e})}setCreateAppDevice(e,t){this.createApp=Object.assign(Object.assign({},this.createApp),{appType:e,selected:Object.assign(Object.assign({},this.createApp.selected),{[e]:t})})}get viewedFreeProgram(){return this.getValue("viewedFreeProgram",{})}getViewedFreeProgram(e){return this.viewedFreeProgram[e]||!1}setViewedFreeProgram(e,t){this.saveValue("viewedFreeProgram",Object.assign(Object.assign({},this.viewedFreeProgram),{[e]:t}))}get lastSelectedIframeLinkModule(){return this.getValue("lastSelectedIframeLinkModule","rp-app")}set lastSelectedIframeLinkModule(e){this.saveValue("lastSelectedIframeLinkModule",e)}get lastSelectedIframeLinkType(){return this.getValue("lastSelectedIframeLinkType",0)}set lastSelectedIframeLinkType(e){this.saveValue("lastSelectedIframeLinkType",e)}get playFromCurrent(){return this.getValue("defaultPlayFrom",!0)}set playFromCurrent(e){this.saveValue("defaultPlayFrom",e)}get downloadArtboardRatio(){return this.getValue("downloadArtboardRatio",1)}set downloadArtboardRatio(e){this.saveValue("downloadArtboardRatio",e)}get lastSelectedAppSetIDs(){return this.getValue("lastSelectedAppSetIDs",{})}set lastSelectedAppSetIDs(e){this.saveValue("lastSelectedAppSetIDs",e)}getAppSetIDByTeamID(e){return this.lastSelectedAppSetIDs[e]||""}setAppSetIDByTeamID(e,t){this.lastSelectedAppSetIDs=Object.assign({},this.lastSelectedAppSetIDs,{[e]:t})}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageSkipEffects=t.AnimateEffects=t.CommandTypes=t.EventTypes=void 0,function(e){e.click="click",e.doubleClick="doubleClick",e.contextMenu="contextMenu",e.mouseDown="mouseDown",e.mouseUp="mouseUp",e.mouseEnter="mouseEnter",e.mouseLeave="mouseLeave",e.loaded="loaded",e.afterMove="afterMove",e.afterResize="afterResize",e.afterRotate="afterRotate",e.afterZoom="afterZoom",e.afterVisible="afterVisible",e.afterHide="afterHide",e.checked="checked",e.unChecked="unChecked",e.toggleCheck="toggleCheck",e.focus="focus",e.blur="blur",e.scroll="scroll"}(t.EventTypes||(t.EventTypes={})),function(e){e.move="move",e.resize="resize",e.rotation="rotation",e.zoom="scale",e.toggleVisible="toggleVisible",e.toggleState="toggleState",e.switchContent="switchContent",e.scroll="scroll"}(t.CommandTypes||(t.CommandTypes={})),function(e){e.none="none",e.linear="linear",e.easeIn="ease-in",e.easeOut="ease-out",e.easeInOut="ease-in-out"}(t.AnimateEffects||(t.AnimateEffects={})),function(e){e.none="none",e.pushToLeft="pushToLeft",e.pushToRight="pushToRight",e.pushToTop="pushToTop",e.pushToBottom="pushToBottom",e.slideToLeft="slideToLeft",e.slideToRight="slideToRight",e.slideToTop="slideToTop",e.slideToBottom="slideToBottom",e.fadeIn="fadeIn",e.zoomIn="zoomIn",e.flipInLeft="flipInLeft",e.flipInRight="flipInRight",e.flipInTop="flipInTop",e.flipInBottom="flipInBottom"}(t.PageSkipEffects||(t.PageSkipEffects={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextPropertyName=t.VerticalAlign=t.TextTransform=t.TextAlign=void 0,function(e){e.left="left",e.center="center",e.right="right",e.justify="justify"}(t.TextAlign||(t.TextAlign={})),function(e){e.none="none",e.upperCase="upperCase",e.lowerCase="lowerCase",e.capitalize="capitalize"}(t.TextTransform||(t.TextTransform={})),function(e){e.top="top",e.middle="middle",e.bottom="bottom"}(t.VerticalAlign||(t.VerticalAlign={})),t.TextPropertyName="textStyle"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPublicPropertiesByComps=t.upgradeTextProperValue=t.upgradeTextFormatForDisplay=t.upgradeTextFormatForApply=t.mergeProperties=t.transEffectValueToCSSValue=t.getImageColorFilter=t.getEffectData=t.getEffectValue=t.mergePropertyCacheToComp=t.propertyCache=t.isSamePropertyValue=t.compareProperty=t.getDefaultPropertyName=t.textProps=t.shapeProps=t.sortProperty=t.getDefaultShadow=t.getTextShadow=t.PropertyOrder=void 0;const o=n(6),i=n(129),r=n(7),s=n(15),a=n(14),l=n(30),c=n(22),u=n(199),d=n(258),h=n(46),p=n(344),f=n(257),m=n(880),g=n(349),y=n(881),v=n(101),b=n(882),_=n(259),w=n(883),C=n(128),x=n(350),S=n(100),k=n(351),P=n(18),T=n(54),M=n(1),A=n(5),O=n(25),E=n(11);function D(){return{disabled:!0,hidden:!1,x:0,y:3,blur:6,color:P.TextShadowColor}}function I(e){e.sort((e,n)=>t.PropertyOrder[e.type]-t.PropertyOrder[n.type])}t.PropertyOrder=["opacity",h.TextPropertyName,S.TextFormatExPropertyName,f.MultiTextPropertyName,l.FillPropertyName,p.IconPropertyName,c.StrokePropertyName,w.BorderPropertyName,u.RadiusPropertyName,d.ShadowPropertyName,x.PaddingPropertyName,C.InputModelPropertyName,_.PolygonPropertyName,m.ImgPropertyName,b.ColorFilterPropertyName,k.BlurPropertyName,v.LinePropertyName,g.LayoutPropertyName,y.ContainerPropertyName].reduce((e,t,n)=>Object.assign(Object.assign({},e),{[t]:n}),{}),t.getTextShadow=D,t.getDefaultShadow=function(e=!1){return e?D():{disabled:!0,hidden:!1,x:0,y:3,blur:6,color:P.ShadowColor}},t.sortProperty=I;const L={[l.FillPropertyName]:M.default("property.propertyNames.fill"),[c.StrokePropertyName]:M.default("property.propertyNames.stroke"),[w.BorderPropertyName]:M.default("property.propertyNames.border"),[u.RadiusPropertyName]:M.default("property.propertyNames.radius"),[h.TextPropertyName]:M.default("property.propertyNames.text"),[_.PolygonPropertyName]:M.default("property.propertyNames.polygon"),[p.IconPropertyName]:M.default("property.propertyNames.icon"),[m.ImgPropertyName]:M.default("property.propertyNames.img"),[g.LayoutPropertyName]:M.default("property.propertyNames.layout"),[y.ContainerPropertyName]:M.default("property.propertyNames.container"),[d.ShadowPropertyName]:M.default("property.propertyNames.shadow"),[v.LinePropertyName]:M.default("property.propertyNames.line"),[C.InputModelPropertyName]:M.default("property.propertyNames.inputModel"),[x.PaddingPropertyName]:M.default("property.propertyNames.padding"),[c.SeparatorPropertyName]:M.default("property.propertyNames.separator"),color:M.default("property.propertyNames.color")};t.shapeProps=["opacity",l.FillPropertyName,c.StrokePropertyName,d.ShadowPropertyName,u.RadiusPropertyName,w.BorderPropertyName],t.textProps=[h.TextPropertyName,S.TextFormatExPropertyName,f.MultiTextPropertyName],t.getDefaultPropertyName=function(e){return L[e]||e},t.compareProperty=function(e,t){const n=Object.keys(e),o=Object.keys(t);return!!r.arrayEquals(n,o)&&n.every(n=>{const o=n;if("ref"===o||"prop"===o||"name"===o||"hidden"===o)return!0;const i=e[o],s=t[o],a=typeof i,l=typeof i;return a===l&&(Array.isArray(i)&&Array.isArray(s)?r.arrayEquals(i,s):"object"===a&&"object"===l?r.isEqualDate(i,s):i===s)})},t.isSamePropertyValue=function e(t,n){const o=typeof n;let i=t;if("object"===o)return!!i&&Object.keys(n).every(o=>e(t[o],n[o]));switch(o){case"number":i=i||0;break;case"string":i=i||"";break;case"boolean":i=i||!1;break;default:return!0}return i===n};function N(e,t){return o.isUndefined(t)?0:t}function j(e,t){if(!t)return"";switch(e){case b.FilterName.hueRotate:return`hue-rotate(${(1.8*t+360)%360}deg)`;case b.FilterName.saturate:return`${e}(${t+100}%)`;case b.FilterName.brightness:case b.FilterName.contrast:return`${e}(${(t+100)/2+50}%)`;case b.FilterName.invert:return`${e}(${t}%)`}return""}function R(e,t){return!!t&&(e.length>1||(1!==e.length||!r.isEqualDate(e[0],t))&&0!==e.length)}t.propertyCache=new class{constructor(){this.cache={},this.support={[A.CText]:[h.TextPropertyName,f.MultiTextPropertyName,S.TextFormatExPropertyName],[A.CConnector]:[c.StrokePropertyName],[A.CIcon]:[p.IconPropertyName],[A.CLine]:[c.StrokePropertyName,v.LinePropertyName]},this.cache={}}canCache(e,t){const n=this.support[e];return!!n&&-1!==n.indexOf(t)}get(e,t){var n;return null===(n=this.cache[e])||void 0===n?void 0:n[t]}save(e,t,n){if(!this.canCache(e,t))return;let o=this.cache[e];o||(o=this.cache[e]={}),o[t]=r.depthClone(n)}},t.mergePropertyCacheToComp=function(e){const{properties:n,type:o}=e;if(Object.keys(n).forEach(e=>{var i;const r=n[e],s=r.prop||e;if(!r.hidden){const e=t.propertyCache.get(o,s);if(e){Object.keys(e).forEach(t=>{["hidden","name","prop"].includes(t)||(r[t]=e[t])});const t=Math.round(1.4*((null===(i=n.textStyle||n.textFormat)||void 0===i?void 0:i.fontSize)||14));s===f.MultiTextPropertyName?(n.multiText.wrap=!1,n.multiText.lineHeightEx=t):s===S.TextFormatExPropertyName&&(n.textFormat.wrap=!1,n.textFormat.lineHeightEx=void 0,n.textFormat.lineHeight=void 0,n.textFormat.listType=void 0)}}}),e.type===A.CText){const{textFormat:t,textStyle:o}=n,i=(null==t?void 0:t.fontStyle)||(null==o?void 0:o.fontStyle);if(t||o){e.value=O.setValueWithFontstyle(e.value,i);const t=E.StyleHelper.initCSSStyleParser(n),o=Object.assign({},t.getTextStyle()),{width:r,height:a}=s.measureTextSize(o,e.value,{isRich:!0,wrap:!1,isMultiText:!0});e.size.width=r,e.size.height=a}}},t.getEffectValue=N,t.getEffectData=function(e,t){const n={name:M.default("property.component.colorFilter."+e),value:N(0,t),min:-100,max:100,step:1};return e===b.FilterName.invert&&(n.min=0),n},t.getImageColorFilter=function(e,t){let n="";if(e){const{disabled:t}=e;if(!t){n=function(e){const t={[b.FilterName.hueRotate]:0,[b.FilterName.saturate]:1,[b.FilterName.brightness]:2,[b.FilterName.contrast]:3,[b.FilterName.invert]:4};return e.sort((e,n)=>{var o,i;return null!==(i=null!==(o=t[e])&&void 0!==o?o:5-t[n])&&void 0!==i?i:5})}(Object.keys(e)).map(t=>j(t,e[t])).join(" ")}}return t&&!t.disabled&&t.blurValue.aMount&&(n=`${n||""} blur(${t.blurValue.aMount}px)`),n},t.transEffectValueToCSSValue=j,t.mergeProperties=function(e,t){if(!t)return e;const n=r.depthClone(e);return Object.keys(t).reduce((e,t)=>(e.includes(t)||e.push(t),e),Object.keys(e)).forEach(e=>{const o=e,i=n[o],s=t[o];i?s&&(n[o]=r.merge(i,s,(e,t,n)=>{if(["colorStops","color","radius","dashArray"].includes(e))return n}),!s.ref&&n[o]&&delete n[o].ref):n[o]=s}),n},t.upgradeTextFormatForApply=function(e,t){var n,o,i,l;if(!t)return e;let c=r.depthClone(e);const u=s.getTextFormatByHTMLString(t,function(e){var t,n,o,i;const r=[];return(null===(t=e.fontStyle)||void 0===t?void 0:t.strike)&&r.push("line-through"),(null===(n=e.fontStyle)||void 0===n?void 0:n.underline)&&r.push("underline"),{fontFamily:e.fontFamily,fontSize:(e.fontSize||14)+"px",color:a.parseColorToString(e.color||""),textAlign:e.textAlign,fontWeight:(null===(o=e.fontStyle)||void 0===o?void 0:o.bold)?"bold":"",fontStyle:(null===(i=e.fontStyle)||void 0===i?void 0:i.italic)?"italic":"",textDecorationLine:r.join(" ")}}(c)),{strike:d,bold:h,italic:p,underline:f}=u.fontStyle||{};c=Object.assign(Object.assign(Object.assign({},c),u),{textAlign:c.textAlign,fontStyle:{strike:null!=d?d:null===(n=c.fontStyle)||void 0===n?void 0:n.strike,bold:null!=h?h:null===(o=c.fontStyle)||void 0===o?void 0:o.bold,italic:null!=p?p:null===(i=c.fontStyle)||void 0===i?void 0:i.italic,underline:null!=f?f:null===(l=c.fontStyle)||void 0===l?void 0:l.underline}}),u.textAlign&&(c.textAlign=u.textAlign);const m=s.getListTypeByHTMLString(t);return m&&(c.listType=m),c},t.upgradeTextFormatForDisplay=function(e,t,n={}){if(!t)return e;const o=Object.assign({},e),r=s.getManyRichStyleByHTMLString(t),{fontFamily:a,fontSize:l,fontStyle:c,textAlign:u,listType:d,color:h}=o;if(a&&R(r.fontFamily,T.getFontFamily(a))&&!n["family-inherit"]&&delete o.fontFamily,R(r.fontSize,l+"px")&&!n["size-inherit"]&&delete o.fontSize,h&&R(r.color.map(e=>i(e).toHex8String()),i(h).toHex8String())&&!n["color-inherit"]&&delete o.color,o.fontStyle){(null==c?void 0:c.bold)&&R(r.fontWeight,"bold")&&!n["bold-inherit"]&&(o.fontStyle.bold=!1);(null==c?void 0:c.italic)&&R(r.fontStyle,"italic")&&n["italic-inherit"]&&(o.fontStyle.italic=!1)}return R(r.textAlign,u)&&n["align-inherit"]&&delete o.textAlign,function(e,t){if(!t)return!1;const n="order"===t?"OL":"UL",o=document.createElement("div");o.innerHTML=e;const i=o.childNodes;return 1!==i.length||i.item(0).nodeName!==n}(t,d)&&delete o.listType,o},t.upgradeTextProperValue=function(e){if(!e)return e;const{lineHeight:t,lineHeightEx:n,fontSize:i}=e;return o.isUndefined(n)&&!o.isUndefined(t)?Object.assign(Object.assign({},r.depthClone(e)),{lineHeightEx:t+(i||T.DefaultFontSize)}):o.isUndefined(n)&&o.isUndefined(t)?Object.assign(Object.assign({},r.depthClone(e)),{lineHeightEx:1.4*(i||T.DefaultFontSize)}):e},t.getPublicPropertiesByComps=function(e){const t=[],n=[...e],i=n.length;if(i){const e={},r=n.reduce((e,t)=>(Object.keys(t.properties).forEach(n=>{let i=t.properties[n];o.isUndefined(i)||i||(i={}),i&&(e[n]?e[n].count=e[n].count+1:e[n]={count:1,type:i.prop||n},i.hidden&&(e[n].count=e[n].count-1))}),e),e);Object.keys(r).forEach(e=>{r[e].count===i&&t.push({name:e,type:r[e].type})})}if(1===i&&t.forEach(e=>{e.locked=n[0].locked}),i>1){const e=t.findIndex(e=>"layout"===e.type);-1!==e&&t.splice(e,1)}if(n.some(e=>e.type===A.CPath&&e.value.closed)){const e=t.findIndex(e=>"line"===e.type);-1!==e&&t.splice(e,1)}return I(t),t.unshift({name:"opacity",type:"opacity"}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMobileAppType=t.couldPagePreview=t.isNodeVisible=t.parseDataToRPTree=t.isStartWithControlPanel=t.isStartFromPreview=t.isPhoneIn=t.isLarkApplets=t.isLarkBrowser=t.parserVisibleCommand=t.shouldHiddenPageVisible=t.parserScaleCommand=t.parserRotateCommand=t.parserResizeCommand=t.parserMoveCommand=t.isMobileDevice=t.isMobileApp=t.getPreviewOptFromUrl=t.getPreviewOptFromOfflineDemo=t.getDefaultOption=t.shareOptionToSearchStr=t.getUrlSearchObj=void 0;const o=n(6),i=n(168),r=n(204),s=n(7),a=n(205),l=n(88),c=n(89),u=n(44),d=n(254);function h(){return function(e){const t=s.depthClone(e);return Object.keys(t).forEach(n=>{const o=e[n].toLowerCase(),i=Number(o);"1"===o?t[n]=!0:"0"===o?t[n]=!1:isNaN(i)||(t[n]=i)}),t}(d.parseUrlSearch())}function p(){var e;const t=null===(e=c.getOfflineDemoData())||void 0===e?void 0:e.config;return t?{showLinkAreaWhenHovered:t.showLinkAreaWhenHovered,alwaysShowLinkArea:t.alwaysShowLinkArea,autoScreen:t.autoScreen,mobileType:t.mobileType,noBoundary:t.noBoundary}:{}}function f(e){const t=null!=e?e:h(),n={};return Object.keys(t).forEach(e=>{switch(e){case i.PreviewUrlSearchKey.ShowOutside:n.noBoundary=!!t[e];break;case i.PreviewUrlSearchKey.DeviceType:n.mobileType=t[e];break;case i.PreviewUrlSearchKey.AlwayshowLinkArea:n.alwaysShowLinkArea=!!t[e];break;case i.PreviewUrlSearchKey.ShowLinkAreaWhenMouseHover:n.showLinkAreaWhenHovered=!!t[e];break;case i.PreviewUrlSearchKey.FitToScreen:n.autoScreen=!!t[e]}}),n}t.getUrlSearchObj=h,t.shareOptionToSearchStr=function(e){const t=Object.keys(e).filter(t=>!o.isUndefined(e[t]));let n="";const r=e=>o.isBoolean(e)?e?1:0:e,s=t.map(t=>{const n=e[t];switch(t){case"alwaysShowLinkArea":return`${i.PreviewUrlSearchKey.AlwayshowLinkArea}=${r(n)}`;case"showLinkAreaWhenHovered":return`${i.PreviewUrlSearchKey.ShowLinkAreaWhenMouseHover}=${r(n)}`;case"autoScreen":return`${i.PreviewUrlSearchKey.FitToScreen}=${r(n)}`;case"noBoundary":return`${i.PreviewUrlSearchKey.ShowOutside}=${r(n)}`;case"showControllerPanel":return`${i.PreviewUrlSearchKey.ShowControllerPanel}=${r(n)}`;case"mobileType":return`${i.PreviewUrlSearchKey.DeviceType}=${r(n)}`;default:return}}).filter(e=>!o.isUndefined(e));return s.length&&(n=""+s.join("&")),n},t.getDefaultOption=function(e){var t;const{appType:n,size:o,_id:s}=e;let a=i.MobileType.None;switch(n){case"pad":a=i.MobileType.Pad;break;case"phone":a=r.adapterPhoneShell(o.height/o.width);break;default:a=i.MobileType.None}const l={showLinkAreaWhenHovered:!1,alwaysShowLinkArea:!1,autoScreen:!1,mobileType:a,noBoundary:!["pad","phone"].includes(n)},c=p(),d=f(),h=u.default.previewOption||[];let m=l;if(h.length){const e=h.find(e=>e.appID===s),n=(null===(t=null==e?void 0:e.option)||void 0===t?void 0:t.mobileType)||"",o=["iphoneX","iphone","android","pad","none"].includes(n)?n:a;m=Object.assign({},l,null==e?void 0:e.option,{mobileType:o},d,c)}else m=Object.assign({},l,d,c),u.default.previewOption=[{appID:s,option:m}];return["phone","pad"].includes(n)||delete m.mobileType,-1!==location.href.indexOf("/standalone/rp")&&(m.noBoundary=!1),m},t.getPreviewOptFromOfflineDemo=p,t.getPreviewOptFromUrl=f,t.isMobileApp=-1!==window.location.href.indexOf("phoneUrl=true"),t.isMobileDevice=()=>null!==navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i),t.parserMoveCommand=function(e,t){const{x:n,y:o,fromCurrent:i}=t,{position:r}=e;let s=r.x,a=r.y;return i?(s+=n,a+=o):(s=n,a=o),{x:s,y:a}},t.parserResizeCommand=function(e,t){const{size:n,position:o}=e,{width:i,height:r,fromCurrent:s,transformOrigin:a}=t;let l,c;s?(l=n.width+i,c=n.height+r):(l=i,c=r);let u=o.x,d=o.y;const h=l-n.width,p=c-n.height;let f=0,m=0;return"center"===a||"top"===a||"bottom"===a?m=-h/2:"right"!==a&&"topRight"!==a&&"bottomRight"!==a||(m=-h),"left"===a||"right"===a||"center"===a?f=-p/2:"bottomLeft"!==a&&"bottom"!==a&&"bottomRight"!==a||(f=-p),u+=m,d+=f,{size:{width:l,height:c},position:{x:u,y:d}}},t.parserRotateCommand=function(e,t){const n=e.rotate||0,{rotate:o,fromCurrent:i}=t;let r=o;return i&&(r=n+o),r},t.parserScaleCommand=function(e,t){const n=e._scale,{size:o,position:i}=e,{x:r,y:s,fromCurrent:a,transformOrigin:l}=t;let c=r,u=s;a&&(c=(n.x||1)*r,u=(n.y||1)*s);let d=i.x,h=i.y,p=o.width*c,f=o.height*u;const m=p-o.width*n.x,g=f-o.height*n.y;let y=0,v=0;return"center"===l||"top"===l||"bottom"===l?v=-m/2:"left"===l||"topLeft"===l||"bottomLeft"===l?v=0:"right"!==l&&"topRight"!==l&&"bottomRight"!==l||(v=-m),"left"===l||"right"===l||"center"===l?y=-g/2:"topLeft"===l||"top"===l||"topRight"===l?y=0:"bottomLeft"!==l&&"bottom"!==l&&"bottomRight"!==l||(y=-g),d+=v,h+=y,{scale:{x:c,y:u},position:{x:d,y:h}}},t.shouldHiddenPageVisible=e=>a.isAdminOrSuperAdmin(e)||a.isMember(e),t.parserVisibleCommand=function(e,t){const n=e.hidden,{state:o}=t;let i=n;switch(o){case"show":i=!1;break;case"hidden":i=!0;break;default:i=!n}return i},t.isLarkBrowser=-1!==navigator.userAgent.indexOf("Lark")&&-1===window.location.href.indexOf("lark=true"),t.isLarkApplets=-1!==window.location.href.indexOf("lark=true"),t.isPhoneIn=-1!==window.location.href.indexOf("phoneUrl=true"),t.isStartFromPreview=-1!==window.location.href.indexOf("/run/rp"),t.isStartWithControlPanel=-1!==window.location.href.indexOf(i.PreviewUrlSearchKey.ShowControllerPanel+"=true"),t.parseDataToRPTree=function(e,t,n){const{allCollapsed:o=!1,shouldHidePage:i=!1,showPageNumber:r=!1}=n,s=(t,n)=>t.filter(e=>!i||!e.hidden).map((t,i)=>{var a;if(r){const e=i+1,o=null===(a=null==n?void 0:n.data)||void 0===a?void 0:a.serialNumber;t.serialNumber=o?`${o}.${e}`:""+e}const l={data:t,isLeaf:!t.children||!t.children.length,selected:t._id===e,parent:n};return l.isLeaf||(l.expand=!o,l.children=s(t.children,l)),l});return s(t)},t.isNodeVisible=function(e){return!e.hidden&&e.state!==l.NodeState.Deleted},t.couldPagePreview=function(e,n){const o=t.shouldHiddenPageVisible(n);return!(!e||!o&&l.isPageHidden(e)||e.state===l.NodeState.Deleted)},t.isMobileAppType=function(e){return["pad","phone"].includes(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAction=t.ActionType=void 0,function(e){e.App_GetApp="[app] get-app",e.App_AddNode="[app] add-node",e.App_InsertNode="[app] insert-node",e.App_UpdateNodes="[app] update-nodes",e.App_PatchNode="[app] patch-node",e.App_LoadArtboards="[app] load-artboards",e.App_SelectNode="[app] select-node",e.App_ArtboardSelectSync="[app] select-sync",e.App_Tree_UpdateSelectedIDs="[app] tree_update_selected",e.App_Tree_UpdateExpandedIDs="[app] tree_update_expanded",e.App_Tree_HidePage="[app] tree_hide_page",e.App_RemoveArtboard="[app] remove-artboard",e.App_UpdateCoopers="[app] update-coopers",e.App_KillCoopers="[app] kill-coopers",e.App_DownloadArtboard="[app] download-artboard",e.APP_RefreshPage="[app] refresh-page",e.App_Tree_UpdateTrashSelectedIDs="[app] tree_update_trash_selected",e.App_ChangeProjectSize="[app] change_project_size",e.App_Patch_Info="[app] patch info",e.App_LoadAllPrototypeApps="[app] load all prototype apps",e.App_ShowWater="[app] show water",e.IO_UPDATE="[io] update",e.Preview_GetApp="[preview] get-app",e.Preview_LoadArtBoard="[preview] load-artboard",e.Preview_AfterSkipToPage="[preview] skip-to-page",e.Preview_SelectNode="[preview] select-node",e.Preview_Exit="[preview] exit",e.Preview_beforeSkipToPage="[preview] before-skip-to-page",e.Preview_goBackward="[preview] go-backward",e.Preview_goForward="[preview] go-forward",e.Preview_returnHome="[preview] go-home",e.Preview_showFragment="[preview] show-fragment",e.Preview_exitFragment="[preview] exit-fragment",e.Preview_showMessage="[preview] show-message",e.Preview_hideMessage="[preview] hide-message",e.Preview_toLogIn="[preview] to-log-in",e.Preview_PwdEnabled="[preview] app pwd enabled",e.Preview_resetLink="[preview] reset link ",e.Preview_StartRequestLink="[preview] start request link",e.Preview_EndRequestLink="[preview] end request link",e.Preview_checkShareLinkReset="[preview] check share link has reset",e.Preview_setCurrLinkID="[preview] get current linkID",e.Preview_hasShareLinkReset="[preview] check share link has reset",e.Preview_ProjectExist="[preview] check the project exist",e.Preview_ShowWater="[preview] show water",e.Global_Toast="[global] toast",e.Global_IO_Message="[global] io-message",e.Global_SOCKET_STATE_CHANGE="[global] socket-state-change",e.Global_NETWORK_STATE_CHANGE="[global] network-state-change",e.Global_AFK="[global] afk",e.Global_Waiting="[global] waiting",e.Global_Offline_Sync="[global] offline-sync",e.Global_Remote_Login="[global] remote login",e.Global_Login_Expired="[global] login expired",e.Lib_LoadLib="[Lib] load-app",e.Lib_LoadLibs="[Lib] load-libs",e.Lib_LoadError="[Lib] load-libs-error",e.Lib_AddLib="[Lib] add-lib",e.Lib_UpdateLib="[Lib] update-lib",e.Lib_AddColor="[Lib] add-color",e.Lib_AddTypography="[Lib] add-typography",e.Lib_AddComponent="[Lib] add-component",e.Lib_PatchColorItem="[Lib] patch-color-item",e.Lib_PatchComponentItem="[Lib] patch-component-item",e.Lib_PatchTypographyItem="[Lib] patch-typography-item",e.Lib_RemoveLibItem="[Lib] remove-lib-item",e.Lib_ResourceItemIndexChanged="[Lib] item-index-changed",e.Lib_SwitchLib="[Lib] switch-lib",e.Lib_AddGroup="[Lib] add-group",e.Lib_RemoveGroup="[Lib] remove-group",e.Lib_RenameGroup="[Lib] rename-group",e.Lib_MoveGroup="[Lib] move-group",e.Lib_ResetGroup="[Lib] reset-group",e.Lib_RemoveAfterMoveGroup="[Lib] remove-after-move-group",e.Lib_RemoveComponents="[Lib] remove-components",e.Lib_PatchComponents="[Lib] patch-components",e.Lib_AddRelations="[Lib] add-relations",e.Lib_PatchRelations="[Lib] patch-relations",e.Lib_RemoveRelations="[Lib] remove-relations",e.User_Preference_Load="[User] load preference",e.User_Preference_Patch="[User] patch preference",e.Page_Revisions_Load="[Revisions] load",e.Page_Revisions_revert="[Revisions] revert",e.Page_Revisions_loadArtboard="[Revisions] load artboard",e.Page_Revision_Switch="[Revisions] switch",e.Page_Revision_Waring="[Revisions] waring",e.User_GetUserInfo="[USER] get user info",e.User_GetSession="[USER] get sission",e.Team_GetTeamInfo="[TEAM] get team info",e.Share_GetTeamInfo="[Share] get team info",e.Share_GetUserInfo="[Share] get user info",e.Share_GetRunLink="[Share] get run link",e.Share_GetRunLinkDone="[Share] get run link done",e.Share_GetRunLinkError="[Share] get run link error",e.Share_SetLinkPass="[Share] set link pass",e.Share_SetLinkPassDone="[Share] set link pass done",e.Share_SetLinkPassError="[Share] set link pass error",e.Share_GetLinkPass="[Share] get link pass",e.Share_GetLinkPassDone="[Share] get link pass done",e.Share_ValidatePasswordError="[Share] validate password error",e.Share_GetPwEnableDone="[Share] get password enable",e.Share_ChangePwEnable="[Share] change password enable",e.Share_ChangePwEnableDone="[Share] change password enable done",e.Share_ChangePwEnableError="[Share] change password enable error",e.Share_ChangeValidatePassword="[Share] change validate pwd",e.User_Login="[User] login",e.User_Logout="[User] logout",e.User_Patch_Token="[User] patch token",e.Team_AllTeams="[Team] all teams",e.Team_SwitchTeam="[Team] switch team",e.Team_ChangeStatus="[Team] change status",e.Team_Create="[Team] create",e.Team_Patch="[Team] patch",e.Tag_Add="[Tag] add",e.Tag_ALL_Tags="[Tag] get all tags",e.AppSet_All="[AppSet] all",e.AppSet_AddAppSet="[AppSet] add appset",e.AppSet_AddApp="[AppSet] add app",e.AppSet_RemoveAppSet="[AppSet] remove appSet",e.AppSet_RemoveApp="[AppSet] remove app",e.AppSet_MoveApp="[AppSet] move app",e.AppSet_Recycle="[AppSet] recycle",e.AppSet_Restore="[AppSet] restore",e.AppSet_ClearFromRecycle="[AppSet] clrear from recycle",e.AppSet_Star="[AppSet] star",e.AppSet_PatchOrder="[AppSet] patch order",e.AppSet_Clear_Apps="[AppSet] clear apps",e.AppSet_Patch="[AppSet] Patch",e.Example_Load_All="[Example] load all",e.Example_Page_Down="[Example] page down",e.ShareApp_GetLink="[Share App] get link",e.ShareApp_GetPublicLink="[Share App] get public link",e.ShareApp_Patch="[Share App] patch",e.ShareApp_ResetLink="[Share App] reset link",e.ShareApp_LoadEmbedShareLink="[Share App] load embed share link",e.ShareApp_ResetEmbedShareLink="[Share App] reset embed share link",e.ShareApp_Waiging="[Share App] waiting",e.Activity_Invitation_All="[Activity] all invitation",e.Activity_Invitation_Progress_Info="[Activity] invitation progress info",e.Activity_Upgrade="[Activity] upgrade",e.Activity_Link_Token="[Activity] Link Token",e.Message_Get_UnreadCount="[Message] get unread count",e.Message_Read_App="[Message] read app message",e.Message_Read_App_About_Me="[Message] read app message about me",e.Message_Resolve_Join="[Message] read join app message",e.Message_Read_All="[Message] read all message",e.Message_Read_All_About_Me="[Message] read all message about me",e.Member_Load_All="[Member] load team members",e.Member_Load_App_Members="[Member] load app members",e.Member_Update_App_Members="[Member] update app members",e.Invitation_Load_Link="[invitation] load link",e.Invitation_Patch_Link="[invitation] patch link",e.Invitation_Patch_Group="[invitation] patch group",e.Department_Load_List="[department] load list"}(t.ActionType||(t.ActionType={})),t.createAction=function(e,t){return void 0===t?{type:e}:{type:e,payload:t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOSSystem=t.getDevicePixelRatio=t.isIE=t.isShareFrame=t.isIframe=t.isMockRPD=t.isElectron=t.isFireFox=t.isMacOS=void 0;const o=window.navigator.userAgent,i=-1!==o.indexOf("Macintosh"),r=-1!==o.indexOf("Firefox"),s=-1!==o.toLowerCase().indexOf(" electron");var a;!function(e){e.macOS="macOS",e.Windows="windows",e.Android="android",e.Linux="linux",e.iOS="ios",e.Unknown="unknown"}(a||(a={})),t.isMacOS=i,t.isFireFox=r,t.isElectron=s,t.isMockRPD=o.includes("mockRPD"),t.isIframe=window.self!==window.top,t.isShareFrame="true"===new URLSearchParams(location.search).get("isFrame"),t.isIE=()=>{const{userAgent:e}=window.navigator;return"ActiveXObject"in window||e.indexOf("Trident")>-1},t.getDevicePixelRatio=function(){return window.devicePixelRatio||1},t.getOSSystem=function(){return i?a.macOS:-1!==o.indexOf("Windows")?a.Windows:-1!==o.indexOf("Android")||-1!==o.indexOf("Adr")?a.Android:-1!==o.indexOf("Linux")?a.Linux:o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)||-1!==o.indexOf("iPhone")||-1!==o.indexOf("iPad")?a.iOS:a.Unknown}},function(e,t,n){"use strict";function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAngleOfLine=t.getAngleWhenShiftPress=t.getMidpointOfTwoPoints=t.getSymmetricPoint=t.getCenter=t.getBoundsOfRotatedRectangle=t.rotateSinglePoint=t.getNoRotateRect=t.getNWPoint=t.centerRotatePoints=t.fixPointsWithMinimum=t.getScalePoints=t.getRectPoints=t.getDragPoints=t.getAllMiddlePointByCornerPoint=t.getAllResizePoints=t.getSizeByPoints=t.getOppositePoint=t.adjustPointByAdsorbedBounds=t.moveLineAccordingToPoint=t.dragResizePoint=t.ILineIndex=t.getDirectionByIndex=t.ILineDirection=void 0;const o=n(112),i=n(345),r=n(150),s=n(7),a=n(346);function l(e,t,n,i,s){if(t>=r.SelectionPoints.leftTop&&t<=r.SelectionPoints.leftBottom){const e=t-1<0?3:t-1,r=t;n[e]=o.moveLineToPoint(n[e],i),n[r]=o.moveLineToPoint(n[r],i)}else{const e=t-4;n[e]=o.moveLineToPoint(n[e],i)}}function c(e,t){let n;if(t>=0&&t<4)n=t-2<0?t+2:t-2;else{const e=t-4;n=e-2<0?e+2:e-2,n+=4}return e[n]}function u(e){return{width:o.getTowPointDis(e[0],e[1]),height:o.getTowPointDis(e[1],e[2])}}function d(e,t,n){const o=e.x-t.x,i=e.y-t.y;return{x:t.x+Math.sqrt(Math.pow(i,2)+Math.pow(o,2))*Math.cos((180*Math.atan2(-i,o)/Math.PI-n)*Math.PI/180),y:t.y-Math.sqrt(Math.pow(i,2)+Math.pow(o,2))*Math.sin((180*Math.atan2(-i,o)/Math.PI-n)*Math.PI/180)}}function h(e,t,n){if(!n)return{x:e.x+t.width/2,y:e.y+t.height/2};const o=e.x,i=e.y,r=(180-Math.atan(t.height/t.width)/Math.PI*180-n+360)/180*Math.PI,s=Math.sqrt(Math.pow(t.width/2,2)+Math.pow(t.height/2,2));return{x:o-s*Math.cos(r),y:-(-i-s*Math.sin(r))}}!function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(t.ILineDirection||(t.ILineDirection={})),t.getDirectionByIndex=function(e){return[i.Direction.nw,i.Direction.ne,i.Direction.se,i.Direction.sw,i.Direction.n,i.Direction.e,i.Direction.s,i.Direction.w][e]},function(e){e[e.Top=0]="Top",e[e.Right=1]="Right",e[e.Bottom=2]="Bottom",e[e.left=3]="left"}(t.ILineIndex||(t.ILineIndex={})),t.dragResizePoint=function(e,t,n,i,s=0,c){const u=(null==c?void 0:c.isVerticalMiddle)||!1,d=(null==c?void 0:c.isHorizontalCenter)||!1,h=o.getLinesByPoints(e);if(u||d){const i=o.getCenterPoint(e);if(t>=0&&t<4){const e=t-1<0?3:t-1,r=t,s={x:2*i.x-n.x,y:2*i.y-n.y};h[e]=o.moveLineToPoint(h[e],n),h[r]=o.moveLineToPoint(h[r],n);[0,1,2,3].filter(t=>t!==e&&t!==r).forEach(e=>{1===e||3===e?d&&(h[e]=o.moveLineToPoint(h[e],s)):u&&(h[e]=o.moveLineToPoint(h[e],s))})}else{const e=t-4,r=(e+2)%4,a={x:2*i.x-n.x,y:2*i.y-n.y};h[e]=o.moveLineToPoint(h[e],n);1===e||3===e?(d||s&&u)&&(h[r]=o.moveLineToPoint(h[r],a)):(u||s&&d)&&(h[r]=o.moveLineToPoint(h[r],a))}}else l(e,t,h,n,i);const p=h[0],f=h[1];if(p.k===f.k){const o=p.isPoint?p:f,i=p.isPoint?0:1;o.k=0,o.b=e[i].y,t!==r.SelectionPoints.leftTop&&t!==r.SelectionPoints.rightTop||(o.b=n.y)}const m=h[2],g=h[3];if(m.k===g.k){const o=m.isPoint?m:g,i=m.isPoint?2:3;o.k=0,o.b=e[i].y,t!==r.SelectionPoints.rightBottom&&t!==r.SelectionPoints.leftBottom||(o.b=n.y)}return o.getPointsByLines(h).map(e=>a.Point(e).round())},t.moveLineAccordingToPoint=l,t.adjustPointByAdsorbedBounds=function(e,t,n){const o=n.left+n.width/2,i=n.top+n.height/2,r=c(e,t);return{x:2*o-r.x,y:2*i-r.y}},t.getOppositePoint=c,t.getSizeByPoints=u,t.getAllResizePoints=function(e){const t=e.concat([]);let n,o=e[0];return e.forEach((i,r)=>{const s=r+1===e.length?0:r+1;n=e[s],t.push({x:(o.x+n.x)/2,y:(o.y+n.y)/2}),o=n}),t},t.getAllMiddlePointByCornerPoint=function(e){return e.reduce((t,n,o)=>{const i=o+1===e.length?0:o+1,r=n,s=e[i];return t.push({x:(r.x+s.x)/2,y:(r.y+s.y)/2}),t},[])},t.getDragPoints=function(e,t){switch(t){case r.default.box:return e;case r.default.none:return[];case r.default.leftTop_to_rightBottom:return[e[0],e[2]];case r.default.leftBottom_to_rightTop:return[e[1],e[3]];case r.default.leftMiddle_to_rightMiddle:return[e[5],e[7]];case r.default.topMiddle_to_bottomMiddle:return[e[4],e[6]];case r.default.corner:return[e[0],e[1],e[2],e[3]];case r.default.control:return[e[4],e[5],e[6],e[7]]}return e},t.getRectPoints=function(e,t,n=0){if(s.sameNumber(n,0))return[{x:e.x,y:e.y},{x:e.x+t.width,y:e.y},{x:e.x+t.width,y:e.y+t.height},{x:e.x,y:e.y+t.height}];const{x:o,y:i}=h(e,t,0),r=Math.hypot(t.width/2,t.height/2),a=Math.atan(t.height/t.width),l=n/180*Math.PI,c=Math.PI-a-l,u=a-l,d=2*Math.PI-a-l,p=Math.PI+a-l,f=Math.cos,m=Math.sin;return[{x:o+r*f(c),y:-(-i+r*m(c))},{x:o+r*f(u),y:-(-i+r*m(u))},{x:o+r*f(d),y:-(-i+r*m(d))},{x:o+r*f(p),y:-(-i+r*m(p))}]},t.getScalePoints=function(e,t){if(e)return e.map(e=>({x:e.x*t,y:e.y*t}))},t.fixPointsWithMinimum=function(e,t){const n=e.map(e=>e.x),o=e.map(e=>e.y),i=Math.max(...n)-Math.min(...n),r=Math.max(...o)-Math.min(...o);if(io.rotatePoint(e,n)),e=o.offsetPoints(e,{x:t.x,y:t.y})),e},t.getNWPoint=function(e,t,n){const o=(180-Math.atan(t.height/t.width)/Math.PI*180-n+360)/180*Math.PI,i=Math.sqrt(Math.pow(t.width/2,2)+Math.pow(t.height/2,2));return{x:e.x+i*Math.cos(o),y:-(-e.y+i*Math.sin(o))}},t.getNoRotateRect=function(e){const t=u(e),n=o.getCenterPoint(e);return Object.assign(Object.assign({},t),{left:n.x-t.width/2,top:n.y-t.height/2,right:n.x+t.width/2,bottom:n.y+t.height/2})},t.rotateSinglePoint=d,t.getBoundsOfRotatedRectangle=function({position:e,size:t,rotate:n}){const o=[{x:e.x,y:e.y},{x:e.x+t.width,y:e.y},{x:e.x,y:e.y+t.height},{x:e.x+t.width,y:e.y+t.height}],i={x:e.x+t.width/2,y:e.y+t.height/2},r=o.map(e=>d(e,i,n));let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;return r.forEach(e=>{s=Math.min(s,e.x),a=Math.min(a,e.y),l=Math.max(l,e.x),c=Math.max(c,e.y)}),{left:s,top:a,right:l,bottom:c,width:l-s,height:c-a}},t.getCenter=h,t.getSymmetricPoint=function(e,t){const{direction:n,intersectionOnYAxes:o,intersectionOnXAxes:i}=t;return"vertical"===n?{x:2*i-e.x,y:e.y}:{x:e.x,y:2*o-e.y}},t.getMidpointOfTwoPoints=function(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},t.getAngleWhenShiftPress=function(e,t){const n=t%e;return t%360-n+(n>=e/2?e:0)},t.getAngleOfLine=function(e,t){const{x:n,y:o}=e,{x:i,y:r}=t;let a;if(n===i)a=o>r?90:270;else{const e=(o-r)/(n-i),t=s.sameNumber(n,0)&&s.sameNumber(o,0)?0:180;a=180*Math.atan(e)/Math.PI+t}return a}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isChineseFont=t.checkFontFamily=t.MinRichTextSize=t.MinFontSize=t.DefaultFontSize=t.DefaultRichTextFontSize=t.FontBoxScale=t.DefaultTextSize=t.getFontKey=t.getFontFamily=t.fontFamilysConfig=t.DefaultFontFamilys=t.FontFamilys=void 0;const o=n(99),i=n(1);var r;!function(e){e.MicrosoftYaHei="Microsoft YaHei",e.PingFangSC="PingFang SC",e.SimSun="SimSun",e.FangSong="FangSong",e.KaiTi="KaiTi",e.SimHei="SimHei",e.Roboto="Roboto",e.Arial="Arial",e.ArialBlack="Arial Black",e.TimesNewRoman="Times New Roman",e.Tahoma="Tahoma",e.Verdana="Verdana",e.Helvetica="Helvetica"}(r=t.FontFamilys||(t.FontFamilys={})),t.DefaultFontFamilys=[{id:r.MicrosoftYaHei,text:i.default("property.component.textStyle.MicrosoftYahei")},{id:r.PingFangSC,text:i.default("property.component.textStyle.pingfang")},{id:r.SimSun,text:i.default("property.component.textStyle.SimSun")},{id:r.FangSong,text:i.default("property.component.textStyle.FangSong")},{id:r.KaiTi,text:i.default("property.component.textStyle.KaiTi")},{id:r.SimHei,text:i.default("property.component.textStyle.SimHei")},{id:r.Roboto,text:"Roboto"},{id:r.Arial,text:"Arial"},{id:r.ArialBlack,text:"Arial Bold"},{id:r.TimesNewRoman,text:"Times New Roman"},{id:r.Tahoma,text:"Tahoma"},{id:r.Verdana,text:"Verdana"},{id:r.Helvetica,text:"Helvetica"}],t.fontFamilysConfig={[r.MicrosoftYaHei]:'"Microsoft YaHei", 微软雅黑, -apple-system, BlinkMacSystemFont, "PingFang SC", Helvetica, Tahoma, Arial, sans-serif',[r.PingFangSC]:'"PingFang SC", -apple-system, BlinkMacSystemFont, Helvetica, Tahoma, Arial, "Microsoft YaHei", 微软雅黑, sans-serif',[r.SimSun]:"SimSun, STSong",[r.FangSong]:"FangSong_GB2312, FangSong, STFangsong",[r.KaiTi]:"KaiTi_GB2312, KaiTi, STKaiti",[r.SimHei]:'SimHei, "Heiti SC", 黑体, sans-serif',[r.Roboto]:"Roboto",[r.Arial]:"Arial",[r.ArialBlack]:'"Arial Black"',[r.TimesNewRoman]:'"Times New Roman"',[r.Tahoma]:"Tahoma",[r.Verdana]:"Verdana",[r.Helvetica]:"Helvetica"},t.getFontFamily=e=>Object.keys(t.fontFamilysConfig).includes(e)?t.fontFamilysConfig[e]:e,t.getFontKey=e=>Object.keys(t.fontFamilysConfig).find(n=>t.fontFamilysConfig[n]===e)||e,t.DefaultTextSize=[{id:8,text:"8"},{id:9,text:"9"},{id:10,text:"10"},{id:11,text:"11"},{id:12,text:"12"},{id:13,text:"13"},{id:14,text:"14"},{id:16,text:"16"},{id:18,text:"18"},{id:20,text:"20"},{id:22,text:"22"},{id:24,text:"24"},{id:26,text:"26"},{id:28,text:"28"},{id:36,text:"36"},{id:42,text:"42"},{id:48,text:"48"},{id:72,text:"72"}],t.FontBoxScale=.5,t.DefaultRichTextFontSize=t.DefaultTextSize,t.DefaultFontSize=14,t.MinFontSize=t.DefaultTextSize[0].id,t.MinRichTextSize=t.DefaultRichTextFontSize[0].id,t.checkFontFamily=function(e){if(!e)return r.MicrosoftYaHei;const t=e.split(",");let n="",i=Number.POSITIVE_INFINITY;return t.forEach((e,t)=>{const s=e.trim(),a=o.getEnumName(r,s);a&&te.ctrlKey||e.metaKey,t.isIE=()=>{const{userAgent:e}=window.navigator;return"ActiveXObject"in window||e.indexOf("Trident")>-1},t.isFigma=()=>/Figma/.test(o),t.isChrome=()=>/Chrome/.test(o),t.isSafari=()=>/Safari/.test(o)&&!t.isChrome(),t.isFirefox=()=>/Firefox/.test(o),t.isMac=-1!==o.indexOf("Macintosh"),t.saveToCahche=function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(e){console.log(e)}},t.loadFromCache=function(e,t){const n=window.localStorage.getItem(e);if(n)try{return JSON.parse(n)}catch(n){return console.error(`not find ${e} from cache`),t}return t},t.getMacCmdOrCtrl=()=>t.isSafari()?"^":"⌘",t.keydown=e=>{const t=-1!==window.navigator.userAgent.indexOf("Macintosh"),n=[],o=e=>-1===["control","shift","alt","meta"].indexOf(e.toLowerCase()),i=e=>t?"backspace"===e:"delete"===e||"del"===e;return{clear:()=>n.length=0,setKey:t=>{const r=t.key.toLowerCase();"control"!==r&&"meta"!==r||-1!==n.indexOf("ctrl")||n.push("ctrl"),"alt"===r&&-1===n.indexOf("alt")&&n.push("alt"),"shift"===r&&-1===n.indexOf("shift")&&n.push("shift"),i(r)&&-1===n.indexOf("delete")?n.push("delete"):o(t.key.toLocaleLowerCase())&&-1===n.indexOf(t.key.toLocaleLowerCase())&&n.push(t.key.toLocaleLowerCase());const s=n.join("+").toLowerCase();return e&&-1!==e.indexOf(s)&&t.preventDefault(),s},removeKey:e=>{const t=e.key.toLowerCase();"control"!==t&&"meta"!==t||-1===n.indexOf("ctrl")||n.splice(n.indexOf("ctrl"),1),"alt"===t&&-1!==n.indexOf("alt")&&n.splice(n.indexOf("alt"),1),"shift"===t&&-1!==n.indexOf("shift")&&n.splice(n.indexOf("shift"),1),i(t)&&-1!==n.indexOf("delete")?n.splice(n.indexOf("delete"),1):o(e.key.toLocaleLowerCase())&&-1!==n.indexOf(e.key.toLocaleLowerCase())&&n.splice(n.indexOf(e.key.toLocaleLowerCase()),1)},getKeys:()=>n}},t.copy=e=>{const t=document.createElement("textarea");t.textContent=e,t.style.position="fixed",document.body.appendChild(t),t.select();try{return document.execCommand("copy"),document.body.removeChild(t),!0}catch(e){console.warn("copy failed.")}return document.body.removeChild(t),!1},t.validateEmail=e=>/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e);t.convertEventToHotKey=e=>{var n;const o=[],i=null===(n=e.key)||void 0===n?void 0:n.toLocaleLowerCase();return i?((e=>t.isMacOS&&e.metaKey||!t.isMacOS&&e.ctrlKey)(e)&&o.push("ctrl"),(e.altKey||"shift"===i)&&o.push("shift"),(e=>t.isMacOS?"backspace"===e:"delete"===e||"del"===e)(i)?o.push("delete"):(e=>-1===["control","shift","alt","meta"].indexOf(e.toLowerCase()))(e.key)&&o.push(e.key),o.join("+").toLocaleLowerCase()):""}},function(e,t,n){e.exports=n(841)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.offMove=t.onMove=t.getMousePosition=t.dragDelegate=void 0;const o=n(80),i=n(887).default();window.addEventListener("mousemove",i.call),t.dragDelegate=(e,t)=>{let n,r;const s={x:0,y:0},a={dx:0,dy:0};let l=!1,c=Object.assign({},s);window.event instanceof MouseEvent&&(n={pageX:window.event.pageX,pageY:window.event.pageY});const u=t=>{if(t.buttons!==o.MouseButtons.Left)return;n||(n={pageX:t.pageX,pageY:t.pageY}),r||(r=n),s.x=t.pageX-n.pageX,s.y=t.pageY-n.pageY,a.dx=t.pageX-r.pageX,a.dy=t.pageY-r.pageY,r={pageX:t.pageX,pageY:t.pageY},l||(Math.abs(s.x)>=5||Math.abs(s.y)>=5)&&(l=!0);const i=c.x!==s.x||c.y!==s.y;l&&i&&(c=Object.assign({},s),e(t,s,a,n))},d=e=>{window.removeEventListener("mouseup",d),i.remove(u),t(e,s,l)};window.addEventListener("mouseup",d),i.add(u)},t.getMousePosition=(e,t)=>{const n=e.getBoundingClientRect();return{x:t.pageX-n.left+e.scrollLeft,y:t.pageY-n.top+e.scrollTop,pageX:t.pageX,pageY:t.pageY}},t.onMove=e=>{i.add(e)},t.offMove=e=>{i.remove(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i=n(2),r=n(208);n(961),n(389);class s extends o.PureComponent{constructor(e){super(e),this.renderContent=()=>{const{selected:e,cls:t,style:n,size:r,disabled:s,url:a,theme:l,customFontIcon:c}=this.props,{onMouseDown:u,onClick:d,onMouseOver:h,onMouseEnter:p}=this.props,f=n||{},m=!!a,g=!m&&!c,y=r||16,v=!!c&&!g&&!m;return(g||v)&&(f.fontSize=y,f.height=y+2,f.width=y+2,f.lineHeight=y+"px"),o.createElement("div",{style:f,className:i.default("dsm-c-rp-icon",{selected:e&&"button"===l&&!s,disabled:s,"button-theme":"button"===l||"hot-button"===l,"hot-button-theme":"hot-button"===l,"img-icon":m,"font-icon":g}),onClick:s?void 0:d,onMouseDown:s?void 0:u,onMouseEnter:s?void 0:p,onMouseOver:s?void 0:h},o.createElement("div",{className:"icon-background"}),m&&o.createElement("img",{src:a,width:y,height:y,draggable:!1}),g&&o.createElement("i",{style:{fontSize:r},className:"mockplus_rp mockplus_rp_"+(t||"icon_normal")}),v&&o.createElement("label",{style:{fontSize:r,fontFamily:c.fontName}},String.fromCharCode(c.iconCode)))},this.state={},this.selfRef=o.createRef()}render(){const{tips:e,className:t,isInPopup:n,autoHideTips:i}=this.props,s="dsm-c-rp-icon-tooltip "+(t||"");return e?o.createElement(r.default,{text:e,ownerIsDialog:n,className:s,autoHide:null==i||i},this.renderContent()):o.createElement("div",{className:s},this.renderContent())}}s.defaultProps={size:16,theme:"button"},t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCompExistedInDoOfPatches=t.ArtboardPatchesClass=void 0;const o=n(6),i=n(114);function r(e,t){return Boolean(e.do[t])}function s(e,t){return Boolean(e.undo[t])}t.ArtboardPatchesClass=class{constructor(e){this._do=o.defaultTo(null==e?void 0:e.do,{}),this._undo=o.defaultTo(null==e?void 0:e.undo,{})}get do(){return this._do}get undo(){return this._undo}coverPatches(e){for(let t in e.do){const n=e.do[t],o=this.do[t],i=a(n);this.do[t]=r(this,t)?o.filter(i):[];const l=e.undo[t],c=this.undo[t],u=a(l);this.undo[t]=s(this,t)?c.filter(u):[],this.do[t].push(...n),this.undo[t].push(...l)}return this}isCompExistedInPatches(e){return this.do[e]}getPatchesByCompChange(e,t){return{do:{[e]:[...t.do]},undo:{[e]:[...t.undo]}}}getAttrChangePatches(e,t,n){const o=(new i.ComponentPatchesClass).getAttrChangePatches(e,t,{oldVal:n.oldVal,newVal:n.newVal});return this.coverPatches(this.getPatchesByCompChange(e,o)),this}findOperationSuit(e){const t=this._do;return Object.values(t).reduce((e,t)=>e=e.concat(t),[]).some(e)}},t.isCompExistedInDoOfPatches=r;const a=o.curry((e,t)=>!e.some(e=>e.path===t.path))},function(e,t,n){var o=n(40),i=n(115);e.exports=n(39)?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(21),i=n(62),r=n(69),s=n(116)("src"),a=n(634),l=(""+a).split("toString");n(75).inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,n,a){var c="function"==typeof n;c&&(r(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(r(n,s)||i(n,s,e[t]?""+e[t]:l.join(String(t)))),e===o?e[t]=n:a?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[s]||a.call(this)}))},function(e,t,n){var o=n(4),i=n(26),r=n(85),s=/"/g,a=function(e,t,n,o){var i=String(r(e)),a="<"+t;return""!==n&&(a+=" "+n+'="'+String(o).replace(s,""")+'"'),a+">"+i+""+t+">"};e.exports=function(e,t){var n={};n[e]=t(a),o(o.P+o.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberKeyDoubleClickEventHandle=t.isCharsKey=t.isDelPressed=t.isControlKeyPressed=t.convertShortCutToHotKey=t.convertEventToHotKey=void 0;const o=n(50),i=n(7);function r(e){return o.isMacOS&&e.metaKey||!o.isMacOS&&e.ctrlKey}t.convertEventToHotKey=e=>{var t;const n=[],i=null===(t=e.key)||void 0===t?void 0:t.toLowerCase();return i?(r(e)&&n.push("ctrl"),(e.altKey||"alt"===i)&&n.push("alt"),(e.shiftKey||"shift"===i)&&n.push("shift"),(e=>o.isMacOS?"backspace"===e:"delete"===e||"del"===e)(i)?n.push("delete"):(e=>-1===["control","shift","alt","meta"].indexOf(e.toLowerCase()))(e.key)&&n.push(e.key),n.join("+").toLowerCase()):""},t.convertShortCutToHotKey=e=>{const t=[];return o.isMacOS?e.replace(/ /g,"").replace("⌘","ctrl+").replace("⇧","shift+").replace("⌥","alt+").replace("⌫","delete").replace("↩","enter").toLowerCase():(e.split(" ").forEach((e,n)=>{n%2==0&&t.push(e)}),t.length>1?(t.forEach((e,n)=>{let o=e.toLowerCase();"⌘"===o?o="ctrl":"⌥"===o?o="alt":"⇧"===o?o="shift":"⌫"===o?o="delete":"↩"===o&&(o="enter"),t[n]=o}),t.join("+").toLowerCase()):e.toLowerCase())},t.isControlKeyPressed=r,t.isDelPressed=function(e){const t=e.key.toLowerCase();return o.isMacOS?"backspace"===t:"delete"===t||"del"===t},t.isCharsKey=function(e){return![{min:65,max:90},{min:48,max:57},{min:96,max:107},{min:111,max:109},{min:192,max:186},{min:222,max:219},{min:32,max:32}].some(t=>{return!((n=e)<=(o=t).max&&n>=o.min);var n,o})};t.NumberKeyDoubleClickEventHandle=class{constructor(e){this._capture=!1,this.DURATION=300,this.clickCount=0,this.isKeyPressed=!1,this.timeStamp=0,this.NUM_KEY="0123456789",this.numStr="",this.doExecute=()=>{let e=this.numStr.trim();const t=/\d+/.test(e);if(this.reset(),!t||!e.length)return;"0"===e?e="100":"00"===e?e="0":1===e.length?e+="0":"0"===e[0]&&(e=e.substr(1));const n=parseInt(e,10);this.handle&&this.handle(n)},this.handleKeyDown=e=>{if(i.isInputting()||this.isControllerKey(e))return void this.reset();const{key:t}=e;this.validateKey(t),clearTimeout(this.timeOut),this.isNumberChar(t)&&(this.timeOut=window.setTimeout(this.doExecute,this.DURATION))},this.handleKeyUp=e=>{i.isInputting()||this.isControllerKey(e)?this.reset():this.isNumberChar(e.key)&&(this.isKeyPressed=!0)},this._capture=!!e}reset(){this.numStr="",this.clickCount=0,this.isKeyPressed=!1,this.timeStamp=0,clearTimeout(this.timeOut),this.timeOut=void 0}isControllerKey(e){return e.shiftKey||e.altKey||e.ctrlKey||e.metaKey}isNumberChar(e){return-1!==this.NUM_KEY.indexOf(e)}validateKey(e){const t=this.isNumberChar(e);t||(this.timeStamp=0,this.clickCount=0,this.numStr="");const n=Date.now(),o=n-this.timeStamp<=this.DURATION;!this.isKeyPressed&&t&&(this.timeStamp=n,this.numStr=""+e,this.clickCount=1),t&&o&&this.isKeyPressed&&(this.clickCount++,this.clickCount>=2&&this.numStr.length<2&&(this.clickCount=0,this.numStr=this.numStr?`${this.numStr}${e}`:e))}get capture(){return{capture:this._capture}}addEventListener(e){this.handle=e,window.addEventListener("keydown",this.handleKeyDown,this.capture),window.addEventListener("keyup",this.handleKeyUp,this.capture)}removeEventListener(){window.removeEventListener("keydown",this.handleKeyDown,this.capture),window.removeEventListener("keyup",this.handleKeyUp,this.capture)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i=n(2),r=n(23),s=n(288);n(1556);class a extends o.Component{constructor(e){super(e),this.check=e=>{const t=!this.props.checked;this.props.disabled||this.props.onChange&&(this.props.onChange(t),e.stopPropagation())}}render(){const{disabled:e,checked:t,indeterminate:n,text:a,icon:l,iconLink:c,desc:u,autoLinefeed:d,width:h,maxWidth:p,fontSize:f}=this.props;return o.createElement("div",{className:i.default("dsm-c-checkbox",{"disabled-checkbox":e,"dsm-c-checkbox-dark":this.props.darkMode,"dsm-c-checkbox-auto-line":d}),style:{width:h,maxWidth:d?p:"max-content"},onClick:this.check,onDoubleClick:e=>{e.stopPropagation()}},o.createElement("span",{className:i.default("checkbox-viewer",{"checkbox-checked":t&&!n,"checkbox-checked-indeterminate":t&&n})},o.createElement("span",{className:"checkbox-viewer-inner"})),d?o.createElement("span",{className:"checkbox-text",style:{maxWidth:l?`calc(${p} - 45px)`:`calc(${p} - 23px)`,fontSize:f}},a):o.createElement("span",{className:"checkbox-text",style:{maxWidth:l?"calc(100% - 45px)":"calc(100% - 23px)",fontSize:f}},a),l&&o.createElement(s.default,{href:c,target:"target"},o.createElement(r.default,{cls:l})),u&&o.createElement("div",{className:"dsc"},u))}}a.defaultProps={darkMode:!1,checked:!1,indeterminate:!1,text:"",autoLinefeed:!1,width:"auto",maxWidth:200,fontSize:13},t.default=a},function(e,t,n){"use strict";function o(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return o}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(164),i=n(85);e.exports=function(e){return o(i(e))}},function(e,t,n){var o=n(165),i=n(115),r=n(70),s=n(84),a=n(69),l=n(300),c=Object.getOwnPropertyDescriptor;t.f=n(39)?c:function(e,t){if(e=r(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(a(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(69),i=n(43),r=n(225)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),o(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShortCutKey=t.transShortCutKeyToMac=t.unListenerShortCut=t.listenerShortCut=t.stopBubbleWhenSortCut=void 0;const o=n(65),i=n(50),r=n(7),s=["f1","ctrl+g","ctrl+d","ctrl+0","ctrl+1","ctrl+2","ctrl+3","ctrl+4","ctrl+5","ctrl+6","ctrl+7","ctrl+8","ctrl+9","ctrl++","ctrl+-","ctrl+=","ctrl+z","ctrl+y","ctrl+l","ctrl+f","ctrl+p","ctrl+r","ctrl+t","ctrl+o","alt+w","ctrl+n","ctrl+h","ctrl+f11","ctrl+arrowup","ctrl+arrowdown","ctrl+arrowright","ctrl+arrowleft","ctrl+shift+arrowup","ctrl+shift+arrowdown","shift+arrowleft","shift+arrowright","shift+arrowup","shift+arrowdown","ctrl+tab","ctrl+alt+l","ctrl+alt+¬","ctrl+alt+c","ctrl+alt+ç","ctrl+alt+r","ctrl+alt+®","ctrl+alt+t","ctrl+alt+†","ctrl+alt+m","ctrl+alt+µ","ctrl+alt+b","ctrl+alt+∫","ctrl+shift+h","ctrl+shift+u","alt+g","alt+©","alt+l","alt+¬","ctrl+s","ctrl+f4","alt+f4","ctrl+f11"];i.isMockRPD||s.push("ctrl+w");const a=["alt+arrowleft","alt+arrowright","alt+arrowup","alt+arrowdown","ctrl+[","ctrl+]","ctrl+s","ctrl+f","ctrl++","ctrl+-","ctrl+=","ctrl+0","ctrl+1","ctrl+2","ctrl+3","ctrl+4","ctrl+5","ctrl+6","ctrl+7","ctrl+8","ctrl+9","ctrl+n"],l=e=>{c(e)};function c(e){const t=o.convertEventToHotKey(e).replace(/^[ ]$/g,"");r.isInputting()?-1!==a.indexOf(t)&&e.preventDefault():u.includes(t)||(-1===s.indexOf(t)&&-1===a.indexOf(t)||e.preventDefault(),o.isControlKeyPressed(e)&&0==="1234567890".indexOf(e.key)&&e.preventDefault())}t.stopBubbleWhenSortCut=c;let u=[];t.listenerShortCut=function(e){u=e||[],window.addEventListener("keydown",l,{capture:!0})},t.unListenerShortCut=function(){u=[],window.removeEventListener("keydown",l)};const d=["⇧","⌥","⌘"];function h(e){return e.trim().split(" + ").map(e=>{const t=e.trim();return"Alt"===t?"⌥":"Ctrl"===t?"⌘":"Shift"===t?"⇧":"Delete"===t||"Backspace"===t?"⌫":"Enter"===t?"↩":t}).sort((e,t)=>{const n=d.indexOf(e),o=d.indexOf(t);return-1===n||-1===o?1:n-o}).join("")}t.transShortCutKeyToMac=h,t.getShortCutKey=function(e,t){const n=[];t&&(t.ctrlKey&&n.push("Ctrl"),t.altKey&&n.push("Alt"),t.shiftKey&&n.push("Shift"));let o=e[0].toUpperCase()+e.substring(1).toLowerCase();i.isMacOS&&("delete"!==e.toLowerCase()&&"backspace"!==e.toLowerCase()||(o="⌫"),"enter"===e.toLowerCase()&&(o="↩")),n.push(o);let r=n.join(" + ");return i.isMacOS&&(r=h(r)),r}},function(e,t,n){"use strict";var o=n(376),i=n(929),r=Object.prototype.toString;function s(e){return"[object Array]"===r.call(e)}function a(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===r.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,o=e.length;n0?o:n)(e)}},function(e,t,n){"use strict";var o=n(26);e.exports=function(e,t){return!!e&&o((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MouseButtons=t.MouseButton=void 0,function(e){e[e.Left=0]="Left",e[e.Wheel=1]="Wheel",e[e.Right=2]="Right",e[e.Back=3]="Back",e[e.Forward=4]="Forward"}(t.MouseButton||(t.MouseButton={})),function(e){e[e.Null=0]="Null",e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.Wheel=4]="Wheel",e[e.Back=8]="Back",e[e.Forward=16]="Forward"}(t.MouseButtons||(t.MouseButtons={}))},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasInteraction=t.getClassNameAndStyleOfFragmentAction=t.getFragmentPositionTip=t.getPositionFromFragmentAction=t.getRealMode=t.isPageOrFragmentActionTypeExited=t.getSupportCommands=t.canSetInteraction=t.getSupportEventsInfo=t.getSupportEvents=t.DefaultCommandParam=t.DefaultAnimation=t.DefaultScrollCommandParam=t.DefaultContentCommandParam=t.DefaultStateCommandParam=t.DefaultVisibleCommandParam=t.DefaultRotateCommandParam=t.DefaultZoomCommandParam=t.DefaultResizeCommandParam=t.DefaultMoveCommandParam=void 0;const i=n(14),r=n(131),s=n(45),a=n(923),l=n(18),c=n(13),u=n(5),d=n(373),h=[s.EventTypes.click,s.EventTypes.doubleClick,s.EventTypes.contextMenu,s.EventTypes.mouseDown,s.EventTypes.mouseUp,s.EventTypes.mouseEnter,s.EventTypes.mouseLeave,s.EventTypes.afterMove,s.EventTypes.afterResize,s.EventTypes.afterZoom,s.EventTypes.afterRotate,s.EventTypes.afterVisible,s.EventTypes.afterHide],p=[s.EventTypes.click,s.EventTypes.doubleClick,s.EventTypes.contextMenu,s.EventTypes.mouseDown,s.EventTypes.mouseUp,s.EventTypes.loaded];function f(e,t){var n;if(!e)return t instanceof c.UIFragment&&!t.isMain?[s.EventTypes.loaded]:[...p];if((null==t?void 0:t.type)===u.CFrame)return[];if([u.CCompoundPath,u.CTable].find(e=>{var n;return e===(null===(n=null==t?void 0:t.parent)||void 0===n?void 0:n.type)}))return[];if(!t||t.isConnector||t.type===u.CSymbol)return[];const o=[...h],i=null===(n=t.parent)||void 0===n?void 0:n.select;return t.select?"self"===t.select.target?(o.push(s.EventTypes.checked),t.select.reversible&&o.push(s.EventTypes.unChecked,s.EventTypes.toggleCheck)):o.splice(0):i&&"child"===i.target&&o.push(s.EventTypes.checked,s.EventTypes.unChecked,s.EventTypes.toggleCheck),t.type===u.CInput&&o.push(s.EventTypes.focus,s.EventTypes.blur),t.autoSize&&o.splice(o.indexOf(s.EventTypes.afterResize),1),(t.autoSize||t.type===u.CLine)&&o.splice(o.indexOf(s.EventTypes.afterResize),1),t.type==u.CLine&&o.splice(o.indexOf(s.EventTypes.afterRotate),1),o}t.DefaultMoveCommandParam={x:0,y:0,fromCurrent:!1},t.DefaultResizeCommandParam={width:0,height:0,fromCurrent:!1,transformOrigin:"topLeft"},t.DefaultZoomCommandParam={x:1,y:1,fromCurrent:!1,transformOrigin:"center"},t.DefaultRotateCommandParam={rotate:0,fromCurrent:!1,transformOrigin:"center"},t.DefaultVisibleCommandParam={state:"toggle",forceFront:!1},t.DefaultStateCommandParam={stateID:"normal"},t.DefaultContentCommandParam={target:"@next",effect:"none"},t.DefaultScrollCommandParam={horizontal:!1,vertical:!0},t.DefaultAnimation={effect:"none",delay:0,duration:0},t.DefaultCommandParam={[s.CommandTypes.move]:t.DefaultMoveCommandParam,[s.CommandTypes.resize]:t.DefaultResizeCommandParam,[s.CommandTypes.rotation]:t.DefaultRotateCommandParam,[s.CommandTypes.zoom]:t.DefaultZoomCommandParam,[s.CommandTypes.toggleVisible]:t.DefaultVisibleCommandParam,[s.CommandTypes.toggleState]:t.DefaultStateCommandParam,[s.CommandTypes.switchContent]:t.DefaultContentCommandParam,[s.CommandTypes.scroll]:t.DefaultScrollCommandParam},t.getSupportEvents=f,t.getSupportEventsInfo=function(e){var t;const n=f(e&&!e.isArtboard,e),o=null===(t=null==e?void 0:e.libData)||void 0===t?void 0:t.interactions,i=null==o?void 0:o.transformEventName,r=n.map(e=>{const t={id:e,text:a.EventNames[e]};if(i){const n=i(e);n&&(t.text=n)}return t});return(null==o?void 0:o.sort)?o.sort(r):r},t.canSetInteraction=function(e){return f(!0,e).length>0},t.getSupportCommands=function(e){var t;const n=[s.CommandTypes.move,s.CommandTypes.zoom];return e?(e.autoSize||n.splice(1,0,s.CommandTypes.resize),e.type!==u.CLine&&n.push(s.CommandTypes.rotation),[u.CLine,u.CSymbol].includes(e.type)&&n.splice(n.indexOf(s.CommandTypes.resize),1),n.push(s.CommandTypes.toggleVisible),d.allowedToggleStateCmd(e)&&n.push(s.CommandTypes.toggleState),e.type===u.CContentPanel&&(null===(t=e.value)||void 0===t?void 0:t.length)&&n.push(s.CommandTypes.switchContent),n.push(s.CommandTypes.scroll),n):[]},t.isPageOrFragmentActionTypeExited=(e,t)=>o(void 0,void 0,void 0,(function*(){var n;const o=null===(n=null==e?void 0:e.actions)||void 0===n?void 0:n.find(e=>e.type===t);return!o||"fragment"!==t&&"page"!==t?{isExisted:!1}:{isExisted:!0,action:o}})),t.getRealMode=(e,t)=>{let n=e;if(!n)switch(t){case s.PageSkipEffects.slideToBottom:n=r.FragmentPositionMode.Top;break;case s.PageSkipEffects.slideToLeft:n=r.FragmentPositionMode.Right;break;case s.PageSkipEffects.slideToRight:n=r.FragmentPositionMode.Left;break;case s.PageSkipEffects.slideToTop:n=r.FragmentPositionMode.Bottom;break;default:n=r.FragmentPositionMode.Center}return n},t.getPositionFromFragmentAction=(e,n,o,i,s)=>{switch(t.getRealMode(o,s)){case r.FragmentPositionMode.Custom:return i||{x:0,y:0};case r.FragmentPositionMode.Left:return{x:0,y:e.size.height/2-n.size.height/2};case r.FragmentPositionMode.Right:return{x:e.size.width-n.size.width,y:e.size.height/2-n.size.height/2};case r.FragmentPositionMode.Top:return{x:e.size.width/2-n.size.width/2,y:0};case r.FragmentPositionMode.Bottom:return{x:e.size.width/2-n.size.width/2,y:e.size.height-n.size.height};case r.FragmentPositionMode.Center:return{x:e.size.width/2-n.size.width/2,y:e.size.height/2-n.size.height/2}}},t.getFragmentPositionTip=(e,n,o)=>{const i=t.getRealMode(e,n);switch(i){case r.FragmentPositionMode.Custom:return`${o.x}, ${o.y}`;case r.FragmentPositionMode.Left:case r.FragmentPositionMode.Right:case r.FragmentPositionMode.Top:case r.FragmentPositionMode.Bottom:case r.FragmentPositionMode.Center:return a.FragmentPositionModes[i];default:return`${o.x}, ${o.y}`}},t.getClassNameAndStyleOfFragmentAction=e=>{var t;const n={},o={},{animation:r,params:s,isExit:a}=e;if(s.showBackground)if(s.backgroundColor){const{color:e,type:t}=s.backgroundColor;e&&t&&i.applyFillToStyle({color:e,type:t},o)}else o.background=i.parseColorToString(Object.assign(Object.assign({},l.GrayColor),{a:.5}));o.pointerEvents="none",s.showBackground&&(o.pointerEvents="all"),n.animationTimingFunction=r.effect,n.animationDuration=(null!==(t=r.duration)&&void 0!==t?t:1)+"ms";let c=s.effect;"none"===c&&(n.animationDuration="1ms"),n.animationFillMode="forwards";const u=!["slideToLeft","slideToRight","slideToTop","slideToBottom"].includes(c);a||r.duration||u||(c+="-none");return{keyframeName:(a?"revert-":"")+(u?"fragment-custom-":"fragment-")+c,bgStyle:o,animationStyle:n}},t.hasInteraction=function(e){const{interactions:t}=e;return!(!t||!Object.keys(t).length)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createArtboard=t.makeComponents=t.makeUIComponent=void 0;const o=n(5),i=n(13);let r;function s(e,t,n){const s=function(e){return r||(r={[o.CGroup]:i.UIGroupComponent,[o.CSymbol]:i.UISymbolComponent,[o.CStackPanel]:i.UIStackPanelComponent,[o.CWrapPanel]:i.UIWrapPanelComponent,[o.CGridPanel]:i.UIGridPanelComponent,[o.CContentPanel]:i.UIContentPanelComponent,[o.CListLayoutPanel]:i.UIListLayoutSealedComponent,[o.CSelectPanel]:i.UISelectPanelComponent,[o.CCanvasPanel]:i.UIPanelComponent,[o.CConnector]:i.UIConnectorComponent,[o.CCompoundPath]:i.UICompoundPathComponent,[o.CTable]:i.UITableComponent,[o.CTree]:i.UITreeComponent,[o.CTreeItem]:i.UITreeItemComponent}),r[e]}(null==e?void 0:e.type);return s?new s(e,t,n):(null==e?void 0:e.sealed)?new i.UIPanelComponent(e,t,n):(null==e?void 0:e.alias)===o.CTreeItem?new i.UITreeItemComponent(e,t,n):new i.UIComponent(e,t,n)}t.makeUIComponent=s,t.makeComponents=function(e,t,n){return function(e){const t=e.filter(e=>!!e);e.length!==t.length&&e.splice(0,e.length,...t)}(e),e.map(e=>s(e,t,n))},t.createArtboard=function(e){return{_id:e.id,appID:e.appID,background:void 0,components:[],imageURL:"",interaction:{},latestRevisionID:"",modified:!1,name:e.name,nodeID:e.nodeID,position:e.position,responsive:!1,size:e.size,type:e.type,userID:e.userID,updatedBy:e.userID,state:0,createdAt:new Date,updatedAt:new Date}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),i=n(395),r=n(2);function s(e){const{width:t,height:n,children:s,setRef:a,autoHeight:l,autoHeightMin:c,autoHeightMax:u,disabledScroll:d,onScroll:h,onScrollStart:p,onScrollStop:f}=e;return o.createElement(i.default,{autoHeight:l,autoHeightMin:c,autoHeightMax:u,className:r.default("dsm-c-scrollview",{disabled:d}),style:{width:t,height:n},autoHide:!0,renderTrackHorizontal:e=>o.createElement("div",Object.assign({},e,{className:"track-bar h-track"})),renderTrackVertical:e=>o.createElement("div",Object.assign({},e,{className:"track-bar v-track"})),ref:a,onScroll:h,onScrollStart:p,onScrollStop:f},s)}n(1547),s.defaultProps={autoHeight:!1,autoHeightMin:0,autoHeightMax:200,width:"100%",height:"100%"},t.default=s},function(e,t,n){var o=n(28);e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var o=n(4),i=n(75),r=n(26);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),o(o.S+o.F*r((function(){n(1)})),"Object",s)}},function(e,t,n){var o=n(76),i=n(164),r=n(43),s=n(36),a=n(241);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,d=6==e,h=5==e||d,p=t||a;return function(t,a,f){for(var m,g,y=r(t),v=i(y),b=o(a,f,3),_=s(v.length),w=0,C=n?p(t,_):l?p(t,0):void 0;_>w;w++)if((h||w in v)&&(g=b(m=v[w],w,y),e))if(n)C[w]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return w;case 2:C.push(m)}else if(u)return!1;return d?-1:c||u?u:C}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPageHidden=t.getHiddenParentNode=t.getAllPageCount=t.containsNode=t.prettyPrintTree=t.getNodesByIDs=t.collapseOfTree=t.renameNodeOfTree=t.findParentNodeByID=t.findAllAncestors=t.findNodeByID=t.findNextPageNode=t.getRemoveNodeIncludeChild=t.changeTreeToArray=t.getFirstPageNode=t.getFirstPageNodeOfTree=t.parseNodesWithArtboardsToTreeByState=t.parseNodeToTreeByState=t.parseNodesToTree=t.NodeState=void 0;const o=n(251);var i;function r(e){return Object.assign({},e,{_id:e._id,name:e.name,type:e.type,index:0,appID:e.appID,artboardID:e.artboardID,path:e.path,children:[],userID:e.userID,_collapse:e._collapse||!1,hidden:e.hidden})}function s(e,t){const n=[];return e.forEach(e=>function(e,t,n){const o=r(e);if("ROOT"===e.path)o.index=t.length,n&&(o.index=e.index),t.push(o);else{const i=e.path.split(",").slice(1);i.reduce((r,s,a)=>{const l=r.find(e=>e._id===s);return a===i.length-1&&(l?(o.parent=l,o.index=l.children.length,n&&(o.index=e.index),l.hidden&&(o.hidden=!0),l.children.push(o)):(o.index=t.length,n&&(o.index=e.index),t.push(o))),l?l.children:r},t)}}(e,n,t)),n}function a(e,t){const n=e.map(e=>r(e)),o=n.filter(e=>e.state===i.Normal),a=n.filter(e=>e.state===i.Deleted),l=a.map(e=>e._id);let c=[],u=[];o.forEach(e=>{!function(e,t){const n=e.path;for(let e=0,o=t.length;e{const t=e.path.split(",").reverse()[0],n=a.find(e=>e._id===t);n&&n.children.push(e)}),a.sort((e,t)=>{const n=new Date(e.deletedAt||0).getTime();return new Date(t.deletedAt||0).getTime()-n}),{realNodes:d,tempDeleteNodes:a}}function l(e,t){for(let n=0;n{t.push(e),e.children.length&&c(e.children,t)}),t}function u(e,t,n){e.forEach(e=>{t.includes(e._id)?(n.push(e._id),e.children.length&&u(e.children,e.children.map(e=>e._id),n)):e.children.length&&u(e.children,t,n)})}function d(e,t){for(let n=0;n{t.children&&t.children.length>0&&e(t.children,n,o);const i=n.filter(e=>e.nodeID===t._id);if(i.length>0){t.stateID=t._id;const e=i.map(e=>({_id:`${t._id}$${e._id}`,name:`[${e.name||"-"}]`,type:"fragment",size:e.size,position:e.position,index:0,appID:e.appID,artboardID:e._id,path:t.path,children:[],userID:e.userID,_collapse:!1,stateID:t._id,source:"rp-fragment",imageURL:e.imageURL,imageCreatedAt:e.imageCreatedAt,updatedAt:e.updatedAt,createdAt:e.createdAt}));t.children.unshift(...e);const n={_id:t._id,pages:[t,...e]};o.push(n)}})}(n,t,o),{pageNodes:n,states:o}},t.getFirstPageNodeOfTree=l,t.getFirstPageNode=function(e){return l(s(e))},t.changeTreeToArray=c,t.getRemoveNodeIncludeChild=u,t.findNextPageNode=function(e,t,n){let o=[];if(u(e,t,o),!o.includes(n)){const t=d(e,n);if(t)return t}const i=c(e);let r=0;o.forEach(e=>{const t=i.findIndex(t=>t._id===e);r=Math.max(t,r)});let s=r+1,a=i[s];for(;a&&("page"!==(null==a?void 0:a.type)||o.includes(a._id));)++s,a=i[s];for(a||(a=i[r]);a&&("page"!==(null==a?void 0:a.type)||o.includes(a._id));)--s,a=i[s];return a},t.findNodeByID=d,t.findAllAncestors=function(e){const t=[];let n=e;for(;n.parent;)t.unshift(n.parent._id),n=n.parent;return t},t.findParentNodeByID=function e(t,n,o=null){for(let i=0;it._id===n?Object.assign({},t,{name:o}):(t.children&&(t.children=e(t.children,n,o)),t))},t.collapseOfTree=function e(t,n,o){return t.map(t=>t._id===n?Object.assign({},t,{_collapse:o}):(t.children&&(t.children=e(t.children,n,o)),t))},t.getNodesByIDs=function e(t,n){if(0===n.length)return[];for(let o=0;on.includes(e._id));if(i.children&&i.children.length>0){const t=e(i.children,n);if(t.length>0)return t}}return[]},t.prettyPrintTree=function e(t,n=0){t.forEach(t=>{const o=Array(n).fill(" ").join("");console.log(`${o} [${t.index}] ${t._id} ${t.name}`),t.children&&t.children.length>0&&e(t.children,n+1)})},t.containsNode=function e(t,n){if(t._id===n)return!0;if(!t.children||0===t.children.length)return!1;for(let o=0;o{e.filter(e=>3!==e.state).forEach(e=>{"page"===e.type&&t++,e.children&&n(e.children)})};return n(e),t},t.getHiddenParentNode=h,t.isPageHidden=function(e){return!!h(e).length||e.hidden}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOfflineDemoData=void 0,t.getOfflineDemoData=()=>{const e=window.offlineDemoData;if(e&&"[object Object]"===Object.prototype.toString.call(e))return e}},function(e,t,n){"use strict";
+/*! *****************************************************************************
+ * 自定义的数学函数及方法,其中部分常用的通过自定义计算方式实现,就项目使用情况来说,性能高于对应原生方法
+ * TODO 该文件目前暂未启用,之前这些方法放在 globalUtils中,待 2021-3的版本发布后,全局统一替换到这个模块
+ * @author Matt 2021-3-19
+ ***************************************************************************** */Object.defineProperty(t,"__esModule",{value:!0});function o(e,t,n){return n?e>=t.min&&e<=t.max:e>t.min&&e0?e:0-e}function r(...e){const t=Array.from(e);if(!t.length)return NaN;if(t.length<2)return t[0];const[n,o,...i]=t;return r(n>o?o:n,...i)}function s(...e){const t=Array.from(e);if(!t.length)return NaN;if(t.length<2)return t[0];const[n,o,...i]=t;return s(n>o?n:o,...i)}function a(e,t,n){const o=n||1e-5;return i(e-t)<=o||e===t}t.default={max:s,min:r,ceil:function(e){const t=e%1;return 0===t?e:e>0?e-t+1:e-t},floor:function(e){const t=e%1;return 0===t?e:e>0?e-t:e-1-t},abs:i,round:function(e){if(0===e%1)return e;let t=e;return e>0?(t+=.5,t-t%1):(t=0-t+.5,0-(t-t%1))},pow:function(e,t){return Math.pow(e,t)},trunc:function(e){return e-e%1},hypot:Math.hypot,sqrt:Math.sqrt,cos:Math.cos,acos:Math.acos,sin:Math.sin,asin:Math.asin,tan:Math.tan,atan:Math.atan,random:Math.random,distance:function(e,t){return e>t?e-t:t-e},between:o,betweenNumber:function(e,t){return r(t.max,s(e,t.min))},betweenRange:function(e,t,n){return o(t.min,e,n)&&o(t.max,e,n)||o(e.min,t,n)&&o(e.max,t,n)},isMoreOrLess:function(e,t,n){return t>=e-n&&t<=e+n},equal:a,equalRange:function(e,t){return a(e.min,t.min)&&a(e.max,t.max)},intersectRange:function(e,t,n){return o(e.min,t,n)||o(e.max,t,n)||o(t.max,e,n)||o(t.min,e,n)},value:function(e,t){var n;return null!==(n=null!=e?e:t)&&void 0!==n?n:0},variable:function(e,t){return null!=e?e:t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minWindowTop=t.isMac=t.isFirefox=t.isSafari=t.isChrome=t.isIE=t.isCtrlKey=t.isMacOS=void 0;const o=window.navigator.userAgent;t.isMacOS=-1!==window.navigator.userAgent.indexOf("Macintosh"),t.isCtrlKey=e=>e.ctrlKey||e.metaKey,t.isIE=()=>{const{userAgent:e}=window.navigator;return"ActiveXObject"in window||e.indexOf("Trident")>-1},t.isChrome=()=>/Chrome/.test(o),t.isSafari=()=>/Safari/.test(o)&&!t.isChrome(),t.isFirefox=()=>/Firefox/.test(o),t.isMac=-1!==o.indexOf("Macintosh");const i=o.includes("mockRPD"),r=-1!==o.indexOf("LarkLocale");t.minWindowTop=i?t.isMacOS?24:40:r?36:0},function(e,t,n){"use strict";var o,i,r,s;Object.defineProperty(t,"__esModule",{value:!0});const a=n(262),l=(n(264),n(382),n(265),n(945)),c=(n(384),n(385),n(950)),u=n(951),d=n(952),h=n(1),p=n(953),f=n(954),m=n(955),g=n(956),y=n(957),v=n(50),b=n(336),_=null!==(i=null===(o=window.apis)||void 0===o?void 0:o.Token)&&void 0!==i?i:"";a.default.defaults.baseURL=null!==(s=null===(r=window.apis)||void 0===r?void 0:r.Prefix)&&void 0!==s?s:"",a.default.defaults.headers.Authorization="Bearer "+_,a.default.defaults.headers["x-mockplus-lang"]=h.languageManager.currentLanguage;(()=>{let e="rp-for-web";v.isMockRPD&&(a.default.defaults.headers["x-mockplus-user-agent"]="rpClient",e="rp-for-desktop"),a.default.defaults.headers["x-mockplus-app"]=`${e}|${b.version}|${v.getOSSystem()}`})(),t.default={app:m.default,artboard:g.default,team:f.default,file:l,user:p.default,ds:y.default,userPreference:c,share:u,mixedApp:d}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getViewBoundsOfComponentsWithArtboard=t.getViewBoundsOfComponents=t.getViewPositionOfComponentsData=void 0;const o=n(52),i=n(24),r=n(25);function s(e){return o.getBoundsOfRotatedRectangle({position:e.position,size:e.size,rotate:e.rotate||0})}t.getViewPositionOfComponentsData=function(e){if(0===e.length)return null;const t=s(e[0]),n={x:t.left,y:t.top};return e.length<=1?n:e.reduce((e,t)=>{const n=s(t);return{x:Math.min(e.x,n.left),y:Math.min(e.y,n.top)}},n)},t.getViewBoundsOfComponents=function(e){return 0===e.length?null:i.union(...e.map(e=>e.getViewBoundsInParent()))},t.getViewBoundsOfComponentsWithArtboard=function(e,t){return 0===e.length?null:i.union(...e.map(e=>r.getCompAbsoluteBounds(e,t)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modifyPathWithOffset=t.getInteractionOfTwoSpecialLine=t.resetConnectPatchWhenResize=t.resetConnectPatch=t.modifyCustomPath=t.modifyConnectPatch=t.updateConnectCompWhenEndMove=t.updateConnectComponentPatches=t.updateConnectByDiff=t.removeConnectWhenDelete=t.getInnerOrAroundConnect=t.shouldModifyEndPointForDirection=t.shouldModifyStartPointForDirection=t.autoAdsorptionWithDirection=t.autoAdsorption=t.judgeExtendWithPut=t.isSamePoint=t.removePathPointByLine=t.getDirectionByPoints=t.getManhattanDistanceOfTwoPoints=t.getMidpointWithPath=t.getPathControlPoints=t.parseLineStr=t.modifyPathWhenRender=t.offsetPathWhenRender=t.getPathStartOrEndDirection=t.getPathStartOrEndTwoPoint=t.getPointByComponent=t.getSearchPointByRealPoint=t.offsetPointArray=t.convertPointsToArray=t.convertPointArrayToPoint=t.getSizeByPaths=t.getPositionByPaths=t.getSearchPoint=t.isAngleInRange=t.getEndPosition=t.getAllEndPosition=t.getRealPoint=t.searchPathBySelf=t.searchPathByPlanner=t.getPathPlannerOfContainer=t.DELTA=void 0;const o=n(6),i=n(7),r=n(24),s=n(10),a=n(32),l=n(5),c=n(52),u=n(33),d=n(429),h=n(1123);function p(e){const{size:t,rotate:n}=e,i={left:270,top:0,right:90,bottom:180};return o.mapValues(i,(e,o)=>f((i[o]+n)%360,t))}function f(e,t){const n=Math.atan(t.width/t.height)/Math.PI*180,o={left:[270-n,360-n],top:[360-n,90-n],right:[90-n,90+n],bottom:[90+n,270-n]};return Object.entries(o).reduce((t,[n,o])=>(m(e%360,o)&&(t=n),t),"left")}function m(e,t){const[n,o]=t;return n=0&&e<=o||e>n&&e<=360}function g(e){const t=e.filter((e,t)=>t%2==0),n=e.filter((e,t)=>t%2!=0);if(!t.length||!n.length)return{minPoint:{x:0,y:0},maxPoint:{x:0,y:0}};let o=Math.min(...t),i=Math.max(...t);return{minPoint:{x:o,y:Math.min(...n)},maxPoint:{x:i,y:Math.max(...n)}}}function y(e,t={offsetX:0,offsetY:0}){const n=[],{offsetX:o,offsetY:i}=t;for(let t=0;t=0;n--)t.push(e[2*n],e[2*n+1]);return t}function _(e,t){const{position:n,size:o,rotate:r}=e,[s,a,l,u]=c.getAllMiddlePointByCornerPoint(c.getRectPoints(n,o,r));switch(t){case"left":return{x:i.round(u.x),y:i.round(u.y)};case"top":return{x:i.round(s.x),y:i.round(s.y)};case"right":return{x:i.round(a.x),y:i.round(a.y)};case"bottom":return{x:i.round(l.x),y:i.round(l.y)};default:return{x:0,y:0}}}function w(e,t=!0){var n,o,i,r;const s=t?e:b(e);return{point1:{x:null!==(n=s[0])&&void 0!==n?n:0,y:null!==(o=s[1])&&void 0!==o?o:0},point2:{x:null!==(i=s[2])&&void 0!==i?i:0,y:null!==(r=s[3])&&void 0!==r?r:0}}}function C(e,t=!0){if(e.length>=4){const{point1:n,point2:o}=w(e,t);return T(n,o)}return""}function x(e,t,n=!0){const o=e.length,i=C(e,n);["arrow-down","arrow-up"].includes(i)?n?e[1]-=t:e[o-1]-=t:["arrow-left","arrow-right"].includes(i)&&(n?e[0]-=t:e[o-2]-=t)}function S(e,t){let n=[];const o=t%2/2;return n=e.map(e=>e+o),x(n,o),x(n,o,!1),n}function k(e){const t=[...e],n={x:t[0],y:t[1]},o={x:t[2],y:t[3]},i={x:t[4],y:t[5]};(E(n,o,i)||O(n,o,i))&&t.splice(2,2);const r=t.length,s={x:t[r-2],y:t[r-1]},a={x:t[r-4],y:t[r-3]},l={x:t[r-6],y:t[r-5]};return(E(s,a,l)||O(s,a,l))&&t.splice(r-4,2),t}function P(e,t){return i.abs(e.x-t.x)+i.abs(e.y-t.y)}function T(e,t){return i.sameNumber(e.x,t.x)&&i.sameNumber(e.y,t.y)?"arrow-center":i.sameNumber(e.x,t.x)?e.yt.x?"arrow-left":"arrow-right":""}function M(e,t){const n=y([...e]),o=n.length;let r=[],s=o-((null==t?void 0:t.endCursor)||1),a=(null==t?void 0:t.beginCursor)||0,l=a+1,c="",u=[];for(;as){r.push(...u.slice(1,u.length-1));break}const e=n[a],t=n[l];e.x!==t.x||c||(c="vertical",u.push(a)),e.y!==t.y||c||(c="horizontal",u.push(a)),"vertical"===c&&i.sameNumber(e.x,t.x)||"horizontal"===c&&i.sameNumber(e.y,t.y)?(u.push(l),l++):(u.length>2?(a=u[u.length-1],r.push(...u.slice(1,u.length-1))):a++,c="",l=a+1,u=[])}let d=n.filter((e,t)=>!r.includes(t));(null==t?void 0:t.removeSamePoint)&&(d=function(e,t=0){const n=[...e];let o=t,i=o+1,r=[];for(;o1&&i!r.includes(t))}(d));const h=[];return d.forEach(e=>{h.push(e.x,e.y)}),h}function A(e,n){return i.sameNumber(P(e,n),t.DELTA)}function O(e,t,n){const o=T(e,t),i=T(e,n);if(s=i,"arrow-down"===(r=o)&&"arrow-down"===s||"arrow-up"===r&&"arrow-up"===s||"arrow-left"===r&&"arrow-left"===s||"arrow-right"===r&&"arrow-right"===s||""===r&&""===s||"arrow-center"===r||"arrow-center"===s){if(P(e,t)>=P(e,n))return!0}var r,s;return!1}function E(e,t,n){const o=T(e,t),i=T(e,n);return s=i,"arrow-down"===(r=o)&&"arrow-up"===s||"arrow-up"===r&&"arrow-down"===s||"arrow-left"===r&&"arrow-right"===s||"arrow-right"===r&&"arrow-left"===s;var r,s}function D(e,n){let o={x:e.x,y:e.y};return e.x===n.x&&e.yn.y&&(o.y-=t.DELTA),e.y===n.y&&e.xn.x&&(o.x-=t.DELTA),o}function I(e,t,n=0){return i.sameNumber(e.x,t.x,n)&&i.sameNumber(e.y,t.y,n)}function L(e,t,n=!1){const o=[],i=[],r=e.components.filter(e=>{if(e.isConnector){const r=e,{startPoint:s,endPoint:a}=r.value;if(t.includes(e.id))return i.push(r),!1;if(n&&t.includes(s.id)&&i.push(r),!n&&t.includes(s.id)&&t.includes(a.id))i.push(r);else{if(t.includes(s.id))return o.push({connectId:e.id,compId:s.id,isStart:!0}),!0;if(t.includes(a.id))return o.push({connectId:e.id,compId:a.id,isStart:!1}),!0}}}),s=[],a=r.filter(e=>{if(e.isConnector&&e.isAloneLineAfterDelete([...t]))return!0;s.push(e)});return{innerConnectComps:i,roundConnectComps:r,roundMapInfo:o,aloneConnectComps:a,notAloneConnectComps:s}}function N(e,t,n,o,i=!1,r){const a={do:{},undo:{}};return t.forEach(t=>{const{startPoint:l,endPoint:c,path:u}=t.value,{newStart:d,newEnd:h}=function(e,t,n,o,i){const{startPoint:r,endPoint:s}=t.value,a=Object.assign({},r),l=Object.assign({},s),c=i.find(e=>e.connectId===t.id&&e.isStart),u=i.find(e=>e.connectId===t.id&&!e.isStart);if(c&&c.isStart){const t=e.components.find(e=>e.id===s.id);if(t){if(!n.includes(s.id)){const e=_(t,s.direction);l.x=e.x+o.offsetX,l.y=e.y+o.offsetY}}else l.id=s.id,l.direction=s.direction,l.x=s.x+o.offsetX,l.y=s.y+o.offsetY}if(u){const t=e.components.find(e=>e.id===u.compId);if(!u.isStart&&t){const e=_(t,s.direction);l.x=e.x,l.y=e.y}}return{newStart:a,newEnd:l}}(e,t,n,o,r);if(!i&&(null==u?void 0:u.length)){const e=v(u,o);a.do[t.id]=[s.Ops.replace("/value",{startPoint:d,endPoint:h,path:e})],a.undo[t.id]=[s.Ops.replace("/value",{startPoint:l,endPoint:c,path:u})]}else a.do[t.id]=[s.Ops.replace("/value",{startPoint:d,endPoint:h})],a.undo[t.id]=[s.Ops.replace("/value",{startPoint:l,endPoint:c})]}),a}function j(e,t,n){const{startPoint:o,endPoint:i,path:a}=e.value,l=r.offsetPoint(e.getStartPoint(!0),t),c=r.offsetPoint(e.getEndPoint(!0),t),u=Object.assign({},o,l),d=Object.assign({},i,c),h=(null==a?void 0:a.length)?v(a,{offsetX:t.x,offsetY:t.y}):[],p=(null==a?void 0:a.length)?{startPoint:u,endPoint:d,path:h}:{startPoint:u,endPoint:d};n.do[e.id]=[s.Ops.replace("/value",p)],n.undo[e.id]=[s.Ops.replace("/value",e.value)]}function R(e,n,o){let r=[...e];if(e.length<6)return e;"start"!==o&&(r=b(e));const{isExtendACorner:s,isLineCorner:a,originStartPoint:l,originCornerPoint:c}=function(e){const t=e.length,n={x:e[0],y:e[1]},o={x:e[2],y:e[3]};let r={x:e[4],y:e[5]};const s={x:e[t-2],y:e[t-1]};let a=!1;if(8===e.length&&T(n,o)===T(n,s)){a=!0;const e=T(n,s);"arrow-left"===e?r={x:i.round(s.x+(n.x-s.x)/2),y:s.y}:"arrow-up"===e?r={x:s.x,y:i.round(s.y+(n.y-s.y)/2)}:"arrow-right"===e?r={x:i.round(n.x+(s.x-n.x)/2),y:n.y}:"arrow-down"===e?r={x:n.x,y:i.round(n.y+(s.y-n.y)/2)}:a=!1}let l=!1;if(!T(n,r)){const t={x:e[2],y:e[3]};l=!0,r=Object.assign({},t)}return{isExtendACorner:l,isLineCorner:a,originStartPoint:n,originCornerPoint:r,originEndPoint:s}}(r),u=T(l,c);return"arrow-left"===u?n.x>c.x+5?(r[0]=n.x,r[1]=n.y,r[2]=n.x-t.DELTA,r[3]=n.y,s?r.splice(4,0,c.x,n.y):a?r.splice(4,0,c.x,n.y,c.x,c.y):r[5]=n.y):r=[]:"arrow-up"===u?n.y>c.y+5?(r[0]=n.x,r[1]=n.y,r[2]=n.x,r[3]=n.y-t.DELTA,s?r.splice(4,0,n.x,c.y):a?r.splice(4,0,n.x,c.y,c.x,c.y):r[4]=n.x):r=[]:"arrow-right"===u?n.x!e.isConnector).map(e=>e.getViewBoundsInParent()));return{bigBounds:r.inflate(n,{left:3*t.DELTA,top:3*t.DELTA})}}(e),s=function(e){let t=1;const n=i.round(i.max(e.right,e.top)).toString().length;return n>3&&(t=Math.pow(.1,n-3)),t}(o),a=r.scale(o,s),c={width:a.width+2*t.DELTA,height:a.height+2*t.DELTA},u=new Array(i.round(c.width*c.height)).fill(0),p=d(u,[i.round(c.width),i.round(c.height)]);return function(e,t){t.forEach(t=>{for(let n=t.left;n<=t.right;n++)e.set(n,t.top,1),e.set(n,t.bottom,1);for(let n=t.top;n<=t.bottom;n++)e.set(t.left,n,1),e.set(t.right,n,1)})}(p,e.components.filter(e=>!e.isConnector&&e.type!==l.CLine&&!e.locked&&(!n||(null==n?void 0:n.includes(e.id)))).map(e=>{const n=e.getViewBoundsInParent(),a=r.offsetBounds(n,{left:-o.left,top:-o.top}),l=r.scale(a,s),c=t.DELTA*s;return{left:i.max(i.round(l.left-c+1+t.DELTA),0),right:i.max(i.round(l.right+c-1+t.DELTA),0),top:i.max(i.round(l.top-c+1+t.DELTA),0),bottom:i.max(i.round(l.bottom+c-1+t.DELTA),0)}})),{planner:h(p),bigBounds:o,scaleNum:s}},t.searchPathByPlanner=function(e,n,o,r,s){let a=[];if(i.sameNumber(e.x,n.x)&&i.sameNumber(e.y,n.y))return a;const l={x:i.round((e.x-r.left)*s),y:i.round((e.y-r.top)*s)},c={x:i.round((n.x-r.left)*s),y:i.round((n.y-r.top)*s)};if(i.sameNumber(l.x,c.x)&&i.sameNumber(l.y,c.y))return a;o.search(l.x+t.DELTA,l.y+t.DELTA,c.x+t.DELTA,c.y+t.DELTA,a),a=M(a);const u=a.length;if(a.length>=4){const o=i.sameNumber(a[0],a[2])?"vertical":"horizontal",l=i.sameNumber(a[u-4],a[u-2])?"vertical":"horizontal";a=a.map((a,c)=>{if(1!==s){if(c===u-2)return n.x;if(c===u-1)return n.y;if("horizontal"===l&&c===u-3)return n.y;if("vertical"===l&&c===u-4)return n.x;if(0===c)return e.x;if(1===c)return e.y;if("horizontal"===o&&3===c)return e.y;if("vertical"===o&&2===c)return e.x}return c%2==0?i.round((a-t.DELTA)/s+r.left):i.round((a-t.DELTA)/s+r.top)})}const d=y(a);return 1!==s&&d.length&&!I(d[0],n)&&a.unshift(e.x,e.y),a},t.searchPathBySelf=function(e,t){const n={x:t.x,y:e.y};let o=[e.x,e.y,n.x,n.y,t.x,t.y];return(r.isEqualPoint(e,n)||r.isEqualPoint(n,t))&&(o=[e.x,e.y,t.x,t.y]),o},t.getRealPoint=function(e,t){if(!t.id)return{x:i.round(t.x||0),y:i.round(t.y||0)};const n=e.components.find(e=>e.id===t.id);if(!n)return{x:t.x||0,y:t.y||0};const{position:o,size:r}=n,s=c.getRectPoints(o,r,n.rotate),[a,l,u,d]=c.getAllMiddlePointByCornerPoint(s);switch(t.direction){case"left":return{x:i.round(d.x),y:i.round(d.y)};case"top":return{x:i.round(a.x),y:i.round(a.y)};case"right":return{x:i.round(l.x),y:i.round(l.y)};case"bottom":return{x:i.round(u.x),y:i.round(u.y)}}return{x:i.round(t.x||0),y:i.round(t.y||0)}},t.getAllEndPosition=p,t.getEndPosition=f,t.isAngleInRange=m,t.getSearchPoint=function(e,n){if(!n.id)return{x:i.round(n.x||0),y:i.round(n.y||0)};const o=e.components.find(e=>e.id===n.id);if(!o)return{x:n.x||0,y:n.y||0};const{position:r,size:s,rotate:a}=o,[l,u,d,h]=c.getAllMiddlePointByCornerPoint(c.getRectPoints(r,s,a)),f=p(o),m={left:{x:-t.DELTA,y:0},top:{x:0,y:-t.DELTA},right:{x:t.DELTA,y:0},bottom:{x:0,y:t.DELTA}};switch(n.direction){case"left":{const e=m[f.left];return{x:i.round(h.x+e.x),y:i.round(h.y+e.y)}}case"top":{const e=m[f.top];return{x:i.round(l.x+e.x),y:i.round(l.y+e.y)}}case"right":{const e=m[f.right];return{x:i.round(u.x+e.x),y:i.round(u.y+e.y)}}case"bottom":{const e=m[f.bottom];return{x:i.round(d.x+e.x),y:i.round(d.y+e.y)}}}return{x:i.round(n.x||0),y:i.round(n.y||0)}},t.getPositionByPaths=function(e){const{minPoint:t}=g(e);return{x:t.x,y:t.y}},t.getSizeByPaths=function(e){const{minPoint:t,maxPoint:n}=g(e);return{width:i.max(n.x-t.x,1),height:i.max(n.y-t.y,1)}},t.convertPointArrayToPoint=y,t.convertPointsToArray=function(e){return e.reduce((e,t)=>(e.push(t.x,t.y),e),[])},t.offsetPointArray=v,t.getSearchPointByRealPoint=function(e,n){switch(n){case"left":return{x:e.x-t.DELTA,y:e.y};case"top":return{x:e.x,y:e.y-t.DELTA};case"right":return{x:e.x+t.DELTA,y:e.y};case"bottom":return{x:e.x,y:e.y+t.DELTA};default:return e}},t.getPointByComponent=_,t.getPathStartOrEndTwoPoint=w,t.getPathStartOrEndDirection=C,t.offsetPathWhenRender=S,t.modifyPathWhenRender=k,t.parseLineStr=function(e,t,n,o,i){let r=S(e,t);r=function(e,t,n,o){const{startArrow:i,endArrow:r}=t,s=[...e];if(i&&(s[0]+=n.width,s[1]+=n.height),r){const e=s.length;s[e-2]+=o.width,s[e-1]+=o.height}return s}(r,n,o,i),r=k(r);const s=[];for(let e=0;e=r){a=r-n[s],s++;break}s++}const l=o[s],c=o[s+1],u=Object.assign({},l);return l&&c&&l.x===c.x&&(u.y=c.y>l.y?l.y+a:l.y-a),l&&c&&l.y===c.y&&(u.x=c.x>l.x?l.x+a:l.x-a),u||{x:0,y:0}},t.getManhattanDistanceOfTwoPoints=P,t.getDirectionByPoints=T,t.removePathPointByLine=M,t.isSamePoint=I,t.judgeExtendWithPut=function(e){const n=[...e],o={x:e[0],y:e[1]},i={x:e[2],y:e[3]},r=e.length,s={x:e[r-2],y:e[r-1]},a={x:e[r-4],y:e[r-3]};if(P(s,a)>t.DELTA){const e=D(s,a);n.splice(r-2,0,e.x,e.y)}if(P(o,i)>t.DELTA){const e=D(o,i);n.splice(2,0,e.x,e.y)}return n},t.autoAdsorption=function(e,t,n,o=5){let r=[...e];const s="vertical"===n?1:0,a=2*(t-1)+s,l=2*(t+2)+s,c=2*t+s,u=2*(t+1)+s;if(t>1&&t+2=8){const t={x:e[r-2],y:e[r-1]},s={x:e[r-4],y:e[r-3]},a={x:e[r-6],y:e[r-5]},l={x:e[r-8],y:e[r-7]},c=A(t,s);(c&&P(t,a)=8){const t={x:e[0],y:e[1]},r={x:e[2],y:e[3]},s={x:e[4],y:e[5]},a={x:e[6],y:e[7]},l=A(t,r);(l&&P(t,s)=6){const o={x:t[0],y:t[1]},i={x:t[2],y:t[3]},r={x:t[4],y:t[5]},s=e.getStartDirection();if(T(o,i)===T(i,r)&&(("left"===s||"right"===s)&&"horizontal"===n||("top"===s||"bottom"===s)&&"vertical"===n))return!0}return!1},t.shouldModifyEndPointForDirection=function(e,t,n){const o=t.length;if(o>=6){const i={x:t[o-2],y:t[o-1]},r={x:t[o-4],y:t[o-3]},s={x:t[o-6],y:t[o-5]},a=e.getEndDirection();if(T(i,r)===T(i,s)&&(("left"===a||"right"===a)&&"horizontal"===n||("top"===a||"bottom"===a)&&"vertical"===n))return!0}return!1},t.getInnerOrAroundConnect=L,t.removeConnectWhenDelete=function(e,t){let n={do:{},undo:{}};const o=t.filter(e=>!e.isConnector).map(e=>e.id),{innerConnectComps:i,aloneConnectComps:r}=L(e,o),a=[],l=[];return[...i,...r].forEach(t=>{a.push(t.id);const n=e.components.findIndex(e=>e.id===t.id);l.push(s.Ops.addChildren(""+n,[t.toJSON()]))}),a.length&&(n.do[e.id]=[s.Ops.removeChildren(a)],n.undo[e.id]=[...l]),n},t.updateConnectByDiff=function(e,t,n,o=!1,i=!1){const r=t.filter(e=>!e.isConnector).map(e=>e.id),s=t.map(e=>e.id),{innerConnectComps:a,roundConnectComps:l,roundMapInfo:c}=L(e,r,o),d=N(e,a,s,n,!1,c),h=N(e,l,s,i?{offsetX:0,offsetY:0}:n,!0,c);return u.coverPatches(h,d)},t.updateConnectComponentPatches=function(e,t,n,i={x:0,y:0},a){const l=t.map(e=>e.id),{innerConnectComps:c,roundConnectComps:u}=L(e,l,!1);if(u.forEach(e=>{const o=t.find(t=>t.id===e.getStartCompID()||t.id===e.getEndCompID());o&&z(e,o,n)}),c.forEach(a=>{const l=a.getStartCompID(),c=a.getEndCompID(),u=t.find(e=>e.id===l),d=t.find(e=>e.id===c),h=e.components.find(e=>e.id===l),p=e.components.find(e=>e.id===c),f={x:0,y:0};u&&h&&(f.x=u.position.x-h.position.x,f.y=u.position.y-h.position.y);const m={x:0,y:0};d&&p&&(m.x=d.position.x-p.position.x,m.y=d.position.y-p.position.y),u&&h&&!p?j(a,r.offsetPoint(f,{x:0-i.x,y:0-i.y}),n):d&&!h&&p?j(a,r.offsetPoint(m,{x:0-i.x,y:0-i.y}),n):I(f,m)&&h&&p&&o.isEqual(null==u?void 0:u.size,null==h?void 0:h.size)&&o.isEqual(null==d?void 0:d.size,null==p?void 0:p.size)?j(a,r.offsetPoint(f,{x:0-i.x,y:0-i.y}),n):function(e,t,n){const{startPoint:o,endPoint:i}=e.value,r=t.find(t=>t.id===e.getStartCompID()),a=t.find(t=>t.id===e.getEndCompID()),l=r&&_(r,o.direction),c=a&&_(a,i.direction);n.do[e.id]=[s.Ops.replace("/value",{startPoint:Object.assign({},o,l),endPoint:Object.assign({},i,c)})],n.undo[e.id]=[s.Ops.replace("/value",e.value)]}(a,t,n)}),a){const t=[...c,...u].map(e=>e.id);e.components.filter(e=>e.isConnector&&!t.includes(e.id)).forEach(e=>{j(e,{x:0-i.x,y:0-i.y},n)})}},t.updateConnectCompWhenEndMove=function(e,t){let n={do:{},undo:{}};return e.forEach(e=>{var o;e.isConnector&&(null===(o=t[e.id])||void 0===o?void 0:o.value)&&(n.do[e.id]=[s.Ops.replace("/value",t[e.id].value)],n.undo[e.id]=[s.Ops.replace("/value",e.$data.value)])}),n},t.modifyConnectPatch=j,t.modifyCustomPath=R,t.resetConnectPatch=z,t.resetConnectPatchWhenResize=function(e,t,n){const o={do:{},undo:{}},i=t.filter(e=>!e.isConnector).map(e=>e.id),{innerConnectComps:r}=L(e,i);return r.forEach(e=>{const{startPoint:t,endPoint:i}=e.value,r=n.find(e=>e.id===t.id||e.id===i.id);r&&z(e,r,o)}),o},t.getInteractionOfTwoSpecialLine=function(e,t){const n=e[0].x===e[1].x?"vertical":"horizontal",o=t[0].x===t[1].x?"vertical":"horizontal";if("horizontal"===n&&"horizontal"===o){if(e[0].y!==t[0].y)return;{const{minX:n,maxX:o}=a.getMinMaxXY(e),{minX:i,maxX:r}=a.getMinMaxXY(t);if(n>r||oi&&on&&ri)return[{x:i,y:t[0].y}];if(o>r&&n=i&&o<=l&&o>=s?[{x:o,y:n}]:void 0}{const n=e[0].y,o=t[0].x,{minY:i,maxY:r}=a.getMinMaxXY(t),{minX:s,maxX:l}=a.getMinMaxXY(e);return n<=r&&n>=i&&o<=l&&o>=s?[{x:o,y:n}]:void 0}}if(e[0].x!==t[0].x)return;{const{minY:n,maxY:o}=a.getMinMaxXY(e),{minY:i,maxY:r}=a.getMinMaxXY(t);if(n>r||oi&&oo&&ri)return[{x:t[0].x,y:i}];if(o>r&&nthis.originParams[e],this.saveCacheOriginParams=(e,t)=>{this.originParams[e]=t},this.initAnimationOperation=()=>{const{animate:e}=this.command;return i.Ops.replace("./_animation",{timing:e.effect,delay:e.delay,duration:e.duration,animationIterationCount:e.loop?"infinite":1})},this.refreshSelf=()=>{const e=this._worker.docTree.get(this.command.target.id);e&&(this.command.target=e)},this.delay=(e,t)=>{window.setTimeout(()=>{e()},t)},this.cleanAnimation=()=>{const{target:{id:e,ownerArtboardID:t,_animation:n}}=this.command;n&&this.patch({[t]:{[e]:[i.Ops.replace("/_animation",void 0)]}})},this.finish=()=>{this.cleanAnimation(),this.onFinish&&this.onFinish(this)},this.patch=e=>{var t;null===(t=this.workManager)||void 0===t||t.patch(e)},this._worker=e,this.doc=e.doc,this.command=t}get canRevert(){return!this.command.params.disabledAutoRevert}execute(e){if(e&&!this.canRevert)return;!e&&this.cashOriginParams();const t=(e?this.revert:this.run).bind(this);this.delay(()=>{t(),this.delay(this.finish,this.command.animate.duration)},this.command.animate.delay||0)}startSubWorker(){var e,t;this.afterEvent&&this.afterTrigger&&(null===(e=this.workManager)||void 0===e?void 0:e.startWorker)&&this.fulfilled&&(this.fulfilled=!1,null===(t=this.workManager)||void 0===t||t.startWorker(this.afterTrigger,this.afterEvent))}get afterTrigger(){return this.command.target}getCurrentPath(e){const t=this.command.target,{currentStateID:n}=t,i=t.states[null!=n?n:""];if(!n||n===r.PredefinedStates.normal||!i)return"/"+e;const s=e.split("/");let a=!o.isUndefined(i),l=i;for(let e=0;eo.createElement("div",{style:{width:s},className:"dsm-c-tooltip"},n&&o.createElement("div",{style:l,className:i.default("tips",t,a,{"size-s":"small"===e},{cover:c})},n),r);r.defaultProps={theme:"normal",direction:"down",text:"",align:"center",tipStyle:{}},t.default=r},function(e,t,n){"use strict";if(n(39)){var o=n(107),i=n(21),r=n(26),s=n(4),a=n(191),l=n(249),c=n(76),u=n(122),d=n(115),h=n(62),p=n(124),f=n(78),m=n(36),g=n(328),y=n(118),v=n(84),b=n(69),_=n(144),w=n(28),C=n(43),x=n(238),S=n(119),k=n(72),P=n(120).f,T=n(240),M=n(116),A=n(35),O=n(87),E=n(181),D=n(167),I=n(243),L=n(146),N=n(186),j=n(121),R=n(242),z=n(317),B=n(40),F=n(71),H=B.f,Y=F.f,W=i.RangeError,V=i.TypeError,U=i.Uint8Array,G=Array.prototype,K=l.ArrayBuffer,$=l.DataView,q=O(0),J=O(2),X=O(3),Z=O(4),Q=O(5),ee=O(6),te=E(!0),ne=E(!1),oe=I.values,ie=I.keys,re=I.entries,se=G.lastIndexOf,ae=G.reduce,le=G.reduceRight,ce=G.join,ue=G.sort,de=G.slice,he=G.toString,pe=G.toLocaleString,fe=A("iterator"),me=A("toStringTag"),ge=M("typed_constructor"),ye=M("def_constructor"),ve=a.CONSTR,be=a.TYPED,_e=a.VIEW,we=O(1,(function(e,t){return Pe(D(e,e[ye]),t)})),Ce=r((function(){return 1===new U(new Uint16Array([1]).buffer)[0]})),xe=!!U&&!!U.prototype.set&&r((function(){new U(1).set({})})),Se=function(e,t){var n=f(e);if(n<0||n%t)throw W("Wrong offset!");return n},ke=function(e){if(w(e)&&be in e)return e;throw V(e+" is not a typed array!")},Pe=function(e,t){if(!w(e)||!(ge in e))throw V("It is not a typed array constructor!");return new e(t)},Te=function(e,t){return Me(D(e,e[ye]),t)},Me=function(e,t){for(var n=0,o=t.length,i=Pe(e,o);o>n;)i[n]=t[n++];return i},Ae=function(e,t,n){H(e,t,{get:function(){return this._d[n]}})},Oe=function(e){var t,n,o,i,r,s,a=C(e),l=arguments.length,u=l>1?arguments[1]:void 0,d=void 0!==u,h=T(a);if(null!=h&&!x(h)){for(s=h.call(a),o=[],t=0;!(r=s.next()).done;t++)o.push(r.value);a=o}for(d&&l>2&&(u=c(u,arguments[2],2)),t=0,n=m(a.length),i=Pe(this,n);n>t;t++)i[t]=d?u(a[t],t):a[t];return i},Ee=function(){for(var e=0,t=arguments.length,n=Pe(this,t);t>e;)n[e]=arguments[e++];return n},De=!!U&&r((function(){pe.call(new U(1))})),Ie=function(){return pe.apply(De?de.call(ke(this)):ke(this),arguments)},Le={copyWithin:function(e,t){return z.call(ke(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(ke(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return R.apply(ke(this),arguments)},filter:function(e){return Te(this,J(ke(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(ke(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(ke(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){q(ke(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(ke(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(ke(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(ke(this),arguments)},lastIndexOf:function(e){return se.apply(ke(this),arguments)},map:function(e){return we(ke(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ae.apply(ke(this),arguments)},reduceRight:function(e){return le.apply(ke(this),arguments)},reverse:function(){for(var e,t=ke(this).length,n=Math.floor(t/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return ue.call(ke(this),e)},subarray:function(e,t){var n=ke(this),o=n.length,i=y(e,o);return new(D(n,n[ye]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?o:y(t,o))-i))}},Ne=function(e,t){return Te(this,de.call(ke(this),e,t))},je=function(e){ke(this);var t=Se(arguments[1],1),n=this.length,o=C(e),i=m(o.length),r=0;if(i+t>n)throw W("Wrong length!");for(;r255?255:255&o),i.v[p](n*t+i.o,o,Ce)}(this,n,e)},enumerable:!0})};b?(f=n((function(e,n,o,i){u(e,f,c,"_d");var r,s,a,l,d=0,p=0;if(w(n)){if(!(n instanceof K||"ArrayBuffer"==(l=_(n))||"SharedArrayBuffer"==l))return be in n?Me(f,n):Oe.call(f,n);r=n,p=Se(o,t);var y=n.byteLength;if(void 0===i){if(y%t)throw W("Wrong length!");if((s=y-p)<0)throw W("Wrong length!")}else if((s=m(i)*t)+p>y)throw W("Wrong length!");a=s/t}else a=g(n),r=new K(s=a*t);for(h(e,"_d",{b:r,o:p,l:s,e:a,v:new $(r)});d{const t=o.indexOf(e);-1!==t&&o.splice(t,1)}),o},t.includeEnum=function(e,t){if("object"==typeof e)for(let n in e)if(e[n]===t)return!0;return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextFormatExPropertyName=void 0,t.TextFormatExPropertyName="textFormat";var o=n(46);Object.defineProperty(t,"FontStyle",{enumerable:!0,get:function(){return o.FontStyle}}),Object.defineProperty(t,"FontStyleName",{enumerable:!0,get:function(){return o.FontStyleName}}),Object.defineProperty(t,"TextAlign",{enumerable:!0,get:function(){return o.TextAlign}}),Object.defineProperty(t,"TextPropertyName",{enumerable:!0,get:function(){return o.TextPropertyName}}),Object.defineProperty(t,"TextTransform",{enumerable:!0,get:function(){return o.TextTransform}}),Object.defineProperty(t,"VerticalAlign",{enumerable:!0,get:function(){return o.VerticalAlign}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinePropertyName=t.LinePointType=void 0,function(e){e.none="none",e.solidArrow="solidArrow",e.hollowArrow="hollowArrow",e.solidTriangle="solidTriangle",e.hollowTriangle="hollowTriangle",e.solidDot="solidDot",e.hollowDot="hollowDot",e.solidCube="solidCube",e.hollowCube="hollowCube",e.solidDiamond="solidDiamond",e.hollowDiamond="hollowDiamond",e.perpendicular="perpendicular"}(t.LinePointType||(t.LinePointType={})),t.LinePropertyName="line"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderClipFill=t.renderGradient=t.renderRadialGradient=t.renderLinearGradient=void 0;const o=n(0),i=n(30),r=n(14),s=n(7);t.renderLinearGradient=(e,t,n)=>{const{colorStops:i,direction:a}=t,{x1:l,x2:c,y1:u,y2:d}=a||{x1:0,x2:0,y1:0,y2:1},h=r.fullColorStops(i),p=s.max(n.width,n.height);if(!p)return null;const f=n.width/p,m=n.height/p;return o.createElement("defs",null,o.createElement("linearGradient",{id:""+e,x1:l*f,x2:c*f,y1:u*m,y2:d*m},h.sort((e,t)=>(e.point||0)-(t.point||0)).map((e,t)=>o.createElement("stop",{key:""+t,offset:(e.point||0)+"%",stopColor:r.parseColorToString(e.color)}))))},t.renderRadialGradient=(e,t,n)=>{const{colorStops:i,to:s,from:a,angle:l,widthRatio:c}=t,u=r.fullColorStops(i),{x:d,y:h}=a||{x:.5,y:.5,r:0},{x:p,y:f,r:m}=s||{x:.5,y:.5,r:.5},g=`translate(${d}, ${h}),\n scale(${n.height/n.width}, 1),\n rotate(${l||0}),\n scale(${c||1}, 1),\n translate(${-d}, ${-h})`;return o.createElement("defs",null,o.createElement("radialGradient",{id:""+e,fx:d,fy:h,cx:p,cy:f,r:m,gradientTransform:g},u.sort((e,t)=>(e.point||0)-(t.point||0)).map((e,t)=>o.createElement("stop",{key:""+t,offset:(e.point||0)+"%",stopColor:r.parseColorToString(e.color)}))))},t.renderGradient=(e,n,o)=>{if(e){const{type:r,color:s}=e;if(r===i.FillType.linear)return t.renderLinearGradient(n,s,o);if(r===i.FillType.radial)return t.renderRadialGradient(n,s,o)}return null},t.renderClipFill=(e,n)=>{const{id:r,type:s,size:u,fill:d,scale:h,transition:p,transform:f,offset:m}=e;let g;const y=`${s}-fill-${r}`,v=`url(#${y})`,b=`${s}-clip-path-${r}`;if(d&&d.disabled)return null;switch(null==d?void 0:d.type){case i.FillType.linear:g=l(n,v,b,u,d.color,h,p,f,m);break;case i.FillType.radial:g=c(n,v,b,u,d.color,h,p,f,m);break;case i.FillType.solid:g=a(n,b,u,d.color,h,p,f,m);break;default:return null}return o.createElement(o.Fragment,null,t.renderGradient(d,y,u),g)};const a=(e,t,n,i,s=1,a,l,c)=>{const u=r.parseColorToString(i);return o.createElement(o.Fragment,null,o.createElement("defs",null,o.createElement("clipPath",{id:""+t},e)),o.createElement("g",{style:{clipPath:`url(#${t})`,transform:l}},o.createElement("rect",{x:(null==c?void 0:c.x)||0,y:(null==c?void 0:c.y)||0,width:n.width*s,height:n.height*s,fill:u,style:{transition:a,MozTransition:a,WebkitTransition:a}})))},l=(e,t,n,i,r,a=1,l,c,u)=>{const d=s.max(i.width,i.height);return o.createElement(o.Fragment,null,o.createElement("defs",null,o.createElement("clipPath",{id:""+n},e)),o.createElement("g",{style:{clipPath:`url(#${n})`,transform:c}},o.createElement("rect",{x:(null==u?void 0:u.x)||0,y:(null==u?void 0:u.y)||0,width:d*a,height:d*a,fill:t,style:{transition:l,MozTransition:l,WebkitTransition:l}})))},c=(e,t,n,i,s,a=1,l,c,u)=>{const d=r.reviseRadialGradient(s,i),{colorStops:h}=d;return r.fullColorStops(h).length?o.createElement(o.Fragment,null,o.createElement("defs",null,o.createElement("clipPath",{id:n},e)),o.createElement("g",{style:{clipPath:`url(#${n})`,transform:c}},o.createElement("rect",{x:(null==u?void 0:u.x)||0,y:(null==u?void 0:u.y)||0,width:i.width*a,height:i.height*a,fill:t,style:{transition:l,MozTransition:l,WebkitTransition:l}}))):null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0);t.default=o.createContext({})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasPanelConfig=t.makeCanvas=t.DefaultCanvasData=void 0;const o=n(0),i=n(6),r=n(2),s=n(17),a=n(30),l=n(11),c=n(18),u=n(103),d=n(1),h=n(29),p=n(5),f=n(38),m=n(5),g=n(8),y=n(113);n(1099);const v=n(7),b=n(57);t.DefaultCanvasData={size:{width:300,height:300},layout:{responsive:!1,auto:!0,fixedWidth:!1,fixedHeight:!1,horizontal:f.HorizontalAlign.Auto,vertical:f.VerticalAlign.Auto},properties:{container:{scroll:!0,showScroll:!0},fill:{disabled:!1,type:a.FillType.solid,color:c.DefaultWhiteFillColor},stroke:{thickness:1,color:c.DefaultStrokeColor,disabled:!1},radius:{isPercent:!1,disabled:!0,topRight:0,topLeft:0,bottomRight:0,bottomLeft:0},shadow:{disabled:!0,x:0,y:3,blur:6,color:c.ShadowColor}}},t.makeCanvas=function(e,n){return n?h.makeCommonComponent(e,p.CCanvasPanel,n):h.makeCommonComponent(e,p.CCanvasPanel,v.depthClone(t.DefaultCanvasData))},t.CanvasPanelConfig={type:m.CCanvasPanel,name:d.default("resource.components.canvasPanel"),thumb:{spriteIconClass:g.SpriteThumb.CanvasPanel.className,dragPosition:g.SpriteThumb.CanvasPanel.position}};class _ extends o.Component{constructor(){super(...arguments),this.scrollbarDom=o.createRef(),this.resetScrollbar=()=>{const e=this.scrollbarDom.current;e&&(e.scrollToTop(),e.scrollToLeft())}}componentDidMount(){window.addEventListener("resetPanelScrollbar",this.resetScrollbar)}componentWillUnmount(){window.removeEventListener("resetPanelScrollbar",this.resetScrollbar)}render(){const{comp:e,isPreview:t,isContainerActiveContainer:n,ignoreFill:a,ignoreStroke:c}=this.props,{properties:u,size:h,isSealed:p,opacity:f}=e,{container:m}=u,g=l.StyleHelper.initCSSStyleParser(u);let v=Object.assign({},g.getShadowStyle(b.isSafari()));const _=e.getTransition();v=Object.assign(Object.assign(Object.assign(Object.assign({},h),v),g.getRadiusStyle(h)),{opacity:i.isUndefined(e.opacity)?1:e.opacity/100,transition:_});let w=!1;u.container&&(w=!u.container.showScroll);const C=!t&&n,x=t||!n,S=0===f;return o.createElement("div",{className:r.default("lib-comp-panel",{preview:t,clip:x,expand:C,"no-sealed":!p}),style:v},u.fill&&!u.fill.disabled&&!S&&o.createElement(y.default,{size:h,transition:_,properties:{fill:a?void 0:u.fill,radius:u.radius}}),m&&m.scroll&&t?o.createElement(s.ScrollBars,{ref:this.scrollbarDom,autoHide:!0,hiddenHorizontalScrollBar:w,hiddenVerticalScrollBar:w,thumbClassName:"lib-comp-canvas-scroll-thumb"},this.props.children):this.props.children,!t&&!e.components.length&&o.createElement("p",{className:"empty-container-tips",style:{lineHeight:e.size.height+"px"}},d.default("tips.doubleClickComponent")),u.stroke&&!u.stroke.disabled&&!S&&o.createElement(y.default,{size:h,transition:_,properties:{stroke:c?void 0:u.stroke,radius:u.radius,border:u.border},zIndex:e.components.length}))}}t.default=_,_.contextType=u.default},function(e,t,n){(function(o){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==o&&"env"in o&&(e=o.env.DEBUG),e}(t=e.exports=n(1337)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var i=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(r=i))})),e.splice(r,0,o)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(148))},function(e,t,n){"use strict";var o=n(221),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return o.isMemo(e)?s:a[e.$$typeof]||i}a[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[o.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,o)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;g(window.debug?20:80)&&o.free(),i=!1)}t.saveToCahche=function(e,t){try{i&&r(),window.localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}},t.loadFromCache=function(e,t){const n=window.localStorage.getItem(e);if(n)try{return JSON.parse(n)}catch(e){return t||n}return t},t.autoClearLocalStorage=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collectComponentsLayout=t.getCompsLayoutByData=t.getSmartLayoutByCompData=t.getSmartLayout=t.getAutoLayout=void 0;const o=n(7),i=n(38),r=n(25);function s(e,t){const n=Math.max(5,.15*t.width),s=Math.max(5,.15*t.height),{position:a,size:l,rotate:c}=e,u=r.getBoundsInParent({position:a,size:l,rotate:c}),d=o.round(u.left-t.left),h=o.round(t.width-d-u.width),p=o.round(u.top-t.top),f=d<=n,m=h<=n,g=p<=s,y=o.round(t.height-p-u.height)<=s;let v=i.HorizontalAlign.Left;f&&(v=i.HorizontalAlign.Left),m&&(v=i.HorizontalAlign.Right),f&&m&&(v=i.HorizontalAlign.LeftAndRight),f||m||(v=i.HorizontalAlign.Auto);let b=i.VerticalAlign.Top;g&&(b=i.VerticalAlign.Top),y&&(b=i.VerticalAlign.Bottom),g&&y&&(b=i.VerticalAlign.TopAndBottom),g||y||(b=i.VerticalAlign.Auto);return{horizontal:v,vertical:b,fixedWidth:!f||!m,fixedHeight:!g||!y}}function a(e,t){const n=new WeakMap;return 0===e.length||e.forEach(e=>{const{position:o,size:i,rotate:r}=e,a=s({position:o,size:i,rotate:r},t);n.set(e,a)}),n}function l(e,t){const n=new Map;return 0===e.length||e.forEach(e=>{const{position:o,size:i,rotate:r}=e,a=s({position:o,size:i,rotate:r||0},t);n.set(e._id,a)}),n}t.getAutoLayout=s,t.getSmartLayout=a,t.getSmartLayoutByCompData=l,t.getCompsLayoutByData=function(e,t){const n=l(e,t);return e.forEach(e=>{const t=e.layout,{vertical:o,horizontal:i,fixedHeight:r,fixedWidth:s,auto:a}=t;a||n.set(e._id,{fixedHeight:r,fixedWidth:s,horizontal:i,vertical:o})}),n},t.collectComponentsLayout=function(e,t){const n=a(e,t);return e.forEach(e=>{const t=e.layout;t.auto||n.set(e,{fixedHeight:t.fixedHeight,fixedWidth:t.fixedWidth,horizontal:t.horizontal,vertical:t.vertical})}),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rotateLine=t.getFootOfPerpendicular=t.getAngleByPoint=t.getCenterPoint=t.getBoundingOfPoints=t.offsetPoint=t.offsetPoints=t.getOffsetByPoints=t.getDeltaForOrderRotate=t.rotatePoint=t.isPointInArea=t.getQuadrilateralArea=t.getTriangleArea=t.moveLineToPoint=t.getRotateOffset=t.getTowPointDis=t.getPointByLine=t.getLineByPoint=t.getPointsByLines=t.getLinesByPoints=void 0;const o=n(127),i=n(6),r=n(7),s=n(24);function a(e,t){const n={k:0,b:0,isPoint:!1};return 0===Math.round(e.x-t.x)?(n.k=1/0,n.b=e.x):(n.k=(e.y-t.y)/(e.x-t.x),n.b=e.y-n.k*e.x),n.isPoint=r.sameNumber(e.x,t.x)&&r.sameNumber(t.y,e.y),n}function l(e,t){let n,i;return o.ok(e.k!==t.k,"平行线无交点"),e.k===1/0?(n=e.b,i=t.k*n+t.b):t.k===1/0?(n=t.b,i=e.k*n+e.b):(n=(t.b-e.b)/(e.k-t.k),i=e.k*n+e.b),{x:n,y:i}}function c(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function u(e,t,n){return{x:Math.hypot(t,e)*Math.cos((180*Math.atan2(-t,e)/Math.PI+n)*Math.PI/180),y:-Math.hypot(t,e)*Math.sin((180*Math.atan2(-t,e)/Math.PI+n)*Math.PI/180)}}function d(e,t){let n;return n=e.k===1/0?t.x:t.y-e.k*t.x,Object.assign(Object.assign({},e),{k:e.k,b:n})}function h(e){const t=c(e[0],e[1]),n=c(e[1],e[2]),o=c(e[2],e[0]),i=t+n+o;return Math.sqrt(.5*i*(.5*i-t)*(.5*i-n)*(.5*i-o))}function p(e){return h([e[0],e[1],e[2]])+h([e[2],e[3],e[0]])}function f(e,t){return{x:e.x+t.x,y:e.y+t.y}}t.getLinesByPoints=function(e){const t=[];let n,o=e[0];return e.forEach((i,r)=>{const s=r+1===e.length?0:r+1;n=e[s],t.push(a(o,n)),o=n}),t},t.getPointsByLines=function(e){const t=[];let n=e[e.length-1];return e.forEach(e=>{t.push(l(n,e)),n=e}),t},t.getLineByPoint=a,t.getPointByLine=l,t.getTowPointDis=c,t.getRotateOffset=u,t.moveLineToPoint=d,t.getTriangleArea=h,t.getQuadrilateralArea=p,t.isPointInArea=function(e,t){if(e instanceof Array&&4===e.length){const n=h([e[0],e[1],t]),o=h([e[1],e[2],t]),i=h([e[2],e[3],t]),s=h([e[3],e[0],t]),a=p(e);return 0!==a&&r.distance(a,n+o+i+s)<=1}return!1},t.rotatePoint=function(e,t){if(t){const n=2*t*Math.PI/360;return{x:e.x*Math.cos(n)-e.y*Math.sin(n),y:e.x*Math.sin(n)+e.y*Math.cos(n)}}return e},t.getDeltaForOrderRotate=function(e,t,n,o){e/=2,t/=2;const i=Math.hypot(e,t),r=Math.atan2(-t,e)/Math.PI*180,s=(r-n-o)/180*Math.PI,a=(-r-n-o)/180*Math.PI,l=(r-n)/180*Math.PI,c=(-r-n)/180*Math.PI,u=Math.max(Math.abs(Math.sin(s)*i),Math.abs(Math.sin(a)*i)),d=Math.max(Math.abs(Math.cos(s)*i),Math.abs(Math.cos(a)*i)),h=Math.max(Math.abs(Math.sin(l)*i),Math.abs(Math.sin(c)*i)),p=Math.max(Math.abs(Math.cos(l)*i),Math.abs(Math.cos(c)*i));return{left:p-d,top:h-u,right:d-p,bottom:u-h}},t.getOffsetByPoints=function(e,t,n,o=!0){const a=e.map(e=>u(e.x,e.y,n)),l=t.map(e=>u(e.x,e.y,n)),{left:c,top:d,right:h,bottom:p}=s.getBoundsWithPoints(a),{left:f,top:m,right:g,bottom:y}=s.getBoundsWithPoints(l);return v={left:o?r.round(f-c):f-c,top:o?r.round(m-d):m-d,right:o?r.round(g-h):g-h,bottom:o?r.round(y-p):y-p},i.mapValues(v,e=>r.sameNumber(e,0)?0:e);var v},t.offsetPoints=function(e,t){return e.map(e=>f(e,t))},t.offsetPoint=f,t.getBoundingOfPoints=function(e,t=!0){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;e.forEach(e=>{e.xs&&(s=e.x),e.ya&&(a=e.y)});const l=s-n,c=a-o,u={left:n,top:o,width:l,height:c,right:n+l,bottom:o+c};return t?i.mapValues(u,e=>r.round(e)):u},t.getCenterPoint=function(e){let t=0,n=0;return e.forEach(e=>{t+=e.x,n+=e.y}),{x:t/e.length,y:n/e.length}},t.getAngleByPoint=function(e,t){const n=t.x-e.x,o=t.y-e.y,i=Math.hypot(n,o),r=Math.asin(o/i);let s=180/(Math.PI/r);return t.x{const{size:t,properties:n,zIndex:r,transition:s}=e,a=i.StyleHelper.initCSSStyleParser(n),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.size),a.getFillStyle(t)),a.getStrokeStyle()),a.getRadiusStyle(t,n.border)),{left:0,top:0,position:"absolute",boxSizing:"border-box",zIndex:r||"auto",pointerEvents:"none",transition:s,overflow:"hidden"});return o.createElement("div",{className:"lib-comp-general-background",style:l})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doAddOperationByNewValue=t.ComponentPatchesClass=void 0;const o=n(10),i=n(6),r=n(441);class s{constructor(e){this.doAddOperation=(e,t)=>{const n=this.do,i=this.undo;this.isPathExistedInPatches(e)||(n.push(o.Ops.add(e,t)),i.push(o.Ops.remove(e)))},this.doReplaceOperationByPath=(e,t,n)=>{!i.isEqual(t,n)&&!this.do.find(t=>t.path===e)&&(this.do.push(o.Ops.replace(e,n)),this.undo.push(o.Ops.replace(e,t)))},this._do=i.defaultTo(null==e?void 0:e.do,[]),this._undo=i.defaultTo(null==e?void 0:e.undo,[])}get do(){return this._do}get undo(){return this._undo}get value(){return{do:this.do,undo:this.undo}}mergeNewValueToPatches(e,t,n){!r.isSameProperty(t,n)&&!this.isPathExistedInPatches(e)&&this.addOperation({do:o.Ops.replace(e,i.assign(t,n)),undo:o.Ops.replace(e,t)})}isPathExistedInPatches(e){return Boolean(this.do.find(t=>t.path===e))}addOperation(e){this.do.push(e.do),this.undo.push(e.undo)}getAttrChangePatches(e,t,n){return new s({do:[o.Ops.replace(t,n.newVal)],undo:[o.Ops.replace(t,n.oldVal)]})}}t.ComponentPatchesClass=s,t.doAddOperationByNewValue=(e,t,n)=>{n.isPathExistedInPatches(e)||(n.do.push(o.Ops.add(e,t)),n.undo.push(o.Ops.remove(e)))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t,n){var o=n(302),i=n(226);e.exports=Object.keys||function(e){return o(e,i)}},function(e,t,n){var o=n(78),i=Math.max,r=Math.min;e.exports=function(e,t){return(e=o(e))<0?i(e+t,0):r(e,t)}},function(e,t,n){var o=n(16),i=n(303),r=n(226),s=n(225)("IE_PROTO"),a=function(){},l=function(){var e,t=n(223)("iframe"),o=r.length;for(t.style.display="none",n(227).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("