(self.webpackChunk=self.webpackChunk||[]).push([[4611],{10402:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},72295:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},24566:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},80205:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},61441:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},30631:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},43971:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},58358:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},44757:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},16537:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},77042:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},5527:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},86902:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},53878:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},21970:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Pe}});var Qe=Ge(5891),Tt=Ge(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ze=oe,je=Ge(88853),ve=function(Se,we){return Tt.createElement(je.Z,(0,Qe.Z)({},Se,{ref:we,icon:ze}))},fe=Tt.forwardRef(ve),Pe=fe},79906:function(){"use strict"},93938:function(wn,sn){"use strict";sn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11037:function(wn,sn){"use strict";sn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},7543:function(){"use strict"},37404:function(){"use strict";function wn(de,z,ee,ae){ee===void 0&&(ee=0),ae===void 0&&(ae=1/0),this._name=de,this._defaultValue=z,this._minimum=ee,this._maximum=ae}Object.defineProperty(wn.prototype,"name",{get:function(){return this._name},set:function(de){if(typeof de!="string"||de==="")throw new Error("Shape name must be a valid string.");this._name=de}}),Object.defineProperty(wn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("The default value must be a real number, not: "+de);this._defaultValue=de}}),Object.defineProperty(wn.prototype,"minimum",{get:function(){return this._minimum},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("Minimum must be a real number, not: "+de);this._minimum=de}}),Object.defineProperty(wn.prototype,"maximum",{get:function(){return this._maximum},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("Maximum must be a real number, not: "+de);this._maximum=de}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(de,z){var ee=go.Shape._FigureParameters[de];return ee?ee[z]:null},go.Shape.setFigureParameter=function(de,z,ee){if(!(ee instanceof wn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValueee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var ae=go.Shape._FigureParameters[de];ae||(ae=[],go.Shape._FigureParameters[de]=ae),ae[z]=ee};var sn=[];function Ge(de,z){var ee=sn.pop();return ee===void 0?new go.Point(de,z):(ee.x=de,ee.y=z,ee)}function Qe(){var de=sn.pop();return de===void 0?new go.Point:de}function Tt(de){sn.push(de)}function oe(de,z,ee,ae,re,le,ue,pe,Ee){Ee||(Ee=new go.Point);var be=de-ee,Ne=re-ue,Te=NaN,ke=NaN;if(be===0)if(Ne===0)de===ee&&(Te=de,ke=z);else{var Oe=(le-pe)/Ne,Be=le-Oe*re;Te=de,ke=Oe*Te+Be}else if(Ne===0){var Re=(z-ae)/be,$e=z-Re*de;Te=re,ke=Re*Te+$e}else{var Re=(z-ae)/be,Oe=(le-pe)/Ne,$e=z-Re*de,Be=le-Oe*re;Te=(Be-$e)/(Re-Oe),ke=Re*Te+$e}return Ee.x=Te,Ee.y=ke,Ee}function ze(de,z,ee,ae,re,le,ue,pe,Ee,be,Ne,Te,ke,Oe){var Be=1-Ee,Re=Ee,$e=de*Be+ee*Re,_e=z*Be+ae*Re,Ve=ee*Be+re*Re,ot=ae*Be+le*Re,ct=re*Be+ue*Re,ft=le*Be+pe*Re,wt=$e*Be+Ve*Re,qe=_e*Be+ot*Re,it=Ve*Be+ct*Re,pt=ot*Be+ft*Re,Ct=wt*Be+it*Re,xt=qe*Be+pt*Re;be.x=$e,be.y=_e,Ne.x=wt,Ne.y=qe,Te.x=Ct,Te.y=xt,ke.x=it,ke.y=pt,Oe.x=ct,Oe.y=ft}var je=new go.Spot(.156,.156),ve=new go.Spot(.844,.844),fe=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new wn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=5),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var re=ae*fe,le=new go.Geometry().add(new go.PathFigure(ae,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-ae,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-re,0,z,re)).add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)).add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,ee-re,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,ae,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,re,ee,0,ee-re)).add(new go.PathSegment(go.PathSegment.Line,0,ae)).add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,re,re,0).close()));return re>1&&(le.spot1=new go.Spot(0,0,re,re),le.spot2=new go.Spot(1,1,-re,-re)),le}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=ee/2,ae.endX=z,ae.endY=ee/2,ae}),go.Shape.defineFigureGenerator("LineV",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z/2,ae.startY=0,ae.endX=z/2,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(de,z,ee){var ae=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ae*z,(1-ae)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(de,z,ee){var ae=z/2,re=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ae,ae,ae,ae).close()));return re.spot1=je,re.spot2=ve,re.defaultStretch=go.GraphObject.Uniform,re}),go.Shape.defineFigureGenerator("Line1",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=0,ae.endX=z,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Line2",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z,ae.startY=0,ae.endX=0,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Curve1",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,fe*z,0,z,(1-fe)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,0,fe*ee,(1-fe)*z,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,fe*ee,fe*z,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-fe)*z,0,0,(1-fe)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new wn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=.1:ae<-1?ae=-1:ae>1&&(ae=1);var re=Math.abs(ae)*z;if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())),rez&&(ae=z);var re=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())),re.5&&(ae=.5);var re=Math.abs(ae)*z;if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())),rez&&(ae=z/2);var re=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())),rez&&(ae=z/2);var re=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())):le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),re0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+pe,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,re,re,pe,pe).close())),le.spot1=je,le.spot2=ve,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*ee,-.09239631*z,.07836421*ee,.1406031*z,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*ee,.2450511*z,-.00697547*ee,.3776197*z,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*ee,.4539471*z,0,.6066018*z,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*ee,.6914277*z,-.01904177*ee,.8921095*z,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*ee,1.036446*z,.04105738*ee,1.020377*z,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*ee,1.04448*z,.360238*ee,.992256*z,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*ee,1.032337*z,.5771781*ee,1.018411*z,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*ee,1.028411*z,.9571472*ee,.8556702*z,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*ee,.7431877*z,1.009325*ee,.5624123*z,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*ee,.4820677*z,1.031761*ee,.3030112*z,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*ee,.2329994*z,1.01518*ee,.03213784*z,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*ee,-.02812061*z,.9032597*ee,-.01205169*z,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*ee,-.01812061*z,.6089503*ee,-.00606892*z,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*ee,-.01606892*z,.3892545*ee,-.01205169*z,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(de,z,ee){var ae=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ae*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close())).setSpots(ae/2,ae/2,1-ae/2,1-ae/2)}),go.Shape.setFigureParameter("Pie",0,new wn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new wn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(de,z,ee){var ae=de?de.parameter1:NaN,re=de?de.parameter2:NaN;isNaN(ae)&&(ae=0),isNaN(re)&&(re=315);var le=ae%360;le<0&&(le+=360);var ue=re%360,pe=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(pe,pe).add(new go.PathSegment(go.PathSegment.Arc,le,ue,pe,pe,pe,pe).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(de,z,ee){var ae=fe/Math.SQRT2*.5,re=Math.SQRT2/2,le=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,re*z,le*ee,z,(1-ae)*ee,(re+ae)*z,(le+ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new wn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30);var re=Math.min(ae,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-re,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+re,0)).add(new go.PathSegment(go.PathSegment.Line,le+re,ue-re)).add(new go.PathSegment(go.PathSegment.Line,z,ue-re)).add(new go.PathSegment(go.PathSegment.Line,z,ue+re)).add(new go.PathSegment(go.PathSegment.Line,le+re,ue+re)).add(new go.PathSegment(go.PathSegment.Line,le+re,ee)).add(new go.PathSegment(go.PathSegment.Line,le-re,ee)).add(new go.PathSegment(go.PathSegment.Line,le-re,ue+re)).add(new go.PathSegment(go.PathSegment.Line,0,ue+re)).add(new go.PathSegment(go.PathSegment.Line,0,ue-re)).add(new go.PathSegment(go.PathSegment.Line,le-re,ue-re).close()))}),go.Shape.setFigureParameter("ThinCross",0,new wn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var re=Math.min(ae,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-re,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+re,0)).add(new go.PathSegment(go.PathSegment.Line,le+re,ue-re)).add(new go.PathSegment(go.PathSegment.Line,z,ue-re)).add(new go.PathSegment(go.PathSegment.Line,z,ue+re)).add(new go.PathSegment(go.PathSegment.Line,le+re,ue+re)).add(new go.PathSegment(go.PathSegment.Line,le+re,ee)).add(new go.PathSegment(go.PathSegment.Line,le-re,ee)).add(new go.PathSegment(go.PathSegment.Line,le-re,ue+re)).add(new go.PathSegment(go.PathSegment.Line,0,ue+re)).add(new go.PathSegment(go.PathSegment.Line,0,ue-re)).add(new go.PathSegment(go.PathSegment.Line,le-re,ue-re).close()))}),go.Shape.setFigureParameter("ThickX",0,new wn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(de,z,ee){var ae=de?de.parameter1:NaN;if((isNaN(ae)||ae<0)&&(ae=30),z===0||ee===0){var re=new go.Geometry(go.Geometry.Rectangle);return re.startX=0,re.startY=0,re.endX=z,re.endY=ee,re}else{var le=z/2,ue=ee/2,pe=Math.atan2(ee,z),Ee=ae-Math.min(Math.cos(pe)*ae/2,le),be=ae-Math.min(Math.sin(pe)*ae/2,ue),re=new go.Geometry,Ne=new go.PathFigure(Ee,0,!0);return re.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,le,.2*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,z-Ee,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,be)),Ne.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,ee-be)),Ne.add(new go.PathSegment(go.PathSegment.Line,z-Ee,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,le,.8*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Ee,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,ee-be)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),re}}),go.Shape.setFigureParameter("ThinX",0,new wn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var re=new go.Geometry,le=new go.PathFigure(.1*z,0,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),re}),go.Shape.setFigureParameter("SquareIBeam",0,new wn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.2);var re=new go.Geometry,le=new go.PathFigure(0,0,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close()),re}),go.Shape.setFigureParameter("RoundedIBeam",0,new wn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.5);var re=new go.Geometry,le=new go.PathFigure(0,0,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,Math.abs(1-ae)*z,.25*ee,Math.abs(1-ae)*z,.75*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),re}),go.Shape.defineFigureGenerator("HalfEllipse",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,fe*z,0,z,(.5-fe/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,(.5+fe/2)*ee,fe*z,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,0,z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*ee,.5*z,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*z,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.5*ee,.9*z,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.6*z,.2*ee,z,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*ee,z,.8*ee,.6*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,.5*z,.75*ee,.55*z,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*ee,.45*z,.95*ee,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*z,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*ee,0,.25*ee,.4*z,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.4*z,.6*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,ee,.5*z,.75*ee,.45*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*ee,.55*z,.95*ee,.5*z,.75*ee));var le=.2,ue=.3,pe=0,Ee=le*fe;return re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Ee+pe)*ee,(.5-Ee+ue)*z,(.5+le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+pe)*ee,(.5+Ee+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Ee+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue)*z,(.5-Ee+pe)*ee,(.5+Ee+ue)*z,(.5-le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-Ee+ue)*z,(.5-le+pe)*ee,(.5-le+ue+.05)*z,(.5-Ee+pe-.02)*ee)),le=.2,ue=0,pe=-.3,Ee=le*fe,re.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+pe)*ee,(.5+Ee+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Ee+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue)*z,(.5-Ee+pe)*ee,(.5+Ee+ue)*z,(.5-le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+pe)*ee,(.5-Ee+ue)*z,(.5-le+pe)*ee,(.5-le+ue)*z,(.5-Ee+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Ee+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Ee+pe)*ee,(.5-Ee+ue)*z,(.5+le+pe)*ee)),le=.2,ue=-.3,pe=0,Ee=le*fe,re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue-.05)*z,(.5-Ee+pe-.02)*ee,(.5+Ee+ue)*z,(.5-le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+pe)*ee,(.5-Ee+ue)*z,(.5-le+pe)*ee,(.5-le+ue)*z,(.5-Ee+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Ee+pe)*ee,(.5-Ee+ue)*z,(.5+le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+Ee+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Ee+pe)*ee).close()),ae.setSpots(.06,.33,.93,.68),ae}),go.Shape.defineFigureGenerator("YinYang",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*.5,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),re.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),re.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var le=.1,ue=.5,pe=.25;return re.add(new go.PathSegment(go.PathSegment.Move,(ue+le)*z,pe*ee)),re.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*pe,le*z,le*z).close()),re=new go.PathFigure(z*.5,0,!1),ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),pe=.75,re=new go.PathFigure((ue+le)*z,pe*ee,!0),ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*pe,le*z,le*z).close()),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Peace",function(de,z,ee){var ae=.8535533905932737,re=.5*z,le=.5*ee;return new go.Geometry().add(new go.PathFigure(re,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,re,le,re,le)).add(new go.PathSegment(go.PathSegment.Line,re,ee)).add(new go.PathSegment(go.PathSegment.Move,re,le)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,re,le)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ae*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=.5,ue=.5,pe=.5,Ee=new go.PathFigure(ue*z,(pe-le)*ee);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),le=.4,re=fe*.4;var be=Qe(),Ne=Qe(),Te=Qe(),ke=Qe();ze(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.42,be,Ne,Te,ke,ke);var Oe=Qe(),Be=Qe(),Re=Qe();ze(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.58,ke,ke,Re,Oe,Be);var $e=Qe(),_e=Qe(),Ve=Qe();ze(ue,pe+le,ue-re,pe+le,ue-le,pe+re,ue-le,pe,.42,$e,_e,Ve,ke,ke);var ot=Qe(),ct=Qe(),ft=Qe();return ze(ue,pe+le,ue-re,pe+le,ue-le,pe+re,ue-le,pe,.58,ke,ke,ft,ot,ct),Ee.add(new go.PathSegment(go.PathSegment.Move,ft.x*z,ft.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,ot.x*z,ot.y*ee,ct.x*z,ct.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Te.x*z,Te.y*ee,be.x*z,be.y*ee,Ne.x*z,Ne.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,ft.x*z,ft.y*ee).close()),Ee.add(new go.PathSegment(go.PathSegment.Move,Ve.x*z,Ve.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,Re.x*z,Re.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,Oe.x*z,Oe.y*ee,Be.x*z,Be.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Ve.x*z,Ve.y*ee,$e.x*z,$e.y*ee,_e.x*z,_e.y*ee).close()),Tt(be),Tt(Ne),Tt(Te),Tt(ke),Tt(Oe),Tt(Be),Tt(Re),Tt($e),Tt(_e),Tt(Ve),Tt(ot),Tt(ct),Tt(ft),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Fragile",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*z,0)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.5*ee,z,.25*ee,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new wn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30),ae>z&&(ae=z);var re=(z-ae)/2,le=re+ae;return new go.Geometry().add(new go.PathFigure(le,.5*ee).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,re,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(de,z,ee){var ae=new go.Geometry,re=fe*.4,le=.4,ue=.5,pe=.5,Ee=Qe(),be=Qe(),Ne=Qe(),Te=Qe(),ke=new go.PathFigure((ue-le)*z,pe*ee,!1);ae.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee)),ze(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.44,Ne,Te,be,Ee,Ee),ke.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.y*ee,Ne.x*z,Ne.y*ee,Te.x*z,Te.y*ee));var Oe=Ge(be.x,be.y);ze(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.56,Ee,Ee,be,Ne,Te);var Be=Ge(be.x,be.y);ke.add(new go.PathSegment(go.PathSegment.Line,(Oe.x*.1+.95*.9)*z,Oe.y*.1*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.85*z,Oe.y*.1*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),ke.add(new go.PathSegment(go.PathSegment.Line,z,0)),ke.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*z,.15*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*z,(Be.y*.1+.05*.9)*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,Be.x*z,Be.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,Ne.x*z,Ne.y*ee,Te.x*z,Te.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee)),le=.35,re=fe*.35;var Re=new go.PathFigure(ue*z,(pe-le)*ee,!1);ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee));var $e=new go.PathFigure((ue-le)*z,pe*ee,!1);return ae.add($e),Tt(Ee),Tt(be),Tt(Ne),Tt(Te),Tt(Oe),Tt(Be),ae.spot1=new go.Spot(.202,.257),ae.spot2=new go.Spot(.792,.739),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("GenderFemale",function(de,z,ee){var ae=new go.Geometry,re=.375,le=0,ue=-.125,pe=re*fe,Ee=new go.PathFigure((.525+le)*z,(.5+re+ue)*ee,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+re+le)*z,(.5+ue)*ee,(.5+pe+le)*z,(.5+re+ue)*ee,(.5+re+le)*z,(.5+pe+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-re+ue)*ee,(1-.5+re+le)*z,(.5-pe+ue)*ee,(.5+pe+le)*z,(.5-re+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5-re+ue)*ee,(.5-re+le)*z,(.5-pe+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+re+ue)*ee,(.5-re+le)*z,(.5+pe+ue)*ee,(.5-pe+le)*z,(.5+re+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.475*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.525*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee).close()),re=.325,le=0,ue=-.125,pe=re*fe;var Ee=new go.PathFigure((1-.5+re+le)*z,(.5+ue)*ee,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+re+ue)*ee,(.5+re+le)*z,(.5+pe+ue)*ee,(.5+pe+le)*z,(.5+re+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5+re+ue)*ee,(.5-re+le)*z,(.5+pe+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-re+ue)*ee,(.5-re+le)*z,(.5-pe+ue)*ee,(.5-pe+le)*z,(.5-re+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+re+le)*z,(.5+ue)*ee,(.5+pe+le)*z,(.5-re+ue)*ee,(1-.5+re+le)*z,(.5-pe+ue)*ee));var Ee=new go.PathFigure((.525+le)*z,(.5+re+ue)*ee,!1);return ae.add(Ee),ae.spot1=new go.Spot(.232,.136),ae.spot2=new go.Spot(.682,.611),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicImplies",function(de,z,ee){var ae=de?de.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(de,z,ee){var ae=de?de.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,ae*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(de,z,ee){var ae=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*ee,.5*z,.5*ee)));return ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicTruth",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(de,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(de,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new wn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new wn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var re=de?de.parameter2:NaN;isNaN(re)&&(re=.3);var le=(1-ae)*z,ue=(.5-re/2)*ee,pe=(.5+re/2)*ee,Ee=new go.Geometry,be=new go.PathFigure(0,ue,!0);Ee.add(be),be.add(new go.PathSegment(go.PathSegment.Line,le,ue)),be.add(new go.PathSegment(go.PathSegment.Line,le,0)),be.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,le,ee)),be.add(new go.PathSegment(go.PathSegment.Line,le,pe)),be.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),Ee.spot1=new go.Spot(0,ue/ee);var Ne=oe(0,pe/ee,1,pe/ee,le/z,1,1,.5,Qe());return Ee.spot2=new go.Spot(Ne.x,Ne.y),Tt(Ne),Ee}),go.Shape.setFigureParameter("Arrow2",0,new wn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new wn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=30),ae>z&&(ae=z);var re=de?de.parameter2:NaN;isNaN(re)&&(re=30),re=Math.min(re,ee/2);var le=z-ae,ue=(ee-re)/2,pe=ue+re,Ee=new go.Geometry,be=new go.PathFigure(0,ue,!0);Ee.add(be),be.add(new go.PathSegment(go.PathSegment.Line,le,ue)),be.add(new go.PathSegment(go.PathSegment.Line,le,0)),be.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,le,ee)),be.add(new go.PathSegment(go.PathSegment.Line,le,pe)),be.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),Ee.spot1=new go.Spot(0,ue/ee);var Ne=oe(0,pe/ee,1,pe/ee,le/z,1,1,.5,Qe());return Ee.spot2=new go.Spot(Ne.x,Ne.y),Tt(Ne),Ee}),go.Shape.defineFigureGenerator("Chevron",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("DoubleArrow",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),ae}),go.Shape.setFigureParameter("DoubleEndArrow",0,new wn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var re=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var Ee=oe(0,.5,.3,0,0,re/ee,.1,re/ee,Qe());return ue.spot1=new go.Spot(Ee.x,Ee.y),Ee=oe(.7,1,1,.5,0,le/ee,1,le/ee,Ee),ue.spot2=new go.Spot(Ee.x,Ee.y),Tt(Ee),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new wn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new wn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=40);var re=de?de.parameter2:NaN;isNaN(re)&&(re=100);var le=(ee-ae)/2,ue=le+ae,pe=(ee-re)/2,Ee=pe+re;(ae>ee||re>ee)&&(re>ae?(ae=ae*ee/re,le=(ee-ae)/2,ue=le+ae,pe=0,Ee=ee):(le=0,ue=ee,pe=0,Ee=ee));var be=new go.Geometry,Ne=new go.PathFigure(z,.5*ee,!0);be.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.7*z,Ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Ne.add(new go.PathSegment(go.PathSegment.Line,.3*z,ue)),Ne.add(new go.PathSegment(go.PathSegment.Line,.3*z,Ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.3*z,pe)),Ne.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),Ne.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Ne.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close());var Te=oe(0,.5,.3,pe/ee,0,le/ee,1,le/ee,Qe());return be.spot1=new go.Spot(Te.x,Te.y),Te=oe(.7,Ee/ee,1,.5,0,ue/ee,1,ue/ee,Te),be.spot2=new go.Spot(Te.x,Te.y),Tt(Te),be}),go.Shape.setFigureParameter("IBeamArrow",0,new wn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var re=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(0,re/ee);var Ee=oe(.7,1,1,.5,0,le/ee,1,le/ee,Qe());return ue.spot2=new go.Spot(Ee.x,Ee.y),Tt(Ee),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new wn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new wn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=40);var re=de?de.parameter2:NaN;isNaN(re)&&(re=100);var le=(ee-ae)/2,ue=le+ae,pe=(ee-re)/2,Ee=pe+re;(ae>ee||re>ee)&&(re>ae?(ae=ae*ee/re,le=(ee-ae)/2,ue=le+ae,pe=0,Ee=ee):(le=0,ue=ee,pe=0,Ee=ee));var be=new go.Geometry,Ne=new go.PathFigure(z,.5*ee,!0);be.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.7*z,Ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*z,Ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,Ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,pe)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*z,pe)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),Ne.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Ne.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close()),be.spot1=new go.Spot(0,le/ee);var Te=oe(.7,Ee/ee,1,.5,0,ue/ee,1,ue/ee,Qe());return be.spot2=new go.Spot(Te.x,Te.y),Tt(Te),be}),go.Shape.setFigureParameter("Pointer",0,new wn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.1);var re=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),re.spot1=new go.Spot(ae,.35);var ue=oe(.2,.65,1,.65,0,1,1,.5,Qe());return re.spot2=new go.Spot(ue.x,ue.y),Tt(ue),re}),go.Shape.setFigureParameter("RoundedPointer",0,new wn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var re=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),re.spot1=new go.Spot(ae,.35);var ue=oe(0,.65,1,.65,0,1,1,.5,Qe());return re.spot2=new go.Spot(ue.x,ue.y),Tt(ue),re}),go.Shape.setFigureParameter("SplitEndArrow",0,new wn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.4);var re=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,.3);var Ee=oe(.7,1,1,.5,0,le/ee,1,le/ee,Qe());return ue.spot2=new go.Spot(Ee.x,Ee.y),Tt(Ee),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new wn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=50);var re=(ee-ae)/2,le=re+ae;ae>ee&&(re=0,le=ee);var ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,re/ee);var Ee=oe(.7,1,1,.5,0,le/ee,1,le/ee,Qe());return ue.spot2=new go.Spot(Ee.x,Ee.y),Tt(Ee),ue}),go.Shape.setFigureParameter("SquareArrow",0,new wn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.7);var re=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),re.spot1=go.Spot.TopLeft,re.spot2=new go.Spot(ae,1),re}),go.Shape.defineFigureGenerator("Cone1",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=fe*.1,ue=new go.PathFigure(0,.9*ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-re)*z,ee,0,(.9+le)*ee).close()),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.97),ae}),go.Shape.defineFigureGenerator("Cone2",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.9*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,ee,.85/.9*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var le=new go.PathFigure(0,.9*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,.8*ee,.85/.9*z,.8*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.82),ae}),go.Shape.defineFigureGenerator("Cube1",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.5,.85),ae}),go.Shape.defineFigureGenerator("Cube2",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.3*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var le=new go.PathFigure(0,.3*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.7,1),ae}),go.Shape.defineFigureGenerator("Cylinder1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var re=new go.Geometry,le=fe*.5,ue=new go.PathFigure(0,ae,!0);re.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,fe*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*z,ae,(.5+le)*z,0,1*z,fe*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-fe*ae,(.5+le)*z,1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,1*ee,0,ee-fe*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae));var pe=new go.PathFigure(z,ae,!1);return re.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*ae,1*z,2*ae-fe*ae,(.5+le)*z,2*ae)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ae,(.5-le)*z,2*ae,0,2*ae-fe*ae)),re.spot1=new go.Spot(0,0,0,2*ae),re.spot2=new go.Spot(1,1),re}),go.Shape.defineFigureGenerator("Cylinder2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var re=new go.Geometry,le=fe*.5,ue=new go.PathFigure(0,ee-ae,!0);re.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,fe*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,(.5+le)*z,0,z,fe*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-fe*ae,(.5+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,ee,0,ee-fe*ae));var pe=new go.PathFigure(0,ee-ae,!1);return re.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*ae,0,ee-ae-fe*ae,(.5-le)*z,ee-2*ae)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,ee-ae,(.5+le)*z,ee-2*ae,z,ee-ae-fe*ae)),re.spot1=new go.Spot(0,0),re.spot2=new go.Spot(1,1,0,-2*ae),re}),go.Shape.defineFigureGenerator("Cylinder3",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var re=new go.Geometry,le=fe*.5,ue=new go.PathFigure(ae,0,!0);re.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-fe*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-fe*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,fe*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,fe*ae,0));var pe=new go.PathFigure(ae,0,!1);return re.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,2*ae,.5*ee,ae+fe*ae,0,2*ae,(.5-le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ae,ee,2*ae,(.5+le)*ee,ae+fe*ae,ee)),re.spot1=new go.Spot(0,0,2*ae,0),re.spot2=new go.Spot(1,1),re}),go.Shape.defineFigureGenerator("Cylinder4",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var re=new go.Geometry,le=fe*.5,ue=new go.PathFigure(z-ae,0,!0);re.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-fe*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-fe*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,fe*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,fe*ae,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0));var pe=new go.PathFigure(z-ae,0,!1);return re.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-2*ae,.5*ee,z-ae-fe*ae,0,z-2*ae,(.5-le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z-2*ae,(.5+le)*ee,z-ae-fe*ae,ee)),re.spot1=new go.Spot(0,0),re.spot2=new go.Spot(1,1,-2*ae,0),re}),go.Shape.defineFigureGenerator("Prism1",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.25*z,.25*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.25*z,.25*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.408,.172),ae.spot2=new go.Spot(.833,.662),ae}),go.Shape.defineFigureGenerator("Prism2",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.25*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("Pyramid1",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var le=new go.PathFigure(.5*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Pyramid2",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Actor",function(de,z,ee){var ae=new go.Geometry,re=.2,le=.1,ue=fe*re,pe=fe*le,Ee=.5,be=.1,Ne=new go.PathFigure(Ee*z,(be+le)*ee,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-re)*z,be*ee,(Ee-ue)*z,(be+le)*ee,(Ee-re)*z,(be+pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be-le)*ee,(Ee-re)*z,(be-pe)*ee,(Ee-ue)*z,(be-le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+re)*z,be*ee,(Ee+ue)*z,(be-le)*ee,(Ee+re)*z,(be-pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be+le)*ee,(Ee+re)*z,(be+pe)*ee,(Ee+ue)*z,(be+le)*ee));var Te=.05,ke=fe*Te;Ee=.05,be=.25;var Oe=new go.PathFigure(.5*z,.2*ee,!0);return ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),Ee=.95,be=.25,Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+Te)*z,be*ee,(Ee+ke)*z,(be-Te)*ee,(Ee+Te)*z,(be-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),Te=.025,ke=fe*Te,Ee=.825,be=.35,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be-Te)*ee,(Ee+Te)*z,(be-ke)*ee,(Ee+ke)*z,(be-Te)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-Te)*z,be*ee,(Ee-ke)*z,(be-Te)*ee,(Ee-Te)*z,(be-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),Te=.05,ke=fe*Te,Ee=.5,be=.7,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be-Te)*ee,(Ee+Te)*z,(be-ke)*ee,(Ee+ke)*z,(be-Te)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-Te)*z,be*ee,(Ee-ke)*z,(be-Te)*ee,(Ee-Te)*z,(be-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),Te=.025,ke=fe*Te,Ee=.175,be=.35,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be-Te)*ee,(Ee+Te)*z,(be-ke)*ee,(Ee+ke)*z,(be-Te)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-Te)*z,be*ee,(Ee-ke)*z,(be-Te)*ee,(Ee-Te)*z,(be-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Te=.05,ke=fe*Te,Ee=.05,be=.25,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be-Te)*ee,(Ee-Te)*z,(be-ke)*ee,(Ee-ke)*z,(be-Te)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ae.spot1=new go.Spot(.2,.2),ae.spot2=new go.Spot(.8,.65),ae}),go.Shape.setFigureParameter("Card",0,new wn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.2);var re=new go.Geometry,le=new go.PathFigure(z,0,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),re.spot1=new go.Spot(0,ae),re.spot2=go.Spot.BottomRight,re}),go.Shape.defineFigureGenerator("Collate",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,.5*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee));var le=new go.PathFigure(.5*z,.5*ee,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,.25),ae}),go.Shape.defineFigureGenerator("CreateRequest",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)&&(re=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,re*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,re*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-re)*ee)),ae}),go.Shape.defineFigureGenerator("Database",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=fe*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-re)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+re)*z,0,z,(.1-le)*ee));var pe=new go.PathFigure(z,.1*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+re)*z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-re)*z,.2*ee,0,(.1+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+re)*z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-re)*z,.3*ee,0,(.2+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+le)*ee,(.5+re)*z,.4*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-re)*z,.4*ee,0,(.3+le)*ee)),ae.spot1=new go.Spot(0,.4),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("DataStorage",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*ee,.25*z,.1*ee).close()),ae.spot1=new go.Spot(.226,0),ae.spot2=new go.Spot(.81,1),ae}),go.Shape.defineFigureGenerator("DiskStorage",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=fe*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-re)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+re)*z,0,z,(.1-le)*ee));var pe=new go.PathFigure(z,.1*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+re)*z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-re)*z,.2*ee,0,(.1+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+re)*z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-re)*z,.3*ee,0,(.2+le)*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("Display",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.25*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("DividedEvent",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)?re=.2:re<.15&&(re=.15);var le=fe*.2,ue=new go.PathFigure(0,.2*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-le)*ee,(.2-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+le)*z,0,z,(.2-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+le)*ee,(.8+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-le)*z,ee,0,(.8+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var pe=new go.PathFigure(0,re*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,re*ee)),ae}),go.Shape.defineFigureGenerator("DividedProcess",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;(isNaN(re)||re<.1)&&(re=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,re*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,re*ee)),ae}),go.Shape.defineFigureGenerator("Document",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var re=new go.PathFigure(0,.7*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("ExternalOrganization",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;(isNaN(re)||re<.2)&&(re=.2);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(re*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,re*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,z,re*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-re)*ee)),ae}),go.Shape.defineFigureGenerator("ExternalProcess",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(.1*z,.4*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("File",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.75*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Interrupt",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,.5*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee));var le=new go.PathFigure(z,.5*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee));var ue=new go.PathFigure(z,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("InternalStorage",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(le)&&(le=.1);var ue=new go.PathFigure(0,0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var pe=new go.PathFigure(re*z,0,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Move,0,le*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*ee)),ae}),go.Shape.defineFigureGenerator("Junction",function(de,z,ee){var ae=new go.Geometry,re=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ue=fe*.5,pe=.5,Ee=new go.PathFigure(z,pe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,ee,z,(pe+ue)*ee,(pe+ue)*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*ee,(pe-ue)*z,ee,0,(pe+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,0,0,(pe-ue)*ee,(pe-ue)*z,0)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,z,pe*ee,(pe+ue)*z,0,z,(pe-ue)*ee));var be=new go.PathFigure((le+re)*z,(le+re)*ee,!1);return ae.add(be),be.add(new go.PathSegment(go.PathSegment.Line,le*z,le*ee)),be.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+re)*ee)),be.add(new go.PathSegment(go.PathSegment.Line,(le+re)*z,le*ee)),ae}),go.Shape.defineFigureGenerator("LinedDocument",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var re=new go.PathFigure(0,.7*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close());var le=new go.PathFigure(.1*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*ee)),ae.spot1=new go.Spot(.1,0),ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("LoopLimit",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MagneticTape",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=.5,ue=new go.PathFigure(.5*z,ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-re)*z,ee,0,(le+re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-re)*ee,(le-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+re)*z,0,z,(le-re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*z,.9*ee,z,(le+re)*ee,(le+re)*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.15,.15),ae.spot2=new go.Spot(.85,.8),ae}),go.Shape.defineFigureGenerator("ManualInput",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MessageFromUser",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)&&(re=.7);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,re*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("MicroformProcessing",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)&&(re=.25);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,re*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-re)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("MicroformRecording",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("MultiDocument",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var re=new go.PathFigure(z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*ee,.96*z,.47*ee,.93*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*ee,.86*z,.57*ee,.83*z,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*z,.4*ee,.4*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var le=new go.PathFigure(.1*z,.2*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.8,.77),ae}),go.Shape.defineFigureGenerator("MultiProcess",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.1*z,.1*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close());var le=new go.PathFigure(.2*z,.1*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ae.spot1=new go.Spot(0,.2),ae.spot2=new go.Spot(.8,1),ae}),go.Shape.defineFigureGenerator("OfflineStorage",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)&&(re=.1);var le=1-re,ue=new go.PathFigure(0,0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close());var pe=new go.PathFigure(.5*re*z,re*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.5*re)*z,re*ee)),ae}),go.Shape.defineFigureGenerator("OffPageConnector",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("Or",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+re)*ee,(le+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-re)*z,ee,0,(le+re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-re)*ee,(le-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+re)*z,0,z,(le-re)*ee));var pe=new go.PathFigure(z,.5*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ae}),go.Shape.defineFigureGenerator("PaperTape",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var re=new go.PathFigure(0,.7*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.5*z,.6*ee,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),ae.spot1=new go.Spot(0,.49),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Procedure",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)&&(re=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure((1-re)*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,re*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),ae}),go.Shape.defineFigureGenerator("Process",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)&&(re=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(re*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Sort",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(0,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.5),ae}),go.Shape.defineFigureGenerator("Start",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)&&(re=.25);var le=new go.PathFigure(re*z,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee));var ue=new go.PathFigure(re*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-re)*z,ee)),ae.spot1=new go.Spot(re,0),ae.spot2=new go.Spot(1-re,1),ae}),go.Shape.defineFigureGenerator("Terminator",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.25*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee)),ae.spot1=new go.Spot(.23,0),ae.spot2=new go.Spot(.77,1),ae}),go.Shape.defineFigureGenerator("TransmittalTape",function(de,z,ee){var ae=new go.Geometry,re=de?de.parameter1:NaN;isNaN(re)&&(re=.1);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-re)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-re)*ee).close()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("AndGate",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(.5+re)*z,0,z,(.5-re)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.5+re)*ee,(.5+re)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.55,1),ae}),go.Shape.defineFigureGenerator("Buffer",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Clock",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+re)*ee,(le+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-re)*z,ee,0,(le+re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-re)*ee,(le-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+re)*z,0,z,(le-re)*ee));var pe=new go.PathFigure(z,le*ee,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*ee));var Ee=new go.PathFigure(.8*z,.75*ee,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*ee)),ae}),go.Shape.defineFigureGenerator("Ground",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.4*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ae}),go.Shape.defineFigureGenerator("Inverter",function(de,z,ee){var ae=new go.Geometry,re=fe*.1,le=.1,ue=.9,pe=.5,Ee=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee));var be=new go.PathFigure((ue+le)*z,pe*ee,!0);return ae.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe-le)*ee,(ue+le)*z,(pe-re)*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.4,.75),ae}),go.Shape.defineFigureGenerator("NandGate",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=fe*.4,ue=fe*.1,pe=.1,Ee=.9,be=.5,Ne=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+le)*ee,(.4+re)*z,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+re)*z,0,.8*z,(.5-le)*ee));var Te=new go.PathFigure((Ee+pe)*z,be*ee,!0);return ae.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be+pe)*ee,(Ee+pe)*z,(be+ue)*ee,(Ee+ue)*z,(be+pe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe)*z,be*ee,(Ee-ue)*z,(be+pe)*ee,(Ee-pe)*z,(be+ue)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be-pe)*ee,(Ee-pe)*z,(be-ue)*ee,(Ee-ue)*z,(be-pe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe)*z,be*ee,(Ee+ue)*z,(be-pe)*ee,(Ee+pe)*z,(be-ue)*ee)),ae.spot1=new go.Spot(0,.05),ae.spot2=new go.Spot(.55,.95),ae}),go.Shape.defineFigureGenerator("NorGate",function(de,z,ee){var ae=new go.Geometry,re=.5,le=fe*re,ue=0,pe=.5,Ee=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(pe-re)*ee,.7*z,(pe-le)*ee)),re=.1,le=fe*.1,ue=.9,pe=.5;var be=new go.PathFigure((ue-re)*z,pe*ee,!0);return ae.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.6,.75),ae}),go.Shape.defineFigureGenerator("OrGate",function(de,z,ee){var ae=new go.Geometry,re=.5,le=fe*re,ue=0,pe=.5,Ee=new go.PathFigure(0,0,!0);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le+le)*z,(pe-re)*ee,.8*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(pe+le)*ee,(ue+le+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee).close()),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("XnorGate",function(de,z,ee){var ae=new go.Geometry,re=.5,le=fe*re,ue=.2,pe=.5,Ee=new go.PathFigure(.1*z,0,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var be=new go.PathFigure(.8*z,.5*ee,!0);ae.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(pe-re)*ee,.7*z,(pe-le)*ee)),re=.1,le=fe*.1,ue=.9,pe=.5;var Ne=new go.PathFigure((ue-re)*z,pe*ee,!0);return ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.65,.75),ae}),go.Shape.defineFigureGenerator("XorGate",function(de,z,ee){var ae=new go.Geometry,re=.5,le=fe*re,ue=.2,pe=.5,Ee=new go.PathFigure(.1*z,0,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var be=new go.PathFigure(.2*z,0,!0);return ae.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le)*z,(pe-re)*ee,.9*z,(pe-le)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee).close()),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.8,.75),ae}),go.Shape.defineFigureGenerator("Capacitor",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("Resistor",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Inductor",function(de,z,ee){var ae=new go.Geometry,re=fe*.1,le=.1,ue=.1,pe=.5,Ee=new go.PathFigure((ue-re*.5)*z,ee,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-re)*z,ee,(ue-le)*z,0)),ue=.3,Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+re)*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-re)*z,ee,(ue-le)*z,0)),ue=.5,Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+re)*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-re)*z,ee,(ue-le)*z,0)),ue=.7,Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+re)*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-re)*z,ee,(ue-le)*z,0)),ue=.9,Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re*.5)*z,ee,(ue+le)*z,0,(ue+re)*z,ee)),ae}),go.Shape.defineFigureGenerator("ACvoltageSource",function(de,z,ee){var ae=new go.Geometry,re=fe*.5,le=.5,ue=.5,pe=.5,Ee=new go.PathFigure((ue-le)*z,pe*ee,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe-le)*ee,(ue+le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,(ue-le+.1)*z,pe*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le-.1)*z,pe*ee,ue*z,(pe-le)*ee,ue*z,(pe+le)*ee)),ae}),go.Shape.defineFigureGenerator("DCvoltageSource",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.75*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("Diode",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Wifi",function(de,z,ee){var ae=new go.Geometry,re=z,le=ee;z=z*.38,ee=ee*.6;var ue=fe*.8,pe=.8,Ee=0,be=.5,Ne=(re-z)/2,Te=(le-ee)/2,ke=new go.PathFigure(Ee*z+Ne,(be+pe)*ee+Te,!0);ae.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe)*z+Ne,be*ee+Te,(Ee-ue)*z+Ne,(be+pe)*ee+Te,(Ee-pe)*z+Ne,(be+ue)*ee+Te)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be-pe)*ee+Te,(Ee-pe)*z+Ne,(be-ue)*ee+Te,(Ee-ue)*z+Ne,(be-pe)*ee+Te)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe+ue*.5)*z+Ne,be*ee+Te,Ee*z+Ne,(be-pe)*ee+Te,(Ee-pe+ue*.5)*z+Ne,(be-ue)*ee+Te)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be+pe)*ee+Te,(Ee-pe+ue*.5)*z+Ne,(be+ue)*ee+Te,Ee*z+Ne,(be+pe)*ee+Te).close()),ue=fe*.4,pe=.4,Ee=.2,be=.5;var Oe=new go.PathFigure(Ee*z+Ne,(be+pe)*ee+Te,!0);ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe)*z+Ne,be*ee+Te,(Ee-ue)*z+Ne,(be+pe)*ee+Te,(Ee-pe)*z+Ne,(be+ue)*ee+Te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be-pe)*ee+Te,(Ee-pe)*z+Ne,(be-ue)*ee+Te,(Ee-ue)*z+Ne,(be-pe)*ee+Te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe+ue*.5)*z+Ne,be*ee+Te,Ee*z+Ne,(be-pe)*ee+Te,(Ee-pe+ue*.5)*z+Ne,(be-ue)*ee+Te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be+pe)*ee+Te,(Ee-pe+ue*.5)*z+Ne,(be+ue)*ee+Te,Ee*z+Ne,(be+pe)*ee+Te).close()),ue=fe*.2,pe=.2,Ee=.5,be=.5;var Be=new go.PathFigure((Ee-pe)*z+Ne,be*ee+Te,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be-pe)*ee+Te,(Ee-pe)*z+Ne,(be-ue)*ee+Te,(Ee-ue)*z+Ne,(be-pe)*ee+Te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe)*z+Ne,be*ee+Te,(Ee+ue)*z+Ne,(be-pe)*ee+Te,(Ee+pe)*z+Ne,(be-ue)*ee+Te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be+pe)*ee+Te,(Ee+pe)*z+Ne,(be+ue)*ee+Te,(Ee+ue)*z+Ne,(be+pe)*ee+Te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe)*z+Ne,be*ee+Te,(Ee-ue)*z+Ne,(be+pe)*ee+Te,(Ee-pe)*z+Ne,(be+ue)*ee+Te)),ue=fe*.4,pe=.4,Ee=.8,be=.5;var Re=new go.PathFigure(Ee*z+Ne,(be-pe)*ee+Te,!0);ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe)*z+Ne,be*ee+Te,(Ee+ue)*z+Ne,(be-pe)*ee+Te,(Ee+pe)*z+Ne,(be-ue)*ee+Te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be+pe)*ee+Te,(Ee+pe)*z+Ne,(be+ue)*ee+Te,(Ee+ue)*z+Ne,(be+pe)*ee+Te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe-ue*.5)*z+Ne,be*ee+Te,Ee*z+Ne,(be+pe)*ee+Te,(Ee+pe-ue*.5)*z+Ne,(be+ue)*ee+Te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be-pe)*ee+Te,(Ee+pe-ue*.5)*z+Ne,(be-ue)*ee+Te,Ee*z+Ne,(be-pe)*ee+Te).close()),ue=fe*.8,pe=.8,Ee=1,be=.5;var $e=new go.PathFigure(Ee*z+Ne,(be-pe)*ee+Te,!0);return ae.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe)*z+Ne,be*ee+Te,(Ee+ue)*z+Ne,(be-pe)*ee+Te,(Ee+pe)*z+Ne,(be-ue)*ee+Te)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be+pe)*ee+Te,(Ee+pe)*z+Ne,(be+ue)*ee+Te,(Ee+ue)*z+Ne,(be+pe)*ee+Te)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe-ue*.5)*z+Ne,be*ee+Te,Ee*z+Ne,(be+pe)*ee+Te,(Ee+pe-ue*.5)*z+Ne,(be+ue)*ee+Te)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ne,(be-pe)*ee+Te,(Ee+pe-ue*.5)*z+Ne,(be-ue)*ee+Te,Ee*z+Ne,(be-pe)*ee+Te).close()),ae}),go.Shape.defineFigureGenerator("Email",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Ethernet",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.35*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var le=new go.PathFigure(.1*z,ee,!0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var ue=new go.PathFigure(.6*z,ee,!0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee).close());var pe=new go.PathFigure(0,.5*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Power",function(de,z,ee){var ae=new go.Geometry,re=fe*.4,le=.4,ue=.5,pe=.5,Ee=Qe(),be=Qe(),Ne=Qe(),Te=Qe();ze(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.5,Ee,Ee,be,Ne,Te);var ke=Ge(be.x,be.y),Oe=new go.PathFigure(be.x*z,be.y*ee,!0);ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,Ne.x*z,Ne.y*ee,Te.x*z,Te.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee)),ze(ue-le,pe,ue-le,pe-re,ue-re,pe-le,ue,pe-le,.5,Ne,Te,be,Ee,Ee),Oe.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.y*ee,Ne.x*z,Ne.y*ee,Te.x*z,Te.y*ee)),re=fe*.3,le=.3,ze(ue-le,pe,ue-le,pe-re,ue-re,pe-le,ue,pe-le,.5,Ne,Te,be,Ee,Ee),Oe.add(new go.PathSegment(go.PathSegment.Line,be.x*z,be.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,Te.x*z,Te.y*ee,Ne.x*z,Ne.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),ze(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.5,Ee,Ee,be,Ne,Te),Oe.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.y*ee,Te.x*z,Te.y*ee,Ne.x*z,Ne.y*ee).close());var Oe=new go.PathFigure(.45*z,0,!0);return ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Tt(Ee),Tt(be),Tt(Ne),Tt(Te),Tt(ke),ae.spot1=new go.Spot(.25,.45),ae.spot2=new go.Spot(.75,.8),ae}),go.Shape.defineFigureGenerator("Fallout",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee/2,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,ee/2,z/2,ee/2));function le(ue,pe,Ee){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+pe)*z,(.8+Ee)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+pe)*z,(.5+Ee)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+pe)*z,(.5+Ee)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+pe)*z,(.8+Ee)*ee).close())}return le(re,0,0),le(re,.4,0),le(re,.2,-.3),ae}),go.Shape.defineFigureGenerator("IrritationHazard",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.2*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),ae.spot1=new go.Spot(.3,.3),ae.spot2=new go.Spot(.7,.7),ae}),go.Shape.defineFigureGenerator("ElectricalHazard",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.37*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.37*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.34*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),ae}),go.Shape.defineFigureGenerator("FireHazard",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.1*z,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*ee,.45*z,.44*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*ee,.48*z,.17*ee,.54*z,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*ee,.59*z,.29*ee,.58*z,.28*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*ee,.8*z,.34*ee,.88*z,.43*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*ee,.87*z,.48*ee,.88*z,.43*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,1.17*z,.76*ee,.82*z,.8*ee).close()),ae.spot1=new go.Spot(.07,.445),ae.spot2=new go.Spot(.884,.958),ae}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(de,z,ee){var ae=new go.Geometry,re=.5,le=0,ue=0,pe=re*fe,Ee=.4*Math.SQRT2/2+.5,be=.5-.5*Math.SQRT2/2,Ne=1,Te=.5,ke=.5,Oe=0,Be=new go.PathFigure(Ee*z,(1-be)*ee,!1);return ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,Te*ee,Ne*z,.7*ee,Ne*z,Te*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ke+le)*z,(Oe+le)*ee,(.5+re+le)*z,(.5-pe+le)*ee,(.5+pe+le)*z,(.5-re+le)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5-re+ue)*ee,(.5-re+le)*z,(.5-pe+ue)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*ee,(.5-re+le)*z,(.5+pe+ue)*ee,(.5-pe+le)*z,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Move,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);ae.add(re);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close()),ae}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.2*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var re=new go.PathFigure(0,.2*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ae}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.7*z,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*ee,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,ee,.4*z,.5*ee,z,.5*ee).close());var le=new go.PathFigure(.45*z,.73*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*ee)),ae}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);ae.add(re);var le=new go.PathFigure(.335*z,(1-.555)*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*ee,(1-.12)*z,.46*ee,(1-.02)*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*ee,.02*z,.54*ee,.12*z,.46*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*ee));var ue=.5-.285,pe=.5,Ee=ue,be=Math.PI/4,Ne=4*(1-Math.cos(be))/(3*Math.sin(be)),Te=Ne*.5,ke=ue,Oe=ue,Be=Ne*ke,Re=Ne*Oe;le.add(new go.PathSegment(go.PathSegment.Bezier,(pe-ke)*z,Ee*ee,(pe-(Be+ke)/2)*z,(Ee+(Oe+Re)/2)*ee,(pe-ke)*z,(Ee+Re)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,(Ee-Oe)*ee,(pe-ke)*z,(Ee-Re)*ee,(pe-Be)*z,(Ee-Oe)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(pe+ke)*z,Ee*ee,(pe+Be)*z,(Ee-Oe)*ee,(pe+ke)*z,(Ee-Re)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(pe+ke)*z,(Ee+Re)*ee,(pe+(Be+ke)/2)*z,(Ee+(Oe+Re)/2)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee));var $e=new go.PathFigure(.2*z,ee,!1);ae.add($e),$e.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var _e=new go.PathFigure(.8*z,ee,!1);return ae.add(_e),_e.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.1*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var le=new go.PathFigure(.2*z,.2*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventError",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);ae.add(re);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(.1*z,ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Caution",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.05*z,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*ee,0,ee,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*ee,.5*z,0,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,z,ee,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.05*z,ee));var le=.05;return re.add(new go.PathSegment(go.PathSegment.Move,(.5-le)*z,.875*ee)),re.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*ee,le*z,le*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*ee,.575*z,.725*ee,.625*z,.375*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*ee,.375*z,.375*ee,.425*z,.725*ee)),ae}),go.Shape.defineFigureGenerator("Recycle",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.45*z,.95*ee,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*ee,.17*z,.95*ee,.15*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*ee,0,.675*ee,0,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*ee));var le=new go.PathFigure(.475*z,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*ee,.35*z,0,.375*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*ee,.625*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*ee));var ue=new go.PathFigure(.675*z,.575*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(de,z,ee){var ae=new go.Geometry,re=.5,le=fe*.5,ue=new go.PathFigure(z,re*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,re*z,ee,z,(re+le)*ee,(re+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,re*ee,(re-le)*z,ee,0,(re+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,re*z,0,0,(re-le)*ee,(re-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,re*ee,(re+le)*z,0,z,(re-le)*ee));var pe=new go.PathFigure(re*z,0,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,re*z,.15*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,re*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,re*z,.85*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,0,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.15*z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.85*z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,re*z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,re*z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Package",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.15*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,.15*ee,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*ee).close()),ae.spot1=new go.Spot(0,.1),ae.spot2=new go.Spot(1,1),ae}),go.Shape.defineFigureGenerator("Class",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Component",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee).close());var le=new go.PathFigure(0,.2*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ue=new go.PathFigure(0,.6*ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),ae}),go.Shape.defineFigureGenerator("Boat Shipment",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.15*z,.6*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee));var le=new go.PathFigure(.15*z,.6*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Customer/Supplier",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Workcell",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Supermarket",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.66*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,.66*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ae}),go.Shape.defineFigureGenerator("TruckShipment",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(z,.8*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee).close());var ue=.1,pe=fe*.1,Ee=.2,be=.9,Ne=new go.PathFigure((Ee-ue)*z,be*ee,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be-ue)*ee,(Ee-ue)*z,(be-pe)*ee,(Ee-pe)*z,(be-ue)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+ue)*z,be*ee,(Ee+pe)*z,(be-ue)*ee,(Ee+ue)*z,(be-pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be+ue)*ee,(Ee+ue)*z,(be+pe)*ee,(Ee+pe)*z,(be+ue)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ue)*z,be*ee,(Ee-pe)*z,(be+ue)*ee,(Ee-ue)*z,(be+pe)*ee).close()),ue=.1,pe=fe*.1,Ee=.8,be=.9;var Te=new go.PathFigure((Ee-ue)*z,be*ee,!0);return ae.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be-ue)*ee,(Ee-ue)*z,(be-pe)*ee,(Ee-pe)*z,(be-ue)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+ue)*z,be*ee,(Ee+pe)*z,(be-ue)*ee,(Ee+ue)*z,(be-pe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(be+ue)*ee,(Ee+ue)*z,(be+pe)*ee,(Ee+pe)*z,(be+ue)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ue)*z,be*ee,(Ee-pe)*z,(be+ue)*ee,(Ee-ue)*z,(be+pe)*ee).close()),ae}),go.Shape.defineFigureGenerator("KanbanPost",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.2*z,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ae}),go.Shape.defineFigureGenerator("Forklift",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ue=new go.PathFigure(.5*z,.8*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee));var pe=new go.PathFigure(.5*z,.7*ee,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var Ee=.1,be=fe*.1,Ne=.1,Te=.9,ke=new go.PathFigure((Ne-Ee)*z,Te*ee,!0);ae.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Te-Ee)*ee,(Ne-Ee)*z,(Te-be)*ee,(Ne-be)*z,(Te-Ee)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Ee)*z,Te*ee,(Ne+be)*z,(Te-Ee)*ee,(Ne+Ee)*z,(Te-be)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Te+Ee)*ee,(Ne+Ee)*z,(Te+be)*ee,(Ne+be)*z,(Te+Ee)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Ee)*z,Te*ee,(Ne-be)*z,(Te+Ee)*ee,(Ne-Ee)*z,(Te+be)*ee)),Ee=.1,be=fe*.1,Ne=.4,Te=.9;var Oe=new go.PathFigure((Ne-Ee)*z,Te*ee,!0);return ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Te-Ee)*ee,(Ne-Ee)*z,(Te-be)*ee,(Ne-be)*z,(Te-Ee)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Ee)*z,Te*ee,(Ne+be)*z,(Te-Ee)*ee,(Ne+Ee)*z,(Te-be)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Te+Ee)*ee,(Ne+Ee)*z,(Te+be)*ee,(Ne+be)*z,(Te+Ee)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Ee)*z,Te*ee,(Ne-be)*z,(Te+Ee)*ee,(Ne-Ee)*z,(Te+be)*ee)),ae}),go.Shape.defineFigureGenerator("RailShipment",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.1*z,.4*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*ee).close());var le=new go.PathFigure(.45*z,.7*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee));var ue=new go.PathFigure(.55*z,.4*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var Ne=.05,Te=fe*.05,ke=.175,Oe=.95,pe=new go.PathFigure((ke-Ne)*z,Oe*ee,!0);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Oe-Ne)*ee,(ke-Ne)*z,(Oe-Te)*ee,(ke-Te)*z,(Oe-Ne)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(ke+Ne)*z,Oe*ee,(ke+Te)*z,(Oe-Ne)*ee,(ke+Ne)*z,(Oe-Te)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Oe+Ne)*ee,(ke+Ne)*z,(Oe+Te)*ee,(ke+Te)*z,(Oe+Ne)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-Ne)*z,Oe*ee,(ke-Te)*z,(Oe+Ne)*ee,(ke-Ne)*z,(Oe+Te)*ee));var Ne=.05,Te=fe*.05,ke=.375,Oe=.95,Ee=new go.PathFigure((ke-Ne)*z,Oe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Oe-Ne)*ee,(ke-Ne)*z,(Oe-Te)*ee,(ke-Te)*z,(Oe-Ne)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ke+Ne)*z,Oe*ee,(ke+Te)*z,(Oe-Ne)*ee,(ke+Ne)*z,(Oe-Te)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Oe+Ne)*ee,(ke+Ne)*z,(Oe+Te)*ee,(ke+Te)*z,(Oe+Ne)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ke-Ne)*z,Oe*ee,(ke-Te)*z,(Oe+Ne)*ee,(ke-Ne)*z,(Oe+Te)*ee));var Ne=.05,Te=fe*.05,ke=.625,Oe=.95,be=new go.PathFigure((ke-Ne)*z,Oe*ee,!0);ae.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Oe-Ne)*ee,(ke-Ne)*z,(Oe-Te)*ee,(ke-Te)*z,(Oe-Ne)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ke+Ne)*z,Oe*ee,(ke+Te)*z,(Oe-Ne)*ee,(ke+Ne)*z,(Oe-Te)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Oe+Ne)*ee,(ke+Ne)*z,(Oe+Te)*ee,(ke+Te)*z,(Oe+Ne)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ke-Ne)*z,Oe*ee,(ke-Te)*z,(Oe+Ne)*ee,(ke-Ne)*z,(Oe+Te)*ee));var Ne=.05,Te=fe*.05,ke=.825,Oe=.95,Be=new go.PathFigure((ke-Ne)*z,Oe*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Oe-Ne)*ee,(ke-Ne)*z,(Oe-Te)*ee,(ke-Te)*z,(Oe-Ne)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ke+Ne)*z,Oe*ee,(ke+Te)*z,(Oe-Ne)*ee,(ke+Ne)*z,(Oe-Te)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Oe+Ne)*ee,(ke+Ne)*z,(Oe+Te)*ee,(ke+Te)*z,(Oe+Ne)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ke-Ne)*z,Oe*ee,(ke-Te)*z,(Oe+Ne)*ee,(ke-Ne)*z,(Oe+Te)*ee).close());var Re=new go.PathFigure(0,ee,!1);return ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Warehouse",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(.15*z,ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var pe=.05,Ee=fe*.05,be=.35,Ne=.775,Te=new go.PathFigure((be-pe)*z,Ne*ee,!0);return ae.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,be*z,(Ne-pe)*ee,(be-pe)*z,(Ne-Ee)*ee,(be-Ee)*z,(Ne-pe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(be+pe)*z,Ne*ee,(be+Ee)*z,(Ne-pe)*ee,(be+pe)*z,(Ne-Ee)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,be*z,(Ne+pe)*ee,(be+pe)*z,(Ne+Ee)*ee,(be+Ee)*z,(Ne+pe)*ee)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(be-pe)*z,Ne*ee,(be-Ee)*z,(Ne+pe)*ee,(be-pe)*z,(Ne+Ee)*ee).close()),ae}),go.Shape.defineFigureGenerator("ControlCenter",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee).close()),ae}),go.Shape.defineFigureGenerator("Bluetooth",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.75*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Globe",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.75*z,0,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.75*ee,.75*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*z,ee,0,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*ee,.25*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,.15*z,.25*ee,.15*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*ee,.85*z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*ee,.35*z,.3*ee,.65*z,.3*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*ee,.35*z,.7*ee,.65*z,.7*ee)),ae}),go.Shape.defineFigureGenerator("Wave",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.25*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*ee,.1*z,0,.2*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*ee,.425*z,.5*ee,.575*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*ee,.8*z,0,.9*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*ee,.1*z,.5*ee,.2*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*ee,.425*z,ee,.575*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*ee,.8*z,.5*ee,.9*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Operator",function(de,z,ee){var ae=new go.Geometry,re=.3,le=fe*.3,ue=.5,pe=.7,Ee=new go.PathFigure((ue-re)*z,pe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee));var be=new go.PathFigure(0,.7*ee,!1);return ae.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),ae}),go.Shape.defineFigureGenerator("TripleFanBlades",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.65*z,.3*ee,.65*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*ee,.35*z,.3*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*z,.6*ee,.1*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.2*z,ee,.35*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,.7*z,.6*ee,.9*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.8*z,ee,.65*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("CentrifugalPump",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,0,ee,.4*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*ee,.8*z,ee,.85*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae}),go.Shape.defineFigureGenerator("Battery",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*ee));var le=new go.PathFigure(0,.6*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Delete",function(de,z,ee){var ae=new go.Geometry,re=.5,le=fe*.5,ue=.5,pe=.5,Ee=new go.PathFigure((ue-re)*z,pe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee));var be=new go.PathFigure(.15*z,.5*ee,!1);return ae.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Flag",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.1*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*ee,.15*z,0,.35*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,.65*z,.2*ee,.85*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.85*z,.6*ee,.65*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*z,.4*ee,.15*z,.4*ee).close()),ae}),go.Shape.defineFigureGenerator("Help",function(de,z,ee){var ae=new go.Geometry,re=.5,le=fe*.5,ue=.5,pe=.5,Ee=new go.PathFigure((ue-re)*z,pe*ee,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee).close()),re=.05,le=fe*.05,ue=.5,pe=.8;var be=new go.PathFigure((ue-re)*z,pe*ee,!1);return ae.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee).close()),be.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*ee,.4*z,.2*ee,.3*z,.25*ee)),ae}),go.Shape.defineFigureGenerator("Location",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*ee,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*ee,.5*z,0,.025*z,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*ee)),ae}),go.Shape.defineFigureGenerator("Unlocked",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*ee)),ae}),go.Shape.defineFigureGenerator("Gear",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*ee,.79840625*z,.39915625*ee,.7834375*z,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*ee,.64228125*z,.2188125*ee,.603875*z,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*ee,.39759375*z,.20190625*ee,.36053125*z,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*ee,.21765625*z,.36059375*ee,.201875*z,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*ee,.20221875*z,.603875*ee,.21884375*z,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*ee,.36353125*z,.78340625*ee,.3991875*z,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*ee,.602375*z,.79809375*ee,.63946875*z,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*ee,.78234375*z,.63940625*ee,.798125*z,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*ee,0,.375*ee,.05*z,.325*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*ee,.3*z,.225*ee,.4*z,.175*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*ee,.46*z,.05*ee,.525*z,.05*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*ee,.525*z,.275*ee,.475*z,.325*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*ee,z,.4*ee,z,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*ee,.675*z,.55*ee,.675*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*ee,.65*z,.7*ee,.65*z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,ee,.61*z,.85*ee,.61*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*z,ee,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Map",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.2*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),re.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("Eject",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee*.7)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var le=new go.PathFigure(0,ee*.6,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),ae}),go.Shape.defineFigureGenerator("Pencil",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*1,ee*1,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),re.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.85)),re.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),re.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.3)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.3)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee*.3)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.85)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee*.85).close());var le=new go.PathFigure(.126*z,.85*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*ee).close());var ue=new go.PathFigure(.402*z,.85*ee,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*ee).close());var pe=new go.PathFigure(.678*z,.85*ee,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*ee).close());var Ee=new go.PathFigure(.5*z,.1*ee,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*ee).close()),ae}),go.Shape.defineFigureGenerator("Staircase",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee*1,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.8)),re.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.8)),re.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.6)),re.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.6)),re.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.4)),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.4)),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.2)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.2)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.15)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.15)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.35)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),ae}),go.Shape.defineFigureGenerator("5Bars",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee*1,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*(1-.184)).close());var le=new go.PathFigure(z*.204,ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.204,ee*(1-.184))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*1).close());var ue=new go.PathFigure(z*.408,ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*1).close());var pe=new go.PathFigure(z*.612,ee,!0);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*1).close());var Ee=new go.PathFigure(z*.816,ee,!0);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.816,ee*(1-.184*4))),Ee.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-.184*5))),Ee.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1).close()),ae}),go.Shape.defineFigureGenerator("PC",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var le=new go.PathFigure(z*.055,.07*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.07)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.1).close());var ue=new go.PathFigure(z*.055,.13*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.16).close());var pe=new go.PathFigure(z*.055,.18*ee,!0);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.21).close());var Ee=new go.PathFigure(z*1,0,!0);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.65)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.65).close()),ae}),go.Shape.defineFigureGenerator("Plane",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.55*z,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*ee,0,.4*ee,.225*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*ee,.975*z,0,z,.08*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee).close()),ae}),go.Shape.defineFigureGenerator("Key",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*1,ee*.5,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*ee).close()),re.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*ee)),re.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*ee,.075*z,.075*ee).close()),ae}),go.Shape.defineFigureGenerator("FilmTape",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var le=new go.PathFigure(0,0,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*0)),le.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var ue=new go.PathFigure(z*.11,ee*.1,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.11,ee*.8).close());var pe=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),ee*.8).close());var Ee=new go.PathFigure(z*(.11+.24133333*2+.028*2),ee*.1,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.1)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.8)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),ee*.8).close()),ae}),go.Shape.defineFigureGenerator("FloppyDisk",function(de,z,ee){var ae=new go.Geometry,re=8,le=re*fe,ue=new go.PathFigure(re,0,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-re)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-re,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,re,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-re,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,0,re)),ue.add(new go.PathSegment(go.PathSegment.Bezier,re,0,0,le,le,0).close());var pe=new go.PathFigure(z*.83,0,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*0).close());var Ee=new go.PathFigure(z*.83,ee*1,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.5)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.5)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*1).close());var be=new go.PathFigure(z*.78,ee*.05,!1);return ae.add(be),be.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),be.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),be.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("SpeechBubble",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=15),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var re=ae*fe,le=ee*.8,ue=new go.Geometry,pe=new go.PathFigure(ae,0,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-re,0,z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le-ae)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,le,z,le-re,z-re,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.55,le)),pe.add(new go.PathSegment(go.PathSegment.Line,ae,le)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,le-ae,re,le,0,le-re)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ae)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,re,re,0).close()),re>1?(ue.spot1=new go.Spot(0,0,re,re),ue.spot2=new go.Spot(1,.8,-re,-re)):(ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.8)),ue}),go.Shape.defineFigureGenerator("Repeat",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*.45,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.9)),re.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.9)),re.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.45).close());var le=new go.PathFigure(z*1,ee*.55,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.55).close()),ae}),go.Shape.defineFigureGenerator("Windows",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*.1,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.9)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.9).close());var le=new go.PathFigure(z*.1,ee*.2,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.22,ee*.285)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.25).close());var ue=new go.PathFigure(z*.28,ee*.37,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),ae}),go.Shape.defineFigureGenerator("Beaker",function(de,z,ee){var ae=new go.Geometry,re=15,le=re*fe,ue=new go.PathFigure(z*.62,ee*.475,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-re)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-re,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,re,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-re,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.62,ee*.03).close()),le>1?(ae.spot1=new go.Spot(0,0,le,le),ae.spot2=new go.Spot(1,1,-le,-le)):(ae.spot1=go.Spot.TopLeft,ae.spot2=go.Spot.BottomRight),ae}),go.Shape.defineFigureGenerator("Download",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*1,!0);ae.add(re);var le=.1/.3;re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.4,ee*0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),ae}),go.Shape.defineFigureGenerator("Bin",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*1,!0);ae.add(re);var le=.1/.3;return re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close()),ae}),go.Shape.defineFigureGenerator("Upload",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*1,!0);ae.add(re);var le=.1/.3;re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.5,ee*0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("EmptyDrink",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*.15,ee*0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close()),ae}),go.Shape.defineFigureGenerator("Drink",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*.15,ee*0,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close());var le=new go.PathFigure(z*.235,ee*.28,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.765,ee*.28)),le.add(new go.PathSegment(go.PathSegment.Line,z*.655,ee*.97)),le.add(new go.PathSegment(go.PathSegment.Line,z*.345,ee*.97).close()),ae}),go.Shape.defineFigureGenerator("4Arrows",function(de,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*.5,ee*0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.25)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.25)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.5)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.65)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.65)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.5)),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.35)),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.25)),re.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},98598:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var wn={},sn="5.0",Ge={},Qe=null,Tt=!1,oe=!1,ze=null,je=!1,ve=null,fe=null,Pe=0;Pe4?parseFloat(mt):5};wn.setHTML5Codebase=function(mt,gt){fe=mt,pt(mt,gt)},wn.setJavaCodebase=wn.setJavaCodebaseVersion=wn.isCompiledInstalled=wn.setPreCompiledScriptPath=wn.setPreCompiledResourcePath=function(){},wn.setHTML5CodebaseVersion=function(mt,gt){var St=parseFloat(mt);if(St!==NaN&&St<5){console.log("The GeoGebra HTML5 codebase version "+St+" is deprecated. Using version latest instead.");return}ve=mt,it(mt,gt)},wn.getHTML5CodebaseVersion=function(){return de},wn.getParameters=function(){return Ge},wn.setFontsCSSURL=function(mt){ue=mt},wn.setGiacJSURL=function(mt){},wn.setJNLPFile=function(mt){Se=mt},wn.setJNLPBaseDir=function(mt){},wn.inject=function(){function mt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var gt="auto",St=Ge.id,Ot,Lt=!1,Ut=0;Ut=5)return!0;var mt=wn.getAppletObject();return mt&&typeof mt.recalculateEnvironments=="function"?(mt.recalculateEnvironments(),!0):!1},wn.startAnimation=function(){var mt=wn.getAppletObject();return mt&&typeof mt.startAnimation=="function"?(mt.startAnimation(),!0):!1},wn.stopAnimation=function(){var mt=wn.getAppletObject();return mt&&typeof mt.stopAnimation=="function"?(mt.stopAnimation(),!0):!1},wn.getAppletObject=function(){var mt=Ge.id!==void 0?Ge.id:"ggbApplet";return window[mt]},wn.resize=function(){};var Be=function(mt,gt,St){var Ot=document.createElement("param");Ot.setAttribute("name",gt),Ot.setAttribute("value",St),mt.appendChild(Ot)},Re=function(mt){return mt&&mt!=="false"},$e=function(mt,gt,St){Ee(de)<=4.2&&(St=!0);var Ot=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==de||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Ot=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Lt=document.createElement("div");Lt.classList.add("appletParameters","notranslate");var Ut=gt.width,Et=gt.height;if(gt.disableAutoScale=gt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():gt.disableAutoScale,gt.width!==void 0)if(Ee(de)<=4.4)Re(gt.showToolBar)&&(gt.height-=7),Re(gt.showAlgebraInput)&&(gt.height-=37),gt.width<605&&Re(gt.showToolBar)&&(gt.width=605,Ut=605);else{var yt=100;(Re(gt.showToolBar)||Re(gt.showMenuBar))&&(gt.hasOwnProperty("customToolBar")&&(gt.customToolbar=gt.customToolBar),yt=Re(gt.showMenuBar)?245:155),Ut=5?(gt.appletOnLoad=function(Ie){var Xe=mt.querySelector(".ggb_preview");Xe&&Xe.parentNode.removeChild(Xe),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ke),window.GGBT_wsf_view&&$(window).trigger("resize"),Pt(Ie)},lt||Ke.appendChild(bt)):Lt.appendChild(bt),Ke.appendChild(Lt),lt||mt.appendChild(Ke),setTimeout(function(){wn.resize()},1)}else{var ht=document.createElement("div");ht.className="applet_scaler",ht.style.position="relative",ht.style.display="block",ht.appendChild(Lt),mt.appendChild(ht),gt.appletOnLoad=function(Ie){wn.resize(),Pt(Ie)}}function et(Ie,Xe){Xe&&typeof Xe.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ie,Xe.appletOnLoad):renderGGBElement(Ie),Ct("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Xe)}function Ze(Ie,Xe){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ie,params:Xe}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(vt){et(vt.article,vt.params)}),html5AppletsToProcess=null)},Ee(de)<5&&(Ie.className+=" geogebraweb")):et(Ie,Xe)}if(Ot){scriptLoadStarted=!0;for(var He=0;He0?(nt.remove(),Ke.attr("id","fullscreencontent").show(),jQuery(Pt).append(Ke),window.dispatchEvent(new Event("resize"))):$e(nt,gt,!1),window.GGBT_wsf_view.launchFullScreen(Pt)}else ye=Ot,$e(mt,gt,!1);if(!window.GGBT_wsf_view)for(Et=0;Etmt/4*3&&(nt=mt/4*3),Pt=nt/5.8,yt.setAttribute("src",re),yt.setAttribute("width",nt),yt.setAttribute("height",Pt);var Ke=(mt-nt)/2,lt=(gt-Pt)/2;yt.style.left=Ke+"px",yt.style.top=lt+"px",Lt.appendChild(yt)}}return Lt.appendChild(Et),Lt},wt=function(mt){return mt=mt.toLowerCase(),mt==="html5"||mt==="screenshot"?mt:"html5"},qe=["web","webSimple","web3d","tablet","tablet3d","phone"],it=function(mt,gt){if(de=mt,gt){pt(de,!0);return}var St=!Tt;if(St){var Ot=Ee(de);!isNaN(Ot)&&Ot<4.4&&(St=!1)}var Lt,Ut;window.location.protocol.substr(0,4)==="http"?Lt=window.location.protocol:Lt="http:";var Et=de.indexOf("//");Et>0?Ut=de:Et===0?Ut=Lt+de:Ut="https://www.geogebra.org/apps/5.2.814.0/";for(var yt in qe)if(de.slice(qe[yt].length*-1)===qe[yt]||de.slice((qe[yt].length+1)*-1)===qe[yt]+"/"){pt(Ut,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&St&&!Qe.is3D&&!Qe.AV&&!Qe.SV&&!Qe.CV&&!Qe.EV2&&!Qe.CP&&!Qe.PC&&!Qe.DA&&!Qe.FI&&!Qe.PV&&!Re(Ge.showToolBar)&&!Re(Ge.showMenuBar)&&!Re(Ge.showAlgebraInput)&&!Re(Ge.enableRightClick)&&(!Ge.appName||Ge.appName=="classic")?Ut+="webSimple/":Ut+="web3d/",pt(Ut,!1)},pt=function(mt,gt){if(mt.requirejs){we=mt;return}mt.slice(-1)!=="/"&&(mt+="/"),we=mt,gt===null&&(gt=mt.indexOf("http")===-1),me=gt,z="web.nocache.js",ee=!1;var St=we.split("/");St.length>1&&(!gt&&St[St.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):qe.indexOf(St[St.length-2])>=0&&(z=St[St.length-2]+".nocache.js")),St=mt.split("/"),de=St[St.length-3],de.substr(0,4)==="test"?de=de.substr(4,1)+"."+de.substr(5,1):(de.substr(0,3)==="war"||de.substr(0,4)==="beta")&&(de="5.0");var Ot=parseFloat(de);Ot!==NaN&&Ot<5&&mt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Ot+" is deprecated. Using version latest instead."),it("5.0",gt))},Ct=function(mt,gt){window.console&&window.console.log&&(!gt||typeof gt.showLogging=="undefined"||gt.showLogging&>.showLogging!=="false")&&console.log(mt)};Ge.material_id!==void 0?Te(xt):xt();function xt(){var mt=sn;ve!==null?mt=ve:parseFloat(mt)<5&&(mt="5.0"),it(mt,!1),fe!==null&&pt(fe,me),je=!0}return wn},GGBAppletUtils=function(){"use strict";function wn(){return window.GGBT_wsf_edit!==void 0}function sn(je,ve){ve!=1?(je.style.transformOrigin="0% 0% 0px",je.style.webkitTransformOrigin="0% 0% 0px",je.style.transform="scale("+ve+","+ve+")",je.style.webkitTransform="scale("+ve+","+ve+")",je.style.maxWidth="initial",je.querySelector(".ggb_preview")!==null&&(je.querySelector(".ggb_preview").style.maxWidth="initial"),je.querySelectorAll(".ggb_preview img")[0]!==void 0&&(je.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),je.querySelectorAll(".ggb_preview img")[1]!==void 0&&(je.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(je.style.transform="none",je.style.webkitTransform="none")}function Ge(je,ve,fe,Pe,Ce,Se){var we=null;if(Se!=null&&Se!="")for(var me=je.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+Se+" ")>-1){we=me;break}else me=me.parentNode;var ye=0,de=0,z=0,ee=0,ae=0,re=0,le=0;if(we)ye=we.offsetWidth,de=Math.max(Pe?we.offsetWidth:0,we.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ye=Math.min(window.innerWidth,document.documentElement.clientWidth),de=Math.min(window.innerHeight,document.documentElement.clientHeight),z=ye):(ye=window.innerWidth,de=window.innerHeight,z=window.innerWidth),je){var ue=je.getBoundingClientRect();ue.left>0&&ue.left<=ye&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ae=ye-ue.width-ue.left,re=z<=480?10:30):(re=ue.left,ae=z<=480?10:30),ee=re+ae)}if(je&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var pe=je.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,le=40)}}return je&&((fe===void 0||!fe)&&ve>0&&ve+ee1&&(Se=!0)),ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Se=!0),!(je.hasOwnProperty("disableAutoScale")&&je.disableAutoScale))Ce=Qe(je,ve,Se,fe,je.scaleContainerClass);else return Pe;return Se&&(!je.hasOwnProperty("scale")||Pe===1)?Ce:Math.min(Pe,Ce)}function oe(je){var ve=Math.min(window.innerWidth,document.documentElement.clientWidth),fe=Math.min(window.innerHeight,document.documentElement.clientHeight),Pe=je.getBoundingClientRect(),Ce=(ve-Pe.width)/2,Se=(fe-Pe.height)/2;Se<0&&(Se=0),je.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?je.style.left="40px":je.style.left=Ce+"px",je.style.top=Se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Se<40?je.style.top="40px":je.style.top=Se+"px",je.style.left=Ce+"px")}function ze(je,ve){var fe=je.querySelector(".appletParameters");if(fe){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ve.id!==fe.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(je)}if(fe.parentElement&&/fullscreen/.test(fe.parentElement.className))return;var Pe=Tt(ve,je);wn()&&fe.setAttribute("data-param-scale",Pe);for(var Ce=null,Se=0;Se=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(wn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(wn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(wn){var sn=c[wn];return sn==null?null:sn},r=d,webModule.__errFn=e}function B(){function wn(je){var ve=je.lastIndexOf(rb);ve==-1&&(ve=je.length);var fe=je.indexOf(sb);fe==-1&&(fe=je.length);var Pe=je.lastIndexOf(tb,Math.min(fe,ve));return Pe>=O?je.substring(O,Pe+P):W}function sn(je){if(!je.match(/^\w+:\/\//)){var ve=o.createElement(ub);ve.src=je+vb,je=wn(ve.src)}return je}function Ge(){var je=__gwt_getMetaProperty(wb);return je!=null?je:W}function Qe(){for(var je=o.getElementsByTagName(_),ve=O;veO?je[je.length-P].href:W}function oe(){var je=o.location;return je.href==je.protocol+zb+je.host+je.pathname+je.search+je.hash}var ze=Ge();return ze==W&&(ze=Qe()),ze==W&&(ze=Tt()),ze==W&&oe()&&(ze=wn(o.location.href)),ze=sn(ze),ze}function C(wn){return wn.match(/^\//)||wn.match(/^[a-zA-Z]+:\/\//)?wn:webModule.__moduleBase+wn}function D(){var wn=[],sn=O,Ge=[],Qe=[];function Tt(je){var ve=Qe[je](),fe=Ge[je];if(ve in fe)return ve;var Pe=[];for(var Ce in fe)Pe[fe[Ce]]=Ce;throw r&&r(je,Pe,ve),null}if(__gwt_isKnownPropertyValue=function(je,ve){return ve in Ge[je]},webModule.__getPropMap=function(){var je={};for(var ve in Ge)Ge.hasOwnProperty(ve)&&(je[ve]=Tt(ve));return je},webModule.__computePropValue=Tt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var oe;try{oe=Cb;var ze=oe.indexOf(Db);ze!=-1&&(sn=parseInt(oe.substring(ze+P),$),oe=oe.substring(O,ze))}catch(je){}return webModule.__softPermutationId=sn,C(oe+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},58788:function(wn,sn,Ge){"use strict";Ge.d(sn,{Ax:function(){return ze},Ds:function(){return je},KI:function(){return fe},SI:function(){return oe},f1:function(){return Tt}});var Qe=Ge(10148);function Tt(Pe){let Ce=!0;if(Pe.length>0){for(let Se=0;Se0&&vt[vt.length-1])||Ht[0]!==6&&Ht[0]!==2)){At=0;continue}if(Ht[0]===3&&(!vt||Ht[1]>vt[0]&&Ht[1]',"select"),this.addActionButton(Xe,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Xe,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Xe,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Xe,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Xe,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Xe,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Xe,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Ye){var At=document.createElement("div");At.className=""+Ie.toolbarButtonStyleClass.name,At.setAttribute("data-type-name",Ye.typeName),At.innerHTML=Ye.icon,At.addEventListener("click",function(){Ie.markerToolbarButtonClicked(At,Ye)}),Ie.buttons.push(At),Ie.markerButtons.push(At)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var vt=document.createElement("div");vt.className=this.toolbarBlockStyleClass.name,vt.style.whiteSpace="nowrap",vt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(vt),this.addActionButton(vt,'',"render"),this.addActionButton(vt,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},We.prototype.addButtonClickListener=function(Fe){this.buttonClickListeners.push(Fe)},We.prototype.removeButtonClickListener=function(Fe){this.buttonClickListeners.indexOf(Fe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Fe),1)},We.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},We.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Fe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ie=0;Ie0&&this.buttonClickListeners.forEach(function(Xe){return Xe("marker",Ie)}),this.markerButtonOverflowBlock.style.display="none"},We.prototype.actionToolbarButtonClicked=function(Fe,Ie){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xe){return Xe("action",Ie)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},We.prototype.setActiveButton=function(Fe){this.resetButtonStyles(),Fe.className=Fe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Fe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},We.prototype.setActiveMarkerButton=function(Fe){var Ie=this.markerButtons.find(function(Xe){return Xe.getAttribute("data-type-name")===Fe});Ie&&this.setActiveButton(Ie)},We.prototype.setCurrentMarker=function(Fe){var Ie=this;this.currentMarker=Fe,this.buttons.filter(function(Xe){return/delete|notes/.test(Xe.getAttribute("data-action"))}).forEach(function(Xe){Ie.currentMarker===void 0?(Xe.style.fillOpacity="0.4",Xe.style.pointerEvents="none"):(Xe.style.fillOpacity="1",Xe.style.pointerEvents="all")})},We}(),le=function(){function We(Fe,Ie,Xe,vt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Fe,this.displayMode=Ie,this.uiStyleSettings=Xe,this.styles=vt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return We.prototype.addStyles=function(){var Fe;this.toolboxStyleClass=this.styles.addClass(new ae("toolbox",` width: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: sans-serif; `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+` box-sizing: content-box; `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+` `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` overflow: hidden; `)),this.toolboxStyleColorsClass=this.styles.addClass(new ae("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var Ie=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ae("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ae("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ae("toolbox-panel-row",` display: flex; `+(this.displayMode==="inline"?"position: absolute;":"")+` `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+` cursor: default; height: `+1.5*this.uiStyleSettings.toolbarHeight+`px; `+(this.displayMode==="inline"?"width: 100%;":"")+` box-sizing: content-box; `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ae("toolbox-panel-row_colors",` background-color: `+((Fe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Fe!==void 0?Fe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new ae("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*Ie)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*Ie)+`px; padding: `+Ie+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ae("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ae("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new ee("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new ee("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},We.prototype.show=function(Fe){var Ie;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Fe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ie=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ie!==void 0?Ie:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},We.prototype.setPanelButtons=function(Fe){var Ie,Xe,vt=this;this.panels=Fe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ie=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ie!==void 0?Ie:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Xe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Xe!==void 0?Xe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ye){var At;Ye.uiStyleSettings=vt.uiStyleSettings;var Gt=document.createElement("div");Gt.className=vt.toolboxButtonStyleClass.name+" "+((At=vt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&At!==void 0?At:vt.toolboxButtonStyleColorsClass.name),Gt.innerHTML=Ye.icon,Gt.title=Ye.title,Gt.addEventListener("click",function(){vt.panelButtonClick(Ye)}),vt.panelButtons.push(Gt),vt.buttonRow.appendChild(Gt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},We.prototype.panelButtonClick=function(Fe){var Ie=this,Xe=-1;if(Fe!==this.activePanel){Xe=this.panels.indexOf(Fe),this.panelRow.innerHTML="";var vt=Fe.getUi();vt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(vt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=Fe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ie.displayMode==="inline"?Ie.panelRow.style.display="none":Ie.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ye,At){var Gt,on;Ye.className=Ie.toolboxButtonStyleClass.name+" "+(At===Xe?""+((Gt=Ie.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Gt!==void 0?Gt:Ie.toolboxActiveButtonStyleColorsClass.name):""+((on=Ie.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&on!==void 0?on:Ie.toolboxButtonStyleColorsClass.name))})},We}(),ue=function(We,Fe){this.title=We,this.icon=Fe},pe=function(We){function Fe(Ie,Xe,vt,Ye){var At=We.call(this,Ie,Ye||'')||this;return At.colors=[],At.addTransparent=!1,At.colorBoxes=[],At.colors=Xe,At.currentColor=vt,At.setCurrentColor=At.setCurrentColor.bind(At),At.getColorBox=At.getColorBox.bind(At),At}return fe(Fe,We),Fe.prototype.getUi=function(){var Ie=this,Xe=document.createElement("div");return Xe.style.overflow="hidden",Xe.style.whiteSpace="nowrap",this.colors.forEach(function(vt){var Ye=Ie.getColorBox(vt);Xe.appendChild(Ye),Ie.colorBoxes.push(Ye)}),Xe},Fe.prototype.getColorBox=function(Ie){var Xe=this,vt=this.uiStyleSettings.toolbarHeight/4,Ye=this.uiStyleSettings.toolbarHeight-vt,At=document.createElement("div");At.style.display="inline-block",At.style.boxSizing="content-box",At.style.width=Ye-2+"px",At.style.height=Ye-2+"px",At.style.padding="1px",At.style.marginRight="2px",At.style.marginBottom="2px",At.style.borderWidth="2px",At.style.borderStyle="solid",At.style.borderRadius=(Ye+2)/2+"px",At.style.borderColor=Ie===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",At.addEventListener("click",function(){Xe.setCurrentColor(Ie,At)});var Gt=document.createElement("div");return Gt.style.display="inline-block",Gt.style.width=Ye-2+"px",Gt.style.height=Ye-2+"px",Gt.style.backgroundColor=Ie,Gt.style.borderRadius=Ye/2+"px",Ie==="transparent"&&(Gt.style.fill=this.uiStyleSettings.toolboxAccentColor,Gt.innerHTML=` `),At.appendChild(Gt),At},Fe.prototype.setCurrentColor=function(Ie,Xe){var vt=this;this.currentColor=Ie,this.colorBoxes.forEach(function(Ye){Ye.style.borderColor=Ye===Xe?vt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ie)},Fe}(ue),Ee=function(){function We(Fe,Ie,Xe){this._state="new",this._isSelected=!1,this._container=Fe,this._overlayContainer=Ie,this.globalSettings=Xe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(We.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),We.prototype.ownsTarget=function(Fe){return!1},Object.defineProperty(We.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),We.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},We.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},We.prototype.pointerDown=function(Fe,Ie){},We.prototype.dblClick=function(Fe,Ie){},We.prototype.manipulate=function(Fe){},We.prototype.pointerUp=function(Fe){this.stateChanged()},We.prototype.dispose=function(){},We.prototype.addMarkerVisualToContainer=function(Fe){this.container.childNodes.length>0?this.container.insertBefore(Fe,this.container.childNodes[0]):this.container.appendChild(Fe)},We.prototype.getState=function(){return{typeName:We.typeName,state:this.state,notes:this.notes}},We.prototype.restoreState=function(Fe){this._state=Fe.state,this.notes=Fe.notes},We.prototype.scale=function(Fe,Ie){},We.prototype.colorChanged=function(Fe){this.onColorChanged&&this.onColorChanged(Fe),this.stateChanged()},We.prototype.fillColorChanged=function(Fe){this.onFillColorChanged&&this.onFillColorChanged(Fe),this.stateChanged()},We.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Fe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Fe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Fe)&&this.onStateChanged(this)}},We.typeName="MarkerBase",We}(),be=function(){function We(){this.findGripByVisual=this.findGripByVisual.bind(this)}return We.prototype.findGripByVisual=function(Fe){return this.topLeft.ownsTarget(Fe)?this.topLeft:this.topCenter.ownsTarget(Fe)?this.topCenter:this.topRight.ownsTarget(Fe)?this.topRight:this.centerLeft.ownsTarget(Fe)?this.centerLeft:this.centerRight.ownsTarget(Fe)?this.centerRight:this.bottomLeft.ownsTarget(Fe)?this.bottomLeft:this.bottomCenter.ownsTarget(Fe)?this.bottomCenter:this.bottomRight.ownsTarget(Fe)?this.bottomRight:void 0},We}(),Ne=function(){function We(){this.GRIP_SIZE=10,this.visual=we.createGroup(),this.visual.appendChild(we.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(we.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return We.prototype.ownsTarget=function(Fe){return Fe===this.visual||Fe===this.visual.childNodes[0]||Fe===this.visual.childNodes[1]},We}(),Te=function(){function We(){}return We.toITransformMatrix=function(Fe){return{a:Fe.a,b:Fe.b,c:Fe.c,d:Fe.d,e:Fe.e,f:Fe.f}},We.toSVGMatrix=function(Fe,Ie){return Fe.a=Ie.a,Fe.b=Ie.b,Fe.c=Ie.c,Fe.d=Ie.d,Fe.e=Ie.e,Fe.f=Ie.f,Fe},We}(),ke=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.left=0,Ye.top=0,Ye.width=0,Ye.height=0,Ye.defaultSize={x:50,y:20},Ye.offsetX=0,Ye.offsetY=0,Ye.rotationAngle=0,Ye.CB_DISTANCE=10,Ye._suppressMarkerCreateEvent=!1,Ye.container.transform.baseVal.appendItem(we.createTransform()),Ye.setupControlBox(),Ye}return fe(Fe,We),Object.defineProperty(Fe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Fe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Fe.prototype,"visual",{get:function(){return this._visual},set:function(Ie){this._visual=Ie;var Xe=we.createTransform();this._visual.transform.baseVal.appendItem(Xe)},enumerable:!1,configurable:!0}),Fe.prototype.ownsTarget=function(Ie){return!!We.prototype.ownsTarget.call(this,Ie)||!!(this.controlGrips.findGripByVisual(Ie)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ie))},Fe.prototype.pointerDown=function(Ie,Xe){We.prototype.pointerDown.call(this,Ie,Xe),this.state==="new"&&(this.left=Ie.x,this.top=Ie.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var vt=this.unrotatePoint(Ie);if(this.manipulationStartX=vt.x,this.manipulationStartY=vt.y,this.offsetX=vt.x-this.left,this.offsetY=vt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Xe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Xe)){this.activeGrip=this.rotatorGrip;var Ye=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ye.x-this.width/2,this.top=Ye.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var At=this.container.transform.baseVal.getItem(0);At.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(At,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Fe.prototype.pointerUp=function(Ie){var Xe=this.state;We.prototype.pointerUp.call(this,Ie),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ie),this._state="select",Xe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Fe.prototype.moveVisual=function(Ie){this.visual.style.transform="translate("+Ie.x+"px, "+Ie.y+"px)"},Fe.prototype.manipulate=function(Ie){var Xe=this.unrotatePoint(Ie);this.state==="creating"?this.resize(Ie):this.state==="move"?(this.left=this.manipulationStartLeft+(Xe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Xe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Xe):this.state==="rotate"&&this.rotate(Ie)},Fe.prototype.resize=function(Ie){var Xe=this.manipulationStartLeft,vt=this.manipulationStartWidth,Ye=this.manipulationStartTop,At=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Xe=this.manipulationStartLeft+Ie.x-this.manipulationStartX,vt=this.manipulationStartWidth+this.manipulationStartLeft-Xe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:vt=this.manipulationStartWidth+Ie.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ye=this.manipulationStartTop+Ie.y-this.manipulationStartY,At=this.manipulationStartHeight+this.manipulationStartTop-Ye;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:At=this.manipulationStartHeight+Ie.y-this.manipulationStartY}vt>=0?(this.left=Xe,this.width=vt):(this.left=Xe+vt,this.width=-vt),At>=0?(this.top=Ye,this.height=At):(this.top=Ye+At,this.height=-At),this.setSize()},Fe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Fe.prototype.rotate=function(Ie){if(Math.abs(Ie.x-this.centerX)>.1){var Xe=Math.sign(Ie.x-this.centerX);this.rotationAngle=180*Math.atan((Ie.y-this.centerY)/(Ie.x-this.centerX))/Math.PI+90*Xe,this.applyRotation()}},Fe.prototype.applyRotation=function(){var Ie=this.container.transform.baseVal.getItem(0);Ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ie,0)},Fe.prototype.rotatePoint=function(Ie){if(this.rotationAngle===0)return Ie;var Xe=this.container.getCTM(),vt=we.createPoint(Ie.x,Ie.y);return{x:(vt=vt.matrixTransform(Xe)).x,y:vt.y}},Fe.prototype.unrotatePoint=function(Ie){if(this.rotationAngle===0)return Ie;var Xe=this.container.getCTM();Xe=Xe.inverse();var vt=we.createPoint(Ie.x,Ie.y);return{x:(vt=vt.matrixTransform(Xe)).x,y:vt.y}},Fe.prototype.select=function(){We.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Fe.prototype.deselect=function(){We.prototype.deselect.call(this),this.controlBox.style.display="none"},Fe.prototype.setupControlBox=function(){this.controlBox=we.createGroup();var Ie=we.createTransform();Ie.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ie),this.container.appendChild(this.controlBox),this.controlRect=we.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=we.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new be,this.addControlGrips(),this.controlBox.style.display="none"},Fe.prototype.adjustControlBox=function(){var Ie=this.controlBox.transform.baseVal.getItem(0);Ie.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ie,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},Fe.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},Fe.prototype.createGrip=function(){var Ie=new Ne;return Ie.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(Ie.visual),Ie},Fe.prototype.positionGrips=function(){var Ie=this.controlGrips.topLeft.GRIP_SIZE,Xe=-Ie/2,vt=Xe,Ye=(this.width+this.CB_DISTANCE)/2-Ie/2,At=(this.height+this.CB_DISTANCE)/2-Ie/2,Gt=this.height+this.CB_DISTANCE-Ie/2,on=this.width+this.CB_DISTANCE-Ie/2;this.positionGrip(this.controlGrips.topLeft.visual,Xe,vt),this.positionGrip(this.controlGrips.topCenter.visual,Ye,vt),this.positionGrip(this.controlGrips.topRight.visual,on,vt),this.positionGrip(this.controlGrips.centerLeft.visual,Xe,At),this.positionGrip(this.controlGrips.centerRight.visual,on,At),this.positionGrip(this.controlGrips.bottomLeft.visual,Xe,Gt),this.positionGrip(this.controlGrips.bottomCenter.visual,Ye,Gt),this.positionGrip(this.controlGrips.bottomRight.visual,on,Gt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ye,vt-3*this.CB_DISTANCE)},Fe.prototype.positionGrip=function(Ie,Xe,vt){var Ye=Ie.transform.baseVal.getItem(0);Ye.setTranslate(Xe,vt),Ie.transform.baseVal.replaceItem(Ye,0)},Fe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Fe.prototype.showControlBox=function(){this.controlBox.style.display=""},Fe.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Te.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Te.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},We.prototype.getState.call(this))},Fe.prototype.restoreState=function(Ie){We.prototype.restoreState.call(this,Ie);var Xe=Ie;this.left=Xe.left,this.top=Xe.top,this.width=Xe.width,this.height=Xe.height,this.rotationAngle=Xe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Te.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Xe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Te.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Xe.containerTransformMatrix))},Fe.prototype.scale=function(Ie,Xe){We.prototype.scale.call(this,Ie,Xe);var vt=this.rotatePoint({x:this.left,y:this.top}),Ye=this.unrotatePoint({x:vt.x*Ie,y:vt.y*Xe});this.left=Ye.x,this.top=Ye.y,this.width=this.width*Ie,this.height=this.height*Xe,this.adjustControlBox()},Fe}(Ee),Oe=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.fillColor="transparent",Ye.strokeColor="transparent",Ye.strokeWidth=0,Ye.strokeDasharray="",Ye.opacity=1,Ye.setStrokeColor=Ye.setStrokeColor.bind(Ye),Ye.setFillColor=Ye.setFillColor.bind(Ye),Ye.setStrokeWidth=Ye.setStrokeWidth.bind(Ye),Ye.setStrokeDasharray=Ye.setStrokeDasharray.bind(Ye),Ye.createVisual=Ye.createVisual.bind(Ye),Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){return!(!We.prototype.ownsTarget.call(this,Ie)&&Ie!==this.visual)},Fe.prototype.createVisual=function(){this.visual=we.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Fe.prototype.pointerDown=function(Ie,Xe){We.prototype.pointerDown.call(this,Ie,Xe),this.state==="new"&&(this.createVisual(),this.moveVisual(Ie),this._state="creating")},Fe.prototype.manipulate=function(Ie){We.prototype.manipulate.call(this,Ie)},Fe.prototype.resize=function(Ie){We.prototype.resize.call(this,Ie),this.setSize()},Fe.prototype.setSize=function(){We.prototype.setSize.call(this),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Fe.prototype.pointerUp=function(Ie){We.prototype.pointerUp.call(this,Ie),this.setSize()},Fe.prototype.setStrokeColor=function(Ie){this.strokeColor=Ie,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ie),this.stateChanged()},Fe.prototype.setFillColor=function(Ie){this.fillColor=Ie,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Fe.prototype.setStrokeWidth=function(Ie){this.strokeWidth=Ie,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Fe.prototype.setStrokeDasharray=function(Ie){this.strokeDasharray=Ie,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Fe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},We.prototype.getState.call(this))},Fe.prototype.restoreState=function(Ie){var Xe=Ie;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.opacity=Xe.opacity,this.createVisual(),We.prototype.restoreState.call(this,Ie),this.setSize()},Fe.prototype.scale=function(Ie,Xe){We.prototype.scale.call(this,Ie,Xe),this.setSize()},Fe.title="Rectangle marker",Fe}(ke),Be=function(We){function Fe(Ie,Xe,vt,Ye){var At=We.call(this,Ie,Ye||'')||this;return At.widths=[],At.widthBoxes=[],At.widths=Xe,At.currentWidth=vt,At.setCurrentWidth=At.setCurrentWidth.bind(At),At}return fe(Fe,We),Fe.prototype.getUi=function(){var Ie=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.widths.forEach(function(vt){var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.flexGrow="2",Ye.style.alignItems="center",Ye.style.justifyContent="space-between",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.borderColor=vt===Ie.currentWidth?Ie.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){Ie.setCurrentWidth(vt,Ye)}),Xe.appendChild(Ye);var At=document.createElement("div");At.innerText=vt.toString(),At.style.marginRight="5px",Ye.appendChild(At);var Gt=document.createElement("div");Gt.style.minHeight="20px",Gt.style.flexGrow="2",Gt.style.display="flex",Gt.style.alignItems="center";var on=document.createElement("hr");on.style.minWidth="20px",on.style.border="0px",on.style.borderTop=vt+"px solid "+Ie.uiStyleSettings.toolboxColor,on.style.flexGrow="2",Gt.appendChild(on),Ye.appendChild(Gt),Ie.widthBoxes.push(Ye)}),Xe},Fe.prototype.setCurrentWidth=function(Ie,Xe){var vt=this;this.currentWidth=Ie,this.widthBoxes.forEach(function(Ye){Ye.style.borderColor=Ye===Xe?vt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Fe}(ue),Re=function(We){function Fe(Ie,Xe,vt,Ye){var At=We.call(this,Ie,Ye||'')||this;return At.styles=[],At.styleBoxes=[],At.styles=Xe,At.currentStyle=vt,At.setCurrentStyle=At.setCurrentStyle.bind(At),At}return fe(Fe,We),Fe.prototype.getUi=function(){var Ie=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.styles.forEach(function(vt){var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.alignItems="center",Ye.style.justifyContent="space-between",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.overflow="hidden",Ye.style.maxWidth=100/Ie.styles.length-5+"%",Ye.style.borderColor=vt===Ie.currentStyle?Ie.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){Ie.setCurrentStyle(vt,Ye)}),Xe.appendChild(Ye);var At=document.createElement("div");At.style.minHeight="20px",At.style.flexGrow="2",At.style.overflow="hidden";var Gt=` `;At.innerHTML=Gt,Ye.appendChild(At),Ie.styleBoxes.push(Ye)}),Xe},Fe.prototype.setCurrentStyle=function(Ie,Xe){var vt=this;this.currentStyle=Ie,this.styleBoxes.forEach(function(Ye){Ye.style.borderColor=Ye===Xe?vt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Fe}(ue),$e=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.strokeColor=vt.defaultColor,Ye.strokeWidth=vt.defaultStrokeWidth,Ye.strokeDasharray=vt.defaultStrokeDasharray,Ye.strokePanel=new pe("Line color",vt.defaultColorSet,vt.defaultColor),Ye.strokePanel.onColorChanged=Ye.setStrokeColor,Ye.strokeWidthPanel=new Be("Line width",vt.defaultStrokeWidths,vt.defaultStrokeWidth),Ye.strokeWidthPanel.onWidthChanged=Ye.setStrokeWidth,Ye.strokeStylePanel=new Re("Line style",vt.defaultStrokeDasharrays,vt.defaultStrokeDasharray),Ye.strokeStylePanel.onStyleChanged=Ye.setStrokeDasharray,Ye}return fe(Fe,We),Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=We.prototype.getState.call(this);return Ie.typeName=Fe.typeName,Ie},Fe.typeName="FrameMarker",Fe.title="Frame marker",Fe.icon='',Fe}(Oe),_e=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Ve=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.x1=0,Ye.y1=0,Ye.x2=0,Ye.y2=0,Ye.defaultLength=50,Ye.manipulationStartX=0,Ye.manipulationStartY=0,Ye.manipulationStartX1=0,Ye.manipulationStartY1=0,Ye.manipulationStartX2=0,Ye.manipulationStartY2=0,Ye.setupControlBox(),Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){return!!We.prototype.ownsTarget.call(this,Ie)||!(!this.grip1.ownsTarget(Ie)&&!this.grip2.ownsTarget(Ie))},Fe.prototype.pointerDown=function(Ie,Xe){We.prototype.pointerDown.call(this,Ie,Xe),this.manipulationStartX=Ie.x,this.manipulationStartY=Ie.y,this.state==="new"&&(this.x1=Ie.x,this.y1=Ie.y,this.x2=Ie.x,this.y2=Ie.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Xe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Xe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Fe.prototype.pointerUp=function(Ie){var Xe=this.state;We.prototype.pointerUp.call(this,Ie),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Ie),this._state="select",Xe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Fe.prototype.adjustVisual=function(){},Fe.prototype.manipulate=function(Ie){this.state==="creating"?this.resize(Ie):this.state==="move"?(this.x1=this.manipulationStartX1+Ie.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ie.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ie.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ie.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ie)},Fe.prototype.resize=function(Ie){switch(this.activeGrip){case this.grip1:this.x1=Ie.x,this.y1=Ie.y;break;case this.grip2:case void 0:this.x2=Ie.x,this.y2=Ie.y}this.adjustVisual(),this.adjustControlBox()},Fe.prototype.select=function(){We.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Fe.prototype.deselect=function(){We.prototype.deselect.call(this),this.controlBox.style.display="none"},Fe.prototype.setupControlBox=function(){this.controlBox=we.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Fe.prototype.adjustControlBox=function(){this.positionGrips()},Fe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Fe.prototype.createGrip=function(){var Ie=new Ne;return Ie.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(Ie.visual),Ie},Fe.prototype.positionGrips=function(){var Ie=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ie/2,this.y1-Ie/2),this.positionGrip(this.grip2.visual,this.x2-Ie/2,this.y2-Ie/2)},Fe.prototype.positionGrip=function(Ie,Xe,vt){var Ye=Ie.transform.baseVal.getItem(0);Ye.setTranslate(Xe,vt),Ie.transform.baseVal.replaceItem(Ye,0)},Fe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},We.prototype.getState.call(this))},Fe.prototype.restoreState=function(Ie){We.prototype.restoreState.call(this,Ie);var Xe=Ie;this.x1=Xe.x1,this.y1=Xe.y1,this.x2=Xe.x2,this.y2=Xe.y2},Fe.prototype.scale=function(Ie,Xe){We.prototype.scale.call(this,Ie,Xe),this.x1=this.x1*Ie,this.y1=this.y1*Xe,this.x2=this.x2*Ie,this.y2=this.y2*Xe,this.adjustVisual(),this.adjustControlBox()},Fe}(Ee),ot=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.strokeColor="transparent",Ye.strokeWidth=0,Ye.strokeDasharray="",Ye.setStrokeColor=Ye.setStrokeColor.bind(Ye),Ye.setStrokeWidth=Ye.setStrokeWidth.bind(Ye),Ye.setStrokeDasharray=Ye.setStrokeDasharray.bind(Ye),Ye.strokeColor=vt.defaultColor,Ye.strokeWidth=vt.defaultStrokeWidth,Ye.strokeDasharray=vt.defaultStrokeDasharray,Ye.strokePanel=new pe("Line color",vt.defaultColorSet,vt.defaultColor),Ye.strokePanel.onColorChanged=Ye.setStrokeColor,Ye.strokeWidthPanel=new Be("Line width",vt.defaultStrokeWidths,vt.defaultStrokeWidth),Ye.strokeWidthPanel.onWidthChanged=Ye.setStrokeWidth,Ye.strokeStylePanel=new Re("Line style",vt.defaultStrokeDasharrays,vt.defaultStrokeDasharray),Ye.strokeStylePanel.onStyleChanged=Ye.setStrokeDasharray,Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){return!(!We.prototype.ownsTarget.call(this,Ie)&&Ie!==this.visual&&Ie!==this.selectorLine&&Ie!==this.visibleLine)},Fe.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorLine=we.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=we.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},Fe.prototype.pointerDown=function(Ie,Xe){We.prototype.pointerDown.call(this,Ie,Xe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Fe.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),we.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Fe.prototype.setStrokeColor=function(Ie){this.strokeColor=Ie,this.adjustVisual(),this.colorChanged(Ie)},Fe.prototype.setStrokeWidth=function(Ie){this.strokeWidth=Ie,this.adjustVisual()},Fe.prototype.setStrokeDasharray=function(Ie){this.strokeDasharray=Ie,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},We.prototype.getState.call(this));return Ie.typeName=Fe.typeName,Ie},Fe.prototype.restoreState=function(Ie){We.prototype.restoreState.call(this,Ie);var Xe=Ie;this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.createVisual(),this.adjustVisual()},Fe.typeName="LineMarker",Fe.title="Line marker",Fe.icon='',Fe}(Ve),ct=function(We){function Fe(Ie,Xe,vt,Ye){var At=We.call(this,Ie,Ye||'')||this;return At.fonts=[],At.fontBoxes=[],At.fonts=Xe,At.currentFont=vt,At.setCurrentFont=At.setCurrentFont.bind(At),At}return fe(Fe,We),Fe.prototype.getUi=function(){var Ie=this,Xe=document.createElement("div");return Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.fonts.forEach(function(vt){var Ye=document.createElement("div");Ye.style.display="inline-block",Ye.style.alignItems="center",Ye.style.justifyContent="space-between",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.overflow="hidden",Ye.style.maxWidth=100/Ie.fonts.length-5+"%",Ye.style.borderColor=vt===Ie.currentFont?Ie.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){Ie.setCurrentFont(vt,Ye)}),Xe.appendChild(Ye);var At=document.createElement("div");At.style.display="flex",At.style.minHeight="20px",At.style.flexGrow="2",At.style.fontFamily=vt,At.style.overflow="hidden";var Gt=document.createElement("div");Gt.style.whiteSpace="nowrap",Gt.style.overflow="hidden",Gt.style.textOverflow="ellipsis",Gt.innerHTML="The quick brown fox jumps over the lazy dog",At.appendChild(Gt),Ye.appendChild(At),Ie.fontBoxes.push(Ye)}),Xe},Fe.prototype.setCurrentFont=function(Ie,Xe){var vt=this;this.currentFont=Ie,this.fontBoxes.forEach(function(Ye){Ye.style.borderColor=Ye===Xe?vt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Fe}(ue),ft=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.color="transparent",Ye.padding=5,Ye.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ye.text=Ye.DEFAULT_TEXT,Ye.isMoved=!1,Ye.color=vt.defaultColor,Ye.fontFamily=vt.defaultFontFamily,Ye.defaultSize={x:100,y:30},Ye.setColor=Ye.setColor.bind(Ye),Ye.setFont=Ye.setFont.bind(Ye),Ye.renderText=Ye.renderText.bind(Ye),Ye.sizeText=Ye.sizeText.bind(Ye),Ye.textEditDivClicked=Ye.textEditDivClicked.bind(Ye),Ye.showTextEditor=Ye.showTextEditor.bind(Ye),Ye.setSize=Ye.setSize.bind(Ye),Ye.positionTextEditor=Ye.positionTextEditor.bind(Ye),Ye.colorPanel=new pe("Color",vt.defaultColorSet,vt.defaultColor),Ye.colorPanel.onColorChanged=Ye.setColor,Ye.fontFamilyPanel=new ct("Font",vt.defaultFontFamilies,vt.defaultFontFamily),Ye.fontFamilyPanel.onFontChanged=Ye.setFont,Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){if(We.prototype.ownsTarget.call(this,Ie)||Ie===this.visual||Ie===this.textElement||Ie===this.bgRectangle)return!0;var Xe=!1;return this.textElement.childNodes.forEach(function(vt){vt===Ie&&(Xe=!0)}),Xe},Fe.prototype.createVisual=function(){this.visual=we.createGroup(),this.bgRectangle=we.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=we.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Fe.prototype.pointerDown=function(Ie,Xe){We.prototype.pointerDown.call(this,Ie,Xe),this.isMoved=!1,this.pointerDownPoint=Ie,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ie),this._state="creating")},Fe.prototype.renderText=function(){var Ie=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Xe){Ie.textElement.appendChild(we.createTSpan(Xe.trim()===""?" ":Xe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Fe.prototype.getTextScale=function(){var Ie=this.textElement.getBBox(),Xe=1;if(Ie.width>0&&Ie.height>0){var vt=(1*this.width-this.width*this.padding*2/100)/Ie.width,Ye=(1*this.height-this.height*this.padding*2/100)/Ie.height;Xe=Math.min(vt,Ye)}return Xe},Fe.prototype.getTextPosition=function(Ie){var Xe=this.textElement.getBBox(),vt=0,Ye=0;return Xe.width>0&&Xe.height>0&&(vt=(this.width-Xe.width*Ie)/2,Ye=this.height/2-Xe.height*Ie/2),{x:vt,y:Ye}},Fe.prototype.sizeText=function(){var Ie=this.textElement.getBBox(),Xe=this.getTextScale(),vt=this.getTextPosition(Xe);vt.y-=Ie.y*Xe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+vt.x+"px, "+vt.y+"px) scale("+Xe+", "+Xe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(vt.x,vt.y),this.textElement.transform.baseVal.getItem(1).setScale(Xe,Xe))},Fe.prototype.manipulate=function(Ie){We.prototype.manipulate.call(this,Ie),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ie.x-this.pointerDownPoint.x)>5||Math.abs(Ie.y-this.pointerDownPoint.y)>5)},Fe.prototype.resize=function(Ie){We.prototype.resize.call(this,Ie),this.isMoved=!0,this.setSize(),this.sizeText()},Fe.prototype.setSize=function(){We.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Fe.prototype.pointerUp=function(Ie){var Xe=this.state;Xe==="creating"&&(this._suppressMarkerCreateEvent=!0),We.prototype.pointerUp.call(this,Ie),this.setSize(),(Xe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Fe.prototype.showTextEditor=function(){var Ie=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Xe){Xe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Xe=Number.parseFloat(Ie.textEditor.style.fontSize);Ie.textEditor.clientWidth>=Number.parseInt(Ie.textEditor.style.maxWidth)&&Xe>.9;)Xe-=.1,Ie.textEditor.style.fontSize=Math.max(Xe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Xe){Xe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Xe){if(Xe.clipboardData){var vt=Xe.clipboardData.getData("text"),Ye=window.getSelection();if(!Ye.rangeCount)return!1;Ye.deleteFromDocument(),Ye.getRangeAt(0).insertNode(document.createTextNode(vt)),Xe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ie.textEditDivClicked(Ie.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Fe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ie=this.getTextScale(),Xe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),vt=this.textElement.getBBox(),Ye={x:vt.width*Ie,y:vt.height*Ie};Xe.x-=Ye.x/2,Xe.y-=Ye.y/2,this.textEditor.style.top=Xe.y+"px",this.textEditor.style.left=Xe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Xe.x+"px",this.textEditor.style.fontSize=Math.max(16*Ie,12)+"px",this.textElement.style.display="none"}},Fe.prototype.textEditDivClicked=function(Ie){this.text=Ie.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Fe.prototype.select=function(){We.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Fe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),We.prototype.deselect.call(this)},Fe.prototype.dblClick=function(Ie,Xe){We.prototype.dblClick.call(this,Ie,Xe),this.showTextEditor()},Fe.prototype.setColor=function(Ie){this.textElement&&we.setAttributes(this.textElement,[["fill",Ie]]),this.color=Ie,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ie)},Fe.prototype.setFont=function(Ie){this.textElement&&we.setAttributes(this.textElement,[["font-family",Ie]]),this.fontFamily=Ie,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Fe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Fe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},We.prototype.getState.call(this));return Ie.typeName=Fe.typeName,Ie},Fe.prototype.restoreState=function(Ie){var Xe=Ie;this.color=Xe.color,this.fontFamily=Xe.fontFamily,this.padding=Xe.padding,this.text=Xe.text,this.createVisual(),We.prototype.restoreState.call(this,Ie),this.setSize()},Fe.prototype.scale=function(Ie,Xe){We.prototype.scale.call(this,Ie,Xe),this.setSize(),this.sizeText(),this.positionTextEditor()},Fe.typeName="TextMarker",Fe.title="Text marker",Fe.icon='',Fe}(ke),wt=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.color="transparent",Ye.lineWidth=3,Ye.drawing=!1,Ye.pixelRatio=1,Ye.color=vt.defaultColor,Ye.lineWidth=vt.defaultStrokeWidth,Ye.pixelRatio=vt.freehandPixelRatio,Ye.setColor=Ye.setColor.bind(Ye),Ye.addCanvas=Ye.addCanvas.bind(Ye),Ye.finishCreation=Ye.finishCreation.bind(Ye),Ye.setLineWidth=Ye.setLineWidth.bind(Ye),Ye.colorPanel=new pe("Color",vt.defaultColorSet,vt.defaultColor),Ye.colorPanel.onColorChanged=Ye.setColor,Ye.lineWidthPanel=new Be("Line width",vt.defaultStrokeWidths,vt.defaultStrokeWidth),Ye.lineWidthPanel.onWidthChanged=Ye.setLineWidth,Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){return!(!We.prototype.ownsTarget.call(this,Ie)&&Ie!==this.visual&&Ie!==this.drawingImage)},Fe.prototype.createVisual=function(){this.visual=we.createGroup(),this.drawingImage=we.createImage(),this.visual.appendChild(this.drawingImage);var Ie=we.createTransform();this.visual.transform.baseVal.appendItem(Ie),this.addMarkerVisualToContainer(this.visual)},Fe.prototype.pointerDown=function(Ie,Xe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Ie.x,Ie.y),this.drawing=!0):We.prototype.pointerDown.call(this,Ie,Xe)},Fe.prototype.manipulate=function(Ie){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ie.x,Ie.y),this.canvasContext.stroke()):We.prototype.manipulate.call(this,Ie)},Fe.prototype.resize=function(Ie){We.prototype.resize.call(this,Ie),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Fe.prototype.pointerUp=function(Ie){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):We.prototype.pointerUp.call(this,Ie)},Fe.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},Fe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),We.prototype.select.call(this)},Fe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),We.prototype.deselect.call(this)},Fe.prototype.finishCreation=function(){for(var Ie=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Xe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],vt=Xe[0],Ye=Xe[1],At=Xe[2],Gt=Xe[3],on=!1,jt=0;jt0&&(on=!0,jtGt&&(Gt=jt),Ht>At&&(At=Ht));if(on){this.left=vt/this.pixelRatio,this.top=Ye/this.pixelRatio,this.width=(At-vt)/this.pixelRatio,this.height=(Gt-Ye)/this.pixelRatio;var qt=document.createElement("canvas");qt.width=At-vt,qt.height=Gt-Ye,qt.getContext("2d").putImageData(this.canvasContext.getImageData(vt,Ye,At-vt,Gt-Ye),0,0),this.drawingImgUrl=qt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Fe.prototype.setDrawingImage=function(){we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Fe.prototype.setColor=function(Ie){this.color=Ie,this.colorChanged(Ie)},Fe.prototype.setLineWidth=function(Ie){this.lineWidth=Ie},Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=Object.assign({drawingImgUrl:this.drawingImgUrl},We.prototype.getState.call(this));return Ie.typeName=Fe.typeName,Ie},Fe.prototype.restoreState=function(Ie){this.createVisual(),We.prototype.restoreState.call(this,Ie),this.drawingImgUrl=Ie.drawingImgUrl,this.setDrawingImage()},Fe.prototype.scale=function(Ie,Xe){We.prototype.scale.call(this,Ie,Xe),this.setDrawingImage()},Fe.typeName="FreehandMarker",Fe.title="Freehand marker",Fe.icon='',Fe}(ke),qe=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,vt||'')||this;return Ye.typeBoxes=[],Ye.currentType=Xe,Ye.setCurrentType=Ye.setCurrentType.bind(Ye),Ye}return fe(Fe,We),Fe.prototype.getUi=function(){var Ie=this,Xe=document.createElement("div");Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2";for(var vt=function(Gt){var on="both";switch(Gt){case 0:on="both";break;case 1:on="start";break;case 2:on="end";break;case 3:on="none"}var jt=document.createElement("div");if(jt.style.display="flex",jt.style.flexGrow="2",jt.style.alignItems="center",jt.style.justifyContent="space-between",jt.style.padding="5px",jt.style.borderWidth="2px",jt.style.borderStyle="solid",jt.style.borderColor=on===Ye.currentType?Ye.uiStyleSettings.toolboxAccentColor:"transparent",jt.addEventListener("click",function(){Ie.setCurrentType(on,jt)}),Xe.appendChild(jt),on==="both"||on==="start"){var Ht=document.createElement("div");Ht.style.display="flex",Ht.style.alignItems="center",Ht.style.minHeight="20px",Ht.innerHTML=` `,Ht.style.marginLeft="5px",jt.appendChild(Ht)}var qt=document.createElement("div");qt.style.display="flex",qt.style.alignItems="center",qt.style.minHeight="20px",qt.style.flexGrow="2";var cn=document.createElement("hr");if(cn.style.minWidth="20px",cn.style.border="0px",cn.style.borderTop="3px solid "+(Ye.uiStyleSettings!==void 0?Ye.uiStyleSettings.toolboxColor:"#eeeeee"),cn.style.flexGrow="2",qt.appendChild(cn),jt.appendChild(qt),on==="both"||on==="end"){var Sn=document.createElement("div");Sn.style.display="flex",Sn.style.alignItems="center",Sn.style.minHeight="20px",Sn.innerHTML=` `,Sn.style.marginRight="5px",jt.appendChild(Sn)}Ye.typeBoxes.push(jt)},Ye=this,At=0;At<4;At++)vt(At);return Xe},Fe.prototype.setCurrentType=function(Ie,Xe){var vt=this;this.currentType=Ie,this.typeBoxes.forEach(function(Ye){Ye.style.borderColor=Ye===Xe?vt.uiStyleSettings!==void 0?vt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Fe}(ue),it=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.arrowType="end",Ye.arrowBaseHeight=10,Ye.arrowBaseWidth=10,Ye.getArrowPoints=Ye.getArrowPoints.bind(Ye),Ye.setArrowType=Ye.setArrowType.bind(Ye),Ye.arrowTypePanel=new qe("Arrow type","end"),Ye.arrowTypePanel.onArrowTypeChanged=Ye.setArrowType,Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){return!(!We.prototype.ownsTarget.call(this,Ie)&&Ie!==this.arrow1&&Ie!==this.arrow2)},Fe.prototype.getArrowPoints=function(Ie,Xe){var vt=this.arrowBaseWidth+2*this.strokeWidth,Ye=this.arrowBaseHeight+2*this.strokeWidth;return Ie-vt/2+","+(Xe+Ye/2)+" "+Ie+","+(Xe-Ye/2)+" "+(Ie+vt/2)+","+(Xe+Ye/2)},Fe.prototype.createTips=function(){this.arrow1=we.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=we.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow2)},Fe.prototype.pointerDown=function(Ie,Xe){We.prototype.pointerDown.call(this,Ie,Xe),this.state==="creating"&&this.createTips()},Fe.prototype.adjustVisual=function(){if(We.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",we.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),we.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ie=0;Math.abs(this.x1-this.x2)>.1&&(Ie=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Xe=this.arrow1.transform.baseVal.getItem(0);Xe.setRotate(Ie,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Xe,0);var vt=this.arrow2.transform.baseVal.getItem(0);vt.setRotate(Ie+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(vt,0)}},Fe.prototype.setArrowType=function(Ie){this.arrowType=Ie,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=Object.assign({arrowType:this.arrowType},We.prototype.getState.call(this));return Ie.typeName=Fe.typeName,Ie},Fe.prototype.restoreState=function(Ie){We.prototype.restoreState.call(this,Ie);var Xe=Ie;this.arrowType=Xe.arrowType,this.createTips(),this.adjustVisual()},Fe.typeName="ArrowMarker",Fe.title="Arrow marker",Fe.icon='',Fe}(ot),pt=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.fillColor=vt.defaultFillColor,Ye.strokeWidth=0,Ye.fillPanel=new pe("Color",vt.defaultColorSet,vt.defaultFillColor),Ye.fillPanel.onColorChanged=Ye.setFillColor,Ye}return fe(Fe,We),Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=We.prototype.getState.call(this);return Ie.typeName=Fe.typeName,Ie},Fe.typeName="CoverMarker",Fe.title="Cover marker",Fe.icon='',Fe}(Oe),Ct=function(We){function Fe(Ie,Xe,vt,Ye){var At=We.call(this,Ie,Ye||'')||this;return At.opacities=[],At.opacityBoxes=[],At.opacities=Xe,At.currentOpacity=vt,At.setCurrentOpacity=At.setCurrentOpacity.bind(At),At}return fe(Fe,We),Fe.prototype.getUi=function(){var Ie=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",Xe.style.justifyContent="space-between",this.opacities.forEach(function(vt){var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.alignItems="center",Ye.style.justifyContent="center",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.borderColor=vt===Ie.currentOpacity?Ie.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){Ie.setCurrentOpacity(vt,Ye)}),Xe.appendChild(Ye);var At=document.createElement("div");At.innerText=100*vt+"%",Ye.appendChild(At),Ie.opacityBoxes.push(Ye)}),Xe},Fe.prototype.setCurrentOpacity=function(Ie,Xe){var vt=this;this.currentOpacity=Ie,this.opacityBoxes.forEach(function(Ye){Ye.style.borderColor=Ye===Xe?vt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Fe}(ue),xt=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.setOpacity=Ye.setOpacity.bind(Ye),Ye.fillColor=vt.defaultHighlightColor,Ye.strokeWidth=0,Ye.opacity=vt.defaultHighlightOpacity,Ye.fillPanel=new pe("Color",vt.defaultColorSet,Ye.fillColor),Ye.fillPanel.onColorChanged=Ye.setFillColor,Ye.opacityPanel=new Ct("Opacity",vt.defaultOpacitySteps,Ye.opacity),Ye.opacityPanel.onOpacityChanged=Ye.setOpacity,Ye}return fe(Fe,We),Fe.prototype.setOpacity=function(Ie){this.opacity=Ie,this.visual&&we.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=We.prototype.getState.call(this);return Ie.typeName=Fe.typeName,Ie},Fe.typeName="HighlightMarker",Fe.title="Highlight marker",Fe.icon='',Fe}(pt),mt='',gt='',St=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.bgColor="transparent",Ye.tipPosition={x:0,y:0},Ye.tipBase1Position={x:0,y:0},Ye.tipBase2Position={x:0,y:0},Ye.tipMoving=!1,Ye.color=vt.defaultStrokeColor,Ye.bgColor=vt.defaultFillColor,Ye.fontFamily=vt.defaultFontFamily,Ye.defaultSize={x:100,y:30},Ye.setBgColor=Ye.setBgColor.bind(Ye),Ye.getTipPoints=Ye.getTipPoints.bind(Ye),Ye.positionTip=Ye.positionTip.bind(Ye),Ye.setTipPoints=Ye.setTipPoints.bind(Ye),Ye.colorPanel=new pe("Text color",vt.defaultColorSet,Ye.color,mt),Ye.colorPanel.onColorChanged=Ye.setColor,Ye.bgColorPanel=new pe("Fill color",vt.defaultColorSet,Ye.bgColor,gt),Ye.bgColorPanel.onColorChanged=Ye.setBgColor,Ye.fontFamilyPanel=new ct("Font",vt.defaultFontFamilies,vt.defaultFontFamily),Ye.fontFamilyPanel.onFontChanged=Ye.setFont,Ye.tipGrip=new Ne,Ye.tipGrip.visual.transform.baseVal.appendItem(we.createTransform()),Ye.controlBox.appendChild(Ye.tipGrip.visual),Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){return We.prototype.ownsTarget.call(this,Ie)||this.tipGrip.ownsTarget(Ie)||this.tip===Ie},Fe.prototype.createTip=function(){we.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=we.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Fe.prototype.pointerDown=function(Ie,Xe){this.state==="new"&&We.prototype.pointerDown.call(this,Ie,Xe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Xe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):We.prototype.pointerDown.call(this,Ie,Xe)},Fe.prototype.pointerUp=function(Ie){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,We.prototype.pointerUp.call(this,Ie);else{var Xe=this.state==="creating";We.prototype.pointerUp.call(this,Ie),this.setTipPoints(Xe),this.positionTip()}},Fe.prototype.manipulate=function(Ie){if(this.tipMoving){var Xe=this.unrotatePoint(Ie);this.tipPosition={x:Xe.x-this.manipulationStartLeft,y:Xe.y-this.manipulationStartTop},this.positionTip()}else We.prototype.manipulate.call(this,Ie)},Fe.prototype.setBgColor=function(Ie){this.bgRectangle&&this.tip&&(we.setAttributes(this.bgRectangle,[["fill",Ie]]),we.setAttributes(this.tip,[["fill",Ie]])),this.bgColor=Ie,this.fillColorChanged(Ie)},Fe.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},Fe.prototype.setTipPoints=function(Ie){Ie===void 0&&(Ie=!1);var Xe=Math.min(this.height/2,15),vt=this.height/5;Ie&&(this.tipPosition={x:Xe+vt/2,y:this.height+20});var Ye=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?Ye.1)){var Ie=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Xe=this.tip1.transform.baseVal.getItem(0);Xe.setRotate(Ie,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Xe,0);var vt=this.tip2.transform.baseVal.getItem(0);vt.setRotate(Ie+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(vt,0)}},Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=We.prototype.getState.call(this);return Ie.typeName=Fe.typeName,Ie},Fe.prototype.restoreState=function(Ie){We.prototype.restoreState.call(this,Ie),this.createTips(),this.adjustVisual()},Fe.typeName="MeasurementMarker",Fe.title="Measurement marker",Fe.icon='',Fe}(ot),Ut=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.strokePanel.colors=vt.defaultColorSet,Ye.fillColor="transparent",Ye}return fe(Fe,We),Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=We.prototype.getState.call(this);return Ie.typeName=Fe.typeName,Ie},Fe.typeName="EllipseFrameMarker",Fe.title="Ellipse frame marker",Fe.icon='',Fe}(Ot),Et=function(){function We(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(We.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),We.prototype.addUndoStep=function(Fe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Fe)||(this.undoStack.push(Fe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Fe)&&this.redoStack.splice(0,this.redoStack.length))},We.prototype.replaceLastUndoStep=function(Fe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Fe)},We.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},We.prototype.undo=function(){if(this.undoStack.length>1){var Fe=this.undoStack.pop();return Fe!==void 0&&this.redoStack.push(Fe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},We.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},We}(),yt=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.strokeColor="transparent",Ye.strokeWidth=0,Ye.strokeDasharray="",Ye.curveX=0,Ye.curveY=0,Ye.manipulationStartCurveX=0,Ye.manipulationStartCurveY=0,Ye.setStrokeColor=Ye.setStrokeColor.bind(Ye),Ye.setStrokeWidth=Ye.setStrokeWidth.bind(Ye),Ye.setStrokeDasharray=Ye.setStrokeDasharray.bind(Ye),Ye.positionGrips=Ye.positionGrips.bind(Ye),Ye.addControlGrips=Ye.addControlGrips.bind(Ye),Ye.adjustVisual=Ye.adjustVisual.bind(Ye),Ye.setupControlBox=Ye.setupControlBox.bind(Ye),Ye.resize=Ye.resize.bind(Ye),Ye.strokeColor=vt.defaultColor,Ye.strokeWidth=vt.defaultStrokeWidth,Ye.strokeDasharray=vt.defaultStrokeDasharray,Ye.strokePanel=new pe("Line color",vt.defaultColorSet,vt.defaultColor),Ye.strokePanel.onColorChanged=Ye.setStrokeColor,Ye.strokeWidthPanel=new Be("Line width",vt.defaultStrokeWidths,vt.defaultStrokeWidth),Ye.strokeWidthPanel.onWidthChanged=Ye.setStrokeWidth,Ye.strokeStylePanel=new Re("Line style",vt.defaultStrokeDasharrays,vt.defaultStrokeDasharray),Ye.strokeStylePanel.onStyleChanged=Ye.setStrokeDasharray,Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){return!(!We.prototype.ownsTarget.call(this,Ie)&&Ie!==this.visual&&Ie!==this.selectorCurve&&Ie!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ie))},Fe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Fe.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorCurve=we.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=we.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},Fe.prototype.pointerDown=function(Ie,Xe){We.prototype.pointerDown.call(this,Ie,Xe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ie.x,this.curveY=Ie.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Xe)&&(this.activeGrip=this.curveGrip,this._state="resize")},Fe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),we.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Fe.prototype.setupControlBox=function(){We.prototype.setupControlBox.call(this),this.curveControlLine1=we.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=we.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},Fe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,We.prototype.addControlGrips.call(this)},Fe.prototype.positionGrips=function(){We.prototype.positionGrips.call(this);var Ie=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ie/2,this.curveY-Ie/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},Fe.prototype.manipulate=function(Ie){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ie.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ie.y-this.manipulationStartY),We.prototype.manipulate.call(this,Ie)},Fe.prototype.resize=function(Ie){this.activeGrip===this.curveGrip&&(this.curveX=Ie.x,this.curveY=Ie.y),We.prototype.resize.call(this,Ie),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Fe.prototype.setStrokeColor=function(Ie){this.strokeColor=Ie,this.adjustVisual(),this.colorChanged(Ie)},Fe.prototype.setStrokeWidth=function(Ie){this.strokeWidth=Ie,this.adjustVisual()},Fe.prototype.setStrokeDasharray=function(Ie){this.strokeDasharray=Ie,this.adjustVisual()},Fe.prototype.scale=function(Ie,Xe){this.curveX=this.curveX*Ie,this.curveY=this.curveY*Xe,We.prototype.scale.call(this,Ie,Xe)},Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},We.prototype.getState.call(this));return Ie.typeName=Fe.typeName,Ie},Fe.prototype.restoreState=function(Ie){We.prototype.restoreState.call(this,Ie);var Xe=Ie;this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.curveX=Xe.curveX,this.curveY=Xe.curveY,this.createVisual(),this.adjustVisual()},Fe.typeName="CurveMarker",Fe.title="Curve marker",Fe.icon='',Fe}(Ve),nt=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,Xe,vt)||this;return Ye.fillColor="transparent",Ye.strokeColor="transparent",Ye.strokeWidth=0,Ye.strokeDasharray="",Ye.textColor="transparent",Ye.fontSize="1rem",Ye.isMoved=!1,Ye.captionText="Caption",Ye.PADDING=5,Ye.captionBoxWidth=0,Ye.captionBoxHeight=0,Ye.strokeColor=vt.defaultColor,Ye.strokeWidth=vt.defaultStrokeWidth,Ye.strokeDasharray=vt.defaultStrokeDasharray,Ye.fillColor=vt.defaultFillColor,Ye.textColor=vt.defaultStrokeColor,Ye.fontFamily=vt.defaultFontFamily,Ye.fontSize=vt.defaultCaptionFontSize,Ye.captionText=vt.defaultCaptionText,Ye.setStrokeColor=Ye.setStrokeColor.bind(Ye),Ye.setFillColor=Ye.setFillColor.bind(Ye),Ye.setStrokeWidth=Ye.setStrokeWidth.bind(Ye),Ye.setStrokeDasharray=Ye.setStrokeDasharray.bind(Ye),Ye.createVisual=Ye.createVisual.bind(Ye),Ye.sizeCaption=Ye.sizeCaption.bind(Ye),Ye.setCaptionText=Ye.setCaptionText.bind(Ye),Ye.showTextEditor=Ye.showTextEditor.bind(Ye),Ye.positionTextEditor=Ye.positionTextEditor.bind(Ye),Ye.finishTextEditing=Ye.finishTextEditing.bind(Ye),Ye.setFont=Ye.setFont.bind(Ye),Ye.setTextColor=Ye.setTextColor.bind(Ye),Ye.strokePanel=new pe("Line color",Se(vt.defaultColorSet,["transparent"]),Ye.strokeColor),Ye.strokePanel.onColorChanged=Ye.setStrokeColor,Ye.fillPanel=new pe("Fill color",Se(vt.defaultColorSet,["transparent"]),Ye.fillColor,gt),Ye.fillPanel.onColorChanged=Ye.setFillColor,Ye.strokeWidthPanel=new Be("Line width",vt.defaultStrokeWidths,vt.defaultStrokeWidth),Ye.strokeWidthPanel.onWidthChanged=Ye.setStrokeWidth,Ye.strokeStylePanel=new Re("Line style",vt.defaultStrokeDasharrays,vt.defaultStrokeDasharray),Ye.strokeStylePanel.onStyleChanged=Ye.setStrokeDasharray,Ye.fontFamilyPanel=new ct("Font",vt.defaultFontFamilies,vt.defaultFontFamily),Ye.fontFamilyPanel.onFontChanged=Ye.setFont,Ye.textColorPanel=new pe("Text color",vt.defaultColorSet,Ye.textColor,mt),Ye.textColorPanel.onColorChanged=Ye.setTextColor,Ye}return fe(Fe,We),Fe.prototype.ownsTarget=function(Ie){return!(!We.prototype.ownsTarget.call(this,Ie)&&Ie!==this.visual&&Ie!==this.frame&&Ie!==this.captionBg&&Ie!==this.captionElement)},Fe.prototype.createVisual=function(){this.visual=we.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=we.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=we.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=we.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},Fe.prototype.setCaptionText=function(Ie){this.captionText=Ie,this.captionElement.textContent=this.captionText,this.sizeCaption()},Fe.prototype.pointerDown=function(Ie,Xe){We.prototype.pointerDown.call(this,Ie,Xe),this.isMoved=!1,this.pointerDownPoint=Ie,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ie),this._state="creating")},Fe.prototype.manipulate=function(Ie){We.prototype.manipulate.call(this,Ie),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ie.x-this.pointerDownPoint.x)>5||Math.abs(Ie.y-this.pointerDownPoint.y)>5)},Fe.prototype.resize=function(Ie){We.prototype.resize.call(this,Ie),this.setSize()},Fe.prototype.sizeCaption=function(){var Ie=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ie.width+2*this.PADDING,this.captionBoxHeight=Ie.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),we.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),we.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},Fe.prototype.showTextEditor=function(){var Ie=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(Xe){Xe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Xe){Xe.key==="Enter"&&Ie.finishTextEditing(Ie.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Xe){Xe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ie.finishTextEditing(Ie.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ie.finishTextEditing(Ie.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Fe.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},Fe.prototype.finishTextEditing=function(Ie){this.setCaptionText(Ie.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Fe.prototype.setFont=function(Ie){this.captionElement&&we.setAttributes(this.captionElement,[["font-family",Ie]]),this.fontFamily=Ie,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Fe.prototype.setTextColor=function(Ie){this.captionElement&&we.setAttributes(this.captionElement,[["fill",Ie]]),this.textColor=Ie,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Fe.prototype.setSize=function(){We.prototype.setSize.call(this),we.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Fe.prototype.pointerUp=function(Ie){We.prototype.pointerUp.call(this,Ie),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Fe.prototype.dblClick=function(Ie,Xe){We.prototype.dblClick.call(this,Ie,Xe),this.showTextEditor()},Fe.prototype.setStrokeColor=function(Ie){this.strokeColor=Ie,this.frame&&we.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ie),this.stateChanged()},Fe.prototype.setFillColor=function(Ie){this.fillColor=Ie,this.captionBg&&we.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ie),this.stateChanged()},Fe.prototype.setStrokeWidth=function(Ie){this.strokeWidth=Ie,this.frame&&we.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Fe.prototype.setStrokeDasharray=function(Ie){this.strokeDasharray=Ie,this.frame&&we.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Fe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Fe.prototype.getState=function(){var Ie=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},We.prototype.getState.call(this));return Ie.typeName=this.typeName,Ie},Fe.prototype.restoreState=function(Ie){var Xe=Ie;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.textColor=Xe.textColor,this.fontFamily=Xe.fontFamily,this.captionText=Xe.captionText,this.fontSize=Xe.fontSize,this.createVisual(),We.prototype.restoreState.call(this,Ie),this.setSize()},Fe.prototype.scale=function(Ie,Xe){We.prototype.scale.call(this,Ie,Xe),this.setSize()},Fe.typeName="CaptionFrameMarker",Fe.title="Caption frame marker",Fe.icon='',Fe}(ke),Pt=function(){function We(Fe,Ie){Ie===void 0&&(Ie=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Fe,this.cancelable=Ie}return Object.defineProperty(We.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),We.prototype.preventDefault=function(){this._defaultPrevented=!0},We}(),Ke=function(We){function Fe(Ie,Xe,vt){var Ye=We.call(this,Ie,!1)||this;return Ye.dataUrl=Xe,Ye.state=vt,Ye}return fe(Fe,We),Fe}(Pt),lt=function(We){function Fe(Ie,Xe,vt){vt===void 0&&(vt=!1);var Ye=We.call(this,Ie,vt)||this;return Ye.marker=Xe,Ye}return fe(Fe,We),Fe}(Pt),bt=function(){function We(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return We.prototype.addEventListener=function(Fe,Ie){this[Fe].push(Ie)},We.prototype.removeEventListener=function(Fe,Ie){var Xe=this[Fe].indexOf(Ie);Xe>-1&&this[Fe].splice(Xe,1)},We}(),ht=function(){function We(Fe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new _e,this._isOpen=!1,this.undoRedoManager=new Et,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new bt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=We.instanceCounter++,this.styles=new z(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Fe,this.targetRoot=document.body,this.width=Fe.clientWidth,this.height=Fe.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(We.prototype,"ALL_MARKER_TYPES",{get:function(){return[$e,wt,it,ft,Ut,Ot,xt,St,Lt,pt,ot,yt,nt]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[$e,wt,it,ft,Ot,xt,St]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"BASIC_MARKER_TYPES",{get:function(){return[$e,wt,it,ft,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Fe){var Ie=this;this._availableMarkerTypes.splice(0),Fe.forEach(function(Xe){if(typeof Xe=="string"){var vt=Ie.ALL_MARKER_TYPES.find(function(Ye){return Ye.typeName===Xe});vt!==void 0&&Ie._availableMarkerTypes.push(vt)}else Ie._availableMarkerTypes.push(Xe)})},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Fe){this._zoomLevel=Fe,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),We.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},We.prototype.show=function(){var Fe=this;this.styles.styleSheetRoot===void 0&&de.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=de.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ie){return Ie(new Pt(Fe))})},We.prototype.render=function(){return Pe(this,void 0,void 0,function(){var Fe;return Ce(this,function(Ie){switch(Ie.label){case 0:return this.setCurrentMarker(),(Fe=new ye).naturalSize=this.renderAtNaturalSize,Fe.imageType=this.renderImageType,Fe.imageQuality=this.renderImageQuality,Fe.markersOnly=this.renderMarkersOnly,Fe.width=this.renderWidth,Fe.height=this.renderHeight,[4,Fe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ie.sent(),[4,Fe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ie.sent()]}})})},We.prototype.close=function(Fe){var Ie=this;if(Fe===void 0&&(Fe=!1),this.isOpen){var Xe=!1;Fe||this.eventListeners.beforeclose.forEach(function(vt){var Ye=new Pt(Ie,!0);vt(Ye),Ye.defaultPrevented&&(Xe=!0)}),Xe||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(vt){return vt(new Pt(Ie))}),this.detachEvents(),this._isOpen=!1)}},We.prototype.addMarkersToToolbar=function(){for(var Fe,Ie=[],Xe=0;Xethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Fe:this.editorCanvas.clientWidth,Xe=Ie',Fe.title="Powered by marker.js",Fe.style.display="grid",Fe.style.alignItems="center",Fe.style.justifyItems="center",Fe.style.padding="3px",Fe.style.width="20px",Fe.style.height="20px",this.logoUI.appendChild(Fe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},We.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},We.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},We.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},We.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var Fe=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Fe+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new re(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop-1&&this.markers.splice(this.markers.indexOf(Fe),1),Fe.dispose()},We.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},We.prototype.toolbarButtonClicked=function(Fe,Ie){if(Fe==="marker"&&Ie!==void 0)this.createNewMarker(Ie);else if(Fe==="action")switch(Ie){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},We.prototype.deleteSelectedMarker=function(){var Fe=this;if(this._currentMarker!==void 0){var Ie=!1;if(this.eventListeners.markerbeforedelete.forEach(function(vt){var Ye=new lt(Fe,Fe._currentMarker,!0);vt(Ye),Ye.defaultPrevented&&(Ie=!0)}),!Ie){var Xe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(vt){return vt(new lt(Fe,Xe))})}}},We.prototype.clear=function(){var Fe=this,Ie=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(At){var Gt=new lt(Fe,void 0,!0);At(Gt),Gt.defaultPrevented&&(Ie=!0)}),!Ie)){this.setCurrentMarker();for(var Xe=function(At){var Gt=vt.markers[At];vt.setCurrentMarker(vt.markers[At]),vt._currentMarker.dispose(),vt.markerImage.removeChild(vt._currentMarker.container),vt.markers.splice(vt.markers.indexOf(vt._currentMarker),1),vt.eventListeners.markerdelete.forEach(function(on){return on(new lt(Fe,Gt))})},vt=this,Ye=this.markers.length-1;Ye>=0;Ye--)Xe(Ye);this.addUndoStep()}},Object.defineProperty(We.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),We.prototype.showNotesEditor=function(){var Fe;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(Fe=this._currentMarker.notes)!==null&&Fe!==void 0?Fe:"",this.overlayContainer.appendChild(this.notesArea))},We.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},We.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},We.prototype.addUndoStep=function(){var Fe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ie=this.getState(),Xe=this.undoRedoManager.getLastUndoStep();if(!Xe||Xe.width===Ie.width&&Xe.height===Ie.height){var vt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ie),vt1&&this.panTo({x:Fe.clientX,y:Fe.clientY}))},We.prototype.onPointerUp=function(Fe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Fe.clientX,Fe.clientY)),this.isDragging=!1,this.addUndoStep()},We.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},We.prototype.onKeyUp=function(Fe){this._currentMarker===void 0||this.notesArea!==void 0||Fe.key!=="Delete"&&Fe.key!=="Backspace"||this.deleteSelectedMarker()},We.prototype.clientToLocalCoordinates=function(Fe,Ie){var Xe=this.markerImage.getBoundingClientRect();return{x:(Fe-Xe.left)/this.zoomLevel,y:(Ie-Xe.top)/this.zoomLevel}},We.prototype.onWindowResize=function(){this.positionUI()},We.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Fe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Fe+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},We.prototype.addLicenseKey=function(Fe){me.addKey(Fe)},We.prototype.addEventListener=function(Fe,Ie){this.eventListeners.addEventListener(Fe,Ie)},We.prototype.removeEventListener=function(Fe,Ie){this.eventListeners.removeEventListener(Fe,Ie)},We.prototype.renderState=function(Fe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Fe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(We.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),We.prototype.focus=function(){var Fe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ie){return Ie(new Pt(Fe))}))},We.prototype.blur=function(){var Fe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ie){return Ie(new Pt(Fe))}))},We.instanceCounter=0,We}(),et=Ge(70635),Ze=Ge(58130),He=(We,Fe,Ie)=>new Promise((Xe,vt)=>{var Ye=on=>{try{Gt(Ie.next(on))}catch(jt){vt(jt)}},At=on=>{try{Gt(Ie.throw(on))}catch(jt){vt(jt)}},Gt=on=>on.done?Xe(on.value):Promise.resolve(on.value).then(Ye,At);Gt((Ie=Ie.apply(We,Fe)).next())}),ut=({data:We,className:Fe,fullWidth:Ie,style:Xe={},onClose:vt,onOk:Ye,showFullTools:At,noAssociationId:Gt})=>{const on=(0,Qe.useRef)(null),jt=(0,Qe.useRef)(null),Ht=(0,Qe.useRef)(null),qt=(0,Qe.useRef)(null),[cn,Sn]=(0,Qe.useState)(!1),[An,Vn]=(0,Qe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Qe.useEffect)(()=>{Ht.current||(Ht.current=document.createElement("style"),document.head.appendChild(Ht.current)),We!=null&&We.visible?(document.body.setAttribute("data-custom","y-hidden"),Ht.current.innerHTML=" html { overflow-y: hidden; }",We!=null&&We.src&&Kn()):(document.body.removeAttribute("data-custom"),Ht.current&&(document.head.removeChild(Ht.current),Ht.current=null))},[We==null?void 0:We.visible]);const Kn=()=>He(void 0,null,function*(){Sn(!0),Vn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const pr=yield(0,Ze.ZJ)(We==null?void 0:We.src);on.current.src="",on.current.src=pr,on.current.onload=function(){mr()},Sn(!1),Vn("")}),ar=pr=>He(void 0,null,function*(){Sn(!0),Vn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Pr=yield(0,et.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:We.title,file:pr.dataUrl}});Pr!=null&&Pr.id&&!Gt?(yield(0,et.ZP)(`/api/attachments/${We.id}/add_subitem.json`,{method:"post",body:{subitem_id:Pr==null?void 0:Pr.id,settings:JSON.stringify(pr.state)}})).status===0&&Ye():Pr!=null&&Pr.id&&Ye(Pr),Sn(!1),Vn("")}),xr=()=>{const pr=document.querySelector('a[href="https://markerjs.com/"]');pr&&pr.parentNode&&(pr.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(Vr=>{const Ur=document.querySelector(Vr.name);Ur&&Ur.setAttribute("title",Vr.title)})},mr=()=>{jt.current=new ht(on.current),jt.current.targetRoot=qt.current,jt.current.addEventListener("render",ar),jt.current.addEventListener("beforeclose",vt),At&&(jt.current.availableMarkerTypes=jt.current.ALL_MARKER_TYPES,jt.current.uiStyleSettings.redoButtonVisible=!0,jt.current.uiStyleSettings.notesButtonVisible=!0,jt.current.uiStyleSettings.zoomButtonVisible=!0,jt.current.uiStyleSettings.zoomOutButtonVisible=!0,jt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=jt.current.uiStyleSettings,jt.current.show(),We!=null&&We.snapshotData&&jt.current.restoreState(We.snapshotData),setTimeout(()=>{window.scrollTo(0,0),xr()},300)};return Qe.createElement(Qe.Fragment,null,(We==null?void 0:We.visible)&&Qe.createElement(je.Z,{spinning:cn,tip:An,style:{position:"absolute"}},Qe.createElement("div",{ref:qt,className:ze()(Tt.imageDimensions,Fe,Ie?Tt.fullWidth:""),style:Xe},Qe.createElement("img",{className:Tt.img,ref:on}))))}},21759:function(wn,sn,Ge){"use strict";Ge.d(sn,{N:function(){return ee}});var Qe=Ge(59301),Tt=Ge(57809),oe=Ge(43418),ze=Ge(92832),je=Ge(8591),ve=Ge(95237),fe=Ge(43604),Pe=Ge(70635),Ce={wrap:"wrap___F7E3F",selectWrapper:"selectWrapper____kESB",tips:"tips___aHjQY",linkBtn:"linkBtn___uggVr",mainText:"mainText____S1I0",public_tips:"public_tips___sZVWd",inputCss:"inputCss___t66EO",bt:"bt___lXptu",add_style:"add_style___knrMF"},Se=Ge(92310),we=Ge.n(Se),me=Ge(80205),ye=Ge(59301),de=(ae,re,le)=>new Promise((ue,pe)=>{var Ee=Te=>{try{Ne(le.next(Te))}catch(ke){pe(ke)}},be=Te=>{try{Ne(le.throw(Te))}catch(ke){pe(ke)}},Ne=Te=>Te.done?ue(Te.value):Promise.resolve(Te.value).then(Ee,be);Ne((le=le.apply(ae,re)).next())});const{Option:z}=Tt.default,ee=({subId:ae,value:re,selectvalues:le,disabled:ue,knowledgeOptions:pe=[],className:Ee,height:be,onChange:Ne=()=>{},onAddKnowledgeFinish:Te=()=>{},zIndex:ke=1e3})=>{const Oe=(0,Qe.useRef)(),[Be,Re]=(0,Qe.useState)([]);re=re||[];const $e=(Ve,ot)=>{Ve?(Re([...ot]),Ne([...ot])):(Re([]),Ne([]))};(0,Qe.useEffect)(()=>{(le==null?void 0:le.length)>0?(Re([...le]),Ne([...le])):(Re([]),Ne([]))},[pe]),(0,Qe.useEffect)(()=>{(re==null?void 0:re.length)>0&&Ne([...re])},[pe]);const _e=Ve=>{Ve.preventDefault(),Oe.current="",oe.default.confirm({centered:!0,width:585,zIndex:ke,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:ye.createElement("div",{className:"font14"},ye.createElement("div",{className:Ce.public_tips},ye.createElement(me.Z,{style:{color:"#FF8C29",marginRight:10,paddingTop:5}}),"\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002 \u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"),ye.createElement("div",{style:{display:"flex",alignItems:"center"}},ye.createElement("div",{style:{width:"95px"}},ye.createElement("span",{className:Ce.bt},"*"),"\u77E5\u8BC6\u70B9\u540D\u79F0"),ye.createElement(ze.default,{className:Ce.inputCss,style:{width:"calc(100% - 95px)"},maxLength:20,size:"middle",showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:Oe.current,onChange:ot=>{Oe.current=ot.target.value}}))),onOk:()=>new Promise((ot,ct)=>de(void 0,null,function*(){if(!Oe.current)return je.ZP.warning("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),ct();if(Oe.current.length>20)return je.ZP.warning("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),ct();const ft=yield(0,Pe.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:Oe.current,sub_discipline_id:ae}});if((ft==null?void 0:ft.status)===0){Te({id:ft.tag_discipline_id,name:Oe.current,type:"personal"});let wt=le||[];wt.push(ft.tag_discipline_id),Ne([...wt]),Re([...wt]),Ne([...wt])}return ot()}))})};return ye.createElement(ve.Z,{wrap:!1,align:"middle",className:we()(Ce.wrap,Ee)},ye.createElement(fe.Z,null,ye.createElement(Tt.default,{mode:"multiple",disabled:!ae||ue,className:Ce.selectWrapper,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9\uFF0C\u652F\u6301\u9009\u62E9\u591A\u4E2A",onChange:$e,style:{width:be||490},showSearch:!0,allowClear:!0,value:Be,filterOption:(Ve,ot)=>ot.label.indexOf(Ve.toLowerCase())>=0},pe==null?void 0:pe.map(Ve=>ye.createElement(z,{key:Ve.id,value:Ve.id,label:Ve.name},ye.createElement("div",{style:{display:"flex",alignItems:"center"}},ye.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},Ve.name),(Ve==null?void 0:Ve.type)==="personal"&&ye.createElement("div",{style:{marginLeft:"5px",border:"1px solid #24C074",color:"#24C074",padding:"0 4px",borderRadius:"2px",fontSize:"12px",height:"20px",lineHeight:"20px"}},"\u81EA\u7528")))))),ae&&ye.createElement(fe.Z,{className:`ml20 ${be&&Ce.add_style}`},ye.createElement("span",{className:Ce.tips},"\u6CA1\u6709\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF1F"),ye.createElement("span",{className:Ce.linkBtn,onClick:_e},"\u65B0\u5EFA\u77E5\u8BC6\u70B9")))}},75890:function(wn,sn,Ge){"use strict";var Qe=Ge(59301),Tt=Ge(95237),oe=Ge(43604),ze=Ge(99313),je=Ge(3113),ve=Ge(25711),fe=Ge(93938),Pe=Ge(48136),Ce=Ge(59301);const Se=(0,Qe.forwardRef)(({callback:we,showSaveButton:me,value:ye=""},de)=>{const z=(0,Qe.useRef)(),ee=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],ae=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r x=a + r\\text{cos}\\theta \\ \r y=b + r\\text{sin}\\theta \r \\end{matrix}\\right. `},{value:`\\begin{array}{l} \r \\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r \\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\left\\{\\begin{matrix} \r \\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r \\end{matrix}\\right. \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r \\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r a \\perp \\alpha \\ \r b \\perp \\alpha \r \\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r \\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r a \\parallel \\partial ,b \\parallel \\partial \r \\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r a \\perp m,a \\perp n \r \\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r \\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r a^{2}+b^{2}=c^{2} \r \\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r \\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r \\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r a,b \\in R^{+} \\ \r \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r a,b \\in R \\ \r \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r \\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r \\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r \\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r \\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r P \\left( \\emptyset \\right) =0 \\\\ \r P \\left( S \\right) =1 \r \\end{array}`},{value:`\\begin{array}{c} \r \\forall A \\in S \\\\ \r P \\left( A \\right) \\ge 0 \r \\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r \\end{array}`},{value:`\\begin{array}{c} \r P_{n}=n! \\\\ \r A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r \\end{array}`}]}]}],re=pe=>{z.current.setValue(z.current.getValue()+" "+pe.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(Tt.Z,{className:fe.Z.lists,gutter:[10,10]},ee.map((pe,Ee)=>Ce.createElement(oe.Z,{flex:"110px",className:fe.Z.item},Ce.createElement("div",null,Ce.createElement(ve.Z,{value:`$$${pe.value}$$`}),pe.name),Ce.createElement("div",{className:fe.Z.children},pe.children.map((be,Ne)=>Ce.createElement("div",{key:Ne},Ce.createElement("h1",null,be.name),Ce.createElement(Tt.Z,{gutter:[10,10]},be.data.map((Te,ke)=>Ce.createElement(oe.Z,{key:ke,onClick:()=>re(Te),className:fe.Z.diamond},Ce.createElement(ve.Z,{value:"`$$"+Te.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(Tt.Z,{className:fe.Z.lists,gutter:[10,10]},ae.map((pe,Ee)=>Ce.createElement(oe.Z,{flex:"110px",className:fe.Z.item},Ce.createElement("div",null,Ce.createElement(ve.Z,{value:"`$$"+pe.value+"$$`"}),pe.name),Ce.createElement("div",{className:fe.Z.children},pe.children.map((be,Ne)=>Ce.createElement("div",{key:Ne},be.name&&Ce.createElement("h1",null,be.name),Ce.createElement(Tt.Z,{gutter:[10,10]},be.data.map((Te,ke)=>Ce.createElement(oe.Z,{key:ke,onClick:()=>re(Te),className:fe.Z.diamond},Ce.createElement(ve.Z,{value:"`$$"+Te.value+"$$`"}))))))))))}],ue=()=>{var pe=document.createElement("div");pe.innerHTML=z.current.getValue();var Ee=pe.innerText;return we&&we(Ee),Ee};return(0,Qe.useImperativeHandle)(de,()=>({getData:ue})),Ce.createElement("div",{className:fe.Z.mathWrap},Ce.createElement(ze.default,{defaultActiveKey:"1",items:le}),Ce.createElement("math-field",{locale:"zh_cn",className:fe.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},ye||""),me&&Ce.createElement("div",{className:fe.Z.button},Ce.createElement(je.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});sn.Z=Se},97267:function(wn,sn,Ge){"use strict";var Qe=Ge(59301),Tt=Ge(93314),oe=Ge(3113),ze=Object.defineProperty,je=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Se=(de,z,ee)=>z in de?ze(de,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):de[z]=ee,we=(de,z)=>{for(var ee in z||(z={}))Pe.call(z,ee)&&Se(de,ee,z[ee]);if(fe)for(var ee of fe(z))Ce.call(z,ee)&&Se(de,ee,z[ee]);return de},me=(de,z)=>je(de,ve(z));const ye=({img:de,buttonProps:z={},styles:ee={},customText:ae,ButtonText:re,ButtonClick:le,Buttonclass:ue,ButtonTwo:pe,imgStyles:Ee,loading:be=!1})=>Qe.createElement("section",{className:"tc animated fadeIn",style:we(we({},{color:"#999",margin:"100px auto",visibility:be?"hidden":"visible"}),ee)},Qe.createElement("img",{src:de||Tt,style:me(we({},Ee),{pointerEvents:"none",userSelect:"none"})}),Qe.createElement("p",{className:"mt20 font14"},ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),re&&Qe.createElement(oe.ZP,we({className:ue,onClick:le},z),re),pe&&pe);sn.Z=ye},79646:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return ue}});var Qe=Ge(59301),Tt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=Ge(3113),ze=Ge(63093),je=Ge(48551),ve=Ge(6848),fe=Ge(58130),Pe=Ge(79124),Ce=Ge(97267),Se=Ge(10148),we=Ge(63486),me=Ge(59301),ye=Object.defineProperty,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(pe,Ee,be)=>Ee in pe?ye(pe,Ee,{enumerable:!0,configurable:!0,writable:!0,value:be}):pe[Ee]=be,re=(pe,Ee)=>{for(var be in Ee||(Ee={}))z.call(Ee,be)&&ae(pe,be,Ee[be]);if(de)for(var be of de(Ee))ee.call(Ee,be)&&ae(pe,be,Ee[be]);return pe},le=(pe,Ee,be)=>new Promise((Ne,Te)=>{var ke=Re=>{try{Be(be.next(Re))}catch($e){Te($e)}},Oe=Re=>{try{Be(be.throw(Re))}catch($e){Te($e)}},Be=Re=>Re.done?Ne(Re.value):Promise.resolve(Re.value).then(ke,Oe);Be((be=be.apply(pe,Ee)).next())}),ue=({editOffice:pe="view",data:Ee,theme:be,type:Ne,filename:Te,monacoEditor:ke,className:Oe,style:Be,close:Re,onClose:$e,hasMask:_e,disabledDownload:Ve,onImgDimensions:ot,showNodata:ct,recordInfo:ft})=>{const[wt,qe]=(0,Qe.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[it,pt]=(0,Qe.useState)(""),[Ct,xt]=(0,Qe.useState)(),mt=window.ENV==="build"?"/react/build":"",gt=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,Ot=10*(1024*1024),Lt=(0,Qe.useRef)();Ee!=null&&Ee.startsWith("/api")&&Ne!=="txt"&&(Ee=Se.Z.API_SERVER+Ee);const Ut=Pt=>Pt.substring(Pt.lastIndexOf("/")+1).split(".").pop();Te&&ke&&(ke.filename=Te),(0,Qe.useEffect)(()=>{var Pt,Ke;const lt=(Ke=(Pt=document.cookie)==null?void 0:Pt.replace(/\s/g,""))==null?void 0:Ke.split(";");lt==null||lt.map(bt=>{let ht=bt.split("=");ht[0]==="_educoder_session"&&pt(ht[1])})},[]),(0,Qe.useEffect)(()=>{Ne==="office"&&(Ee.indexOf("bigfilescdn.")>-1||Ee.indexOf("bigfiles1")>-1?xt({url:Ee,fileType:Ut(Ee),model:Ee.indexOf("model=edit")?"edit":"view"}):Et())},[Ne,Ee]);const Et=()=>le(void 0,null,function*(){console.log("data:",Ee);let Pt=Ee;Ee.startsWith("http")||(Pt=location.origin+Pt);let Ke=new URL(Pt).pathname.split("/").pop();const lt=yield(0,Pe.gJ)({attachment_id:Ke});lt.url=gt+lt.url,xt(lt)}),yt=()=>{if(Ee.startsWith("http")||Ee.startsWith("blob:")){nt();return}(0,fe.Sv)(Te||"educoder",Ee,Te)},nt=()=>{ft&&(0,we.fc)({id:ft==null?void 0:ft.id,watch_type:1,course_id:ft==null?void 0:ft.course_id}),(0,fe.Nd)(Te||"educoder",decodeURIComponent(Ee))};return me.createElement("div",{style:re({},Be||{}),className:`${_e&&Tt.bgBlack} ${Ne?Tt.wrp:"hide"}`},Re&&me.createElement("div",{className:Tt.close,ref:Lt},!!ot&&me.createElement(ve.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Lt.current},me.createElement("span",{onClick:()=>{$e(),ot()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!Ve&&me.createElement(ve.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Lt.current},me.createElement("span",{onClick:nt},me.createElement("i",{className:"icon-quxiaozhiding"}))),me.createElement(ve.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Lt.current},me.createElement("span",{className:"",onClick:$e},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${Tt[Oe]} ${Oe} ${Tt.monaco} ${Ne==="txt"?"show":"hide"}`},Ne==="txt"&&me.createElement(me.Fragment,null,me.createElement(je.ZP,re({},ke)))),Ne==="audio"&&me.createElement("audio",{src:`${(Ee==null?void 0:Ee.indexOf("http://"))>-1||(Ee==null?void 0:Ee.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ee}`,autoPlay:!0}),Ne==="video"&&me.createElement(me.Fragment,null,(Ee==null?void 0:Ee.indexOf("http"))>-1?me.createElement("video",{controls:!0,src:`${Ee}`,autoPlay:!0}):me.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ee}`,autoPlay:!0})),Ne==="office"&&Ct&&me.createElement("iframe",{src:`${mt}/office.html?key=${Ct.key}&url=${btoa(Ct.url)}&callbackUrl=${gt+(Ct.callbackUrl||"")}&fileType=${Ct.fileType}&title=${Ct.title||""}&model=${pe}&officeServer=${Se.Z.ONLYOFFICE}&disabledDownload=${!!Ve}`}),Ne==="html"&&me.createElement("iframe",{src:Ee+"&disposition=inline"}),Ne==="pdf"&&me.createElement("iframe",{src:`${mt}/js/pdfview/index.html?filename=${Te||"educoder.pdf"}&url=${encodeURIComponent(Ee)}&disabledDownload=${!!Ve}`}),Ne==="image"&&me.createElement("img",{src:`${(Ee==null?void 0:Ee.indexOf("http://"))>-1||(Ee==null?void 0:Ee.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ee}`}),(Ne==="other"||Ne==="download")&&me.createElement(me.Fragment,null,ct?me.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:me.createElement(oe.ZP,{icon:me.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:yt,disabled:Ve},"\u4E0B\u8F7D")}):me.createElement(oe.ZP,{type:"primary",size:"middle",onClick:yt,disabled:Ve},me.createElement(ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},64542:function(wn,sn,Ge){"use strict";Ge.d(sn,{h:function(){return z},x:function(){return ee}});var Qe=Ge(23469),Tt=Ge(11037),oe=Ge(25711),ze=Ge(59301),je=Object.defineProperty,ve=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,we=(ae,re,le)=>re in ae?je(ae,re,{enumerable:!0,configurable:!0,writable:!0,value:le}):ae[re]=le,me=(ae,re)=>{for(var le in re||(re={}))Ce.call(re,le)&&we(ae,le,re[le]);if(Pe)for(var le of Pe(re))Se.call(re,le)&&we(ae,le,re[le]);return ae},ye=(ae,re)=>ve(ae,fe(re)),de=(ae,re)=>{var le={};for(var ue in ae)Ce.call(ae,ue)&&re.indexOf(ue)<0&&(le[ue]=ae[ue]);if(ae!=null&&Pe)for(var ue of Pe(ae))re.indexOf(ue)<0&&Se.call(ae,ue)&&(le[ue]=ae[ue]);return le};const z=ae=>{var re=ae,{value:le,onChange:ue,scrollId:pe}=re,Ee=de(re,["value","onChange","scrollId"]);return ze.createElement("div",{id:pe||""},ze.createElement(Qe.Z,ye(me({},Ee),{defaultValue:le,onChange:(be,Ne)=>{Ne!=null&&Ne.length?ue(be,Ne):ue(be)}})))},ee=({value:ae,onChange:re,placeholder:le,height:ue=140,isEdit:pe,miniToolbar:Ee,watch:be=!0})=>pe?ze.createElement(Qe.Z,{watch:be,isFocus:!0,height:ue||void 0,placeholder:le,defaultValue:ae,onChange:re,miniToolbar:Ee}):ze.createElement("div",{style:{cursor:"pointer"}},ae?ze.createElement(oe.Z,{className:Tt.Z.inputBorder,value:ae}):ze.createElement("div",{className:`${Tt.Z.inputBorder} ${Tt.Z.placeholder} inputBorderError`},le))},25711:function(wn,sn,Ge){"use strict";Ge.d(sn,{z:function(){return Ne},Z:function(){return Te}});var Qe=Ge(59301),Tt=Ge(1751),oe=Ge(31087),ze=Ge(64018),je=Ge(37312),ve=Ge(10148),fe=Ge(58130),Pe=Ge(15342),Ce=Ge(1012),Se=Ge(79646),we=Ge(59301),ye=({html:ke})=>{const Oe=(0,Qe.useRef)(null),Be=(0,Qe.useRef)(null),Re=`.markdown-body p { margin: 0 0 16px 0 !important; line-height: 28px; white-space: pre-wrap; } ol, ul, li { list-style-type: none } ol, ul, dl { margin-bottom: 0px; } .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #333; overflow: hidden; font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif; word-break: break-word; font-size: 16px; line-height: 1.6; white-space: normal; word-wrap: break-word; position: relative; } .markdown-body ul>li { list-style-type: disc; } .markdown-body ol>li { list-style-type: decimal; } .markdown-body a { background: transparent; } .markdown-body a:active, .markdown-body a:hover { outline: 0; } .markdown-body strong { font-weight: bold; } .markdown-body h1 { font-size: 2em; margin: 0.67em 0; } .markdown-body img { border: 0; } .markdown-body hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } .markdown-body pre { overflow: auto; } .markdown-body code, .markdown-body kbd, .markdown-body pre { font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; font-size: 1em; } .markdown-body input { color: inherit; font: inherit; margin: 0; } .markdown-body html input[disabled] { cursor: default; } .markdown-body input { line-height: normal; } .markdown-body input[type="checkbox"] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } .markdown-body table { border-collapse: collapse; border-spacing: 0; } .markdown-body td, .markdown-body th { padding: 0; } .markdown-body * { -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body input { font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; } .markdown-body a { color: #4183c4; text-decoration: none; } .markdown-body a:hover, .markdown-body a:active { text-decoration: underline; } .markdown-body hr { height: 0; margin: 15px 0; overflow: hidden; background: transparent; border: 0; border-bottom: 1px solid #ddd; } .markdown-body hr:before { display: table; content: ""; } .markdown-body hr:after { display: table; clear: both; content: ""; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin-top: 15px; margin-bottom: 15px; line-height: 1.1; } .markdown-body h1 { font-size: 30px; } .markdown-body h2 { font-size: 21px; } .markdown-body h3 { font-size: 16px; } .markdown-body h4 { font-size: 14px; } .markdown-body h5 { font-size: 12px; } .markdown-body h6 { font-size: 11px; } .markdown-body blockquote { margin: 0; } .markdown-body ul, .markdown-body ol { padding: 0; margin-top: 0; margin-bottom: 0; } ul.linenums, ol.linenums { padding: 16px 0 0 36px !important; } .markdown-body ul, .markdown-body ol { padding-left: 2em; } .markdown-body ol ol, .markdown-body ul ol { list-style-type: lower-roman; } .markdown-body ul ul ol, .markdown-body ul ol ol, .markdown-body ol ul ol, .markdown-body ol ol ol { list-style-type: lower-alpha; } .markdown-body dd { margin-left: 0; } .markdown-body code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-body .octicon { font: normal normal 16px octicons-anchor; line-height: 1; display: inline-block; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .markdown-body .octicon-link:before { content: '\f05c'; } .markdown-body>*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !important; } .markdown-body .anchor { position: absolute; top: 0; left: 0; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; } .markdown-body .anchor:focus { outline: none; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; margin-top: 1em; margin-bottom: 16px; font-weight: bold; line-height: 1.4; } .markdown-body h1 .octicon-link, .markdown-body h2 .octicon-link, .markdown-body h3 .octicon-link, .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { display: none; color: #000; vertical-align: middle; } .markdown-body h1:hover .anchor, .markdown-body h2:hover .anchor, .markdown-body h3:hover .anchor, .markdown-body h4:hover .anchor, .markdown-body h5:hover .anchor, .markdown-body h6:hover .anchor { padding-left: 8px; margin-left: -30px; text-decoration: none; } .markdown-body h1:hover .anchor .octicon-link, .markdown-body h2:hover .anchor .octicon-link, .markdown-body h3:hover .anchor .octicon-link, .markdown-body h4:hover .anchor .octicon-link, .markdown-body h5:hover .anchor .octicon-link, .markdown-body h6:hover .anchor .octicon-link { display: inline-block; } .markdown-body h1 { padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid #eee; } .markdown-body h1 .anchor { line-height: 1; } .markdown-body h2 { padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; } .markdown-body h2 .anchor { line-height: 1; } .markdown-body h3 { font-size: 1.5em; line-height: 1.43; } .markdown-body h3 .anchor { line-height: 1.2; } .markdown-body h4 { font-size: 1.25em; } .markdown-body h4 .anchor { line-height: 1.2; } .markdown-body h5 { font-size: 1em; } .markdown-body h5 .anchor { line-height: 1.1; } .markdown-body h6 { font-size: 1em; color: #777; } .markdown-body h6 .anchor { line-height: 1.1; } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; } .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, .markdown-body ol ul { margin-top: 0; margin-bottom: 0; } .markdown-body li>p { margin-top: 16px; } .markdown-body dl { padding: 0; } .markdown-body dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: bold; } .markdown-body dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-body blockquote { padding: 0 15px; color: #777; border-left: 4px solid #ddd; } .markdown-body blockquote> :first-child { margin-top: 0; } .markdown-body blockquote> :last-child { margin-bottom: 0; } .markdown-body table { display: block; width: 100%; overflow: auto; word-break: normal; word-break: keep-all; } .markdown-body table th { font-weight: bold; text-align: revert; } .markdown-body table th, .markdown-body table td { padding: 6px 13px; border: 1px solid #ddd; } .markdown-body table tr { background-color: #fff; border-top: 1px solid #ccc; } .markdown-body table tr:nth-child(2n) { background-color: #f8f8f8; } .markdown-body img { max-width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body code { padding: 0; padding-top: 0.2em; padding-bottom: 0.2em; margin: 0; font-size: 85%; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; } .markdown-body code:has(.katex) { background-color: transparent; } .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; content: "\\00a0"; } .markdown-body pre>code { padding: 0; margin: 0; font-size: 100%; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-body .highlight { margin-bottom: 16px; } .markdown-body .highlight pre, .markdown-body pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f7f7f7; border-radius: 3px; } .markdown-body .highlight pre { margin-bottom: 0; word-break: normal; } .markdown-body pre { word-wrap: normal; } .markdown-body pre code { display: inline; max-width: initial; padding: 0; margin: 0; overflow: initial; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-body pre code:before, .markdown-body pre code:after { content: normal; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font-size: 11px; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .pl-c { color: #969896; } .markdown-body .pl-c1, .markdown-body .pl-mdh, .markdown-body .pl-mm, .markdown-body .pl-mp, .markdown-body .pl-mr, .markdown-body .pl-s1 .pl-v, .markdown-body .pl-s3, .markdown-body .pl-sc, .markdown-body .pl-sv { color: #0086b3; } .markdown-body .pl-e, .markdown-body .pl-en { color: #795da3; } .markdown-body .pl-s1 .pl-s2, .markdown-body .pl-smi, .markdown-body .pl-smp, .markdown-body .pl-stj, .markdown-body .pl-vo, .markdown-body .pl-vpf { color: #333; } .markdown-body .pl-ent { color: #63a35c; } .markdown-body .pl-k, .markdown-body .pl-s, .markdown-body .pl-st { color: #a71d5d; } .markdown-body .pl-pds, .markdown-body .pl-s1, .markdown-body .pl-s1 .pl-pse .pl-s2, .markdown-body .pl-sr, .markdown-body .pl-sr .pl-cce, .markdown-body .pl-sr .pl-sra, .markdown-body .pl-sr .pl-sre, .markdown-body .pl-src { color: #df5000; } .markdown-body .pl-mo, .markdown-body .pl-v { color: #1d3e81; } .markdown-body .pl-id { color: #b52a1d; } .markdown-body .pl-ii { background-color: #b52a1d; color: #f8f8f8; } .markdown-body .pl-sr .pl-cce { color: #63a35c; font-weight: bold; } .markdown-body .pl-ml { color: #693a17; } .markdown-body .pl-mh, .markdown-body .pl-mh .pl-en, .markdown-body .pl-ms { color: #1d3e81; font-weight: bold; } .markdown-body .pl-mq { color: #008080; } .markdown-body .pl-mi { color: #333; font-style: italic; } .markdown-body .pl-mb { color: #333; font-weight: bold; } .markdown-body .pl-md, .markdown-body .pl-mdhf { background-color: #ffecec; color: #bd2c00; } .markdown-body .pl-mdht, .markdown-body .pl-mi1 { background-color: #eaffea; color: #55a532; } .markdown-body .pl-mdr { color: #795da3; font-weight: bold; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .task-list-item { list-style-type: none; } .markdown-body .task-list-item+.task-list-item { margin-top: 3px; } .markdown-body .task-list-item input { float: left; margin: 0.3em 0 0.25em -1.6em; vertical-align: middle; } .markdown-body :checked+.radio-label { z-index: 1; position: relative; border-color: #4183c4; } /*! Pretty printing styles. Used with prettify.js. */ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000 } /* plain text */ @media screen { .str { color: #080 } /* string content */ .kwd { color: #008 } /* a keyword */ .com { color: #800 } /* a comment */ .typ { color: #606 } /* a type name */ .lit { color: #066 } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660 } .tag { color: #008 } /* a markup tag name */ .atn { color: #606 } /* a markup attribute name */ .atv { color: #080 } /* a markup attribute value */ .dec, .var { color: #606 } /* a declaration; a variable name */ .fun { color: red } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060 } .kwd { color: #006; font-weight: bold } .com { color: #600; font-style: italic } .typ { color: #404; font-weight: bold } .lit { color: #044 } .pun, .opn, .clo { color: #440 } .tag { color: #006; font-weight: bold } .atn { color: #404 } .atv { color: #060 } } /* Put a border around prettyprinted code snippets. */ pre.prettyprint { padding: 2px; /* border: 1px solid #888 */ } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: none } /* Alternate shading for lines */ li.L1, li.L3, li.L5, li.L7, li.L9 { background: #eee } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; }`;return(0,Qe.useEffect)(()=>{const $e=Oe.current.attachShadow({mode:"open"});Be.current=document.createElement("div"),Be.current.className="markdown-body",Be.current.innerHTML=ke,$e.appendChild(Be.current);const _e=document.createElement("style");return _e.textContent=Re,$e.appendChild(_e),()=>{$e.innerHTML=""}},[]),(0,Qe.useEffect)(()=>{Be.current&&(Be.current.innerHTML=ke)},[ke]),we.createElement("div",{ref:Oe})},de=Object.defineProperty,z=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,re=(ke,Oe,Be)=>Oe in ke?de(ke,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Be}):ke[Oe]=Be,le=(ke,Oe)=>{for(var Be in Oe||(Oe={}))ee.call(Oe,Be)&&re(ke,Be,Oe[Be]);if(z)for(var Be of z(Oe))ae.call(Oe,Be)&&re(ke,Be,Oe[Be]);return ke};const ue="@\u2581\u2581@",pe="@\u2581@",Ee=/]*>/g;function be(ke){let Oe=document.createElement("div");return Oe.innerHTML=ke,Oe.childNodes.length===0?"":Oe.childNodes[0].nodeValue}const Ne=(ke,Oe)=>{ke=ke||"";const Be=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Re=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,$e=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,_e=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Oe?ke.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Be,(Ve,ot,ct,ft,wt,qe,it)=>{const pt=ot||ft||qe,Ct=ct||wt||it||"?";return ve.Z.API_SERVER+"/api/attachments/"+pt+Ct+"&t="+(0,fe.Jn)(pt,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ke=ke.replace(_e,(Ve,ot,ct,ft,wt,qe,it)=>{const pt=ot||ft||qe,Ct=ct||wt||it||"?";return ve.Z.API_SERVER+"/attachments/download/"+pt+Ct+"&t="+(0,fe.Jn)(pt,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replace(Be,(Ve,ot,ct,ft,wt,qe,it)=>{const pt=ot||ft||qe,Ct=ct||wt||it||"?";return ve.Z.API_SERVER+"/api/attachments/"+pt+Ct+"&t="+(0,fe.Jn)(pt,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replace(Re,(Ve,ot,ct,ft,wt)=>{const qe=ot||ft,it=ct||wt||"";return'"'+ve.Z.API_SERVER+"/api/attachments/"+qe+it+qe+it+"&t="+(0,fe.Jn)(qe,Date.now())}).replace($e,(Ve,ot,ct,ft,wt)=>{const qe=ot||ft,it=ct||wt||"";return"("+ve.Z.API_SERVER+"/files/uploads/"+qe+it+qe+it+"&t="+(0,fe.Jn)(qe,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `),ke)};var Te=({value:ke="",className:Oe,showTextOnly:Be,showLines:Re,style:$e={},stylesPrev:_e={},highlightKeywords:Ve,showProgramFill:ot,isProgramFill:ct,disabledFill:ft=!1,programFillValue:wt,onFillChange:qe=Ct=>{},onFillBlur:it=()=>{},onFillFocus:pt=()=>{}})=>{let Ct=String(ke);const[xt,mt]=(0,Qe.useState)(""),[gt,St]=(0,Qe.useState)("office"),[Ot,Lt]=(0,Qe.useState)([]),Ut=(0,Qe.useRef)("a"+(0,Ce.Z)()),Et={},yt=(We,Fe,Ie)=>{const Xe=document.createElement(We===pe?"input":"textarea");Xe.style.width="100%",Xe.style.height=We===pe?"40px":"151px",Xe.rows=5,Xe.spellcheck=!1,Xe.name="edu-program-fill",Xe.placeholder="\u8BF7\u8F93\u5165",Xe.dataset.id=Fe;const vt=Object.keys(Et).length;return Et[vt]=Xe,`${Xe.outerHTML}`};function nt(We){return We=We.replace(/!\[.*?\]\(.*?\)/g,""),We=We.replace(/\[.*?\]\(.*?\)/g,""),We=We.replace(new RegExp("","gs"),""),We=We.replace(//g,""),We=We.replace(//g,""),We=We.replace(new RegExp(".*?<\\/video>","gs"),""),We=We.replace(new RegExp(".*?<\\/audio>","gs"),""),We=We.replace(new RegExp(".*?<\\/style>","gs"),""),We=We.replace(new RegExp(".*?<\\/script>","gs"),""),We}const Pt=We=>We.replace(/([\s\S]+?)<\/style>/gim,function(Fe,Ie){let Xe=Ie.replace(/(\n|\r)/g,"").split("}"),vt=[];return Xe.map(Ye=>{Ye!=""&&vt.push(`.${Ut.current} ${Ye}`)}),``}),Ke=(0,Qe.useMemo)(()=>{try{const Xe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,vt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ye=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,At=/\(\/attachments\/download\//g;Ct=Ct.replace(At,"("+ve.Z.API_SERVER+"/attachments/download/").replace(Xe,"("+ve.Z.API_SERVER+"/api/attachments/").replace(vt,'"'+ve.Z.API_SERVER+"/api/attachments/").replace(Ye,'"'+ve.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(Xe){}if(ot){let Xe=-1;return Ct=Ct.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(vt,Ye,At){var Gt;return++Xe,yt(vt,Xe,(Gt=wt==null?void 0:wt[Xe])==null?void 0:Gt.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Pt(Ct||"")}
`}let We=Pt(Ct);We=(0,oe.ZP)(We);const Fe=(0,oe.ez)();Ct.match(/\[TOC\]/)&&(We=We.replace("

[TOC]

",(0,oe.Qv)()),(0,oe.Iy)()),We=We.replace(/(__special_katext_id_\d+__)/g,(Xe,vt)=>{const{type:Ye,expression:At}=Fe[vt];return(0,Pe.renderToString)(be(At)||"",{displayMode:Ye==="block",throwOnError:!1,output:"html"})}),We=We.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Ie=document.createElement("div");if(Ie.innerHTML=We,Be)return Ie.innerText;if(Ve){const Xe=Ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return et(Ie,Xe),Ie.innerHTML}return setTimeout(()=>tt(),500),Ie.innerHTML},[Ct,Ve]);(0,Qe.useEffect)(()=>{Ze.current&&Ze.current.querySelectorAll(["input","textarea"]).forEach(Fe=>{Fe.oninput=lt,Fe.onblur=bt,Fe.onfocus=ht})},[Ot]),(0,Qe.useEffect)(()=>{var We,Fe,Ie,Xe,vt;if(wt!=null&&wt.length)try{const Ye=Ze.current.querySelectorAll(".edu-program-fill-score"),At=Ze.current.querySelectorAll('[name="edu-program-fill"]');for(const[Gt,on]of At.entries())on.value=((We=wt==null?void 0:wt[Gt])==null?void 0:We.value)||"",((Fe=wt==null?void 0:wt[Gt])==null?void 0:Fe.type)==="warning"?on.className="program-fill-warning":((Ie=wt==null?void 0:wt[Gt])==null?void 0:Ie.type)==="success"?on.className="program-fill-success":on.className="";for(const[Gt,on]of Ye.entries())on.innerHTML=(Xe=wt==null?void 0:wt[Gt])!=null&&Xe.score?`${(vt=wt==null?void 0:wt[Gt])==null?void 0:vt.score}\u5206`:"";Lt(wt)}catch(Ye){console.log(Ye,"error")}},[wt]);const lt=We=>{Ot[We.target.dataset.id]=Ot[We.target.dataset.id]||{},Ot[We.target.dataset.id].value=We.target.value,Lt([...Ot]),qe(Ot,We.target.dataset.id)},bt=We=>{Ot[We.target.dataset.id]=Ot[We.target.dataset.id]||{},Ot[We.target.dataset.id].value=We.target.value,Lt([...Ot]),it(Ot,We.target.dataset.id)},ht=We=>{Ot[We.target.dataset.id]=Ot[We.target.dataset.id]||{},Ot[We.target.dataset.id].value=We.target.value,Lt([...Ot]),pt(Ot,We.target.dataset.id)};function et(We,Fe){return We.childNodes.forEach(Ie=>{var Xe;if(Ie.childNodes.length>0)et(Ie,Fe);else if(Ie.nodeName!=="IMG")if(Ie.innerHTML)Ie.innerHTML=(Xe=Ie.innerHTML)==null?void 0:Xe.replace(new RegExp(Fe,"gi"),'$&');else{const vt=document.createElement("span");vt.innerHTML=Ie.textContent.replace(new RegExp(Fe,"gi"),'$&'),Ie.replaceWith(vt)}})}const Ze=(0,Qe.useRef)();oe.jb.WebkitLineClamp=Re,Re&&($e=le(le({},$e),oe.jb));function He(We){let Fe=We.target;if(Fe.tagName.toUpperCase()==="A"){let Ie=Fe.getAttribute("href");if(Ie.indexOf("office")>-1)We.preventDefault(),mt(Ie),St("office");else if(Ie.indexOf("application/pdf")>-1)We.preventDefault(),mt(Ie),St("pdf");else if(Ie.indexOf("text/html")>-1)We.preventDefault(),mt(Ie),St("html");else if(Ie.startsWith("#")){We.preventDefault();let Xe=document.getElementById(Ie.replace("#",""));Xe&&Xe.scrollIntoView(!0)}}}const tt=()=>{var We;const Fe=(We=Ze.current)==null?void 0:We.querySelectorAll("video");Fe==null||Fe.forEach(Ie=>{if(Ie.oncontextmenu=()=>!1,Ie.src.indexOf(".m3u8")>-1&&!Ie.canPlayType("application/vnd.apple.mpegurl")){if(je.ZP.isSupported()){var Xe=new je.ZP;Xe.loadSource(Ie.src),Xe.attachMedia(Ie)}}})};(0,Qe.useEffect)(()=>{if(Ze.current&&Ke&&Ke.match(Ee)&&window.PR.prettyPrint(),Ze.current)return Ze.current.addEventListener("click",He),()=>{var We;(We=Ze.current)==null||We.removeEventListener("click",He),(0,oe.AL)(),(0,oe.Iy)()}},[Ke,Ze.current,He]),(0,Qe.useEffect)(()=>{var We;const Fe=Ie=>{Ie.preventDefault(),Ie.clipboardData.setData("text",window.getSelection().toString())};return(We=Ze.current)==null||We.addEventListener("copy",Fe),()=>{var Ie;(Ie=Ze.current)==null||Ie.removeEventListener("copy",Fe)}},[Ze.current]);const ut=We=>//i.test(We||"");return Qe.createElement(Qe.Fragment,null,Be&&Qe.createElement("div",{ref:Ze},Ke),!Be&&!ut(Ke)&&Qe.createElement("div",{ref:Ze,style:le({},$e),className:`${Oe||""} ${ft?"disabled-fill":""} markdown-body ${Ut.current}`,dangerouslySetInnerHTML:{__html:Ke}}),!Be&&ut(Ke)&&Qe.createElement(ye,{html:Ke}),Qe.createElement(Se.Z,{close:!0,data:xt,type:xt!=null&&xt.length?gt:"",style:le({},_e),onClose:()=>mt("")}))}},9168:function(wn,sn,Ge){"use strict";Ge.d(sn,{cT:function(){return ke},pe:function(){return be}});var Qe=Ge(59301),Tt=Ge(24645),oe=Ge(8591),ze=Ge(70635),je=Ge(28209),ve=Ge.n(je),fe=Ge(1012),Pe=Ge(42203),Ce=Ge(47257),Se=Ge.n(Ce),we=Object.defineProperty,me=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Be,Re,$e)=>Re in Be?we(Be,Re,{enumerable:!0,configurable:!0,writable:!0,value:$e}):Be[Re]=$e,re=(Be,Re)=>{for(var $e in Re||(Re={}))z.call(Re,$e)&&ae(Be,$e,Re[$e]);if(de)for(var $e of de(Re))ee.call(Re,$e)&&ae(Be,$e,Re[$e]);return Be},le=(Be,Re)=>me(Be,ye(Re)),ue=(Be,Re)=>{var $e={};for(var _e in Be)z.call(Be,_e)&&Re.indexOf(_e)<0&&($e[_e]=Be[_e]);if(Be!=null&&de)for(var _e of de(Be))Re.indexOf(_e)<0&&ee.call(Be,_e)&&($e[_e]=Be[_e]);return $e},pe=(Be,Re,$e)=>new Promise((_e,Ve)=>{var ot=wt=>{try{ft($e.next(wt))}catch(qe){Ve(qe)}},ct=wt=>{try{ft($e.throw(wt))}catch(qe){Ve(qe)}},ft=wt=>wt.done?_e(wt.value):Promise.resolve(wt.value).then(ot,ct);ft(($e=$e.apply(Be,Re)).next())});const{Dragger:Ee}=Tt.default,be=Be=>{const Re="bf3c199c2470cb477d907b1e0917c17b",$e="5183666c72eec9e4";var _e=ve().enc.Utf8.parse(Re);let Ve=ve().enc.Utf8.parse($e);var ot=ve().AES.decrypt(Be,_e,{iv:Ve,mode:ve().mode.CBC});return ot.toString(ve().enc.Utf8)};let Ne;const Te=Be=>pe(void 0,[Be],function*({identifier:Re,oldFilename:$e,newFilename:_e}){var Ve,ot,ct,ft,wt,qe;const it=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});it.data=JSON.parse(be(it.data));const pt=new OSS({endpoint:(Ve=it==null?void 0:it.data)==null?void 0:Ve.end_point,region:(ot=it==null?void 0:it.data)==null?void 0:ot.region,accessKeyId:(ct=it==null?void 0:it.data)==null?void 0:ct.access_key_id,accessKeySecret:(ft=it==null?void 0:it.data)==null?void 0:ft.access_key_secret,bucket:(wt=it==null?void 0:it.data)==null?void 0:wt.bucket,stsToken:(qe=it==null?void 0:it.data)==null?void 0:qe.security_token});return new Promise((Ct,xt)=>{console.log(11111,`${Re}/${$e}`,`${Re}/${_e}`,it.data),pt.copy(`/${Re}/${$e}`,`/${Re}/${_e}`).then(mt=>{console.log("\u62F7\u8D1D\u6210\u529F",mt)}).catch(mt=>{console.log(mt)})})}),ke=(Be,Re,$e)=>pe(void 0,null,function*(){var _e,Ve,ot,ct,ft,wt;Re.file_name=Be.name;const qe=yield(0,ze.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",be(qe.data)),qe.data=JSON.parse(be(qe.data));const it=Be.name.split(".");it.pop();const pt=Re.realFileName?it.join(""):(0,fe.Z)(),Ct=new(Se())({endpoint:(_e=qe==null?void 0:qe.data)==null?void 0:_e.end_point,region:(Ve=qe==null?void 0:qe.data)==null?void 0:Ve.region,accessKeyId:(ot=qe==null?void 0:qe.data)==null?void 0:ot.access_key_id,accessKeySecret:(ct=qe==null?void 0:qe.data)==null?void 0:ct.access_key_secret,bucket:(ft=qe==null?void 0:qe.data)==null?void 0:ft.bucket,stsToken:(wt=qe==null?void 0:qe.data)==null?void 0:wt.security_token});return new Promise((xt,mt)=>{var gt;Ct.multipartUpload(`${pt}`,new Blob([Be],{type:Be.type}),le(re({timeout:200*1e3,partSize:102400},$e),{callback:{url:(gt=qe==null?void 0:qe.data)==null?void 0:gt.callback_url,host:qe==null?void 0:qe.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ze.rz)(Re)}})).then(function(St){var Ot;Be.response=(Ot=St.data)==null?void 0:Ot.data,xt(St==null?void 0:St.data)}).catch(function(St){mt(St),console.log("err:",St)})})}),Oe=Be=>{var Re=Be,{user:$e,cancelUpload:_e}=Re,Ve=ue(Re,["user","cancelUpload"]);const[ot,ct]=(0,Qe.useState)([]);let[ft,wt]=(0,Qe.useState)();const qe={onRemove:pt=>{ct([...ot.filter(Ct=>Ct.name!==pt.name)]),Ve.onChange(ot.filter(Ct=>Ct.name!==pt.name))},disabled:Ve.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(pt=>pt.file),customRequest:()=>{},beforeUpload:pt=>pe(void 0,null,function*(){let Ct=Ve.maxSize||1073741824;if(ot.filter(xt=>xt.name===pt.name).length){oe.ZP.info(`${pt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(pt==null?void 0:pt.size)>Ct?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Ct/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:pt.name,file:pt}),ct([...ot]),Ve.onChange(ot),!1)})},it=(pt,Ct)=>pe(void 0,null,function*(){var xt,mt,gt,St,Ot,Lt;Ct.file_name=pt.name;const Ut=pt.name,Et=yield(0,ze.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(Et.data=JSON.parse(be(Et.data)),(Et==null?void 0:Et.status)!==0){ot[ot.findIndex(Pt=>Pt.name===Ut)].status="error",ot[ot.findIndex(Pt=>Pt.name===Ut)].file.status="error",Ve.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ft=new(Se())({endpoint:(xt=Et==null?void 0:Et.data)==null?void 0:xt.end_point,region:(mt=Et==null?void 0:Et.data)==null?void 0:mt.region,accessKeyId:(gt=Et==null?void 0:Et.data)==null?void 0:gt.access_key_id,accessKeySecret:(St=Et==null?void 0:Et.data)==null?void 0:St.access_key_secret,bucket:(Ot=Et==null?void 0:Et.data)==null?void 0:Ot.bucket,stsToken:(Lt=Et==null?void 0:Et.data)==null?void 0:Lt.security_token}),console.log(pt,"file"),wt(ft);const yt=pt.name.split(".");yt.pop();const nt=Ut.indexOf(".")>-1?Ct.realFileName?yt.join("."):(0,fe.Z)():Ut;return new Promise((Pt,Ke)=>{var lt;try{ft.multipartUpload(`${Ve.identifier}/${nt}${Ut.indexOf(".")>-1?"."+Ut.split(".").pop():""}`,new Blob([pt.file],{type:pt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(bt,ht,et)=>{try{console.log("\u8FDB\u5EA6",bt,ht,et);const Ze=ot.findIndex(He=>He.name===Ut);ot[Ze].file.percent=bt*100,ot[Ze].tempCheckpoint=ht,ct([...ot])}catch(Ze){}},checkpoint:ot[ot.findIndex(bt=>bt.name===Ut)].tempCheckpoint,callback:{customValue:{id:Ut+""},url:(lt=Et==null?void 0:Et.data)==null?void 0:lt.callback_url,host:Et==null?void 0:Et.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ze.rz)(Ct)}}).then(function(bt){var ht,et,Ze;const He=ot.findIndex(ut=>ut.name===Ut);let tt="done";if(((ht=bt.data)==null?void 0:ht.status)===0){pt.response=(et=bt.data)==null?void 0:et.data;const ut=ot.findIndex(We=>We.name===Ut);ot[ut].status="done",ot[ut].file.status="done"}else oe.ZP.warning((Ze=bt.data)==null?void 0:Ze.message),tt="error";ot[He].status=tt,ot[He].file.status=tt,Ve.onChange(ot),Pt(bt==null?void 0:bt.data)}).catch(function(bt){ot[ot.findIndex(ht=>ht.name===Ut)].status="error",ot[ot.findIndex(ht=>ht.name===Ut)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),ct([...ot]),Ve.onChange(ot),Ke(bt),console.log("err:",bt)})}catch(bt){}})});return(0,Qe.useEffect)(()=>{ot.every(pt=>pt==="done"||pt==="error")&&Ve.onComplete(ot)},[ot]),(0,Qe.useEffect)(()=>{_e&&(ft==null||ft.cancel())},[_e]),(0,Qe.useEffect)(()=>{Ve.uploading&&ot.map(pt=>pe(void 0,null,function*(){var Ct;if((!pt.status||pt.status==="error")&&!_e){pt.status="uploading",pt.file.status="uploading";const xt=yield it(pt,{login:(Ct=$e==null?void 0:$e.userInfo)==null?void 0:Ct.login,container_type:Ve.container_type,container_id:Ve.container_id,description:Ve.description,realFileName:Ve.realFileName})}}))},[Ve.uploading]),Qe.createElement(Ee,le(re({},qe),{height:Ve.height,className:Ve.className}),Qe.createElement("p",{className:"ant-upload-hint"},Ve.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};sn.ZP=(0,Pe.connect)(({loading:Be,globalSetting:Re,user:$e})=>({globalSetting:Re,loading:Be.models.competitions,user:$e}))(Oe)},36866:function(wn,sn,Ge){"use strict";Ge.d(sn,{h:function(){return pe},Z:function(){return ue}});var Qe=Ge(59301),Tt=Ge(57809),oe=Ge(78241),ze=Ge(3113),je=Ge(89780),ve=Ge.n(je),fe=Ge(79906),Pe=Object.defineProperty,Ce=Object.defineProperties,Se=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,de=(Ee,be,Ne)=>be in Ee?Pe(Ee,be,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):Ee[be]=Ne,z=(Ee,be)=>{for(var Ne in be||(be={}))me.call(be,Ne)&&de(Ee,Ne,be[Ne]);if(we)for(var Ne of we(be))ye.call(be,Ne)&&de(Ee,Ne,be[Ne]);return Ee},ee=(Ee,be)=>Ce(Ee,Se(be));const ae=Tt.default.Option,re={labelCol:{span:4},wrapperCol:{span:20}},le={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};var ue=({callback:Ee,onCancel:be})=>{const[Ne,Te]=(0,Qe.useState)("python");function ke(Be){Te(le[Be][1])}function Oe(Be){Ee(Be)}return Qe.createElement(oe.default,ee(z({},re),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Oe,style:{width:500}}),Qe.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Qe.createElement(Tt.default,{getPopupContainer:Be=>Be.parentNode,onChange:ke},Object.keys(le).map(Be=>Qe.createElement(ae,{key:Be,value:Be},le[Be][0])))),Qe.createElement(oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Qe.createElement(pe,{mode:Ne})),Qe.createElement("div",{className:"flex-container flex-end"},Qe.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Qe.createElement(ze.ZP,{type:"ghost",onClick:be},"\u53D6\u6D88")))};function pe({value:Ee,onChange:be,mode:Ne,options:Te={}}){const ke=(0,Qe.useRef)(),[Oe,Be]=(0,Qe.useState)();return(0,Qe.useEffect)(()=>{if(Oe){let Re=function($e){const _e=$e.getValue();be&&be(_e)};return Oe.on("change",Re),()=>{Oe.off("change",Re)}}},[Oe,be]),(0,Qe.useEffect)(()=>{Oe&&Oe.setOption("mode",Ne)},[Oe,Ne]),(0,Qe.useEffect)(()=>{Oe&&(Ee!==Oe.getValue()||Ee==="")&&setTimeout(()=>{Oe.setValue(Ee||"")},300)},[Oe,Ee]),(0,Qe.useEffect)(()=>{if(ke.current&&!Oe){const Re=ve().fromTextArea(ke.current,z({mode:Ne,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Te));Be(Re)}},[ke.current,Oe]),Qe.createElement("div",{className:"my-codemirror-container"},Qe.createElement("textarea",{ref:ke}))}},23469:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Fn}});var Qe=Ge(59301),Tt=Ge(89780),oe=Ge.n(Tt),ze=Ge(76374),je=Ge(79906),ve=Ge(6313),fe=Ge(25717),Pe=Ge(99498),Ce=Ge(25419),Se=Ge(67549),we=Ge(25711),me=({value:Jt="",className:Qt,showTextOnly:$t,showLines:Rt,style:ln={}})=>{const vn=(0,Qe.useMemo)(()=>"",[Jt]);return Qe.createElement(Qe.Fragment,null,Qe.createElement("div",{dangerouslySetInnerHTML:{__html:vn}}))},ye=Ge(59301),de=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ue=(Jt,Qt,$t)=>Qt in Jt?de(Jt,Qt,{enumerable:!0,configurable:!0,writable:!0,value:$t}):Jt[Qt]=$t,pe=(Jt,Qt)=>{for(var $t in Qt||(Qt={}))re.call(Qt,$t)&&ue(Jt,$t,Qt[$t]);if(ae)for(var $t of ae(Qt))le.call(Qt,$t)&&ue(Jt,$t,Qt[$t]);return Jt},Ee=(Jt,Qt)=>z(Jt,ee(Qt));let be=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ne({onActionCallback:Jt,title:Qt,icon:$t,actionName:Rt,className:ln="",children:vn}){function Vt(){Jt(Rt)}return ye.createElement("a",{title:Qt,className:ln,onClick:Vt},ye.createElement("i",{className:`${$t}`}),vn)}var Te=({watch:Jt,showNullButton:Qt,showNullProgramButton:$t,onActionCallback:Rt,fullScreen:ln,insertTemp:vn,hidetoolBar:Vt,extraUse:Ft})=>{const dn=[...be,{title:`${Jt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Jt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ye.createElement("ul",{className:"markdown-toolbar-container"},!Vt&&dn.map((mn,jn)=>ye.createElement("li",{key:jn},mn.actionName?ye.createElement(Ne,Ee(pe({},mn),{onActionCallback:Rt})):ye.createElement("span",{className:"v-line"}))),Qt?ye.createElement("li",null,ye.createElement(Ne,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Rt},ye.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,$t?ye.createElement(ye.Fragment,null,ye.createElement("li",null,ye.createElement(Ne,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Rt},ye.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),ye.createElement("li",null,ye.createElement(Ne,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Rt},ye.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,vn&&ye.createElement("li",null,ye.createElement(Ne,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${vn}`,onActionCallback:Rt},ye.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ft&&ye.createElement("li",null,Ft),ye.createElement("li",{className:"btn-full-screen"},ye.createElement(Ne,{icon:`${ln?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:ln?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Rt})))},ke=Ge(50474),Oe=Ge(78241),Be=Ge(92832),Re=Ge(3113),$e=Object.defineProperty,_e=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,wt=(Jt,Qt,$t)=>Qt in Jt?$e(Jt,Qt,{enumerable:!0,configurable:!0,writable:!0,value:$t}):Jt[Qt]=$t,qe=(Jt,Qt)=>{for(var $t in Qt||(Qt={}))ct.call(Qt,$t)&&wt(Jt,$t,Qt[$t]);if(ot)for(var $t of ot(Qt))ft.call(Qt,$t)&&wt(Jt,$t,Qt[$t]);return Jt},it=(Jt,Qt)=>_e(Jt,Ve(Qt));const pt={labelCol:{span:4},wrapperCol:{span:20}};var Ct=({callback:Jt,onCancel:Qt})=>{function $t(Rt){Jt(Rt)}return Qe.createElement(Oe.default,it(qe({},pt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:$t,style:{width:500}}),Qe.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Qe.createElement(Be.default,null)),Qe.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Qe.createElement(Be.default,null)),Qe.createElement("div",{className:"flex-container flex-end"},Qe.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Qe.createElement(Re.ZP,{type:"ghost",onClick:Qt},"\u53D6\u6D88")))},xt=Ge(36866),mt=Ge(56701),gt=Ge(43418),St=Ge(95237),Ot=Ge(65983),Lt=Ge(59301),Ut=({callback:Jt,onCancel:Qt})=>{const $t=document.createElement("canvas"),Rt=$t.getContext("2d");$t.width=1e3,$t.height=800,Rt.fillStyle="#ffffff",Rt.fillRect(0,0,$t.width,$t.height);const ln=$t.toDataURL("image/png");return Lt.createElement(gt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Lt.createElement(St.Z,{style:{height:"100vh"}},Lt.createElement(Ot.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:ln,visible:!0,title:String(Date.now())},onOk:vn=>{Jt({src:vn.url})},onClose:Qt})))},Et=Ge(12378);function yt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(yt,go.CommandHandler),yt.prototype.canAlignSelection=function(){var Jt=this.diagram;return!(Jt===null||Jt.isReadOnly||Jt.isModelReadOnly||Jt.selection.count<2)},yt.prototype.alignLeft=function(){var Jt=this.diagram;Jt.startTransaction("aligning left");var Qt=1/0;Jt.selection.each(function($t){$t instanceof go.Link||(Qt=Math.min($t.position.x,Qt))}),Jt.selection.each(function($t){$t instanceof go.Link||$t.move(new go.Point(Qt,$t.position.y))}),Jt.commitTransaction("aligning left")},yt.prototype.alignRight=function(){var Jt=this.diagram;Jt.startTransaction("aligning right");var Qt=-1/0;Jt.selection.each(function($t){if(!($t instanceof go.Link)){var Rt=$t.actualBounds.x+$t.actualBounds.width;Qt=Math.max(Rt,Qt)}}),Jt.selection.each(function($t){$t instanceof go.Link||$t.move(new go.Point(Qt-$t.actualBounds.width,$t.position.y))}),Jt.commitTransaction("aligning right")},yt.prototype.alignTop=function(){var Jt=this.diagram;Jt.startTransaction("alignTop");var Qt=1/0;Jt.selection.each(function($t){$t instanceof go.Link||(Qt=Math.min($t.position.y,Qt))}),Jt.selection.each(function($t){$t instanceof go.Link||$t.move(new go.Point($t.position.x,Qt))}),Jt.commitTransaction("alignTop")},yt.prototype.alignBottom=function(){var Jt=this.diagram;Jt.startTransaction("aligning bottom");var Qt=-1/0;Jt.selection.each(function($t){if(!($t instanceof go.Link)){var Rt=$t.actualBounds.y+$t.actualBounds.height;Qt=Math.max(Rt,Qt)}}),Jt.selection.each(function($t){$t instanceof go.Link||$t.move(new go.Point($t.actualBounds.x,Qt-$t.actualBounds.height))}),Jt.commitTransaction("aligning bottom")},yt.prototype.alignCenterX=function(){var Jt=this.diagram,Qt=Jt.selection.first();if(Qt){Jt.startTransaction("aligning Center X");var $t=Qt.actualBounds.x+Qt.actualBounds.width/2;Jt.selection.each(function(Rt){Rt instanceof go.Link||Rt.move(new go.Point($t-Rt.actualBounds.width/2,Rt.actualBounds.y))}),Jt.commitTransaction("aligning Center X")}},yt.prototype.alignCenterY=function(){var Jt=this.diagram,Qt=Jt.selection.first();if(Qt){Jt.startTransaction("aligning Center Y");var $t=Qt.actualBounds.y+Qt.actualBounds.height/2;Jt.selection.each(function(Rt){Rt instanceof go.Link||Rt.move(new go.Point(Rt.actualBounds.x,$t-Rt.actualBounds.height/2))}),Jt.commitTransaction("aligning Center Y")}},yt.prototype.alignColumn=function(Jt){var Qt=this.diagram;Qt.startTransaction("align Column"),Jt===void 0&&(Jt=0),Jt=parseFloat(Jt);var $t=new Array;Qt.selection.each(function(Ft){Ft instanceof go.Link||$t.push(Ft)});for(var Rt=0;Rt<$t.length-1;Rt++){var ln=$t[Rt],vn=ln.actualBounds.y+ln.actualBounds.height+Jt,Vt=$t[Rt+1];Vt.move(new go.Point(ln.actualBounds.x,vn))}Qt.commitTransaction("align Column")},yt.prototype.alignRow=function(Jt){Jt===void 0&&(Jt=0),Jt=parseFloat(Jt);var Qt=this.diagram;Qt.startTransaction("align Row");var $t=new Array;Qt.selection.each(function(Ft){Ft instanceof go.Link||$t.push(Ft)});for(var Rt=0;Rt<$t.length-1;Rt++){var ln=$t[Rt],vn=ln.actualBounds.x+ln.actualBounds.width+Jt,Vt=$t[Rt+1];Vt.move(new go.Point(vn,ln.actualBounds.y))}Qt.commitTransaction("align Row")},yt.prototype.canRotate=function(Jt){var Qt=this.diagram;return!(Qt===null||Qt.isReadOnly||Qt.isModelReadOnly||Qt.selection.count<1)},yt.prototype.rotate=function(Jt){Jt===void 0&&(Jt=90);var Qt=this.diagram;Qt.startTransaction("rotate "+Jt.toString());var Qt=this.diagram;Qt.selection.each(function($t){$t instanceof go.Link||$t instanceof go.Group||($t.angle+=Jt)}),Qt.commitTransaction("rotate "+Jt.toString())},yt.prototype.pullToFront=function(){var Jt=this.diagram;Jt.startTransaction("pullToFront");var Qt=new go.Map;Jt.selection.each(function($t){Qt.set($t.layer,0)}),Qt.iteratorKeys.each(function($t){var Rt=0;$t.parts.each(function(ln){if(!ln.isSelected){var vn=ln.zOrder;isNaN(vn)?ln.zOrder=0:Rt=Math.max(Rt,vn)}}),Qt.set($t,Rt)}),Jt.selection.each(function($t){yt._assignZOrder($t,Qt.get($t.layer)+1)}),Jt.commitTransaction("pullToFront")},yt.prototype.pushToBack=function(){var Jt=this.diagram;Jt.startTransaction("pushToBack");var Qt=new go.Map;Jt.selection.each(function($t){Qt.set($t.layer,0)}),Qt.iteratorKeys.each(function($t){var Rt=0;$t.parts.each(function(ln){if(!ln.isSelected){var vn=ln.zOrder;isNaN(vn)?ln.zOrder=0:Rt=Math.min(Rt,vn)}}),Qt.set($t,Rt)}),Jt.selection.each(function($t){yt._assignZOrder($t,Qt.get($t.layer)-1-yt._findGroupDepth($t))}),Jt.commitTransaction("pushToBack")},yt._assignZOrder=function(Jt,Qt,$t){$t===void 0&&($t=Jt),Jt.layer===$t.layer&&(Jt.zOrder=Qt),Jt instanceof go.Group&&Jt.memberParts.each(function(Rt){yt._assignZOrder(Rt,Qt+1,$t)})},yt._findGroupDepth=function(Jt){if(Jt instanceof go.Group){var Qt=0;return Jt.memberParts.each(function($t){Qt=Math.max(Qt,yt._findGroupDepth($t))}),Qt+1}else return 0},yt.prototype.doKeyDown=function(){var Jt=this.diagram;if(Jt!==null){var Qt=Jt.lastInput;if(Qt.key==="Up"||Qt.key==="Down"||Qt.key==="Left"||Qt.key==="Right"){var $t=this.arrowKeyBehavior;if($t==="none")return;if($t==="select"){this._arrowKeySelect();return}else if($t==="move"){this._arrowKeyMove();return}else if($t==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},yt.prototype._getAllParts=function(){var Jt=new Array;return this.diagram.nodes.each(function(Qt){Jt.push(Qt)}),this.diagram.parts.each(function(Qt){Jt.push(Qt)}),Jt},yt.prototype._arrowKeyMove=function(){var Jt=this.diagram,Qt=Jt.lastInput,$t=0,Rt=0;if(Qt.control||Qt.meta)$t=1,Rt=1;else if(Jt.grid!==null){var ln=Jt.grid.gridCellSize;Rt=ln.width,$t=ln.height}Jt.startTransaction("arrowKeyMove"),Jt.selection.each(function(vn){Qt.key==="Up"?vn.move(new go.Point(vn.actualBounds.x,vn.actualBounds.y-$t)):Qt.key==="Down"?vn.move(new go.Point(vn.actualBounds.x,vn.actualBounds.y+$t)):Qt.key==="Left"?vn.move(new go.Point(vn.actualBounds.x-Rt,vn.actualBounds.y)):Qt.key==="Right"&&vn.move(new go.Point(vn.actualBounds.x+Rt,vn.actualBounds.y))}),Jt.commitTransaction("arrowKeyMove")},yt.prototype._arrowKeySelect=function(){var Jt=this.diagram,Qt=Jt.lastInput,$t=null;Qt.key==="Up"?$t=this._findNearestPartTowards(270):Qt.key==="Down"?$t=this._findNearestPartTowards(90):Qt.key==="Left"?$t=this._findNearestPartTowards(180):Qt.key==="Right"&&($t=this._findNearestPartTowards(0)),$t!==null&&(Qt.shift?$t.isSelected=!0:Qt.control||Qt.meta?$t.isSelected=!$t.isSelected:Jt.select($t))},yt.prototype._findNearestPartTowards=function(Jt){var Qt=this.diagram.selection.first();if(Qt===null)return null;for(var $t=Qt.actualBounds.center,Rt=this._getAllParts(),ln=1/0,vn=Qt,Vt=0;Vt0){for(var Ft=vn.elt(Vt-1);Ft!==null&&Ft.isTreeExpanded&&!Ft.isTreeLeaf;){var dn=this._sortTreeChildrenByY(Ft);Ft=dn.last()}Ft!==null&&Jt.select(Ft)}else Jt.select(ln)}}else if($t.key==="Down")if(Qt.isTreeExpanded&&!Qt.isTreeLeaf){var Rt=this._sortTreeChildrenByY(Qt).first();Rt!==null&&Jt.select(Rt)}else for(;Qt!==null;){var ln=Qt.findTreeParentNode();if(ln===null)break;var vn=this._sortTreeChildrenByY(ln),Vt=vn.indexOf(Qt);if(Vtvn.y?1:ln.xvn.x?1:0}),Qt},yt.prototype.copyToClipboard=function(Jt){go.CommandHandler.prototype.copyToClipboard.call(this,Jt),this._lastPasteOffset.set(this.pasteOffset)},yt.prototype.pasteFromClipboard=function(){var Jt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Jt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Jt},Object.defineProperty(yt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Jt){if(Jt!=="move"&&Jt!=="select"&&Jt!=="scroll"&&Jt!=="tree"&&Jt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Jt);this._arrowKeyBehavior=Jt}}),Object.defineProperty(yt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Jt){if(!(Jt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Jt);this._pasteOffset.set(Jt)}});var nt=yt,Pt=Ge(37404),Ke=Ge(43604),lt=Ge(70635),bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ht=Ge(59301),et=(Jt,Qt,$t)=>new Promise((Rt,ln)=>{var vn=dn=>{try{Ft($t.next(dn))}catch(mn){ln(mn)}},Vt=dn=>{try{Ft($t.throw(dn))}catch(mn){ln(mn)}},Ft=dn=>dn.done?Rt(dn.value):Promise.resolve(dn.value).then(vn,Vt);Ft(($t=$t.apply(Jt,Qt)).next())});function Ze({onCancel:Jt,callback:Qt}){let $t=(0,Qe.useRef)(),Rt=(0,Qe.useRef)(),ln=(0,Qe.useRef)(),vn=(0,Qe.useRef)(!1);const Vt=(0,Qe.useRef)(!1),[Ft,dn]=(0,Qe.useState)(0);function mn(){const hn=Et.bx.make,Zt={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};$t.current=new Et.S0(Rt.current,{padding:20,grid:hn(Et.s_,"Grid",hn(Et.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),hn(Et.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:en=>{var Xn=en.diagram.commandHandler.addTopLevelParts(en.diagram.selection,!0);Xn||en.diagram.currentTool.doCancel()},commandHandler:hn(nt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:en=>{var Xn=en.subject;Xn.location=Xn.location.copy().snapToGridPoint(en.diagram.grid.gridOrigin,en.diagram.grid.gridCellSize),setTimeout(()=>{en.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:en=>{var Xn=en.subject;setTimeout(()=>{en.diagram.commandHandler.editTextBlock()})},LinkRelinked:en=>{var Xn=en.parameter.part;Xn.invalidateConnectedLinks();var lr=en.subject;en.diagram.toolManager.linkingTool.isForwards?lr.toNode.invalidateConnectedLinks():lr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),$t.current.nodeTemplate=hn(Et.NB,"Auto",{locationSpot:Et.z6.Center,locationObjectName:"SHAPE",desiredSize:new Et.$u(120,60),minSize:new Et.$u(40,40),resizable:!0,resizeCellSize:new Et.$u(10,10),rotatable:!0},new Et.KX("location","loc",Et.E9.parse).makeTwoWay(Et.E9.stringify),new Et.KX("desiredSize","size",Et.$u.parse).makeTwoWay(Et.$u.stringify),hn(Et.bn,{name:"SHAPE",fill:Zt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Et.z6.AllSides,toSpot:Et.z6.AllSides},new Et.KX("figure"),new Et.KX("fill"),new Et.KX("stroke","borderColor"),new Et.KX("strokeWidth","thickness"),new Et.KX("strokeDashArray","dash")),hn(Et.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),hn(Et.al,{margin:1,textAlign:"center",overflow:Et.al.OverflowEllipsis,editable:!0},new Et.KX("text").makeTwoWay(),new Et.KX("stroke","color"))),$t.current.nodeTemplate.toolTip=hn("ToolTip",hn(Et.s_,"Vertical",{maxSize:new Et.$u(200,NaN)},hn(Et.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Et.KX("text")),hn(Et.al,{font:"10pt sans-serif",textAlign:"center"},new Et.KX("text","details"))));function Cn(en,Xn){var lr=(er,Mr)=>{er.handled=!0,er.diagram.model.commit(yr=>{var Or=Mr.part.adornedPart,Tr=new Et.E9().setRectSpot(Or.actualBounds,en);Tr.subtract(Or.location),Tr.scale(2,2),Tr.x+=Math.sign(Tr.x)*130,Tr.y+=Math.sign(Tr.y)*130,Tr.add(Or.location),Tr.snapToGridPoint(er.diagram.grid.gridOrigin,er.diagram.grid.gridCellSize);var cr=yr.copyNodeData(Or.data);yr.setGroupKeyForNodeData(cr,yr.getGroupKeyForNodeData(Or.data)),yr.addNodeData(cr);var Br={from:Or.key,to:yr.getKeyForNodeData(cr)};yr.addLinkData(Br);var En=er.diagram.findNodeForData(cr);En.location=Tr,er.diagram.select(En),setTimeout(()=>{er.diagram.commandHandler.editTextBlock()},20)})};return hn(Et.bn,{figure:Xn,alignment:en,alignmentFocus:en.opposite(),width:en.equals(Et.z6.Top)||en.equals(Et.z6.Bottom)?25:18,height:en.equals(Et.z6.Top)||en.equals(Et.z6.Bottom)?18:25,fill:"orange",stroke:Zt.white,strokeWidth:4,mouseEnter:(er,Mr)=>Mr.fill="dodgerblue",mouseLeave:(er,Mr)=>Mr.fill="orange",isActionable:!0,click:lr,contextClick:lr})}function _n(en){return hn(Et.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(Xn,lr)=>lr.fill="dodgerblue",mouseLeave:(Xn,lr)=>lr.fill="orange",click:(Xn,lr)=>{Xn.diagram.commandHandler.showContextMenu(lr.part.adornedPart)}},en||{})}$t.current.nodeTemplate.selectionAdornmentTemplate=hn(Et.uz,"Spot",hn(Et.Vm,{padding:10}),Cn(Et.z6.Top,"TriangleUp"),Cn(Et.z6.Left,"TriangleLeft"),Cn(Et.z6.Right,"TriangleRight"),Cn(Et.z6.Bottom,"TriangleDown"),_n({alignment:new Et.z6(.75,0)}));function Zn(en,Xn){return(lr,er)=>{lr.handled=!0,lr.diagram.model.commit(Mr=>{Mr.set(er.part.adornedPart.data,en,Xn)})}}function rn(en,Xn){return Xn||(Xn="color"),hn(Et.bn,{width:16,height:16,stroke:"lightgray",fill:en,margin:1,background:"transparent",mouseEnter:(lr,er)=>er.stroke="dodgerblue",mouseLeave:(lr,er)=>er.stroke="lightgray",click:Zn(Xn,en),contextClick:Zn(Xn,en)})}function Pn(){return[hn("ContextMenuButton",hn(Et.s_,"Horizontal",rn(Zt.white,"fill"),rn(Zt.beige,"fill"),rn(Zt.extralightblue,"fill"),rn(Zt.extralightred,"fill"))),hn("ContextMenuButton",hn(Et.s_,"Horizontal",rn(Zt.lightgray,"fill"),rn(Zt.lightgreen,"fill"),rn(Zt.lightblue,"fill"),rn(Zt.lightred,"fill")))]}function nn(){return[hn("ContextMenuButton",hn(Et.s_,"Horizontal",rn(Zt.black),rn(Zt.green),rn(Zt.blue),rn(Zt.red))),hn("ContextMenuButton",hn(Et.s_,"Horizontal",rn(Zt.white),rn(Zt.magenta),rn(Zt.purple),rn(Zt.orange)))]}function gn(en,Xn){return Xn||(Xn="thickness"),hn(Et.bn,"LineH",{width:16,height:16,strokeWidth:en,margin:1,background:"transparent",mouseEnter:(lr,er)=>er.background="dodgerblue",mouseLeave:(lr,er)=>er.background="transparent",click:Zn(Xn,en),contextClick:Zn(Xn,en)})}function pn(en,Xn){return Xn||(Xn="dash"),hn(Et.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:en,margin:1,background:"transparent",mouseEnter:(lr,er)=>er.background="dodgerblue",mouseLeave:(lr,er)=>er.background="transparent",click:Zn(Xn,en),contextClick:Zn(Xn,en)})}function fn(){return[hn("ContextMenuButton",hn(Et.s_,"Horizontal",gn(1),gn(2),gn(3),gn(4))),hn("ContextMenuButton",hn(Et.s_,"Horizontal",pn(null),pn([2,4]),pn([4,4])))]}function bn(en,Xn){return Xn||(Xn="figure"),hn(Et.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:en,margin:1,background:"transparent",mouseEnter:(lr,er)=>er.fill="dodgerblue",mouseLeave:(lr,er)=>er.fill="lightgray",click:Zn(Xn,en),contextClick:Zn(Xn,en)})}$t.current.nodeTemplate.contextMenu=hn("ContextMenu",hn("ContextMenuButton",hn(Et.s_,"Horizontal",bn("Rectangle"),bn("RoundedRectangle"),bn("Ellipse"),bn("Diamond"))),hn("ContextMenuButton",hn(Et.s_,"Horizontal",bn("Parallelogram2"),bn("ManualOperation"),bn("Procedure"),bn("Cylinder1"))),hn("ContextMenuButton",hn(Et.s_,"Horizontal",bn("Terminator"),bn("CreateRequest"),bn("Document"),bn("TriangleDown"))),Pn(),nn(),fn()),$t.current.groupTemplate=hn(Et.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Et.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(en,Xn)=>{var lr=Xn.addMembers(Xn.diagram.selection,!0);lr||Xn.diagram.currentTool.doCancel()},avoidable:!1},new Et.KX("location","loc",Et.E9.parse).makeTwoWay(Et.E9.stringify),hn(Et.s_,"Auto",{name:"BODY"},hn(Et.bn,{parameter1:10,fill:Zt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Et.z6.AllSides,toSpot:Et.z6.AllSides},new Et.KX("fill"),new Et.KX("stroke","color"),new Et.KX("strokeWidth","thickness"),new Et.KX("strokeDashArray","dash")),hn(Et.Vm,{background:"transparent",margin:20})),hn(Et.al,{alignment:Et.z6.Top,alignmentFocus:Et.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Et.KX("text"),new Et.KX("stroke","color"))),$t.current.groupTemplate.selectionAdornmentTemplate=hn(Et.uz,"Spot",hn(Et.s_,"Auto",hn(Et.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),hn(Et.Vm,{margin:1.5})),_n({alignment:Et.z6.TopRight,alignmentFocus:Et.z6.BottomRight})),$t.current.groupTemplate.contextMenu=hn("ContextMenu",Pn(),nn(),fn()),$t.current.linkTemplate=hn(Et.rU,{layerName:"Foreground",routing:Et.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Et.KX("fromSpot","fromSpot",Et.z6.parse),new Et.KX("toSpot","toSpot",Et.z6.parse),new Et.KX("fromShortLength","dir",en=>en>=1?10:0),new Et.KX("toShortLength","dir",en=>en>=1?10:0),new Et.KX("points").makeTwoWay(),hn(Et.bn,{strokeWidth:2},new Et.KX("stroke","color"),new Et.KX("strokeWidth","thickness"),new Et.KX("strokeDashArray","dash")),hn(Et.bn,{segmentIndex:0,segmentOffset:new Et.E9(15,0),segmentOrientation:Et.rU.OrientAlong,alignmentFocus:Et.z6.Right,figure:"circle",width:10,strokeWidth:0},new Et.KX("fill","color"),new Et.KX("visible","dir",en=>en===1)),hn(Et.bn,{segmentIndex:-1,segmentOffset:new Et.E9(-10,6),segmentOrientation:Et.rU.OrientPlus90,alignmentFocus:Et.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Et.KX("fill","color"),new Et.KX("visible","dir",en=>en>=1),new Et.KX("width","thickness",en=>7+3*en),new Et.KX("height","thickness",en=>7+3*en),new Et.KX("segmentOffset","thickness",en=>new Et.E9(-15,4+1.5*en))),hn(Et.bn,{segmentIndex:0,segmentOffset:new Et.E9(15,-6),segmentOrientation:Et.rU.OrientMinus90,alignmentFocus:Et.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Et.KX("fill","color"),new Et.KX("visible","dir",en=>en===2),new Et.KX("width","thickness",en=>7+3*en),new Et.KX("height","thickness",en=>7+3*en),new Et.KX("segmentOffset","thickness",en=>new Et.E9(-15,4+1.5*en))),hn(Et.al,{alignmentFocus:new Et.z6(0,1,-4,0),editable:!0},new Et.KX("text").makeTwoWay(),new Et.KX("stroke","color"))),$t.current.linkTemplate.selectionAdornmentTemplate=hn(Et.uz,hn(Et.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Tn(2)},new Et.KX("pathPattern","thickness",Tn)),_n({alignmentFocus:new Et.z6(0,0,-6,-4)}));function Tn(en){return hn(Et.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(en+4).toString()+" H3"})}function Nn(en){var Xn="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return en===0?Xn="M0 0 M16 16 M0 8 L16 8":en===2&&(Xn="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),hn(Et.bn,{geometryString:Xn,margin:2,background:"transparent",mouseEnter:(lr,er)=>er.background="dodgerblue",mouseLeave:(lr,er)=>er.background="transparent",click:Zn("dir",en),contextClick:Zn("dir",en)})}function Dn(en){var Xn=(lr,er)=>{lr.handled=!0,lr.diagram.model.commit(Mr=>{var yr=er.part.adornedPart;Mr.set(yr.data,en?"toSpot":"fromSpot",Et.z6.stringify(Et.z6.AllSides)),(en?yr.toNode:yr.fromNode).invalidateConnectedLinks()})};return hn(Et.bn,{width:12,height:12,fill:"transparent",mouseEnter:(lr,er)=>er.background="dodgerblue",mouseLeave:(lr,er)=>er.background="transparent",click:Xn,contextClick:Xn})}function Mn(en,Xn){var lr=0,er=Et.z6.RightSide;en.equals(Et.z6.Top)?(lr=270,er=Et.z6.TopSide):en.equals(Et.z6.Left)?(lr=180,er=Et.z6.LeftSide):en.equals(Et.z6.Bottom)&&(lr=90,er=Et.z6.BottomSide),Xn||(lr-=180);var Mr=(yr,Or)=>{yr.handled=!0,yr.diagram.model.commit(Tr=>{var cr=Or.part.adornedPart;Tr.set(cr.data,Xn?"toSpot":"fromSpot",Et.z6.stringify(er)),(Xn?cr.toNode:cr.fromNode).invalidateConnectedLinks()})};return hn(Et.bn,{alignment:en,alignmentFocus:en.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:lr,background:"transparent",mouseEnter:(yr,Or)=>Or.background="dodgerblue",mouseLeave:(yr,Or)=>Or.background="transparent",click:Mr,contextClick:Mr})}$t.current.linkTemplate.contextMenu=hn("ContextMenu",nn(),fn(),hn("ContextMenuButton",hn(Et.s_,"Horizontal",Nn(0),Nn(1),Nn(2))),hn("ContextMenuButton",hn(Et.s_,"Horizontal",hn(Et.s_,"Spot",Dn(!1),Mn(Et.z6.Top,!1),Mn(Et.z6.Left,!1),Mn(Et.z6.Right,!1),Mn(Et.z6.Bottom,!1)),hn(Et.s_,"Spot",{margin:new Et.Zt(0,0,0,2)},Dn(!0),Mn(Et.z6.Top,!0),Mn(Et.z6.Left,!0),Mn(Et.z6.Right,!0),Mn(Et.z6.Bottom,!0)))));const Gn=`{ "class": "GraphLinksModel", "nodeDataArray": [ {"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3}, {"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"}, {"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"}, {"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"}, {"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"}, {"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3}, {"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22}, {"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22}, {"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"} ], "linkDataArray": [ {"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1}, {"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1}, {"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]}, {"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2}, {"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"}, {"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1}, {"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]} ]}`;var ur=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function Er(en){return console.log("shapeName:",en),ur.indexOf(en)>=0}var hr=new Et.YI(ln.current,{maxSelectionCount:1,linkTemplate:hn(Et.rU,{locationSpot:Et.z6.Center,selectionAdornmentTemplate:hn(Et.uz,"Link",{locationSpot:Et.z6.Center},hn(Et.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),hn(Et.bn,{toArrow:"Standard",stroke:null}))},{routing:Et.rU.AvoidsNodes,curve:Et.rU.JumpOver,corner:5,toShortLength:4},new Et.KX("points"),hn(Et.bn,{isPanelMain:!0,strokeWidth:2}),hn(Et.bn,{toArrow:"Standard",stroke:null})),model:new Et.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Et.bn.getFigureGenerators().toArray().map(en=>({text:"\u672A\u547D\u540D",size:"100 100",figure:en.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return $t.current.addDiagramListener("TextEdited",function(en){var Xn;const lr=en.subject.part;var er=(Xn=document.activeElement)==null?void 0:Xn.value;typeof er=="string"&&er.trim()===""&&$t.current.model.commit(function(Mr){Mr.set(lr.data,"text","\u672A\u547D\u540D"),$t.current.commandHandler.stopCommand()},"increment")}),hr.nodeTemplate=hn(Et.NB,"Auto",{locationSpot:Et.z6.Center},new Et.KX("location","location",Et.E9.parse).makeTwoWay(Et.E9.stringify),hn(Et.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new Et.KX("stroke").makeTwoWay(),new Et.KX("fill").makeTwoWay(),new Et.KX("figure")),hn(Et.al,{margin:new Et.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Et.$u(16,16),maxSize:new Et.$u(10,NaN),textAlign:"center",editable:!0},new Et.KX("key").makeTwoWay())),setTimeout(()=>{$t.current.grid=hn(Et.s_,"Grid",hn(Et.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),hn(Et.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),$t.current.grid.visible=!0,$t.current.grid.gridCellStroke="darkgray",$t.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=$t.current,$t.current}const jn=()=>et(this,null,function*(){var hn=$t.current.makeImage();const Zt=yield(0,lt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:hn.src}});Qt({src:Zt.url})});return(0,Qe.useEffect)(()=>(setTimeout(()=>{mn()},500),dn(Ft+1),()=>{$t.current=null}),[]),ht.createElement("div",{ref:Vt,className:vn.current?`${bt.maxH60} body-overflow-initial`:"body-overflow-initial"},ht.createElement(gt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Ft,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:ht.createElement(St.Z,null,ht.createElement(Ke.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ht.createElement(Ke.Z,{onClick:()=>{var hn,Zt,Cn=$t.current.selection.first();if(vn.current=!vn.current,document.activeElement&&Cn){let _n=(Zt=(hn=document.activeElement)==null?void 0:hn.value)==null?void 0:Zt.trim();typeof _n=="string"&&$t.current.model.commit(function(Zn){Zn.set(Cn.data,"text",_n||"\u672A\u547D\u540D"),$t.current.commandHandler.stopCommand()},"increment")}dn(Ft+1)}},ht.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Jt},ht.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:bt.flowChartWrp},ht.createElement("div",{style:{display:"flex",height:"100%"}},ht.createElement("div",{style:{width:"300px",height:"100%"}},ht.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),ht.createElement("div",{style:{height:"calc(100% - 50px)"},className:bt.myPaletteDiv,ref:ln})),ht.createElement("div",{style:{flex:1,position:"relative"}},ht.createElement("div",{ref:Rt,style:{height:"80vh"}}))),ht.createElement("div",{className:"tr"},ht.createElement(Re.ZP,{size:"large",onClick:jn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var He=Ze,tt=Ge(5112),ut=Ge(88897);const We=tt.ZP.Group,Fe={margin:"0 8px"};var Ie=({callback:Jt,onCancel:Qt})=>{function $t(Rt){Jt(Rt)}return Qe.createElement(Oe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:$t},Qe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Qe.createElement("span",{style:Fe},"\u5355\u5143\u683C\u6570\uFF1A"),Qe.createElement("span",{style:Fe},"\u884C\u6570"),Qe.createElement(Oe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Qe.createElement(ut.Z,null)),Qe.createElement("span",{style:Fe},"\u5217\u6570"),Qe.createElement(Oe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Qe.createElement(ut.Z,null))),Qe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Qe.createElement("span",{style:Fe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Qe.createElement(Oe.default.Item,{name:"align"},Qe.createElement(We,null,Qe.createElement(tt.ZP,{value:"default"},Qe.createElement("i",{className:"fa fa-align-justify"})),Qe.createElement(tt.ZP,{value:"left"},Qe.createElement("i",{className:"fa fa-align-left"})),Qe.createElement(tt.ZP,{value:"center"},Qe.createElement("i",{className:"fa fa-align-center"})),Qe.createElement(tt.ZP,{value:"right"},Qe.createElement("i",{className:"fa fa-align-right"}))))),Qe.createElement("div",{className:"flex-container flex-end"},Qe.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Qe.createElement(Re.ZP,{type:"ghost",onClick:Qt},"\u53D6\u6D88")))},Xe=Ge(78673),vt=Ge(98598),Ye=Ge.n(vt),Gt=(0,Qe.forwardRef)(({use3d:Jt,width:Qt,height:$t,callback:Rt,showSaveButton:ln},vn)=>{const Vt=(0,Qe.useRef)(),Ft=(0,Qe.useRef)(),[dn,mn]=(0,Qe.useState)(!1),jn=(0,Qe.useRef)({id:Vt,appName:"graphing",width:Qt||1e3,height:$t||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Qe.useEffect)(()=>{Ft.current=new(Ye())(jn.current,!0),window.onload=function(){Ft.current.inject("applet_container")}},[]);const hn=()=>{var Zt=window.ggbApplet.getPNGBase64(1,!0,72);return Rt&&Rt(Zt),Zt};return(0,Qe.useEffect)(()=>{jn.current.appName=dn?"3D":"graphing",Ft.current.inject("applet_container")},[dn]),(0,Qe.useEffect)(()=>{mn(Jt)},[Jt]),(0,Qe.useImperativeHandle)(vn,()=>({getImgData:hn})),Qe.createElement(Qe.Fragment,null,Qe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Vt}),Qe.createElement(St.Z,{align:"middle"},Qe.createElement(Ke.Z,{flex:1},Qe.createElement(Xe.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:dn,onChange:Zt=>mn(Zt)})),Qe.createElement(Ke.Z,null,Qe.createElement(Re.ZP,{size:"large",onClick:hn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),on=Ge(75890),jt=Ge(8591);const Ht="link",qt="upload-image",cn="add-flowchart",Sn="draw-image",An="add-flowchart",Vn="code-block",Kn="add-table",ar="------------",xr={default:ar,left:`:${ar}`,center:`:${ar}:`,right:`${ar}:`};var mr=Ge(91300);function pr(){}let Pr=0;const Vr=1e4,Ur="\u2581",Jr="@\u2581\u2581@",dr="@\u2581@",at=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,ei=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function Dr(Jt){return/^\d+$/.test(Jt)?`${Jt}px`:Jt}const tr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",nr={[tr+"-B"]:"bold",[tr+"-I"]:"italic"},gr={[Ht]:"\u6DFB\u52A0\u94FE\u63A5",[Vn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[qt]:"\u6DFB\u52A0\u56FE\u7247",[Sn]:"\u6DFB\u52A0\u753B\u56FE",[cn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Kn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Fn=({defaultValue:Jt="",onChange:Qt,width:$t="100%",height:Rt=400,miniToolbar:ln=!1,isFocus:vn=!1,watch:Vt,insertTemp:Ft,mode:dn="markdown",id:mn="markdown-editor-id",showResizeBar:jn=!1,noStorage:hn=!1,showNullButton:Zt=!1,showNullProgramButton:Cn=!1,hidetoolBar:_n=!1,fullScreen:Zn=!1,onBlur:rn,onCMBeforeChange:Pn,onFullScreen:nn,className:gn="",disablePaste:pn=!1,disabled:fn=!1,disabledFill:bn=!1,placeholder:Tn="",values:Nn="",extraUse:Dn})=>{const[Mn,Gn]=(0,Qe.useState)(null),[ur,Er]=(0,Qe.useState)(Jt),[hr,en]=(0,Qe.useState)(Vt),[Xn,lr]=(0,Qe.useState)(Zn),[er,Mr]=(0,Qe.useState)(""),[yr,Or]=(0,Qe.useState)(0),[Tr,cr]=(0,Qe.useState)(Rt),[Br,En]=(0,Qe.useState)(!1),[ti,Ln]=(0,Qe.useState)(0),[Gr,si]=(0,Qe.useState)(0),Ar=(0,Qe.useRef)(),gi=(0,Qe.useRef)(),ni=(0,Qe.useRef)(),Sr=(0,Qe.useRef)();(0,Qe.useEffect)(()=>{const Lr=window.scrollY||window.pageYOffset;Er(Nn),Mn==null||Mn.setValue(Nn),window.scrollTo(0,Lr)},[Nn]),(0,Qe.useEffect)(()=>{nn==null||nn(Xn)},[Xn]),(0,Qe.useEffect)(()=>{if(Ar.current){let Lr=function(zr,Un){var yi;if(pn){Un.preventDefault();return}const Ai=Un.clipboardData;if(Ai){const qi=Ai.types.toString(),Si=Ai.items;if(qi==="Files"||Ai.types.indexOf("Files")>-1){if(Un.preventDefault(),dn=="stex")return;try{let mi=Si[1];((yi=Si[0])==null?void 0:yi.kind)==="file"&&(mi=Si[0]);const _i=mi.getAsFile(),ao=_i.name.split(".").pop();(0,mt.I)(_i,ro=>{var Qo,wo,xn;ro.id?((Qo=_i==null?void 0:_i.type)==null?void 0:Qo.indexOf("image"))>-1?Cr.replaceSelection(`![,](/api/attachments/${ro.id}?type=${ro.content_type})`):((wo=_i==null?void 0:_i.type)==null?void 0:wo.indexOf("video"))>-1?Cr.replaceSelection(``):((xn=_i==null?void 0:_i.type)==null?void 0:xn.indexOf("pdf"))>-1?Cr.replaceSelection(`${_i.name}`):ei.includes(ao)?Cr.replaceSelection(`${_i.name}`):Cr.replaceSelection(`[${_i.name}](/api/attachments/${ro.id}?type=${ro.content_type})`):(ro==null?void 0:ro.status)===401&&(document.location.href="/user/login")})}catch(mi){jt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Cr=oe().fromTextArea(Ar.current,{mode:dn,lineNumbers:!ln,lineWrapping:!0,value:Jt,autoCloseTags:!0,autoCloseBrackets:!0});return Cr.on("keyup",function(zr,Un){Un.keyCode===8&&(zr.getValue()==""?Cr.setOption("placeholder",Tn):Cr.setOption("placeholder",null))}),Cr.on("keydown",function(zr,Un){if(Un.keyCode===8){var yi=Xr(zr);yi&&Un.preventDefault()}}),vn&&Cr.focus(),Cr.on("paste",Lr),fn&&Cr.on("beforeChange",function(zr,Un){(Un.origin==="paste"||Un.origin==="+input")&&Un.cancel()}),Gn(Cr),()=>{Cr.off("paste",Lr)}}},[]);const wr=(0,Qe.useCallback)(()=>{if(gi.current)try{}catch(Lr){console.log(Lr,"---- to set md editor body height")}},[Tr,gi,Xn]);(0,Qe.useEffect)(()=>{function Lr(){let Cr=new ze.Z(zr=>{for(let Un of zr)(Un.target.offsetHeight>0||Un.target.offsetWidth>0)&&(wr(),Mn.setSize("100%","100%"),Mn.refresh())});return Cr.observe(Ar.current.parentElement),Cr}if(Mn){const Cr=Lr();return()=>{var zr,Un;(zr=Ar.current)!=null&&zr.parentElement&&Cr.unobserve((Un=Ar.current)==null?void 0:Un.parentElement)}}},[Mn,wr]),(0,Qe.useEffect)(()=>{if(Mn){let Lr=[];for(const[Cr,zr]of Object.entries(nr)){let Un={[Cr]:()=>{ri(zr)}};Lr.push(Un),Mn.addKeyMap(Un)}return()=>{for(let Cr of Lr)Mn.removeKeyMap(Cr)}}},[Mn]),(0,Qe.useEffect)(()=>{Zn!==Xn&&lr(Zn)},[Zn]),(0,mr.Z)(()=>{if(!hn&&yr>0){let Lr=new Date().getTime(),Cr=window.sessionStorage.getItem(mn);Lr>=yr+Vr&&(!Cr||Cr!==ur)&&(window.sessionStorage.setItem(mn,ur),En(!0))}},Vr),(0,Qe.useEffect)(()=>{en(Vt)},[Mn,Vt]),(0,Qe.useEffect)(()=>{Mn&&vn&&Mn.focus()},[Mn,vn]),(0,Qe.useEffect)(()=>{if(hr&&Mn){let Lr=function(zr){let Un=zr.target;if(Sr.current){let yi=Un.scrollTop/Un.scrollHeight;Sr.current.scrollTop=Sr.current.scrollHeight*yi}};const Cr=Mn.getScrollerElement();return Cr.addEventListener("scroll",Lr),()=>{Cr.removeEventListener("scroll",Lr)}}},[Mn,hr]),(0,Qe.useEffect)(()=>{if(Mn&&Pn){let Lr=function(Cr,zr){Pn(Cr,zr)};return Mn.on("beforeChange",Lr),()=>{Mn.off("beforeChange",Lr)}}},[Mn,Pn]),(0,Qe.useEffect)(()=>{if(Mn&&rn){let Lr=function(){rn(Mn.getValue())};return Mn.on("blur",Lr),()=>{Mn.off("blur",Lr)}}},[Mn,rn]);function Xr(Lr,Cr){var zr=Lr.getDoc(),Un=zr.getCursor(),yi=zr.getLine(Un.line),Ai=yi.charAt(Un.ch-1),qi=yi.lastIndexOf("@\u2581@",Un.ch),Si=yi.lastIndexOf("@\u2581\u2581@",Un.ch),mi=qi>Si?qi:Si,_i=qi>Si?3:4;if(Jr.indexOf(Ai)===-1)return null;if(console.log("change1:",Cr,Lr,yi,Un,mi,qi,Si,Ai),mi>=0&&Un.ch-mi<5){var ao=mi+_i;return zr.replaceRange("",{line:Un.line,ch:mi},{line:Un.line,ch:ao}),{line:Un.line,ch:ao}}return null}(0,Qe.useEffect)(()=>{if(Mn){let Lr=function(Cr,zr){const Un=Cr.getValue();Er(Un),Or(new Date().getTime()),Cr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Qt&&(Cn?Qt(Un,Nr(Un)):Qt(Un))};return Mn.on("change",Lr),()=>{Mn.off("change",Lr)}}},[Mn,Qt]),(0,Qe.useEffect)(()=>{if(Mn)if(Jt==null)Mn.setValue(""),Er("");else{const Lr=window.scrollY||window.pageYOffset;Jt!==Mn.getValue()&&(Mn.setValue(Jt),Er(Jt),Mn.setCursor(fn?1:Mn.lineCount(),0),window.scrollTo(0,Lr))}},[Mn,Jt]);const ri=(0,Qe.useCallback)(Lr=>{const Cr=Mn.getCursor(),zr=Mn.getSelection();let Un=zr.split(` `);switch(Lr){case"bold":return Mn.replaceSelection("**"+zr+"**"),zr===""&&Mn.setCursor(Cr.line,Cr.ch+2),Mn.focus();case"italic":return Mn.replaceSelection("*"+zr+"*"),zr===""&&Mn.setCursor(Cr.line,Cr.ch+1),Mn.focus();case"code":return Mn.replaceSelection("`"+zr+"`"),zr===""&&Mn.setCursor(Cr.line,Cr.ch+1),Mn.focus();case"inline-latex":return Mr("inline-latex"),Mn.focus();case"latex":return Mn.replaceSelection("```latex\n"+zr+"\n```"),Mn.setCursor(Cr.line+1,zr.length+1),Mn.focus();case"line-break":return Mn.replaceSelection(`
`),Mn.focus();case"list-ul":return zr===""?Mn.replaceSelection("- "+zr):Mn.replaceSelection(Un.map(yi=>yi===""?"":`- ${yi}`).join(` `)),Mn.focus();case"list-ol":return zr===""?Mn.replaceSelection("1. "+zr):Mn.replaceSelection(Un.map((yi,Ai)=>yi===""?"":`${Ai+1}. ${yi}`).join(` `)),Mn.focus();case"add-null-ch":return zr===""&&Mn.setCursor(Cr.line,Cr.ch),Mn.replaceSelection(Ur),Mn.focus();case"add-signal":return zr===""&&Mn.setCursor(Cr.line,Cr.ch),Mn.replaceSelection(dr),Mn.focus();case"add-multiple":return zr===""&&Mn.setCursor(Cr.line,Cr.ch),Mn.replaceSelection(Jr),Mn.focus();case"inster-template-1":return zr===""&&Mn.setCursor(Cr.line,Cr.ch),Mn.replaceSelection(at),Mn.focus();case"eraser":return Mn.setValue(""),Mn.focus();case"trigger-watch":return en(!hr),Mn.focus();case"trigger-full-screen":return lr(!Xn),Mn.focus();case Ht:Mr(Ht);return;case Vn:Mr(Vn);return;case qt:Mr(qt);return;case Sn:Mr(Sn);return;case"maths-latex":Mr("maths-latex");return;case cn:Mr(cn);return;case Kn:Mr(Kn);return;default:throw new Error}},[Mn,hr,Xn]),Qn=(0,Qe.useCallback)((Lr,Cr)=>{var zr,Un,yi,Ai,qi,Si;switch(Mr(""),er){case Ht:const{title:Qo,link:wo}=Lr;return Mn.replaceSelection(`[${Qo}](${wo})`),Mn.focus();case Vn:const{language:xn,content:bo}=Lr;return Mn.replaceSelection(["```"+xn,bo,"```"].join(` `)),Mn.focus();case"maths-latex":for(var mi=atob(Lr),_i=new Uint8Array(mi.length),ao=0;ao{Go.id?Mn.replaceSelection(`![,](/api/attachments/${Go.id}?type=${Go.content_type})`):(Go==null?void 0:Go.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Mn.replaceSelection("`$$"+Lr+"$$`");break;case qt:case Sn:case An:const{src:Ya,alt:Ha}=Lr,pi=Cr,Hi=(yi=(Un=(zr=pi==null?void 0:pi.name)==null?void 0:zr.split("."))==null?void 0:Un.pop)==null?void 0:yi.call(Un);return((Ai=pi==null?void 0:pi.type)==null?void 0:Ai.indexOf("image"))>-1||!(pi!=null&&pi.type)?Ha?Mn.replaceSelection(`![ ${Ha} ]( ${Ya} "${Ha}" )`):Mn.replaceSelection(`![,](${Ya})`):((qi=pi==null?void 0:pi.type)==null?void 0:qi.indexOf("video"))>-1?Mn.replaceSelection(``):((Si=pi==null?void 0:pi.type)==null?void 0:Si.indexOf("pdf"))>-1?Mn.replaceSelection(`${pi.name}`):ei.includes(Hi)?Mn.replaceSelection(`${pi.name}`):Mn.replaceSelection(`[${pi.name}](${Ya})`),Mn.focus();case Kn:const{row:so,col:Ii,align:xi}=Lr;let Ki=` `;for(let Go=0;Go{switch(er){case Ht:return Qe.createElement(Ct,{callback:Qn,onCancel:$r});case Vn:return Qe.createElement(xt.Z,{callback:Qn,onCancel:$r});case qt:return Qe.createElement(mt.Z,{callback:Qn,onCancel:$r});case cn:return Qe.createElement(He,{callback:Qn,onCancel:$r});case Kn:return Qe.createElement(Ie,{callback:Qn,onCancel:$r});case"maths-latex":return Qe.createElement(Gt,{showSaveButton:!0,callback:Qn});case"inline-latex":return Qe.createElement(on.Z,{showSaveButton:!0,callback:Qn});default:return null}},[er]);function $r(){Mr("")}(0,Qe.useEffect)(()=>{if(ni.current){let Lr=function(qi){yi=!0,Ai=qi.pageY},Cr=function(){yi=!1},zr=function(qi){if(yi){let Si=qi.pageY-Ai;Si<0&&(Si=0),Si>300&&(Si=300);let mi=Rt+Si+"px";cr(mi)}},Un=ni.current,yi=!1,Ai=0;return Un.addEventListener("mousedown",Lr),document.addEventListener("mousemove",zr),document.addEventListener("mouseup",Cr),()=>{Un.removeEventListener("mousedown",Lr),document.removeEventListener("mousemove",zr),document.removeEventListener("mouseup",Cr)}}},[Mn,ni]),(0,Qe.useEffect)(()=>{cr(Rt)},[Rt]);const ki=Dr($t),Kr=Dr(Tr),Li={width:ki,height:Kr},jr=(0,Qe.useMemo)(()=>{if(yr){let Lr=new Date(yr),Cr=Lr.getHours(),zr=Lr.getMinutes(),Un=Lr.getSeconds();return Cr=Cr<10?"0"+Cr:Cr,zr=zr<10?"0"+zr:zr,Un=Un<10?"0"+Un:Un,`${Cr}:${zr}:${Un}`}return 0},[yr]),Nr=Lr=>{const Cr=[];if(Cn){let zr=-1;Lr=Lr.replace(/(@▁▁@|@▁@)/g,function(Un,yi,Ai){Cr.push({multiLine:Un!==dr})})}return Cr};function li(){window.sessionStorage.removeItem(mn),En(!1),Or(0)}function vi(){En(!1),Or(0),Mn.setValue(window.sessionStorage.getItem(mn))}(0,Qe.useEffect)(()=>{gr[er]&&er!==Sn&&er!==cn&&setTimeout(()=>{const Lr=document.getElementsByClassName("markdown-popup-form")[0],Cr=window.innerWidth/2-Lr.offsetWidth/2,zr=window.innerHeight/2-Lr.offsetHeight/2;Ln(Cr),si(zr)},0)},[er]);const Qr=Lr=>{Lr.preventDefault();const Cr=Lr.clientX-ti,zr=Lr.clientY-Gr;document.body.onmousemove=Un=>{let yi=Un.clientX-Cr,Ai=Un.clientY-zr;const qi=document.getElementsByClassName("markdown-popup-form")[0],Si=window.innerWidth-qi.offsetWidth,mi=window.innerHeight-qi.offsetHeight;yi=Math.max(0,Math.min(yi,Si)),Ai=Math.max(0,Math.min(Ai,mi)),zi(Un.clientX,Un.clientY,Cr,zr)&&(Ln(yi),si(Ai))},document.body.onmouseup=function(){document.body.onmousemove=null}},zi=(Lr,Cr,zr,Un)=>{const yi=document.body.clientHeight,Ai=document.body.clientWidth;return Lr<20&&zr>Lr||Lr>Ai-20&&zrCr||Cr>yi-20&&UnNe in be?Pe(be,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Te}):be[Ne]=Te,z=(be,Ne)=>{for(var Te in Ne||(Ne={}))me.call(Ne,Te)&&de(be,Te,Ne[Te]);if(we)for(var Te of we(Ne))ye.call(Ne,Te)&&de(be,Te,Ne[Te]);return be},ee=(be,Ne)=>Ce(be,Se(Ne));const{useForm:ae}=Qe.default,re={width:280,marginRight:10},le={labelCol:{span:5},wrapperCol:{span:19}};var ue=({callback:be,onCancel:Ne})=>{const[Te]=ae();let ke=(0,ve.useRef)();function Oe($e){be($e,ke.current)}function Be($e,_e){if($e.status===-1){Tt.ZP.error($e.message);return}Te.setFieldsValue({src:`/api/attachments/${$e.id}`,type:_e.type})}function Re($e){let _e=$e.target.files[0];ke.current=_e,Ee(_e,Be)}return fe.createElement(Qe.default,ee(z({form:Te},le),{className:"upload-image-panel",onFinish:Oe,style:{width:470,overflow:"hidden"}}),fe.createElement(Qe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(Qe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(oe.default,{style:re})),fe.createElement(pe,{onFileChange:Re}))),fe.createElement(Qe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(oe.default,{style:{width:264}})),fe.createElement(Qe.default.Item,{style:{textAlign:"right"}},fe.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(ze.ZP,{type:"default",onClick:Ne},"\u53D6\u6D88")))};function pe({onFileChange:be}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:be}))}function Ee(be,Ne){if(!be)throw new String("\u6CA1\u6709\u6587\u4EF6");let Te=new FormData;Te.append("editormd-image-file",be),Te.append("file_param_name","editormd-image-file"),Te.append("byxhr","true");var ke=new window.XMLHttpRequest;ke.withCredentials=!0,ke.addEventListener("load",function(Oe){Ne(JSON.parse(Oe.target.responseText),be)},!1),ke.addEventListener("error",function(Oe){console.error(Oe)},!1),ke.open("POST",`${je.KI}/api/attachments.json`),ke.send(Te)}},50474:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return oe}});var Qe=Ge(59301),Tt=Ge(4676);class oe extends Qe.Component{constructor(je){super(je);const ve=window.document;this.node=ve.createElement("div"),ve.body.appendChild(this.node)}render(){const{children:je}=this.props;return(0,Tt.createPortal)(je,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},48551:function(wn,sn,Ge){"use strict";Ge.d(sn,{SV:function(){return Ze},ZP:function(){return et}});var Qe=Ge(59301),Tt=Ge(76374);const oe={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},ze={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},je={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},ve={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},fe={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(` `)}]};var Pe=Ge(86061),Ce=Ge.n(Pe),Se=Object.defineProperty,we=Object.defineProperties,me=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(He,tt,ut)=>tt in He?Se(He,tt,{enumerable:!0,configurable:!0,writable:!0,value:ut}):He[tt]=ut,ae=(He,tt)=>{for(var ut in tt||(tt={}))de.call(tt,ut)&&ee(He,ut,tt[ut]);if(ye)for(var ut of ye(tt))z.call(tt,ut)&&ee(He,ut,tt[ut]);return He},re=(He,tt)=>we(He,me(tt)),le=(He,tt,ut)=>new Promise((We,Fe)=>{var Ie=Ye=>{try{vt(ut.next(Ye))}catch(At){Fe(At)}},Xe=Ye=>{try{vt(ut.throw(Ye))}catch(At){Fe(At)}},vt=Ye=>Ye.done?We(Ye.value):Promise.resolve(Ye.value).then(Ie,Xe);vt((ut=ut.apply(He,tt)).next())});const ue={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},pe=(He,tt)=>tt.map(ut=>({label:ut,kind:He.languages.CompletionItemKind.Keyword,insertText:ut})),Ee=He=>Object.keys(ue.tables).map(tt=>({label:tt,kind:He.languages.CompletionItemKind.Variable,insertText:tt})),be=(He,tt)=>{const ut=ue.tables[He];return ut?ut.map(We=>({label:We,kind:tt.languages.CompletionItemKind.Field,insertText:We})):[]};function Ne(He,tt,ut,We,Fe){let Ie=tt.getWordUntilPosition(ut),Xe={startLineNumber:ut.lineNumber,endLineNumber:ut.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},vt=We.map(Ye=>({label:Ye,kind:He.languages.CompletionItemKind.Keyword,insertText:Ye,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xe}));return Fe.map(Ye=>{vt.push(re(ae({},Ye),{range:Xe}))}),vt}var Te=He=>{ue.languages.map(Fe=>(He.languages.registerDocumentFormattingEditProvider(Fe,{provideDocumentFormattingEdits(Ie,Xe,vt){return le(this,null,function*(){const Ye=Ce()(Ie.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Ie.getFullModelRange(),text:Ye}]})}}),Fe));const tt=je.quickKey.map(Fe=>({label:Fe.label,kind:He.languages.CompletionItemKind.Method,insertText:Fe.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ut=ve.quickKey.map(Fe=>({label:Fe.label,kind:He.languages.CompletionItemKind.Method,insertText:Fe.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet})),We=ze.quickKey.map(Fe=>({label:Fe.label,kind:He.languages.CompletionItemKind.Method,insertText:Fe.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet}));He.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Fe,Ie){var Xe=Fe.getWordUntilPosition(Ie),vt={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn},Ye=Fe.getLineContent(Ie.lineNumber).substring(Xe.startColumn-2,Xe.endColumn);return{suggestions:[...je.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt})),...je.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Ye.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt}))]}}}),He.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Fe,Ie){var Xe=Fe.getWordUntilPosition(Ie),vt={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn};return{suggestions:[...oe.keywords.map(Ye=>({label:Ye,kind:He.languages.CompletionItemKind.Function,documentation:Ye,insertText:Ye,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt}))]}}}),He.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Fe,Ie){var Xe=Fe.getWordUntilPosition(Ie),vt={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn},Ye=Fe.getLineContent(Ie.lineNumber).substring(Xe.startColumn-2,Xe.endColumn);return{suggestions:[...ze.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt})),...ze.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Ye.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt}))]}}}),He.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Fe,Ie){var Xe=Fe.getWordUntilPosition(Ie),vt={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn},Ye=Fe.getLineContent(Ie.lineNumber).substring(Xe.startColumn-2,Xe.endColumn);return{suggestions:[...fe.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt})),...fe.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Ye.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt}))]}}}),He.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Fe,Ie){var Xe=Fe.getWordUntilPosition(Ie),vt={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn},Ye=Fe.getLineContent(Ie.lineNumber).substring(Xe.startColumn-2,Xe.endColumn);return{suggestions:[...ve.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt})),...ve.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Ye.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:vt}))]}}})};const ke="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Oe=Object.defineProperty,Be=(He,tt,ut)=>tt in He?Oe(He,tt,{enumerable:!0,configurable:!0,writable:!0,value:ut}):He[tt]=ut,Re=(He,tt,ut)=>Be(He,typeof tt!="symbol"?tt+"":tt,ut);const $e=class mx{constructor(tt,ut,We){this.placeholder=tt,this.editor=ut,this.monaco=We,ut.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};Re($e,"ID","editor.widget.placeholderHint");var Ve=$e,ot=Ge(96236),ct=Ge(8591),ft=Ge(6848),wt=Ge(89392),qe=Ge(86766),it=Ge(56102),pt=Object.defineProperty,Ct=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,Ot=(He,tt,ut)=>tt in He?pt(He,tt,{enumerable:!0,configurable:!0,writable:!0,value:ut}):He[tt]=ut,Lt=(He,tt)=>{for(var ut in tt||(tt={}))gt.call(tt,ut)&&Ot(He,ut,tt[ut]);if(mt)for(var ut of mt(tt))St.call(tt,ut)&&Ot(He,ut,tt[ut]);return He},Ut=(He,tt)=>Ct(He,xt(tt)),Et=(He,tt)=>{var ut={};for(var We in He)gt.call(He,We)&&tt.indexOf(We)<0&&(ut[We]=He[We]);if(He!=null&&mt)for(var We of mt(He))tt.indexOf(We)<0&&St.call(He,We)&&(ut[We]=He[We]);return ut},yt=(He,tt,ut)=>new Promise((We,Fe)=>{var Ie=Ye=>{try{vt(ut.next(Ye))}catch(At){Fe(At)}},Xe=Ye=>{try{vt(ut.throw(Ye))}catch(At){Fe(At)}},vt=Ye=>Ye.done?We(Ye.value):Promise.resolve(Ye.value).then(Ie,Xe);vt((ut=ut.apply(He,tt)).next())});function nt(He){return/^\d+$/.test(He)?`${He}px`:He}function Pt(){}let Ke=!1;const lt={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function bt(He=[]){let tt=He;if(Array.isArray(He)){for(let ut=0;ut{var tt=He,{width:ut="100%",height:We="100%",value:Fe,language:Ie="javascript",style:Xe={},options:vt={},overrideServices:Ye={},theme:At="vs-dark",onEditBlur:Gt,isCopy:on=!1,onSave:jt,autoHeight:Ht=!1,forbidCopy:qt=!1,onChange:cn=Pt,editorDidMount:Sn=Pt,onFocus:An=Pt,onBreakPoint:Vn=Pt,breakPointValue:Kn=[],filename:ar="educoder.txt",errorLine:xr,errorContent:mr="",highlightLine:pr,openBreakPoint:Pr=!1,placeholder:Vr=""}=tt,Ur=Et(tt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const Jr=(0,Qe.useRef)(),dr=(0,Qe.useRef)({}),at=(0,Qe.useRef)(),ei=(0,Qe.useRef)(),Dr=(0,Qe.useRef)([]),kn=(0,Qe.useRef)(!1),tr=(0,Qe.useRef)(),nr=(0,Qe.useRef)(),gr=(0,Qe.useRef)(!1),[Fn,Jt]=(0,Qe.useState)(!1);function Qt(){let rn;return Jr.current&&(rn=new Tt.Z(Pn=>{for(let nn of Pn)(nn.target.offsetHeight>0||nn.target.offsetWidth>0)&&dr.current.instance.layout()}),rn.observe(Jr.current)),rn}function $t(){ct.ZP.warning({content:decodeURIComponent(ke),key:"monaco-editor-tip"})}const Rt=()=>{let rn=dr.current.instance;if(Fe!=null&&rn&&Fn){const Pn=rn.getModel();Pn&&Fe!==Pn.getValue()&&(Ke=!0,Pn.setValue(Fe),rn.layout(),Ke=!1)}};(0,Qe.useEffect)(()=>{const rn=qe.Z.subscribe("formatDocument",Pn=>{var nn;let gn=dr.current.instance;(nn=gn==null?void 0:gn.getAction)==null||nn.call(gn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Pn=>{cn(Pn)},rn},[]),(0,Qe.useEffect)(()=>{var rn;let Pn=dr.current.instance;ei.current&&clearTimeout(ei.current),ei.current=setTimeout(()=>{Rt()},500),Fe&&(Fe!=null&&Fe.length)&&((rn=Pn==null?void 0:Pn.updateOptions)==null||rn.call(Pn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Fe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Fe,Fn,dr.current]),(0,Qe.useEffect)(()=>{if(xr&&dr.current&&dr.current.instance){let Pn=dr.current.instance;Pn.changeViewZones(function(nn){var gn=document.createElement("div");gn.style.padding="10px 20px",gn.style.width="calc(100% - 20px)",gn.className="my-error-line-wrp",gn.innerHTML=mr,nn.addZone({afterLineNumber:xr||11,heightInLines:3,domNode:gn})});var rn={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Pn.addOverlayWidget(rn),Pn.revealPositionInCenter({lineNumber:20,column:1})}},[xr,dr.current,Fn]);const ln=(rn="",Pn)=>{if(!rn||rn.trim()==="")return!0;const gn=dr.current.instance.getModel().getLineTokens(Pn);let pn=!1;for(let fn=0;fn<2;fn++)gn.getStandardTokenType(fn)===1&&(pn=!0);return pn};(0,Qe.useEffect)(()=>{var rn;const Pn=(rn=dr.current)==null?void 0:rn.instance;if(Pn&&Fn&&qt){const nn=Pn.onDidBlurEditorWidget(()=>{gr.current=!1}),gn=Pn.onDidFocusEditorText(()=>{gr.current=!0});return()=>{nn.dispose(),gn.dispose()}}},[dr.current,Fn,qt]),(0,Qe.useEffect)(()=>{var rn;if((rn=dr.current)!=null&&rn.instance&&Fn&&Pr){let Pn=dr.current.instance,nn=Pn.getModel();if(!nn)return;(()=>{var hr;let en=[],Xn=[];const lr=nn.getAllDecorations();for(let Mr of lr)Mr.options.className==="highlighted-line"&&(en.push((hr=Mr==null?void 0:Mr.range)==null?void 0:hr.startLineNumber),Xn.push(Mr==null?void 0:Mr.id));if(pr===en[0])return;nn.deltaDecorations(Xn,[]);const er=nn.getLineCount();pr&&pr<=er&&(Pn.deltaDecorations([],[{range:new ht.Range(pr,1,pr,nn.getLineMaxColumn(pr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Pn.revealLineInCenter(pr))})();const pn=(hr=!1)=>{var en;let Xn=[],lr=[];const er=nn.getAllDecorations();for(let Mr of er)Mr.options.linesDecorationsClassName==="breakpoints-select"&&(Xn.push((en=Mr==null?void 0:Mr.range)==null?void 0:en.startLineNumber),lr.push(Mr==null?void 0:Mr.id));if(hr)return{lines:Xn,ids:lr};Vn(Xn)},fn=hr=>yt(void 0,null,function*(){let en={range:new ht.Range(hr,1,hr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield nn.deltaDecorations([],[en]),pn()}),bn=hr=>yt(void 0,null,function*(){let en=[];const Xn=Pn.getLineDecorations(hr);for(let lr of Xn)lr.options.linesDecorationsClassName==="breakpoints-select"&&en.push(lr.id);yield nn.deltaDecorations(en,[]),pn()}),Tn=hr=>{let en=Pn.getLineDecorations(hr);for(let Xn of en)if(Xn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,wt.isEqual)(Kn,pn(!0).lines)){nn.deltaDecorations(pn(!0).ids,[]);const hr=Kn.map(en=>({range:new ht.Range(en,1,en,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));nn.deltaDecorations([],hr)}const Nn=Pn.onDidChangeModelContent(hr=>{let en=Pn.getPosition();if(en){let Xn=en.lineNumber;clearTimeout(nr.current),nr.current=setTimeout(()=>{ln(nn.getLineContent(Xn),Xn)?bn(Xn):Tn(Xn)?(bn(Xn),fn(Xn)):pn()},100)}}),Dn=Pn.onMouseDown(hr=>{var en,Xn,lr;if(hr.target.detail&&((lr=(Xn=(en=hr.target)==null?void 0:en.element)==null?void 0:Xn.className)!=null&&lr.includes("line-numbers"))){let er=hr.target.position.lineNumber;if(ln(nn.getLineContent(er),er))return;Tn(er)?bn(er):fn(er)}}),Mn=hr=>{let en={range:new ht.Range(hr,1,hr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Dr.current=Pn.deltaDecorations(Dr.current,[en])},Gn=()=>{Dr.current=Pn.deltaDecorations(Dr.current,[])},ur=Pn.onMouseMove(hr=>{var en,Xn,lr;if(Gn(),hr.target.detail&&((lr=(Xn=(en=hr.target)==null?void 0:en.element)==null?void 0:Xn.className)!=null&&lr.includes("line-numbers"))){let er=hr.target.position.lineNumber;if(ln(nn.getLineContent(er),er))return;Mn(er)}}),Er=Pn.onMouseLeave(()=>{Gn()});return()=>{Nn.dispose(),Dn.dispose(),ur.dispose(),Er.dispose()}}},[dr.current,Fn,Kn,pr,Pr,Ie]),(0,Qe.useEffect)(()=>{var rn;(rn=dr.current)!=null&&rn.instance&&Pr&&dr.current.instance.setPosition({lineNumber:0,column:0})},[pr]);function vn(){let rn=dr.current.instance;if(rn){const Pn=rn.getSelection(),nn=dr.current.pastePos||{},gn=new ht.Range(nn.startLineNumber||Pn.endLineNumber,nn.startColumn||Pn.endColumn,nn.endLineNumber||Pn.endLineNumber,nn.endColumn||Pn.endColumn);setTimeout(()=>{rn.executeEdits("",[{range:gn,text:""}])},300)}}function Vt(rn){(window.navigator.platform.match("Mac")?rn.metaKey:rn.ctrlKey)&&rn.keyCode==83&&(rn.preventDefault(),jt())}const Ft=()=>{if(Ht&&dr.current.instance){const rn=dr.current.instance.getContentHeight();_n(rn{if(!gr.current)return;const{keyCode:Pn,ctrlKey:nn,metaKey:gn,target:pn,type:fn}=rn;return(fn==="paste"||(Pn===67||Pn===86)&&(gn||nn))&&pn.nodeName==="TEXTAREA"&&($t(),rn.preventDefault()),!1};function jn(rn,Pn){var nn=window.URL||window.webkitURL||window,gn=new Blob([Pn]),pn=document.createElementNS("http://www.w3.org/1999/xhtml","a");pn.href=nn.createObjectURL(gn),pn.download=rn,dn(pn)}(0,Qe.useEffect)(()=>{Ft()},[Ft]),(0,Qe.useEffect)(()=>{Jr.current&&!Fn&&Promise.all([Ge.e(8909),Ge.e(1810)]).then(Ge.bind(Ge,71448)).then(rn=>{try{ht=rn,dr.current.instance=ht.editor.create(Jr.current,{value:Fe,language:bt(Ie),theme:At,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Ye);const Pn=dr.current.instance;let pn=[...ot.BH._menuItems].find(Nn=>Nn[0]._debugName=="EditorContext")[1],fn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],bn=(Nn,Dn)=>{var Mn,Gn;let ur=Nn._first;do Dn.includes((Gn=(Mn=ur.element)==null?void 0:Mn.command)==null?void 0:Gn.id)&&Nn._remove(ur);while(ur=ur.next)};if(Sn(Pn,ht),setTimeout(()=>{Ft(),dr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{jn(ar||"educoder.txt",Pn.getValue())}})},500),dr.current.subscription=Pn.onDidChangeModelContent(Nn=>{kn.current?clearTimeout(tr.current):(Ft(),cn(Pn.getValue(),Nn)),tr.current=setTimeout(()=>{kn.current=!1},500)}),window.Monaco||Te(ht,bt(Ie)),qt&&(bn(pn,fn),Jr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",mn),window.removeEventListener("paste",mn),window.addEventListener("keydown",mn),window.addEventListener("paste",mn)),window.Monaco=ht,Gt&&Pn.onDidBlurEditorWidget(()=>{Gt(Pn.getValue())}),An&&Pn.onDidFocusEditorText(()=>{An(Pn.getValue())}),qt)try{Pn.onDidPaste(Nn=>{const Dn=Pn.getSelection(),Mn=dr.current.pastePos||{},Gn=new ht.Range(Mn.startLineNumber||Dn.endLineNumber,Mn.startColumn||Dn.endColumn,Mn.endLineNumber||Dn.endLineNumber,Mn.endColumn||Dn.endColumn);Pn.executeEdits("",[{range:Nn.range,text:""}])})}catch(Nn){}let Tn=Qt();return Vr&&typeof Vr=="string"&&new Ve(Vr,Pn,ht),Jt(!0),()=>{const Nn=dr.current.instance;Nn.dispose();const Dn=Nn.getModel();Dn&&Dn.dispose(),dr.current.subscription&&dr.current.subscription.dispose(),Tn.unobserve(Jr.current)}}catch(Pn){}})},[]),(0,Qe.useEffect)(()=>{if(dr.current.instance&&Fn)return document.addEventListener("keydown",Vt,!1),()=>{document.removeEventListener("keydown",Vt)}},[jt,Fn]),(0,Qe.useEffect)(()=>{let rn=dr.current.instance;if(rn&&Fn){let Pn=bt(Ie);ht.editor.setModelLanguage(rn.getModel(),Pn)}},[Ie,Fn]),(0,Qe.useEffect)(()=>{dr.current.instance&&Fn&&ht.editor.setTheme(At)},[At,Fn]),(0,Qe.useEffect)(()=>{let rn=dr.current.instance;at.current=vt,rn&&Fn&&(rn.updateOptions(Lt({},vt)),setTimeout(()=>{rn.getModel().updateOptions(Lt({},vt))},200))},[JSON.stringify(vt),Fn]),(0,Qe.useEffect)(()=>{let rn=dr.current.instance;rn&&Fn&&rn.layout()},[ut,We,Fn]);const[hn,Zt]=(0,Qe.useState)(nt(ut)),[Cn,_n]=(0,Qe.useState)(nt(We)),Zn=Ut(Lt({},Xe),{width:hn,height:Cn,position:"relative"});return Qe.createElement("div",{className:"my-monaco-editor",ref:Jr,style:Zn},on&&Qe.createElement(it.CopyToClipboard,{text:Fe,onCopy:()=>ct.ZP.success("\u590D\u5236\u6210\u529F")},Qe.createElement(ft.Z,{title:"\u590D\u5236\u4EE3\u7801"},Qe.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Qe.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ze({width:He="100%",height:tt="100%",original:ut,modified:We,language:Fe,options:Ie={}}){const Xe=(0,Qe.useRef)(),[vt,Ye]=(0,Qe.useState)(null);function At(Ht){let qt;return Xe.current&&(qt=new Tt.Z(cn=>{for(let Sn of cn)(Sn.target.offsetHeight>0||Sn.target.offsetWidth>0)&&Ht.layout()}),qt.observe(Xe.current)),qt}(0,Qe.useEffect)(()=>(Xe.current&&Promise.all([Ge.e(8909),Ge.e(9404)]).then(Ge.bind(Ge,2550)).then(Ht=>{ht=Ht;const qt=ht.editor.createDiffEditor(Xe.current,Ut(Lt({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ie),{wordWrap:!0}));Ye(qt);let cn=At(qt);return()=>{qt.dispose();const Sn=qt.getModel();Sn&&Sn.dispose(),cn.unobserve(Xe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Qe.useEffect)(()=>{vt&&vt.setModel({original:ht.editor.createModel(ut,Fe),modified:ht.editor.createModel(We,Fe)})},[ut,We,Fe,vt]);const Gt=nt(He),on=nt(tt),jt={width:Gt,height:on};return Qe.createElement("div",{className:"my-diff-editor",ref:Xe,style:jt})}},26403:function(wn,sn,Ge){"use strict";var Qe=Ge(7543),Tt=Ge(57809),oe=Ge(78673),ze=Ge(59301);const je=Tt.default.Option;sn.Z=({isTheoretical:ve,onFontSizeChange:fe,cmFontSize:Pe,cmCodeMode:Ce,autoFormat:Se,onCodeModeChange:we,onTabToSpace:me,onAutoFormat:ye,formatDocument:de,className:z="",tabToSpace:ee,children:ae,code_editor:re,challenge:le})=>{const ue={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return ze.createElement("div",{className:`tpi-code-setting ${z}`},ze.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),ze.createElement("section",null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),ze.createElement(Tt.default,{bordered:!1,size:"small",value:Ce,onChange:we},ze.createElement(je,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ze.createElement(je,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!ve&&ze.createElement(ze.Fragment,null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),ze.createElement(Tt.default,{bordered:!1,size:"small",value:Pe,onChange:fe},ze.createElement(je,{value:12},"12px"),ze.createElement(je,{value:14},"14px"),ze.createElement(je,{value:16},"16px"),ze.createElement(je,{value:18},"18px"),ze.createElement(je,{value:20},"20px"),ze.createElement(je,{value:22},"22px"))),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"Tab\u8F6C\u6362"),ze.createElement(oe.Z,{checked:ee,onChange:me})),ze.createElement("div",{className:"file-item",onClick:de},ze.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!ve&&ze.createElement(ze.Fragment,null,ze.createElement("h3",null,"\u5FEB\u6377\u952E"),ze.createElement("section",null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),ze.createElement("span",null,"Ctrl + S")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),ze.createElement("span",null,"F1 / Alt + F1")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),ze.createElement("span",null,"Ctrl + ]/[")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),ze.createElement("span",null,"Ctrl + Shift + \\")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),ze.createElement("span",null,"Home")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),ze.createElement("span",null,"End"))),ae),!ve&&ze.createElement(ze.Fragment,null,ze.createElement("h3",null,"\u5FEB\u6377\u952E"),ze.createElement("section",null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),ze.createElement("span",null,ue[le==null?void 0:le.difficulty])),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),ze.createElement("span",null,re==null?void 0:re.name)),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),ze.createElement("span",null,re!=null&&re.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},94606:function(wn,sn,Ge){"use strict";Ge.d(sn,{jL:function(){return je},w9:function(){return gt},QD:function(){return cn},cQ:function(){return it},op:function(){return At},O5:function(){return gr},_b:function(){return xr},t7:function(){return re},Gi:function(){return yt},YG:function(){return Ut},qp:function(){return we},vr:function(){return Vn},qE:function(){return jt},Je:function(){return pe},wb:function(){return ot},cq:function(){return ht},tp:function(){return de}});var Qe=Ge(59301),Tt={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",je=({dataSource:Fn=[],img:Jt,imgWidth:Qt=346,title:$t,sunTitle:Rt,bannerExtraContent:ln})=>Qe.createElement("div",{className:Tt.banner},Qe.createElement("div",{className:Tt.content},Qe.createElement("aside",null,Qe.createElement("p",null,Qe.createElement("b",null,$t),Qe.createElement("span",null,Rt)),Fn.length>0&&Qe.createElement("div",{className:Tt.btns},Fn.map((vn,Vt)=>Qe.createElement("div",{key:Vt,onClick:vn.click},vn.name,vn.sign?Qe.createElement("img",{src:oe,width:39}):null))),ln),Jt&&Qe.createElement("img",{style:{marginTop:33,marginRight:38},src:Jt,width:Qt}))),ve={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},fe=Ge(92310),Pe=Ge.n(fe),Ce=Ge(89392),we=({dataSource:Fn=[],value:Jt,onChange:Qt,onTitleChange:$t,className:Rt,title:ln,titleWidth:vn=41,style:Vt={},fontColor:Ft="#6A7283",showCount:dn})=>{const[mn,jn]=(0,Qe.useState)(0),[hn,Zt]=(0,Qe.useState)(!1),Cn=(0,Qe.useRef)(null),_n=(0,Qe.useRef)(null);return(0,Qe.useEffect)(()=>{var Zn;Fn.length!==0&&(((Zn=Cn==null?void 0:Cn.current)==null?void 0:Zn.clientHeight)>97?jn(1):jn(0)),Fn.length===0&&jn(0),Zt(!1)},[Fn]),Qe.createElement("div",{className:Pe()(ve.row,Rt),style:Vt},Qe.createElement("div",{onClick:(0,Ce.throttle)(()=>$t==null?void 0:$t(),2e3),style:{width:vn,marginTop:hn?12:4},className:`${ve.title} ${$t?"current":""}`},ln),Qe.createElement("div",{className:hn?`${ve.tagsWrap} ${ve.tagsBorderWrap}`:ve.tagsWrap},Qe.createElement("div",{className:ve.bar,ref:_n,style:mn>0?{height:mn===1?97:"auto",overflow:mn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},Qe.createElement("div",{className:ve.tag,ref:Cn},Fn==null?void 0:Fn.map(Zn=>Qe.createElement("span",{onClick:()=>Qt(Zn.id),key:Zn.id,style:{color:Ft},className:Jt===Zn.id?ve.active:""},Qe.createElement("span",{title:Zn.name,className:ve.name},Zn.name),!!dn&&Qe.createElement("span",{className:ve.num},Zn.count))))),!!mn&&Qe.createElement(Qe.Fragment,null,mn===1?Qe.createElement("div",{onClick:()=>{var Zn;jn(2),((Zn=Cn==null?void 0:Cn.current)==null?void 0:Zn.clientHeight)>245?Zt(!0):Zt(!1)},className:ve.action},"\u5C55\u5F00",Qe.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):Qe.createElement("div",{onClick:()=>{_n.current.scrollTop=0,jn(1),Zt(!1)},className:ve.action},"\u6536\u8D77",Qe.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},me={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},de=({dataSource:Fn=[],value:Jt,onChange:Qt,className:$t,style:Rt={}})=>Qe.createElement("div",{style:Rt,className:Pe()(me.tabs,$t)},Fn.map(ln=>Qe.createElement("span",{onClick:()=>Qt(ln.id),className:Jt===ln.id?me.active:"",key:ln.id},ln.name))),z={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},ee=Ge(92832),re=({dataSource:Fn=[],value:Jt="",onChange:Qt,onInputChange:$t=()=>{},className:Rt,style:ln={},placeholder:vn,allowClear:Vt=!1})=>{var Ft;const[dn,mn]=(0,Qe.useState)(""),[jn,hn]=(0,Qe.useState)("");(0,Qe.useEffect)(()=>{var _n;let Zn=Jt;(_n=JSON.stringify(Jt))!=null&&_n.includes("{")&&(mn(Jt.id),Zn=Jt.value||"");try{hn(decodeURIComponent(Zn||""))}catch(rn){hn(decodeURIComponent(Zn||""))}},[Jt]);const Zt=()=>{Qt(encodeURIComponent(jn),dn||null)},Cn=_n=>{_n!==dn&&(mn(_n),Qt(encodeURIComponent(jn),_n))};return Qe.createElement("div",{className:Pe()(z.input,Rt),style:ln},!!Fn.length&&Qe.createElement("div",{className:z.dropdown},Qe.createElement("div",{className:z.text},(Ft=Fn.find(_n=>_n.id===dn))==null?void 0:Ft.name,Qe.createElement("i",{className:"iconfont icon-zhankai4"}),Qe.createElement("b",{className:z.b1}),Qe.createElement("b",{className:z.b2})),Qe.createElement("div",{className:z.menu},Fn.map((_n,Zn)=>Qe.createElement("div",{key:Zn,onClick:()=>Cn(_n.id)},_n.name)))),Qe.createElement(ee.default,{onPressEnter:Zt,value:jn,onChange:_n=>{hn(_n.target.value),$t(encodeURIComponent(_n.target.value),dn||null)},bordered:!1,placeholder:vn}),Qe.createElement("i",{onClick:Zt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},le={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},pe=({value:Fn,onChange:Jt,className:Qt,total:$t,pageSize:Rt,style:ln={}})=>{const vn=Fn<2,Vt=Fn>=Math.ceil($t/Rt);return $t<=Rt?Qe.createElement(Qe.Fragment,null):Qe.createElement("div",{className:Pe()(le.quickPager,Qt),style:ln},Qe.createElement("div",{onClick:()=>{vn||Jt(Fn-1,"prev")},className:vn?le.disabled:""},"\u4E0A\u4E00\u9875"),Qe.createElement("div",{onClick:()=>{Vt||Jt(Fn+1,"next")},className:Vt?le.disabled:""},"\u4E0B\u4E00\u9875"))},Ee={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},be=Ge(71418),Ne=Ge(6848),Te=Ge(39978),ke=Ge(10148),Oe=Ge(58130),Be=Ge(96908),Re=Ge(57177),$e=Ge(81378),_e=Ge(97267),ot=({className:Fn,dataSource:Jt=[],col:Qt=4,right:$t,bottom:Rt=23,precision:ln=0,wrapWidth:vn=1200,trackEventItems:Vt,loading:Ft})=>{const dn=Math.floor((vn-(Qt-1)*$t)/Qt);return Qe.createElement(be.Z,{spinning:Ft},Qe.createElement("div",{className:Pe()(Ee.list,Fn)},!!Jt.length&&Jt.map((mn,jn)=>{const{name:hn,id:Zt,identifier:Cn,power:_n,cover_image_id:Zn,pic:rn}=mn;return Qe.createElement("div",{className:Ee.wrap,key:Zt,style:{width:dn,marginRight:(1+jn)%Qt===0?0:$t+ln,marginBottom:Rt}},Qe.createElement("a",{target:"_blank",href:`/shixuns/${Cn}/challenges`,className:Ee.li,onClick:Pn=>{Pn.preventDefault(),Vt&&(0,Oe.L9)([Vt]),_n&&(0,Oe.xg)(`/shixuns/${Cn}/challenges`)}},Qe.createElement("div",{className:Ee.img},Qe.createElement("img",{className:Ee.cover,src:`${rn}`}),mn.is_jupyter&&Qe.createElement("img",{className:Ee.sign,src:Be}),mn.is_jupyter_lab&&Qe.createElement("img",{className:Ee.sign,src:Re}),mn.is_unity_3d&&Qe.createElement("img",{className:Ee.sign,src:$e})),Qe.createElement("div",{className:Ee.name},Qe.createElement(Ne.Z,{title:hn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},Qe.createElement("span",{className:Ee.e},hn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),Qe.createElement("div",{className:Ee.tags},Qe.createElement(Ne.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},Qe.createElement("span",null,Qe.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),Qe.createElement("span",null,mn.challenges_count))),!!mn.myshixuns_count&&Qe.createElement(Ne.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Qe.createElement("span",null,Qe.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),Qe.createElement("span",null,mn.myshixuns_count))),Qe.createElement(Ne.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},Qe.createElement("span",null,Qe.createElement("span",null,mn.level))),Qe.createElement("div",{className:Ee.rate},Qe.createElement(Te.Z,{allowHalf:!0,disabled:!0,defaultValue:mn.score_info}),Qe.createElement("span",null,"\xA0",mn.score_info?`${mn.score_info}\u5206`:"5\u5206")))),!_n&&Qe.createElement("div",{className:Ee.lockWrap},Qe.createElement("img",{src:`${ke.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Qe.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Jt.length&&Qe.createElement(_e.Z,null)))},ct={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},ft=Ge(2119),wt=Ge(59301),it=({className:Fn,dataSource:Jt=[],col:Qt=4,right:$t,bottom:Rt=23,precision:ln=0,wrapWidth:vn=1200,trackEventItems:Vt,loading:Ft,onRemove:dn=()=>{},isCurrent:mn=!0,showAlias:jn=!1})=>{const hn=Math.floor((vn-(Qt-1)*$t)/Qt),Zt=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return wt.createElement(be.Z,{spinning:Ft},wt.createElement("div",{className:Pe()(ct.list,Fn)},!!(Jt!=null&&Jt.length)&&(Jt==null?void 0:Jt.map((Cn,_n)=>{var Zn;const{name:rn,id:Pn,identifier:nn,featured:gn,school_name:pn,image_url:fn,excellent:bn,is_plan:Tn}=Cn;return wt.createElement("div",{key:Pn,className:ct.wrap,style:{width:hn,marginRight:(1+_n)%Qt===0?0:$t+ln,marginBottom:Rt}},wt.createElement("a",{className:ct.li,onClick:Nn=>{Nn.preventDefault(),Nn.stopPropagation(),Vt&&(0,Oe.L9)([Vt]),(0,Oe.xg)(`/paths/${nn}`)}},wt.createElement("div",{className:ct.img},wt.createElement("img",{className:ct.cover,src:`${fn}`}),mn&&(0,ft.bg)()&&(Cn==null?void 0:Cn.studying)&&wt.createElement("div",{className:`${ct.movebq} user-path-items`,onClick:Nn=>{Nn.stopPropagation(),dn(Cn)}},wt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),wt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Zn=Cn==null?void 0:Cn.subject_tags)==null?void 0:Zn.map((Nn,Dn)=>{var Mn,Gn;if(Dn===0){const Er=(Mn=Zt.find(hr=>hr.name==Nn))==null?void 0:Mn.swimg;return wt.createElement("img",{className:ct.sign,src:Er,style:{left:"-4px"}})}const ur=(Gn=Zt.find(Er=>Er.name==Nn))==null?void 0:Gn.ptimg;return wt.createElement("img",{className:ct.sign,src:ur,style:{left:`${48+52*(Dn-1)+2*Dn}px`}})}),wt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Cn==null?void 0:Cn.excellent)&&wt.createElement("div",{className:ct.bq},"\u5F00\u653E\u8BFE\u7A0B"))),wt.createElement("div",{className:ct.name},wt.createElement(Ne.Z,{title:jn&&(Cn!=null&&Cn.excellent_alias_name)?wt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${rn}`,wt.createElement("br",null),wt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Cn==null?void 0:Cn.excellent_alias_name}`)):rn},wt.createElement("span",{className:ct.e},jn&&(Cn==null?void 0:Cn.excellent_alias_name)||rn))),wt.createElement(Ne.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${pn}`},wt.createElement("div",{className:ct.unit},wt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),pn)),wt.createElement("div",{className:ct.tags},wt.createElement("div",null,wt.createElement(Ne.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},wt.createElement("span",null,wt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),wt.createElement("span",null,Cn.stages_count))),wt.createElement(Ne.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},wt.createElement("span",null,wt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),wt.createElement("span",null,Cn.members_count)))))))})),!Jt.length&&wt.createElement(_e.Z,null)))},pt={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",xt=Ge(59301),gt=({className:Fn,dataSource:Jt=[],col:Qt=4,right:$t,bottom:Rt=23,precision:ln=0,wrapWidth:vn=1200,trackEventItems:Vt,loading:Ft})=>{const dn=Math.floor((vn-(Qt-1)*$t)/Qt);return xt.createElement(be.Z,{spinning:Ft},xt.createElement("div",{className:Pe()(pt.list,Fn)},!!Jt.length&&Jt.map((mn,jn)=>{const{subject_identifier:hn,id:Zt,identifier:Cn,power:_n}=mn,Zn=mn.is_public!=0&&mn.is_public;return xt.createElement("div",{className:pt.wrap,key:Zt,style:{width:dn,marginRight:(1+jn)%Qt===0?0:$t+ln,marginBottom:Rt}},xt.createElement("a",{className:pt.li,onClick:rn=>{rn.preventDefault(),Vt&&(0,Oe.L9)([Vt]),(0,Oe.xg)(mn.first_category_url)}},xt.createElement("div",{className:pt.top},xt.createElement(Ne.Z,{title:mn.name},xt.createElement("div",{className:pt.name},mn.name)),xt.createElement("img",{className:pt.img,src:ke.Z.IMG_SERVER+"/images/"+mn.avatar_url}),xt.createElement("div",{className:pt.text,title:mn.creator},mn.creator),hn&&xt.createElement("div",{className:pt.btns},xt.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),xt.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Zn&&xt.createElement("div",{className:pt.sign},"\u516C\u5F00")),xt.createElement("div",{className:pt.bottom},mn.visits>0&&xt.createElement(Ne.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},xt.createElement("span",null,xt.createElement("i",{className:"iconfont icon-liulanyan"}),xt.createElement("span",null,mn.visits))),mn.course_members_count>0&&xt.createElement(Ne.Z,{title:"\u6210\u5458",placement:"bottom"},xt.createElement("span",null,xt.createElement("i",{className:"iconfont icon-chengyuan"}),mn.course_members_count)),mn.tasks_count>0&&xt.createElement(Ne.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},xt.createElement("span",null,xt.createElement("i",{className:"iconfont icon-zuoye"}),mn.tasks_count)),mn.is_end?xt.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):xt.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!mn.is_accessible&&xt.createElement("div",{className:pt.lockWrap},xt.createElement("img",{src:`${ke.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),xt.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Jt.length&&xt.createElement(_e.Z,null)))},St={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Ot=Ge(42203),Ut=({dataSource:Fn=[],value:Jt,onChange:Qt,className:$t,style:Rt={},tabBarExtraContent:ln})=>Qe.createElement("div",{className:Pe()(St.tabs,$t),style:Rt},Qe.createElement("div",{className:St.tabsWrap},Fn.map((vn,Vt)=>Qe.createElement("aside",{className:St.tab,onClick:()=>{Qt(vn.id),vn.link&&Ot.history.push(vn.link)},key:Vt},Qe.createElement("div",{className:Jt===vn.id?St.active:""},vn.name),(vn==null?void 0:vn.resetCount)==null&&(vn==null?void 0:vn.total)!==void 0&&Qe.createElement("span",null,"\uFF08",vn==null?void 0:vn.total,"\uFF09"),(vn==null?void 0:vn.resetCount)!==void 0&&(vn==null?void 0:vn.total)!==void 0&&Qe.createElement(Ne.Z,{title:(vn==null?void 0:vn.tip)!=null?vn==null?void 0:vn.tip:""},Qe.createElement("span",{style:{color:"#9096A3"}},"\uFF08",Qe.createElement("span",{style:{color:"#000"}},vn==null?void 0:vn.resetCount),"/",Qe.createElement("span",null,vn==null?void 0:vn.total),"\uFF09"))))),Qe.createElement("div",{className:St.tabBar},ln)),yt=({className:Fn,style:Jt={},children:Qt})=>Qe.createElement("div",{className:Pe()(Fn),style:Jt},Qt),nt={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Pt=Ge(38854),Ke=Ge(20834);const lt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ht=({sortValue:Fn,dropValue:Jt,className:Qt,onSort:$t,onDrop:Rt,dataSource:ln=lt})=>{var vn;return Qe.createElement("div",{className:Pe()(nt.orderWrap,Qt)},Qe.createElement(Pt.Z,{dropdownRender:()=>Qe.createElement(Ke.default,null,ln.map((Vt,Ft)=>Qe.createElement(Ke.default.Item,{key:Ft,onClick:()=>Rt(Vt.id)},Vt.name)))},Qe.createElement("span",{className:nt.orderTextWrap},(vn=ln.find(Vt=>Jt===Vt.id))==null?void 0:vn.name)),Qe.createElement("span",{className:nt.orderIconWrap},Qe.createElement("span",{className:nt.orderAsc},Qe.createElement("i",{className:Fn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${nt.cursorPointer} ${nt.active}`:`iconfont icon-sanjiaoxing-up font12 ${nt.cursorPointer}`,onClick:()=>$t(Fn==="asc"?"desc":"asc")})),Qe.createElement("span",{className:nt.orderDesc},Qe.createElement("i",{className:Fn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${nt.cursorPointer} ${nt.active}`:`iconfont icon-sanjiaoxing-down font12 ${nt.cursorPointer}`,onClick:()=>$t(Fn==="asc"?"desc":"asc")}))))},et={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Ze=Ge(3113),He=Object.defineProperty,tt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Fe=(Fn,Jt,Qt)=>Jt in Fn?He(Fn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):Fn[Jt]=Qt,Ie=(Fn,Jt)=>{for(var Qt in Jt||(Jt={}))ut.call(Jt,Qt)&&Fe(Fn,Qt,Jt[Qt]);if(tt)for(var Qt of tt(Jt))We.call(Jt,Qt)&&Fe(Fn,Qt,Jt[Qt]);return Fn},Xe=(Fn,Jt)=>{var Qt={};for(var $t in Fn)ut.call(Fn,$t)&&Jt.indexOf($t)<0&&(Qt[$t]=Fn[$t]);if(Fn!=null&&tt)for(var $t of tt(Fn))Jt.indexOf($t)<0&&We.call(Fn,$t)&&(Qt[$t]=Fn[$t]);return Qt},vt=(Fn,Jt,Qt)=>new Promise(($t,Rt)=>{var ln=Ft=>{try{Vt(Qt.next(Ft))}catch(dn){Rt(dn)}},vn=Ft=>{try{Vt(Qt.throw(Ft))}catch(dn){Rt(dn)}},Vt=Ft=>Ft.done?$t(Ft.value):Promise.resolve(Ft.value).then(ln,vn);Vt((Qt=Qt.apply(Fn,Jt)).next())}),At=Fn=>{var Jt=Fn,{className:Qt,style:$t,children:Rt,loading:ln=!1,openLoading:vn,onClick:Vt=()=>{},size:Ft="middle",shape:dn="round"}=Jt,mn=Xe(Jt,["className","style","children","loading","openLoading","onClick","size","shape"]);const[jn,hn]=(0,Qe.useState)(!1);return Qe.createElement(Ze.ZP,Ie({onClick:(0,Ce.throttle)(Zt=>vt(void 0,null,function*(){vn&&hn(!0);try{yield Vt(Zt)}catch(Cn){console.log("error",Cn)}vn&&hn(!1)}),2e3,{leading:!0,trailing:!1}),className:Pe()(et.btn,et[`${Ft}-${dn}`],Qt),style:$t,size:Ft,shape:dn,loading:jn||ln},mn),Rt)},Gt={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},jt=({className:Fn,style:Jt,children:Qt=null,onClick:$t,title:Rt})=>Qe.createElement("div",{className:Pe()(Gt.head,Fn),style:Jt},Qe.createElement("span",{className:"primary-hover",onClick:$t},Qe.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),Qe.createElement("b",{title:Rt},Rt),Qe.createElement("div",{className:Gt.node},Qt)),Ht={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},cn=({confirmShow:Fn=!0,confirmTitle:Jt,confirmClick:Qt,cancelShow:$t=!0,cancelTitle:Rt,cancelClick:ln,className:vn,style:Vt,confirmLoading:Ft=!1})=>Qe.createElement("div",{className:Pe()(Ht.btns,vn),style:Vt},Fn&&Qe.createElement(Ze.ZP,{loading:Ft,onClick:Qt,type:"primary",className:Ht.confirm},Jt),$t&&Qe.createElement(Ze.ZP,{onClick:ln,className:Ht.cancel},Rt)),Sn={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},Vn=({className:Fn,style:Jt={},LeftContent:Qt,children:$t,RightContent:Rt})=>Qe.createElement("div",{className:Pe()(Sn.fixedBottom,Fn),style:Jt},Qe.createElement("div",{className:Sn.wrap},Qe.createElement("div",{className:Sn.left},Qt),Qe.createElement("div",{className:Sn.center},$t),Qe.createElement("div",{className:Sn.right},Rt))),Kn={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},xr=({className:Fn,style:Jt={},dataSource:Qt=[]})=>Qe.createElement("div",{className:Pe()(Kn.crumbs,Fn),style:Jt},Qt.map(($t,Rt)=>RtOt.history.push($t.path)},$t.name):Qe.createElement("span",null,$t.name),Qe.createElement("span",null,"\xA0",">","\xA0")):Qe.createElement("span",{key:Rt,style:{color:"#5F6368"}},$t.name))),mr=Ge(31797),pr=Object.defineProperty,Pr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,Ur=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,at=(Fn,Jt,Qt)=>Jt in Fn?pr(Fn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):Fn[Jt]=Qt,ei=(Fn,Jt)=>{for(var Qt in Jt||(Jt={}))Jr.call(Jt,Qt)&&at(Fn,Qt,Jt[Qt]);if(Ur)for(var Qt of Ur(Jt))dr.call(Jt,Qt)&&at(Fn,Qt,Jt[Qt]);return Fn},Dr=(Fn,Jt)=>Pr(Fn,Vr(Jt)),kn=(Fn,Jt)=>{var Qt={};for(var $t in Fn)Jr.call(Fn,$t)&&Jt.indexOf($t)<0&&(Qt[$t]=Fn[$t]);if(Fn!=null&&Ur)for(var $t of Ur(Fn))Jt.indexOf($t)<0&&dr.call(Fn,$t)&&(Qt[$t]=Fn[$t]);return Qt};const{Countdown:tr}=mr.default;var gr=Fn=>{var Jt=Fn,{onChange:Qt}=Jt,$t=kn(Jt,["onChange"]);const[Rt,ln]=(0,Qe.useState)(null);(0,Qe.useEffect)(()=>{typeof Rt=="number"&&Rt>=0&&Qt(Rt)},[Rt]);const vn=Vt=>{const Ft=Math.floor(Vt/1e3);ln(Ft)};return Qe.createElement(tr,Dr(ei({},$t),{onChange:vn}))}},91300:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Tt}});var Qe=Ge(59301);function Tt(oe,ze){const je=(0,Qe.useRef)();(0,Qe.useEffect)(()=>{je.current=oe}),(0,Qe.useEffect)(()=>{function ve(){je.current()}if(ze!==null){let fe=setInterval(ve,ze);return()=>clearInterval(fe)}},[ze])}},84202:function(wn,sn,Ge){"use strict";Ge.d(sn,{Z:function(){return Be}});var Qe=Ge(59301),Tt=Ge(78241),oe=Ge(43428),ze=Ge(43418),je=Ge(8591),ve=Ge(24905),fe=Ge(48551),Pe=Ge(26403),Ce=Ge(50474),Se=Ge(49371),we={"code-panel-container":"code-panel-container___RFtv_","action-oj-bar":"action-oj-bar___ByFmZ",active:"active___s9gT5",tip:"tip___XZhl7"},me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAcCAYAAAAJKR1YAAAAAXNSR0IArs4c6QAAA8pJREFUWEfdl1toHUUYx//f7p7LbnIuSU4bk2JqS3qxbTA9FsQXBamJNMVS8CEPAfGhakQFUaHQh2Kp4IPgBfTBBx9UUHyQGgslscGCIr2QHlpfWg1pktPW0rTunvttdqadTY85yUmTTXJSwe9pZ3dm/r/5f8PMtzQYs96FwEEI0Yj/KojGVUV5Y3dn8DgNnrduV8IQAWtCXty0iggYGmybI1vgiIS8MFNF2Hx1qInoRFc0vIcGR0xRKaEqQGuTH/GpPBqDHjDGkczaWBfxOZAlNqt77eiIznZHw09UAWkqIaCrEKDaiVXNJJDMMPDKtc0HJBE624PwaMoqwkxPnciUcDmemdGZD8irETrbQ6sOIwVKjCM2mvyfAp25VsTjLV7Ml9kEB0gAQXVho2vm0MCfOXwxksbeTTpe3VU/S5UBOJ6afvWMsTBUTYDKMA/Vq/hgdxgRvXrzT5SA03nAtwjUioHcwJTtcgO1IqClwLiFWjYQ48BbQyaumAz7thg4EK1zdSwUBPBzFkhz4DEv8KjMYUUsG0jOkSoIHPrFwpjJ0LujDn0dxoJQEuZUFjA5sN0HdHiru68IaClQbmBqdjBWOtXXUYfeHbOdkvfu8Bxn4qyAj1Pj2KgZ6NEjeETTHbtW7FDZdAl19NcEXuysx7aIVpWLWB7OgVlOk31X/JD1F+IsBxWE/kAbnvSFage02I5mEBhjOWzWZtyT7cPWKDgEfKTgw4atCHDlwdxl54pJfJqcwJFwOzbcS49cxDeZv3EiN+Wsp9dowXPepgcD9GP2Jr7P3kCbpuNoeBPKV9rZYgKfJCccoKf9jXjJ37o4kELT9ZAmy8ZlxnD+H3yZvuqM3m804wWjGb8VLHyVuY4Ml7cdsFdfix6K4NJkekblfhWjz6MgWFe9Wd3ymcTwkTqOcultQEUWcmvPxAF7HYJJDcyuKBkrgBIAgm4F3fQ7bSRwxpDTzh99ZguabM/sj0Qnu6PhZ2loxHpfEN6GEHMOdzfS9+8T01OQYEWq/k1pK/mxP7H238FEZAlQf3c09J1Tyf8eF3ohm1r0kmJ58R5n/DW3qNwvXvmh3hzLodBqonREAOvLY0PQ3nw5//C3sh3YHEjsIirJZ9e/FsPnc+sZCpeX5CTRaNPO0DYptmfy4lMATkEIR5MASzV8bQNrtt4r6aZRXQMNxcyvBUefW3fK/UhRXu/aGfpMtnsmL3wuBPodYcJ1TyC4/VjDBqtyTldAJ/9IN/MiOyYISz4PCOJGV7RhnxR9fupSwM4VBwBMKJrvnZ9at9yau8A7ulgdO7eZq+0AAAAASUVORK5CYII=",ye=Ge(89392),de=Ge(94606),z=Ge(59301),ee=Object.defineProperty,ae=Object.defineProperties,re=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,Ee=($e,_e,Ve)=>_e in $e?ee($e,_e,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):$e[_e]=Ve,be=($e,_e)=>{for(var Ve in _e||(_e={}))ue.call(_e,Ve)&&Ee($e,Ve,_e[Ve]);if(le)for(var Ve of le(_e))pe.call(_e,Ve)&&Ee($e,Ve,_e[Ve]);return $e},Ne=($e,_e)=>ae($e,re(_e));const Te={theme:(0,Se.G)("cmCodeMode","vs-dark"),fontSize:(0,Se.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,Se.G)("cmTabToSpace",!0)};var ke=($e=>($e[$e.set_font_size=0]="set_font_size",$e[$e.set_theme=1]="set_theme",$e[$e.on_tab_to_space=2]="on_tab_to_space",$e[$e.set_show_editor_setting=3]="set_show_editor_setting",$e))(ke||{});function Oe($e,_e){switch(_e.type){case 3:return Ne(be({},$e),{showEditorSetting:_e.payload});case 1:return Ne(be({},$e),{theme:_e.payload});case 0:return Ne(be({},$e),{fontSize:_e.payload});case 2:return Ne(be({},$e),{tabToSpace:_e.payload});default:throw new Error}}var Be=({isLoading:$e,value:_e=[],onChange:Ve,form:ot})=>{var ct;const[ft,wt]=(0,Qe.useReducer)(Oe,Te),{theme:qe,fontSize:it,showEditorSetting:pt,tabToSpace:Ct}=ft,[xt,mt]=(0,Qe.useState)("C"),[gt,St]=(0,Qe.useState)(!1),[Ot,Lt]=(0,Qe.useState)([]),Ut=(0,Qe.useRef)([]),Et=Tt.default.useWatch(["hack","languages"],ot);(0,Qe.useEffect)(()=>{_e!=null&&_e.length&&(Ut.current=(0,ye.cloneDeep)(_e))},[_e]),(0,Qe.useEffect)(()=>{gt&&Lt(Et)},[gt]),(0,Qe.useEffect)(()=>{mt(Et==null?void 0:Et[0])},[Et]);const yt={onFontSizeChange:ht=>{wt({type:0,payload:ht}),(0,Se.t)("cmFontSize",ht)},tabToSpace:Ct,cmFontSize:it,className:"oj",cmCodeMode:qe,onTabToSpace:ht=>{wt({type:2,payload:ht}),(0,Se.t)("cmTabToSpace",ht)},onCodeModeChange:ht=>{wt({type:1,payload:ht}),(0,Se.t)("cmCodeMode",ht)}};function nt(){wt({type:3,payload:!1})}function Pt(){wt({type:3,payload:!0})}function Ke(ht){var et;const Ze=(et=Ut.current)==null?void 0:et.map(He=>(He.language===xt&&(He.code=ht),He));Ut.current=(0,ye.cloneDeep)(Ze),Ve(Ze)}const lt={key:xt,value:(ct=_e==null?void 0:_e.find(ht=>ht.language===xt))==null?void 0:ct.code,language:xt,onChange:Ke,theme:"vs",height:"calc(100% - 40px)",options:{fontSize:it,insertSpaces:Ct}};console.log(888,_e,Et);const bt=_e.filter(ht=>Et==null?void 0:Et.includes(ht.language));return z.createElement(Qe.Fragment,null,z.createElement("div",{className:we["code-panel-container"]},z.createElement(Re,{setVisible:St,languageItems:bt,onLanguage:ht=>mt(ht),language:xt,onShowCodeSetting:Pt}),!$e&&z.createElement(fe.ZP,be({},lt))),z.createElement(Ce.Z,null,z.createElement(oe.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:pt,onClose:nt},z.createElement(Pe.Z,be({},yt)))),z.createElement(ze.default,{centered:!0,open:gt,title:"\u7F16\u7A0B\u8BED\u8A00\u914D\u7F6E",width:564,onOk:()=>{if(!Ot.length){je.ZP.warning("\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00");return}ot.setFieldValue(["hack","languages"],Ot),St(!1)},onCancel:()=>St(!1)},z.createElement("div",{style:{background:"#F6F7F9",padding:"20px 20px 20px 26px"}},z.createElement(ve.default.Group,{value:Ot,options:[{label:"C\u8BED\u8A00",value:"C"},{label:"C++\u8BED\u8A00",value:"C++",style:{marginLeft:30}},{label:"Java\u8BED\u8A00",value:"Java",style:{marginLeft:30}},{label:"Python\u8BED\u8A00",value:"Python",style:{marginLeft:30}}],onChange:ht=>{Lt(ht)}}))))};function Re({languageItems:$e,language:_e,onShowCodeSetting:Ve,onLanguage:ot,setVisible:ct}){return z.createElement("div",{className:we["action-oj-bar"]},$e==null?void 0:$e.map(ft=>z.createElement("aside",{className:_e===(ft==null?void 0:ft.language)?we.active:"",onClick:()=>ot(ft==null?void 0:ft.language),key:ft==null?void 0:ft.language},z.createElement("i",{className:"iconfont icon-bianchengyuyan1"}),z.createElement("span",null,ft==null?void 0:ft.language))),z.createElement("div",{className:we.tip},z.createElement("i",{className:"iconfont icon-tishi12 font14",style:{color:"#FEB636",marginRight:3}}),z.createElement("span",null,"\u8BBE\u7F6E\u521D\u59CB\u4EE3\u7801\uFF0C\u4E3A\u5B66\u751F\u63D0\u4F9B\u660E\u786E\u7F16\u8BD1\u8D77\u70B9")),z.createElement(de.op,{onClick:()=>ct(!0),shape:"default"},z.createElement("img",{src:me,width:18,style:{marginRight:8}}),"\u7F16\u7A0B\u8BED\u8A00\u914D\u7F6E"))}},83890:function(wn,sn,Ge){"use strict";Ge.d(sn,{GM:function(){return Pe},MK:function(){return fe},PR:function(){return Tt},ZS:function(){return Se},d1:function(){return oe},fu:function(){return ze},j2:function(){return Ce},l_:function(){return je},uE:function(){return we},zQ:function(){return ve}});var Qe=Ge(70635);function Tt(){return(0,Qe.U2)("problems/new.json")}function oe(ye="question"){return(0,Qe.U2)("disciplines.json",{source:ye})}function ze(ye){return(0,Qe.U2)(`problems/${ye}/edit.json`)}function je(ye,de){return(0,Qe.gz)(`problems/${ye}.json`,de)}function ve(ye){return(0,Qe.v_)("problems.json",ye)}function fe(ye,de){return(0,Qe.v_)(`exercises/${ye}/exercise_questions.json`,de)}function Pe(ye,de){return(0,Qe.gz)(`exercise_questions/${ye}.json`,de)}function Ce(ye){return(0,Qe.v_)(`problems/${ye}/publish.json`)}function Se(ye){return(0,Qe.v_)(`problems/${ye}/cancel_publish.json`)}function we(ye){return(0,Qe.U2)(`problems/${ye}/start.json`)}function me(ye,de){return post("tag_disciplines.json",{name:de,sub_discipline_id:ye})}},17637:function(wn,sn,Ge){"use strict";Ge.d(sn,{D0:function(){return fe},R8:function(){return ze},jw:function(){return ve},y3:function(){return Pe}});var Qe=Ge(57809),Tt=Ge(59301);const{Option:oe}=Qe.default;var ze=(Ce=>(Ce[Ce.language=0]="language",Ce[Ce.difficult=1]="difficult",Ce[Ce.category=2]="category",Ce[Ce.openOrNot=3]="openOrNot",Ce))(ze||{});const je={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}],2:[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}],3:[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]};function ve(Ce){return je[Ce].map(Se=>Tt.createElement(oe,{key:Se.title,value:Se.key}," ",Se.title," "))}function fe(Ce,Se){Ce.map(we=>{const{id:me,name:ye,sub_disciplines:de}=we;let z={value:me,label:ye};Se.push(z),de&&de.length>0&&(z.children=[],fe(de,z.children))})}function Pe(Ce,Se){var we;let me=[];for(let ye=0;ye0){me[0]=de.id;for(let z=0;zqe in wt?pe(wt,qe,{enumerable:!0,configurable:!0,writable:!0,value:it}):wt[qe]=it,Be=(wt,qe)=>{for(var it in qe||(qe={}))Te.call(qe,it)&&Oe(wt,it,qe[it]);if(Ne)for(var it of Ne(qe))ke.call(qe,it)&&Oe(wt,it,qe[it]);return wt},Re=(wt,qe)=>Ee(wt,be(qe)),$e=(wt,qe,it)=>new Promise((pt,Ct)=>{var xt=St=>{try{gt(it.next(St))}catch(Ot){Ct(Ot)}},mt=St=>{try{gt(it.throw(St))}catch(Ot){Ct(Ot)}},gt=St=>St.done?pt(St.value):Promise.resolve(St.value).then(xt,mt);gt((it=it.apply(wt,qe)).next())});const{Dragger:_e}=Tt.default,Ve=wt=>{const qe=Ot=>Ot&&Ot.substring(0,Ot.lastIndexOf("."));for(var it=[...wt],pt=0,Ct=[],xt=0;xt{if(Ot.forEach(Lt=>{let Ut=Lt.name.split(/\.(?=[^\.]+$)/);Lt.name=`${Ut[0]}.${Ut[1].toLowerCase()}`}),Ot[0].name.includes(".in"))return Ot.length===2?Ot:[Ot[0],{}];if(Ot[0].name.includes(".out"))return Ot.length===2?Ot.reverse():[{},Ot[0]]})},ot=({onClose:wt,onOK:qe,visible:it,wrapClassName:pt,rootIdentifier:Ct,multiple:xt=!1,defaultMultipleValue:mt=!0})=>{const[gt,St]=(0,Qe.useState)([]),[Ot,Lt]=(0,Qe.useState)({}),[Ut,Et]=(0,Qe.useState)(!1),[yt,nt]=(0,Qe.useState)(!0),Pt=(0,Qe.useRef)([]),Ke=(0,Qe.useRef)(0),lt=()=>{wt()};(0,Qe.useEffect)(()=>{bt()},[]),(0,Qe.useEffect)(()=>{it&&(Pt.current=[],Ke.current=0,St([]),nt(mt))},[it]);const bt=()=>$e(void 0,null,function*(){try{const Fe=yield(0,ee.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Ie=JSON.parse((0,z.pe)(Fe.data));Lt(Ie)}catch(Fe){}}),ht=Fe=>Fe&&Fe.substring(0,Fe.lastIndexOf(".")),et=Fe=>{var Ie,Xe;const vt=ht((Ie=Fe[0])==null?void 0:Ie.name)||ht((Xe=Fe[1])==null?void 0:Xe.name),Ye=gt.filter(At=>ht(At.name)!==vt);Pt.current=[...Ye],St([...Ye])},Ze=Fe=>{if(!yt){const Gt=new FormData;Gt.append("file",Fe.file),(0,ee.ZP)("/api/attachments/get_file_content.json",{method:"post",body:Gt},!0).then(jt=>{if(jt.status===0){Ke.current=Ke.current+1;const Ht=Pt.current.map(qt=>{var cn;if(qt.name===Fe.name){const Sn=Be({},qt);return(cn=Fe==null?void 0:Fe.name)!=null&&cn.includes(".in")?Sn.input=jt==null?void 0:jt.content:Sn.output=jt==null?void 0:jt.content,Sn}return qt});if(Pt.current=[...Ht],St([...Ht]),Ke.current>0&&Ke.current===gt.length){Et(!1);let qt=Ve(Ht);qt=qt.filter(cn=>{var Sn,An;return!!((Sn=cn[0])!=null&&Sn.name&&((An=cn[1])!=null&&An.name))}),qt=qt.map(cn=>Re(Be(Be({},cn[0]),cn[1]),{is_file:!1})),qe(qt),wt()}}else Et(!1),wt()});return}const Ie=new(de())({endpoint:Ot.end_point,region:Ot.region,accessKeyId:Ot.access_key_id,accessKeySecret:Ot.access_key_secret,bucket:Ot.bucket,stsToken:Ot.security_token}),Xe=Fe.name,vt={container_type:"TestSet",file_name:Xe},Ye=(0,ae.Z)();let At=`testsets/${Ct}/${Ye}${Xe.indexOf(".")>-1?"."+Xe.split(".").pop():""}`;Ct===null&&(At=`testsets/${Ye}${Xe.indexOf(".")>-1?"."+Xe.split(".").pop():""}`),Ie.multipartUpload(At,new Blob([Fe.file],{type:Fe.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Xe+""},url:Ot==null?void 0:Ot.callback_url,host:Ot==null?void 0:Ot.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ee.rz)(vt)}}).then(function(Gt){if(Gt.data.status===0){Ke.current=Ke.current+1;const on=Pt.current.map(jt=>{var Ht,qt,cn,Sn,An,Vn,Kn,ar,xr,mr,pr,Pr,Vr,Ur,Jr,dr,at;if(jt.name===((qt=(Ht=Gt.data)==null?void 0:Ht.data)==null?void 0:qt.file_name)){const ei=Be({},jt);return(An=(Sn=(cn=Gt.data)==null?void 0:cn.data)==null?void 0:Sn.file_name)!=null&&An.includes(".in")?(ei.in_object_key=(Kn=(Vn=Gt.data)==null?void 0:Vn.data)==null?void 0:Kn.object,ei.in_object_size=(xr=(ar=Gt.data)==null?void 0:ar.data)==null?void 0:xr.size,ei.input=(pr=(mr=Gt.data)==null?void 0:mr.data)==null?void 0:pr.file_name,ei.in_file=Fe):(ei.out_object_key=(Vr=(Pr=Gt.data)==null?void 0:Pr.data)==null?void 0:Vr.object,ei.out_object_size=(Jr=(Ur=Gt.data)==null?void 0:Ur.data)==null?void 0:Jr.size,ei.output=(at=(dr=Gt.data)==null?void 0:dr.data)==null?void 0:at.file_name,ei.out_file=Fe),ei}return jt});if(Pt.current=[...on],St([...on]),Ke.current>0&&Ke.current===gt.length){Et(!1);let jt=Ve(on);jt=jt.filter(Ht=>{var qt,cn;return!!((qt=Ht[0])!=null&&qt.name&&((cn=Ht[1])!=null&&cn.name))}),jt=jt.map(Ht=>Re(Be(Be({},Ht[0]),Ht[1]),{is_file:!0})),qe(jt),wt()}}})},He=Fe=>new Promise((Ie,Xe)=>{let vt=0,Ye=[];for(let At=0;At{vt++,vt===Fe.length&&(Ye.length?(oe.ZP.warning(`${Ye.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Xe()):Ie(Fe))}).catch(Gt=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Gt),vt++,Ye.push(Fe[At].name),vt===Fe.length&&(Ye.length?(oe.ZP.warning(`${Ye.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Xe()):Ie(Fe))})}),tt=()=>$e(void 0,null,function*(){if(gt.length===0){oe.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield He(gt),Et(!0),Ve(gt).some(Ie=>{var Xe,vt;return!((Xe=Ie[0])!=null&&Xe.name&&((vt=Ie[1])!=null&&vt.name))})){ze.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>$e(void 0,null,function*(){gt.map(Ie=>$e(void 0,null,function*(){Ze(Ie)}))}),onCancel:()=>{Et(!1)}});return}gt.map(Ie=>$e(void 0,null,function*(){Ze(Ie)}))}),ut={name:"file",fileList:gt,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:Fe=>{if(gt!=null&>.some(Xe=>Xe.name===Fe.name))return oe.ZP.info(`${Fe.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(Fe.size/1024/1024>100)return oe.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Fe.name))return oe.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const Ie={name:Fe.name,uid:Fe.uid,file:Fe,percent:0};return gt.push(Ie),Pt.current=[...gt],St([...gt]),!1}},We=Ve(gt);return console.log(gt,We,"fileList"),ue.createElement(ze.default,{open:it,wrapClassName:pt,onOk:tt,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Ut},onCancel:lt,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:we.wrap},gt.length?ue.createElement("div",null,ue.createElement(je.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:xt?"visible":"hidden"}},ue.createElement("span",{className:we.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(ve.ZP.Group,{className:`ml20 ${we.testCaseRadio}`,optionType:"button",value:yt,onChange:Fe=>nt(Fe.target.value)},ue.createElement(ve.ZP,{value:!1},"\u6587\u672C"),ue.createElement(ve.ZP,{value:!0},"\u6587\u4EF6"))),ue.createElement(Tt.default,Be({},ut),ue.createElement(fe.ZP,{type:"primary",className:we.btnS},ue.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ue.createElement(ct,{data:We,onRemove:et})):ue.createElement("div",{className:`${we.noData} mb30`},ue.createElement(Tt.default.Dragger,Re(Be({},ut),{className:we.dragger}),ue.createElement("img",{src:me,alt:"",className:"mb20"}),ue.createElement("div",null,ue.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),ue.createElement("span",{className:we.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ue.createElement("div",{className:we.text},ue.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),ue.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",ue.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",ue.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",ue.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",ue.createElement("br",null))))},ct=({data:wt=[],onRemove:qe,width:it="auto",showScore:pt=!1,disabled:Ct=!1,inputChange:xt,onEvaluatingChange:mt,onSelectAll:gt,checkAll1:St,checkAll2:Ot,checkAll3:Lt,checkAll4:Ut,checkAll5:Et,showEvaluatingSetting:yt=!1,className:nt="",isProgramHomework:Pt=!1})=>{const Ke={value:"",filename:"",dataUrl:""},[lt,bt]=(0,Qe.useState)(Be({},Ke)),ht=He=>{let tt=document.createElement("a");document.body.appendChild(tt);let ut=URL.createObjectURL(He.file);tt.href=ut,tt.download=He.name,tt.click(),URL.revokeObjectURL(ut),document.body.removeChild(tt)},et=(He,tt)=>{(0,re.LR)(He,tt)},Ze=(He,tt)=>{ze.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ue.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{qe(He,tt)},onCancel:()=>{}})};return wt.length?ue.createElement("div",{className:nt,style:{width:it}},ue.createElement("div",{className:`${Pt?we.headProgram:we.head}`},yt&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(Pe.default,{checked:St,onChange:He=>{gt(He.target.checked,"hidden")}}),ue.createElement(Ce.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{style:{width:Pt?"25%":"15%"}},"\u7528\u4F8B"),ue.createElement("div",{style:{width:pt?Pt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:pt?Pt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),pt&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),yt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(Pe.default,{checked:Ut,onChange:He=>{gt(He.target.checked,"input_visible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),yt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(Pe.default,{checked:Ot,onChange:He=>{gt(He.target.checked,"is_invisible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),yt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(Pe.default,{checked:Et,onChange:He=>{gt(He.target.checked,"actual_output_visible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),yt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(Pe.default,{checked:Lt,onChange:He=>{gt(He.target.checked,"last_match_rule")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{className:we.operation,style:Pt?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ue.createElement("div",{className:we.listWrapper,style:{boxShadow:Pt?"0px 2px 4px 0px #EAEEF4":"unset"}},wt.map((He,tt)=>{var ut,We,Fe,Ie;return ue.createElement("div",{key:tt,className:we.list,style:Pt?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},yt&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(Pe.default,{checked:!!He.hidden,onChange:Xe=>{mt(Xe.target.checked,tt,"hidden")}})),ue.createElement("div",{style:{width:Pt?"25%":"15%",paddingLeft:Pt?"5px":"0px",paddingRight:Pt?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",tt+1),ue.createElement("div",{className:we.info,style:{width:pt?Pt?"20%":"15%":"25%"}},ue.createElement("span",{title:He.input||((ut=He[0])==null?void 0:ut.name),onClick:()=>$e(void 0,null,function*(){let Xe;He.input?He.input_file_url?Xe=He.input_file_url:Xe=He.in_file:Xe=He[0];let vt;typeof Xe=="string"?(vt=yield fetch(Xe,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),bt({value:yield vt.text(),filename:"",dataUrl:Xe})):(vt=yield(0,re.db)(Xe.file),bt({value:vt.text,filename:Xe.name,dataUrl:vt.link}))})},He.input||((We=He[0])==null?void 0:We.name))),ue.createElement("div",{className:we.info,style:{width:pt?Pt?"20%":"15%":"25%"}},ue.createElement("span",{title:He.output||((Fe=He[1])==null?void 0:Fe.name),onClick:()=>$e(void 0,null,function*(){let Xe;He.input?He.output_file_url?Xe=He.output_file_url:Xe=He.out_file:Xe=He[1];let vt;typeof Xe=="string"?(vt=yield fetch(Xe,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),bt({value:yield vt.text(),filename:"",dataUrl:Xe})):(vt=yield(0,re.db)(Xe.file),bt({value:vt.text,filename:Xe.name,dataUrl:vt.link}))})},He.output||((Ie=He[1])==null?void 0:Ie.name))),pt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Se.default,{size:"large",addonAfter:Pt?"%":null,disabled:Ct,style:{width:"80%"},onChange:Xe=>xt(Xe,tt),value:He.score}),!Pt&&ue.createElement("span",null,"\xA0%")),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Pe.default,{checked:He.input_visible||!1,onChange:Xe=>{mt(Xe.target.checked,tt,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Pe.default,{checked:He.is_invisible||!1,onChange:Xe=>{mt(Xe.target.checked,tt,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Pe.default,{checked:He.actual_output_visible||!1,onChange:Xe=>{mt(Xe.target.checked,tt,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Pe.default,{checked:He.last_match_rule||!1,onChange:Xe=>{mt(Xe.target.checked,tt,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ue.createElement("div",{onClick:()=>Ze(He,tt),style:Pt?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ue.createElement("span",{className:we.del},"\u5220\u9664")))})),ue.createElement(le.Z,{close:!0,data:lt.dataUrl,filename:lt.filename,type:lt.dataUrl.length?"txt":"",onClose:()=>bt(Be({},Ke)),monacoEditor:{value:lt.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var ft=ot},71424:function(wn,sn,Ge){"use strict";Ge.d(sn,{c:function(){return Tt}});var Qe=(oe=>(oe.FirstPage="firstPage",oe.PrevPage="prevPage",oe.NextPage="nextPage",oe))(Qe||{}),Tt=(oe=>(oe[oe.Single=0]="Single",oe[oe.Multiple=1]="Multiple",oe[oe.Judge=2]="Judge",oe[oe.Fill=3]="Fill",oe[oe.Subjective=4]="Subjective",oe[oe.Shixun=5]="Shixun",oe[oe.Program=6]="Program",oe[oe.Combine=7]="Combine",oe))(Tt||{})},31087:function(wn,sn,Ge){"use strict";Ge.d(sn,{AL:function(){return pe},Iy:function(){return we},Qv:function(){return de},ez:function(){return ue},jb:function(){return me}});var Qe=Ge(32834),Tt=Ge.n(Qe),oe=Ge(11690),ze=Ge.n(oe);let je=1;function ve(ke,Oe){const Be=ke.match(/^(\s+)(?:```)/);if(Be===null)return Oe;const Re=Be[1];return Oe.split(` `).map($e=>{const _e=$e.match(/^\s+/);if(_e===null)return $e;const[Ve]=_e;return Ve.length>=Re.length?$e.slice(Re.length):$e}).join(` `)}let fe=[],Pe=["