think/packages/client/public/diagram.min.js

1 line
1.6 MiB
JavaScript
Raw Normal View History

window.urlParams=window.urlParams||{},window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760,window.MAX_AREA=window.MAX_AREA||225e6,window.mxBasePath="/diagram",window.RESOURCES_PATH="/diagram/resources",window.STENCIL_PATH="/diagram/stencils",window.IMAGE_PATH="/diagram/images";var HoverIcons=function(){},mxCellEditorGetInitialValue=function(){},mxCellEditorGetCurrentValue=function(){},mxGraphHandlerIsValidDropTarget=function(){},Format=function(){},BaseFormatPanel=function(){},ArrangePanel=function(){},TextFormatPanel=function(){},StyleFormatPanel=function(){},DiagramStylePanel=function(){},DiagramFormatPanel=function(){},Menus=function(){},mxJSColor={dir:"",bindClass:"color",binding:!0,preloading:!0,install:function(){},init:function(){mxJSColor.preloading&&mxJSColor.preload()},getDir:function(){var t;return mxJSColor.dir||(t=mxJSColor.detectDir(),mxJSColor.dir=!1!==t?t:"jscolor/"),mxJSColor.dir},detectDir:function(){for(var t=location.href,e=document.getElementsByTagName("base"),n=0;n<e.length;n+=1)e[n].href&&(t=e[n].href);for(e=document.getElementsByTagName("script"),n=0;n<e.length;n+=1)if(e[n].src&&/(^|\/)jscolor\.js([?#].*)?$/i.test(e[n].src)){var i=new mxJSColor.URI(e[n].src).toAbsolute(t);return i.path=i.path.replace(/[^\/]+$/,""),i.query=null,i.fragment=null,i.toString()}return!1},preload:function(){for(var t in mxJSColor.imgRequire)mxJSColor.imgRequire.hasOwnProperty(t)&&mxJSColor.loadImage(t)},images:{pad:[181,101],sld:[16,101],cross:[15,15],arrow:[7,11]},imgRequire:{},imgLoaded:{},requireImage:function(t){mxJSColor.imgRequire[t]=!0},loadImage:function(t){mxJSColor.imgLoaded[t]||(mxJSColor.imgLoaded[t]=new Image,mxJSColor.imgLoaded[t].src=mxJSColor.getDir()+t)},fetchElement:function(t){return"string"==typeof t?document.getElementById(t):t},addEvent:function(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)},fireEvent:function(t,e){var n;t&&(document.createEvent?((n=document.createEvent("HTMLEvents")).initEvent(e,!0,!0),t.dispatchEvent(n)):document.createEventObject?(n=document.createEventObject(),t.fireEvent("on"+e,n)):t["on"+e]&&t["on"+e]())},getElementPos:function(t){var e=t,n=t,i=0,l=0;if(e.offsetParent)for(;i+=e.offsetLeft,l+=e.offsetTop,e=e.offsetParent;);for(;(n=n.parentNode)&&"BODY"!==n.nodeName.toUpperCase();)i-=n.scrollLeft,l-=n.scrollTop;return[i,l]},getElementSize:function(t){return[t.offsetWidth,t.offsetHeight]},getRelMousePos:function(t){var e=0,n=0;return"number"==typeof(t=t||window.event).offsetX?(e=t.offsetX,n=t.offsetY):"number"==typeof t.layerX&&(e=t.layerX,n=t.layerY),{x:e,y:n}},getViewPos:function(){return"number"==typeof window.pageYOffset?[window.pageXOffset,window.pageYOffset]:document.body&&(document.body.scrollLeft||document.body.scrollTop)?[document.body.scrollLeft,document.body.scrollTop]:document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)?[document.documentElement.scrollLeft,document.documentElement.scrollTop]:[0,0]},getViewSize:function(){return"number"==typeof window.innerWidth?[window.innerWidth,window.innerHeight]:document.body&&(document.body.clientWidth||document.body.clientHeight)?[document.body.clientWidth,document.body.clientHeight]:document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?[document.documentElement.clientWidth,document.documentElement.clientHeight]:[0,0]},URI:function(t){function i(t){for(var e,n="";t;)"../"===t.substr(0,3)||"./"===t.substr(0,2)?t=t.replace(/^\.+/,"").substr(1):"/./"===t.substr(0,3)||"/."===t?t="/"+t.substr(3):"/../"===t.substr(0,4)||"/.."===t?(t="/"+t.substr(4),n=n.replace(/\/?[^\/]*$/,"")):"."===t||".."===t?t="":(e=t.match(/^\/?[^\/]*/)[0],t=t.substr(e.length),n+=e);return n}this.scheme=null,this.authority=null,this.path="",this.query=null,this.fragment=null,this.parse=function(t){t=t.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);return this.scheme=t[3]?t[2]:null,this.authority=t[5]?t[6]:null,this.path=t[7],this.query=t[9]?t[10]:null,this.fragment=t[12]?